diff --git a/EventarcPublishing/src/V1/Client/PublisherClient.php b/EventarcPublishing/src/V1/Client/PublisherClient.php index 08b94a2150dc..41bd5240f863 100644 --- a/EventarcPublishing/src/V1/Client/PublisherClient.php +++ b/EventarcPublishing/src/V1/Client/PublisherClient.php @@ -39,6 +39,7 @@ use Google\Cloud\Eventarc\Publishing\V1\PublishResponse; use Google\Protobuf\Any; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Eventarc processes events generated by an event provider and delivers them to @@ -168,6 +169,9 @@ private static function getClientDefaults() * @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 * } * * @throws ValidationException diff --git a/Filestore/src/V1/Client/CloudFilestoreManagerClient.php b/Filestore/src/V1/Client/CloudFilestoreManagerClient.php index 0b16c2797297..f31e9e53f663 100644 --- a/Filestore/src/V1/Client/CloudFilestoreManagerClient.php +++ b/Filestore/src/V1/Client/CloudFilestoreManagerClient.php @@ -57,6 +57,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Configures and manages Filestore resources. @@ -294,14 +295,14 @@ public static function snapshotName(string $project, string $location, string $i * 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 + * @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 + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -356,6 +357,9 @@ public static function parseName(string $formattedName, string $template = null) * @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 * } * * @throws ValidationException diff --git a/Firestore/src/Admin/V1/Client/FirestoreAdminClient.php b/Firestore/src/Admin/V1/Client/FirestoreAdminClient.php index 93557144d22f..810ab21ebe42 100644 --- a/Firestore/src/Admin/V1/Client/FirestoreAdminClient.php +++ b/Firestore/src/Admin/V1/Client/FirestoreAdminClient.php @@ -72,6 +72,7 @@ use Google\Cloud\Firestore\Admin\V1\UpdateFieldRequest; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The Cloud Firestore Admin API. @@ -403,14 +404,14 @@ public static function projectName(string $project): string * 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 + * @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 + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -465,6 +466,9 @@ public static function parseName(string $formattedName, string $template = null) * @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 * } * * @throws ValidationException diff --git a/Firestore/src/V1/Client/FirestoreClient.php b/Firestore/src/V1/Client/FirestoreClient.php index 7d0cacc33b8e..d01224d6120d 100644 --- a/Firestore/src/V1/Client/FirestoreClient.php +++ b/Firestore/src/V1/Client/FirestoreClient.php @@ -54,6 +54,7 @@ use Google\Cloud\Firestore\V1\UpdateDocumentRequest; use Google\Cloud\Firestore\V1\Write; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The Cloud Firestore service. @@ -178,6 +179,9 @@ private static function getClientDefaults() * @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 * } * * @throws ValidationException diff --git a/Functions/src/V2/Client/FunctionServiceClient.php b/Functions/src/V2/Client/FunctionServiceClient.php index 503d78f08142..c0d91c5767f6 100644 --- a/Functions/src/V2/Client/FunctionServiceClient.php +++ b/Functions/src/V2/Client/FunctionServiceClient.php @@ -55,6 +55,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Google Cloud Functions is used to deploy functions that are executed by @@ -412,14 +413,14 @@ public static function workerPoolName(string $project, string $location, string * 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 + * @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 + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -474,6 +475,9 @@ public static function parseName(string $formattedName, string $template = null) * @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 * } * * @throws ValidationException diff --git a/GSuiteAddOns/src/V1/Client/GSuiteAddOnsClient.php b/GSuiteAddOns/src/V1/Client/GSuiteAddOnsClient.php index c62f07c0921d..1f671ec86585 100644 --- a/GSuiteAddOns/src/V1/Client/GSuiteAddOnsClient.php +++ b/GSuiteAddOns/src/V1/Client/GSuiteAddOnsClient.php @@ -46,6 +46,7 @@ use Google\Cloud\GSuiteAddOns\V1\ReplaceDeploymentRequest; use Google\Cloud\GSuiteAddOns\V1\UninstallDeploymentRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: A service for managing Google Workspace Add-ons deployments. @@ -220,14 +221,14 @@ public static function projectName(string $project): string * 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 + * @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 + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -282,6 +283,9 @@ public static function parseName(string $formattedName, string $template = null) * @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 * } * * @throws ValidationException diff --git a/GkeBackup/src/V1/Client/BackupForGKEClient.php b/GkeBackup/src/V1/Client/BackupForGKEClient.php index 4f63f25e443e..14f729833b8e 100644 --- a/GkeBackup/src/V1/Client/BackupForGKEClient.php +++ b/GkeBackup/src/V1/Client/BackupForGKEClient.php @@ -77,6 +77,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: BackupForGKE allows Kubernetes administrators to configure, execute, and @@ -432,14 +433,14 @@ public static function volumeRestoreName( * 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 + * @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 + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -494,6 +495,9 @@ public static function parseName(string $formattedName, string $template = null) * @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 * } * * @throws ValidationException diff --git a/GkeConnectGateway/src/V1/Client/GatewayControlClient.php b/GkeConnectGateway/src/V1/Client/GatewayControlClient.php index 54a61010a7da..6ac0651528f7 100644 --- a/GkeConnectGateway/src/V1/Client/GatewayControlClient.php +++ b/GkeConnectGateway/src/V1/Client/GatewayControlClient.php @@ -34,6 +34,7 @@ use Google\Cloud\GkeConnect\Gateway\V1\GenerateCredentialsRequest; use Google\Cloud\GkeConnect\Gateway\V1\GenerateCredentialsResponse; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: GatewayControl is the control plane API for Connect Gateway. @@ -151,6 +152,9 @@ private static function supportedTransports() * @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 * } * * @throws ValidationException diff --git a/GkeConnectGateway/src/V1beta1/Client/GatewayControlClient.php b/GkeConnectGateway/src/V1beta1/Client/GatewayControlClient.php index 5987844c13a9..6234da984ceb 100644 --- a/GkeConnectGateway/src/V1beta1/Client/GatewayControlClient.php +++ b/GkeConnectGateway/src/V1beta1/Client/GatewayControlClient.php @@ -36,6 +36,7 @@ use Google\Cloud\GkeConnect\Gateway\V1beta1\GenerateCredentialsRequest; use Google\Cloud\GkeConnect\Gateway\V1beta1\GenerateCredentialsResponse; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: GatewayControl is the control plane API for Connect Gateway. @@ -155,6 +156,9 @@ private static function supportedTransports() * @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 * } * * @throws ValidationException diff --git a/GkeHub/src/V1/Client/GkeHubClient.php b/GkeHub/src/V1/Client/GkeHubClient.php index 322bf25b0819..37dd76e56d46 100644 --- a/GkeHub/src/V1/Client/GkeHubClient.php +++ b/GkeHub/src/V1/Client/GkeHubClient.php @@ -51,6 +51,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The GKE Hub service handles the registration of many Kubernetes clusters to @@ -258,14 +259,14 @@ public static function membershipName(string $project, string $location, string * 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 + * @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 + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -320,6 +321,9 @@ public static function parseName(string $formattedName, string $template = null) * @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 * } * * @throws ValidationException diff --git a/GkeMultiCloud/src/V1/Client/AttachedClustersClient.php b/GkeMultiCloud/src/V1/Client/AttachedClustersClient.php index f36160558dbd..4504036fdf2d 100644 --- a/GkeMultiCloud/src/V1/Client/AttachedClustersClient.php +++ b/GkeMultiCloud/src/V1/Client/AttachedClustersClient.php @@ -50,6 +50,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The AttachedClusters API provides a single centrally managed service @@ -239,14 +240,14 @@ public static function locationName(string $project, string $location): string * 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 + * @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 + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -301,6 +302,9 @@ public static function parseName(string $formattedName, string $template = null) * @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 * } * * @throws ValidationException diff --git a/GkeMultiCloud/src/V1/Client/AwsClustersClient.php b/GkeMultiCloud/src/V1/Client/AwsClustersClient.php index 31631c08b49d..106616a1f96c 100644 --- a/GkeMultiCloud/src/V1/Client/AwsClustersClient.php +++ b/GkeMultiCloud/src/V1/Client/AwsClustersClient.php @@ -60,6 +60,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The AwsClusters API provides a single centrally managed service @@ -281,14 +282,14 @@ public static function locationName(string $project, string $location): string * 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 + * @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 + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -343,6 +344,9 @@ public static function parseName(string $formattedName, string $template = null) * @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 * } * * @throws ValidationException diff --git a/GkeMultiCloud/src/V1/Client/AzureClustersClient.php b/GkeMultiCloud/src/V1/Client/AzureClustersClient.php index 3d33c75e4705..8f058a1e5af8 100644 --- a/GkeMultiCloud/src/V1/Client/AzureClustersClient.php +++ b/GkeMultiCloud/src/V1/Client/AzureClustersClient.php @@ -64,6 +64,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The AzureClusters API provides a single centrally managed service @@ -308,14 +309,14 @@ public static function locationName(string $project, string $location): string * 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 + * @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 + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -370,6 +371,9 @@ public static function parseName(string $formattedName, string $template = null) * @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 * } * * @throws ValidationException diff --git a/Grafeas/src/V1/Client/GrafeasClient.php b/Grafeas/src/V1/Client/GrafeasClient.php index 9373677f819e..c308aa71ce77 100644 --- a/Grafeas/src/V1/Client/GrafeasClient.php +++ b/Grafeas/src/V1/Client/GrafeasClient.php @@ -52,6 +52,7 @@ use Grafeas\V1\UpdateNoteRequest; use Grafeas\V1\UpdateOccurrenceRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: [Grafeas](https://grafeas.io) API. @@ -201,14 +202,14 @@ public static function projectName(string $project): string * 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 + * @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 + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -263,6 +264,9 @@ public static function parseName(string $formattedName, string $template = null) * @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 * } * * @throws ValidationException diff --git a/Iam/src/V2/Client/PoliciesClient.php b/Iam/src/V2/Client/PoliciesClient.php index 24297fc04026..2dbefd5a46c4 100644 --- a/Iam/src/V2/Client/PoliciesClient.php +++ b/Iam/src/V2/Client/PoliciesClient.php @@ -42,6 +42,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: An interface for managing Identity and Access Management (IAM) policies. @@ -202,6 +203,9 @@ private function createOperationsClient(array $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 * } * * @throws ValidationException diff --git a/IamCredentials/src/V1/Client/IAMCredentialsClient.php b/IamCredentials/src/V1/Client/IAMCredentialsClient.php index f4ea4fbd637d..6027f0e75e18 100644 --- a/IamCredentials/src/V1/Client/IAMCredentialsClient.php +++ b/IamCredentials/src/V1/Client/IAMCredentialsClient.php @@ -41,6 +41,7 @@ use Google\Cloud\Iam\Credentials\V1\SignJwtRequest; use Google\Cloud\Iam\Credentials\V1\SignJwtResponse; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: A service account is a special type of Google account that belongs to your @@ -141,14 +142,14 @@ public static function serviceAccountName(string $project, string $serviceAccoun * 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 + * @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 + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -203,6 +204,9 @@ public static function parseName(string $formattedName, string $template = null) * @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 * } * * @throws ValidationException diff --git a/Iap/src/V1/Client/IdentityAwareProxyAdminServiceClient.php b/Iap/src/V1/Client/IdentityAwareProxyAdminServiceClient.php index bb3922da0569..9f74898e5fdf 100644 --- a/Iap/src/V1/Client/IdentityAwareProxyAdminServiceClient.php +++ b/Iap/src/V1/Client/IdentityAwareProxyAdminServiceClient.php @@ -48,6 +48,7 @@ use Google\Cloud\Iap\V1\UpdateIapSettingsRequest; use Google\Cloud\Iap\V1\UpdateTunnelDestGroupRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: APIs for Identity-Aware Proxy Admin configurations. @@ -168,14 +169,14 @@ public static function tunnelLocationName(string $project, string $location): st * 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 + * @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 + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -230,6 +231,9 @@ public static function parseName(string $formattedName, string $template = null) * @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 * } * * @throws ValidationException diff --git a/Iap/src/V1/Client/IdentityAwareProxyOAuthServiceClient.php b/Iap/src/V1/Client/IdentityAwareProxyOAuthServiceClient.php index c16b9e5590da..11cc1b249b92 100644 --- a/Iap/src/V1/Client/IdentityAwareProxyOAuthServiceClient.php +++ b/Iap/src/V1/Client/IdentityAwareProxyOAuthServiceClient.php @@ -44,6 +44,7 @@ use Google\Cloud\Iap\V1\ListIdentityAwareProxyClientsRequest; use Google\Cloud\Iap\V1\ResetIdentityAwareProxyClientSecretRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: API to programmatically create, list and retrieve Identity Aware Proxy (IAP) @@ -159,6 +160,9 @@ private static function getClientDefaults() * @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 * } * * @throws ValidationException diff --git a/Ids/src/V1/Client/IDSClient.php b/Ids/src/V1/Client/IDSClient.php index 55bb0b19957d..c1fc8aefea03 100644 --- a/Ids/src/V1/Client/IDSClient.php +++ b/Ids/src/V1/Client/IDSClient.php @@ -42,6 +42,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The IDS Service @@ -206,14 +207,14 @@ public static function locationName(string $project, string $location): string * 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 + * @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 + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -268,6 +269,9 @@ public static function parseName(string $formattedName, string $template = null) * @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 * } * * @throws ValidationException diff --git a/Kms/src/V1/Client/AutokeyAdminClient.php b/Kms/src/V1/Client/AutokeyAdminClient.php index 6909717f73ce..503a03fdf21d 100644 --- a/Kms/src/V1/Client/AutokeyAdminClient.php +++ b/Kms/src/V1/Client/AutokeyAdminClient.php @@ -47,6 +47,7 @@ use Google\Cloud\Location\ListLocationsRequest; use Google\Cloud\Location\Location; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Provides interfaces for managing [Cloud KMS @@ -167,14 +168,14 @@ public static function projectName(string $project): string * 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 + * @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 + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -229,6 +230,9 @@ public static function parseName(string $formattedName, string $template = null) * @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 * } * * @throws ValidationException diff --git a/Kms/src/V1/Client/AutokeyClient.php b/Kms/src/V1/Client/AutokeyClient.php index 61e914cf9132..d14d3377255c 100644 --- a/Kms/src/V1/Client/AutokeyClient.php +++ b/Kms/src/V1/Client/AutokeyClient.php @@ -49,6 +49,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Provides interfaces for using [Cloud KMS @@ -259,14 +260,14 @@ public static function locationName(string $project, string $location): string * 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 + * @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 + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -321,6 +322,9 @@ public static function parseName(string $formattedName, string $template = null) * @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 * } * * @throws ValidationException diff --git a/Kms/src/V1/Client/EkmServiceClient.php b/Kms/src/V1/Client/EkmServiceClient.php index d926157f8c31..224114af6dfd 100644 --- a/Kms/src/V1/Client/EkmServiceClient.php +++ b/Kms/src/V1/Client/EkmServiceClient.php @@ -52,6 +52,7 @@ use Google\Cloud\Location\ListLocationsRequest; use Google\Cloud\Location\Location; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Google Cloud Key Management EKM Service @@ -219,14 +220,14 @@ public static function serviceName(string $project, string $location, string $na * 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 + * @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 + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -281,6 +282,9 @@ public static function parseName(string $formattedName, string $template = null) * @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 * } * * @throws ValidationException diff --git a/Kms/src/V1/Client/KeyManagementServiceClient.php b/Kms/src/V1/Client/KeyManagementServiceClient.php index 1a3f40e60d09..77ae0e9dcca7 100644 --- a/Kms/src/V1/Client/KeyManagementServiceClient.php +++ b/Kms/src/V1/Client/KeyManagementServiceClient.php @@ -84,6 +84,7 @@ use Google\Cloud\Location\ListLocationsRequest; use Google\Cloud\Location\Location; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Google Cloud Key Management Service @@ -312,14 +313,14 @@ public static function locationName(string $project, string $location): string * 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 + * @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 + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -374,6 +375,9 @@ public static function parseName(string $formattedName, string $template = null) * @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 * } * * @throws ValidationException diff --git a/KmsInventory/src/V1/Client/KeyDashboardServiceClient.php b/KmsInventory/src/V1/Client/KeyDashboardServiceClient.php index 624254c73990..d7f1763a331a 100644 --- a/KmsInventory/src/V1/Client/KeyDashboardServiceClient.php +++ b/KmsInventory/src/V1/Client/KeyDashboardServiceClient.php @@ -35,6 +35,7 @@ use Google\Auth\FetchAuthTokenInterface; use Google\Cloud\Kms\Inventory\V1\ListCryptoKeysRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Provides a cross-region view of all Cloud KMS keys in a given Cloud project. @@ -122,14 +123,14 @@ public static function projectName(string $project): string * 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 + * @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 + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -184,6 +185,9 @@ public static function parseName(string $formattedName, string $template = null) * @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 * } * * @throws ValidationException diff --git a/KmsInventory/src/V1/Client/KeyTrackingServiceClient.php b/KmsInventory/src/V1/Client/KeyTrackingServiceClient.php index f9c2d67300ef..2a824a92b269 100644 --- a/KmsInventory/src/V1/Client/KeyTrackingServiceClient.php +++ b/KmsInventory/src/V1/Client/KeyTrackingServiceClient.php @@ -37,6 +37,7 @@ use Google\Cloud\Kms\Inventory\V1\ProtectedResourcesSummary; use Google\Cloud\Kms\Inventory\V1\SearchProtectedResourcesRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Returns information about the resources in an org that are protected by a @@ -210,14 +211,14 @@ public static function protectedResourcesSummaryName( * 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 + * @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 + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -272,6 +273,9 @@ public static function parseName(string $formattedName, string $template = null) * @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 * } * * @throws ValidationException diff --git a/Language/src/V1/Client/LanguageServiceClient.php b/Language/src/V1/Client/LanguageServiceClient.php index 16b7bf1935f2..ae0c1f66ec5e 100644 --- a/Language/src/V1/Client/LanguageServiceClient.php +++ b/Language/src/V1/Client/LanguageServiceClient.php @@ -46,6 +46,7 @@ use Google\Cloud\Language\V1\ModerateTextRequest; use Google\Cloud\Language\V1\ModerateTextResponse; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Provides text analysis operations such as sentiment analysis and entity @@ -160,6 +161,9 @@ private static function getClientDefaults() * @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 * } * * @throws ValidationException diff --git a/Language/src/V2/Client/LanguageServiceClient.php b/Language/src/V2/Client/LanguageServiceClient.php index 72c51e9835c1..c980b4502c1a 100644 --- a/Language/src/V2/Client/LanguageServiceClient.php +++ b/Language/src/V2/Client/LanguageServiceClient.php @@ -42,6 +42,7 @@ use Google\Cloud\Language\V2\ModerateTextRequest; use Google\Cloud\Language\V2\ModerateTextResponse; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Provides text analysis operations such as sentiment analysis and entity @@ -154,6 +155,9 @@ private static function getClientDefaults() * @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 * } * * @throws ValidationException diff --git a/LifeSciences/src/V2beta/Client/WorkflowsServiceV2BetaClient.php b/LifeSciences/src/V2beta/Client/WorkflowsServiceV2BetaClient.php index e5406b35ed64..eb9346946c1b 100644 --- a/LifeSciences/src/V2beta/Client/WorkflowsServiceV2BetaClient.php +++ b/LifeSciences/src/V2beta/Client/WorkflowsServiceV2BetaClient.php @@ -44,6 +44,7 @@ use Google\Cloud\Location\Location; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: A service for running workflows, such as pipelines consisting of Docker @@ -190,6 +191,9 @@ public function resumeOperation($operationName, $methodName = null) * @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 * } * * @throws ValidationException diff --git a/Logging/src/V2/Client/ConfigServiceV2Client.php b/Logging/src/V2/Client/ConfigServiceV2Client.php index 3a3d8d103770..d1f92bdff4cc 100644 --- a/Logging/src/V2/Client/ConfigServiceV2Client.php +++ b/Logging/src/V2/Client/ConfigServiceV2Client.php @@ -74,6 +74,7 @@ use Google\Cloud\Logging\V2\UpdateViewRequest; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Service for configuring sinks used to route log entries. @@ -1008,14 +1009,14 @@ public static function settingsName(string $project): string * 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 + * @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 + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -1070,6 +1071,9 @@ public static function parseName(string $formattedName, string $template = null) * @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 * } * * @throws ValidationException diff --git a/Logging/src/V2/Client/LoggingServiceV2Client.php b/Logging/src/V2/Client/LoggingServiceV2Client.php index 580f47194275..550acd73b0ea 100644 --- a/Logging/src/V2/Client/LoggingServiceV2Client.php +++ b/Logging/src/V2/Client/LoggingServiceV2Client.php @@ -41,6 +41,7 @@ use Google\Cloud\Logging\V2\WriteLogEntriesRequest; use Google\Cloud\Logging\V2\WriteLogEntriesResponse; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Service for ingesting and querying logs. @@ -276,14 +277,14 @@ public static function projectLogName(string $project, string $log): string * 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 + * @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 + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -338,6 +339,9 @@ public static function parseName(string $formattedName, string $template = null) * @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 * } * * @throws ValidationException diff --git a/Logging/src/V2/Client/MetricsServiceV2Client.php b/Logging/src/V2/Client/MetricsServiceV2Client.php index 375766ac34e8..ecfc1055593f 100644 --- a/Logging/src/V2/Client/MetricsServiceV2Client.php +++ b/Logging/src/V2/Client/MetricsServiceV2Client.php @@ -40,6 +40,7 @@ use Google\Cloud\Logging\V2\LogMetric; use Google\Cloud\Logging\V2\UpdateLogMetricRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Service for configuring logs-based metrics. @@ -155,14 +156,14 @@ public static function projectName(string $project): string * 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 + * @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 + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -217,6 +218,9 @@ public static function parseName(string $formattedName, string $template = null) * @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 * } * * @throws ValidationException diff --git a/LongRunning/src/LongRunning/Client/OperationsClient.php b/LongRunning/src/LongRunning/Client/OperationsClient.php index 2443891b00cc..e275b18af789 100644 --- a/LongRunning/src/LongRunning/Client/OperationsClient.php +++ b/LongRunning/src/LongRunning/Client/OperationsClient.php @@ -39,6 +39,7 @@ use Google\LongRunning\Operation; use Google\LongRunning\WaitOperationRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Manages long-running operations with an API service. @@ -155,6 +156,9 @@ private static function getClientDefaults() * @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 * } * * @throws ValidationException diff --git a/owl-bot-staging/EventarcPublishing/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/Publishing/V1/CloudEvent.php b/owl-bot-staging/EventarcPublishing/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/Publishing/V1/CloudEvent.php deleted file mode 100644 index 406503720aea..000000000000 Binary files a/owl-bot-staging/EventarcPublishing/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/Publishing/V1/CloudEvent.php and /dev/null differ diff --git a/owl-bot-staging/EventarcPublishing/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/Publishing/V1/Publisher.php b/owl-bot-staging/EventarcPublishing/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/Publishing/V1/Publisher.php deleted file mode 100644 index e9952863ea77..000000000000 Binary files a/owl-bot-staging/EventarcPublishing/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/Publishing/V1/Publisher.php and /dev/null differ diff --git a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/CloudEvent.php b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/CloudEvent.php deleted file mode 100644 index 59178671d8c9..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/CloudEvent.php +++ /dev/null @@ -1,328 +0,0 @@ -google.cloud.eventarc.publishing.v1.CloudEvent - */ -class CloudEvent extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Identifies the event. Producers MUST ensure that source + id is - * unique for each distinct event. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $id = ''; - /** - * Required. Identifies the context in which an event happened. - * URI-reference - * - * Generated from protobuf field string source = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source = ''; - /** - * Required. The version of the CloudEvents specification which the event - * uses. - * - * Generated from protobuf field string spec_version = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $spec_version = ''; - /** - * Required. This attribute contains a value describing the type of event - * related to the originating occurrence. - * - * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = ''; - /** - * Optional. Used for Optional & Extension Attributes - * - * Generated from protobuf field map attributes = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $attributes; - protected $data; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Required. Identifies the event. Producers MUST ensure that source + id is - * unique for each distinct event. - * @type string $source - * Required. Identifies the context in which an event happened. - * URI-reference - * @type string $spec_version - * Required. The version of the CloudEvents specification which the event - * uses. - * @type string $type - * Required. This attribute contains a value describing the type of event - * related to the originating occurrence. - * @type array|\Google\Protobuf\Internal\MapField $attributes - * Optional. Used for Optional & Extension Attributes - * @type string $binary_data - * Optional. Binary data. - * @type string $text_data - * Optional. Text data. - * @type \Google\Protobuf\Any $proto_data - * Optional. Proto data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\Publishing\V1\CloudEvent::initOnce(); - parent::__construct($data); - } - - /** - * Required. Identifies the event. Producers MUST ensure that source + id is - * unique for each distinct event. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Required. Identifies the event. Producers MUST ensure that source + id is - * unique for each distinct event. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Required. Identifies the context in which an event happened. - * URI-reference - * - * Generated from protobuf field string source = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSource() - { - return $this->source; - } - - /** - * Required. Identifies the context in which an event happened. - * URI-reference - * - * Generated from protobuf field string source = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkString($var, True); - $this->source = $var; - - return $this; - } - - /** - * Required. The version of the CloudEvents specification which the event - * uses. - * - * Generated from protobuf field string spec_version = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSpecVersion() - { - return $this->spec_version; - } - - /** - * Required. The version of the CloudEvents specification which the event - * uses. - * - * Generated from protobuf field string spec_version = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSpecVersion($var) - { - GPBUtil::checkString($var, True); - $this->spec_version = $var; - - return $this; - } - - /** - * Required. This attribute contains a value describing the type of event - * related to the originating occurrence. - * - * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Required. This attribute contains a value describing the type of event - * related to the originating occurrence. - * - * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Optional. Used for Optional & Extension Attributes - * - * Generated from protobuf field map attributes = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * Optional. Used for Optional & Extension Attributes - * - * Generated from protobuf field map attributes = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAttributes($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\Publishing\V1\CloudEvent\CloudEventAttributeValue::class); - $this->attributes = $arr; - - return $this; - } - - /** - * Optional. Binary data. - * - * Generated from protobuf field bytes binary_data = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getBinaryData() - { - return $this->readOneof(6); - } - - public function hasBinaryData() - { - return $this->hasOneof(6); - } - - /** - * Optional. Binary data. - * - * Generated from protobuf field bytes binary_data = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setBinaryData($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Optional. Text data. - * - * Generated from protobuf field string text_data = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTextData() - { - return $this->readOneof(7); - } - - public function hasTextData() - { - return $this->hasOneof(7); - } - - /** - * Optional. Text data. - * - * Generated from protobuf field string text_data = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTextData($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Optional. Proto data. - * - * Generated from protobuf field .google.protobuf.Any proto_data = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Any|null - */ - public function getProtoData() - { - return $this->readOneof(8); - } - - public function hasProtoData() - { - return $this->hasOneof(8); - } - - /** - * Optional. Proto data. - * - * Generated from protobuf field .google.protobuf.Any proto_data = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Any $var - * @return $this - */ - public function setProtoData($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * @return string - */ - public function getData() - { - return $this->whichOneof("data"); - } - -} - diff --git a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/CloudEvent/CloudEventAttributeValue.php b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/CloudEvent/CloudEventAttributeValue.php deleted file mode 100644 index 3a83adbd311d..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/CloudEvent/CloudEventAttributeValue.php +++ /dev/null @@ -1,276 +0,0 @@ -google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue - */ -class CloudEventAttributeValue extends \Google\Protobuf\Internal\Message -{ - protected $attr; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $ce_boolean - * Boolean value. - * @type int $ce_integer - * Integer value. - * @type string $ce_string - * String value. - * @type string $ce_bytes - * Bytes value. - * @type string $ce_uri - * URI value. - * @type string $ce_uri_ref - * URI-reference value. - * @type \Google\Protobuf\Timestamp $ce_timestamp - * Timestamp value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\Publishing\V1\CloudEvent::initOnce(); - parent::__construct($data); - } - - /** - * Boolean value. - * - * Generated from protobuf field bool ce_boolean = 1; - * @return bool - */ - public function getCeBoolean() - { - return $this->readOneof(1); - } - - public function hasCeBoolean() - { - return $this->hasOneof(1); - } - - /** - * Boolean value. - * - * Generated from protobuf field bool ce_boolean = 1; - * @param bool $var - * @return $this - */ - public function setCeBoolean($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Integer value. - * - * Generated from protobuf field int32 ce_integer = 2; - * @return int - */ - public function getCeInteger() - { - return $this->readOneof(2); - } - - public function hasCeInteger() - { - return $this->hasOneof(2); - } - - /** - * Integer value. - * - * Generated from protobuf field int32 ce_integer = 2; - * @param int $var - * @return $this - */ - public function setCeInteger($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * String value. - * - * Generated from protobuf field string ce_string = 3; - * @return string - */ - public function getCeString() - { - return $this->readOneof(3); - } - - public function hasCeString() - { - return $this->hasOneof(3); - } - - /** - * String value. - * - * Generated from protobuf field string ce_string = 3; - * @param string $var - * @return $this - */ - public function setCeString($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Bytes value. - * - * Generated from protobuf field bytes ce_bytes = 4; - * @return string - */ - public function getCeBytes() - { - return $this->readOneof(4); - } - - public function hasCeBytes() - { - return $this->hasOneof(4); - } - - /** - * Bytes value. - * - * Generated from protobuf field bytes ce_bytes = 4; - * @param string $var - * @return $this - */ - public function setCeBytes($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * URI value. - * - * Generated from protobuf field string ce_uri = 5; - * @return string - */ - public function getCeUri() - { - return $this->readOneof(5); - } - - public function hasCeUri() - { - return $this->hasOneof(5); - } - - /** - * URI value. - * - * Generated from protobuf field string ce_uri = 5; - * @param string $var - * @return $this - */ - public function setCeUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * URI-reference value. - * - * Generated from protobuf field string ce_uri_ref = 6; - * @return string - */ - public function getCeUriRef() - { - return $this->readOneof(6); - } - - public function hasCeUriRef() - { - return $this->hasOneof(6); - } - - /** - * URI-reference value. - * - * Generated from protobuf field string ce_uri_ref = 6; - * @param string $var - * @return $this - */ - public function setCeUriRef($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Timestamp value. - * - * Generated from protobuf field .google.protobuf.Timestamp ce_timestamp = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCeTimestamp() - { - return $this->readOneof(7); - } - - public function hasCeTimestamp() - { - return $this->hasOneof(7); - } - - /** - * Timestamp value. - * - * Generated from protobuf field .google.protobuf.Timestamp ce_timestamp = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCeTimestamp($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * @return string - */ - public function getAttr() - { - return $this->whichOneof("attr"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CloudEventAttributeValue::class, \Google\Cloud\Eventarc\Publishing\V1\CloudEvent_CloudEventAttributeValue::class); - diff --git a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishChannelConnectionEventsRequest.php b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishChannelConnectionEventsRequest.php deleted file mode 100644 index 79180267cebb..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishChannelConnectionEventsRequest.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - */ -class PublishChannelConnectionEventsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The channel_connection that the events are published from. For example: - * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. - * - * Generated from protobuf field string channel_connection = 1; - */ - protected $channel_connection = ''; - /** - * The CloudEvents v1.0 events to publish. No other types are allowed. - * If this field is set, then the `text_events` fields must not be set. - * - * Generated from protobuf field repeated .google.protobuf.Any events = 2; - */ - private $events; - /** - * The text representation of events to publish. - * CloudEvent v1.0 in JSON format is the only allowed type. Refer to - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * for specification. - * If this field is set, then the `events` fields must not be set. - * - * Generated from protobuf field repeated string text_events = 3; - */ - private $text_events; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $channel_connection - * The channel_connection that the events are published from. For example: - * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. - * @type array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $events - * The CloudEvents v1.0 events to publish. No other types are allowed. - * If this field is set, then the `text_events` fields must not be set. - * @type array|\Google\Protobuf\Internal\RepeatedField $text_events - * The text representation of events to publish. - * CloudEvent v1.0 in JSON format is the only allowed type. Refer to - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * for specification. - * If this field is set, then the `events` fields must not be set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\Publishing\V1\Publisher::initOnce(); - parent::__construct($data); - } - - /** - * The channel_connection that the events are published from. For example: - * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. - * - * Generated from protobuf field string channel_connection = 1; - * @return string - */ - public function getChannelConnection() - { - return $this->channel_connection; - } - - /** - * The channel_connection that the events are published from. For example: - * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. - * - * Generated from protobuf field string channel_connection = 1; - * @param string $var - * @return $this - */ - public function setChannelConnection($var) - { - GPBUtil::checkString($var, True); - $this->channel_connection = $var; - - return $this; - } - - /** - * The CloudEvents v1.0 events to publish. No other types are allowed. - * If this field is set, then the `text_events` fields must not be set. - * - * Generated from protobuf field repeated .google.protobuf.Any events = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEvents() - { - return $this->events; - } - - /** - * The CloudEvents v1.0 events to publish. No other types are allowed. - * If this field is set, then the `text_events` fields must not be set. - * - * Generated from protobuf field repeated .google.protobuf.Any events = 2; - * @param array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class); - $this->events = $arr; - - return $this; - } - - /** - * The text representation of events to publish. - * CloudEvent v1.0 in JSON format is the only allowed type. Refer to - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * for specification. - * If this field is set, then the `events` fields must not be set. - * - * Generated from protobuf field repeated string text_events = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTextEvents() - { - return $this->text_events; - } - - /** - * The text representation of events to publish. - * CloudEvent v1.0 in JSON format is the only allowed type. Refer to - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * for specification. - * If this field is set, then the `events` fields must not be set. - * - * Generated from protobuf field repeated string text_events = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTextEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->text_events = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishChannelConnectionEventsResponse.php b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishChannelConnectionEventsResponse.php deleted file mode 100644 index 6a7494facfc6..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishChannelConnectionEventsResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse - */ -class PublishChannelConnectionEventsResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\Publishing\V1\Publisher::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishEventsRequest.php b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishEventsRequest.php deleted file mode 100644 index f5c6a6cfa164..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishEventsRequest.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.eventarc.publishing.v1.PublishEventsRequest - */ -class PublishEventsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The full name of the channel to publish to. For example: - * `projects/{project}/locations/{location}/channels/{channel-id}`. - * - * Generated from protobuf field string channel = 1; - */ - protected $channel = ''; - /** - * The CloudEvents v1.0 events to publish. No other types are allowed. - * If this field is set, then the `text_events` fields must not be set. - * - * Generated from protobuf field repeated .google.protobuf.Any events = 2; - */ - private $events; - /** - * The text representation of events to publish. - * CloudEvent v1.0 in JSON format is the only allowed type. Refer to - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * for specification. - * If this field is set, then the `events` fields must not be set. - * - * Generated from protobuf field repeated string text_events = 3; - */ - private $text_events; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $channel - * The full name of the channel to publish to. For example: - * `projects/{project}/locations/{location}/channels/{channel-id}`. - * @type array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $events - * The CloudEvents v1.0 events to publish. No other types are allowed. - * If this field is set, then the `text_events` fields must not be set. - * @type array|\Google\Protobuf\Internal\RepeatedField $text_events - * The text representation of events to publish. - * CloudEvent v1.0 in JSON format is the only allowed type. Refer to - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * for specification. - * If this field is set, then the `events` fields must not be set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\Publishing\V1\Publisher::initOnce(); - parent::__construct($data); - } - - /** - * The full name of the channel to publish to. For example: - * `projects/{project}/locations/{location}/channels/{channel-id}`. - * - * Generated from protobuf field string channel = 1; - * @return string - */ - public function getChannel() - { - return $this->channel; - } - - /** - * The full name of the channel to publish to. For example: - * `projects/{project}/locations/{location}/channels/{channel-id}`. - * - * Generated from protobuf field string channel = 1; - * @param string $var - * @return $this - */ - public function setChannel($var) - { - GPBUtil::checkString($var, True); - $this->channel = $var; - - return $this; - } - - /** - * The CloudEvents v1.0 events to publish. No other types are allowed. - * If this field is set, then the `text_events` fields must not be set. - * - * Generated from protobuf field repeated .google.protobuf.Any events = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEvents() - { - return $this->events; - } - - /** - * The CloudEvents v1.0 events to publish. No other types are allowed. - * If this field is set, then the `text_events` fields must not be set. - * - * Generated from protobuf field repeated .google.protobuf.Any events = 2; - * @param array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class); - $this->events = $arr; - - return $this; - } - - /** - * The text representation of events to publish. - * CloudEvent v1.0 in JSON format is the only allowed type. Refer to - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * for specification. - * If this field is set, then the `events` fields must not be set. - * - * Generated from protobuf field repeated string text_events = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTextEvents() - { - return $this->text_events; - } - - /** - * The text representation of events to publish. - * CloudEvent v1.0 in JSON format is the only allowed type. Refer to - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * for specification. - * If this field is set, then the `events` fields must not be set. - * - * Generated from protobuf field repeated string text_events = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTextEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->text_events = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishEventsResponse.php b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishEventsResponse.php deleted file mode 100644 index 4291ac3bfd78..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishEventsResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.eventarc.publishing.v1.PublishEventsResponse - */ -class PublishEventsResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\Publishing\V1\Publisher::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishRequest.php b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishRequest.php deleted file mode 100644 index ce20979caf11..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishRequest.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.eventarc.publishing.v1.PublishRequest - */ -class PublishRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full name of the message bus to publish events to. Format: - * `projects/{project}/locations/{location}/messageBuses/{messageBus}`. - * - * Generated from protobuf field string message_bus = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $message_bus = ''; - protected $format; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $message_bus - * Required. The full name of the message bus to publish events to. Format: - * `projects/{project}/locations/{location}/messageBuses/{messageBus}`. - * @type \Google\Cloud\Eventarc\Publishing\V1\CloudEvent $proto_message - * The Protobuf format of the CloudEvent being published. Specification can - * be found here: - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md - * @type string $json_message - * The JSON format of the CloudEvent being published. Specification can be - * found here: - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * @type string $avro_message - * The Avro format of the CloudEvent being published. Specification can - * be found here: - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\Publishing\V1\Publisher::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full name of the message bus to publish events to. Format: - * `projects/{project}/locations/{location}/messageBuses/{messageBus}`. - * - * Generated from protobuf field string message_bus = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMessageBus() - { - return $this->message_bus; - } - - /** - * Required. The full name of the message bus to publish events to. Format: - * `projects/{project}/locations/{location}/messageBuses/{messageBus}`. - * - * Generated from protobuf field string message_bus = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMessageBus($var) - { - GPBUtil::checkString($var, True); - $this->message_bus = $var; - - return $this; - } - - /** - * The Protobuf format of the CloudEvent being published. Specification can - * be found here: - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md - * - * Generated from protobuf field .google.cloud.eventarc.publishing.v1.CloudEvent proto_message = 2; - * @return \Google\Cloud\Eventarc\Publishing\V1\CloudEvent|null - */ - public function getProtoMessage() - { - return $this->readOneof(2); - } - - public function hasProtoMessage() - { - return $this->hasOneof(2); - } - - /** - * The Protobuf format of the CloudEvent being published. Specification can - * be found here: - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md - * - * Generated from protobuf field .google.cloud.eventarc.publishing.v1.CloudEvent proto_message = 2; - * @param \Google\Cloud\Eventarc\Publishing\V1\CloudEvent $var - * @return $this - */ - public function setProtoMessage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\Publishing\V1\CloudEvent::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The JSON format of the CloudEvent being published. Specification can be - * found here: - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * - * Generated from protobuf field string json_message = 3; - * @return string - */ - public function getJsonMessage() - { - return $this->readOneof(3); - } - - public function hasJsonMessage() - { - return $this->hasOneof(3); - } - - /** - * The JSON format of the CloudEvent being published. Specification can be - * found here: - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * - * Generated from protobuf field string json_message = 3; - * @param string $var - * @return $this - */ - public function setJsonMessage($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The Avro format of the CloudEvent being published. Specification can - * be found here: - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md - * - * Generated from protobuf field bytes avro_message = 4; - * @return string - */ - public function getAvroMessage() - { - return $this->readOneof(4); - } - - public function hasAvroMessage() - { - return $this->hasOneof(4); - } - - /** - * The Avro format of the CloudEvent being published. Specification can - * be found here: - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md - * - * Generated from protobuf field bytes avro_message = 4; - * @param string $var - * @return $this - */ - public function setAvroMessage($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getFormat() - { - return $this->whichOneof("format"); - } - -} - diff --git a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishResponse.php b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishResponse.php deleted file mode 100644 index 76e083aea440..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.eventarc.publishing.v1.PublishResponse - */ -class PublishResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\Publishing\V1\Publisher::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish.php b/owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish.php deleted file mode 100644 index 80fce160f988..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish.php +++ /dev/null @@ -1,71 +0,0 @@ -setMessageBus($messageBus); - - // Call the API and handle any network failures. - try { - /** @var PublishResponse $response */ - $response = $publisherClient->publish($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 -{ - $messageBus = '[MESSAGE_BUS]'; - - publish_sample($messageBus); -} -// [END eventarcpublishing_v1_generated_Publisher_Publish_sync] diff --git a/owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish_channel_connection_events.php b/owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish_channel_connection_events.php deleted file mode 100644 index db010040dcc7..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish_channel_connection_events.php +++ /dev/null @@ -1,57 +0,0 @@ -publishChannelConnectionEvents($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_sync] diff --git a/owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish_events.php b/owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish_events.php deleted file mode 100644 index 0aacdb5f12e3..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish_events.php +++ /dev/null @@ -1,57 +0,0 @@ -publishEvents($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END eventarcpublishing_v1_generated_Publisher_PublishEvents_sync] diff --git a/owl-bot-staging/EventarcPublishing/v1/src/V1/Client/PublisherClient.php b/owl-bot-staging/EventarcPublishing/v1/src/V1/Client/PublisherClient.php deleted file mode 100644 index 76a0e77289e6..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/src/V1/Client/PublisherClient.php +++ /dev/null @@ -1,276 +0,0 @@ - publishAsync(PublishRequest $request, array $optionalArgs = []) - * @method PromiseInterface publishChannelConnectionEventsAsync(PublishChannelConnectionEventsRequest $request, array $optionalArgs = []) - * @method PromiseInterface publishEventsAsync(PublishEventsRequest $request, array $optionalArgs = []) - */ -final class PublisherClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.eventarc.publishing.v1.Publisher'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'eventarcpublishing.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'eventarcpublishing.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', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/publisher_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/publisher_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/publisher_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/publisher_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $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 'eventarcpublishing.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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); - } - - /** - * Publish events to a message bus. - * - * The async variant is {@see PublisherClient::publishAsync()} . - * - * @example samples/V1/PublisherClient/publish.php - * - * @param PublishRequest $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 PublishResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function publish(PublishRequest $request, array $callOptions = []): PublishResponse - { - return $this->startApiCall('Publish', $request, $callOptions)->wait(); - } - - /** - * Publish events to a ChannelConnection in a partner's project. - * - * The async variant is - * {@see PublisherClient::publishChannelConnectionEventsAsync()} . - * - * @example samples/V1/PublisherClient/publish_channel_connection_events.php - * - * @param PublishChannelConnectionEventsRequest $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 PublishChannelConnectionEventsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function publishChannelConnectionEvents(PublishChannelConnectionEventsRequest $request, array $callOptions = []): PublishChannelConnectionEventsResponse - { - return $this->startApiCall('PublishChannelConnectionEvents', $request, $callOptions)->wait(); - } - - /** - * Publish events to a subscriber's channel. - * - * The async variant is {@see PublisherClient::publishEventsAsync()} . - * - * @example samples/V1/PublisherClient/publish_events.php - * - * @param PublishEventsRequest $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 PublishEventsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function publishEvents(PublishEventsRequest $request, array $callOptions = []): PublishEventsResponse - { - return $this->startApiCall('PublishEvents', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/EventarcPublishing/v1/src/V1/gapic_metadata.json b/owl-bot-staging/EventarcPublishing/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 8c15efbe6be4..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.eventarc.publishing.v1", - "libraryPackage": "Google\\Cloud\\Eventarc\\Publishing\\V1", - "services": { - "Publisher": { - "clients": { - "grpc": { - "libraryClient": "PublisherGapicClient", - "rpcs": { - "Publish": { - "methods": [ - "publish" - ] - }, - "PublishChannelConnectionEvents": { - "methods": [ - "publishChannelConnectionEvents" - ] - }, - "PublishEvents": { - "methods": [ - "publishEvents" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/EventarcPublishing/v1/src/V1/resources/publisher_client_config.json b/owl-bot-staging/EventarcPublishing/v1/src/V1/resources/publisher_client_config.json deleted file mode 100644 index 8e360d5b8878..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/src/V1/resources/publisher_client_config.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "interfaces": { - "google.cloud.eventarc.publishing.v1.Publisher": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [] - }, - "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 - } - }, - "methods": { - "Publish": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "PublishChannelConnectionEvents": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "PublishEvents": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/EventarcPublishing/v1/src/V1/resources/publisher_descriptor_config.php b/owl-bot-staging/EventarcPublishing/v1/src/V1/resources/publisher_descriptor_config.php deleted file mode 100644 index bff99c08e674..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/src/V1/resources/publisher_descriptor_config.php +++ /dev/null @@ -1,64 +0,0 @@ - [ - 'google.cloud.eventarc.publishing.v1.Publisher' => [ - 'Publish' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Eventarc\Publishing\V1\PublishResponse', - 'headerParams' => [ - [ - 'keyName' => 'message_bus', - 'fieldAccessors' => [ - 'getMessageBus', - ], - ], - ], - ], - 'PublishChannelConnectionEvents' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Eventarc\Publishing\V1\PublishChannelConnectionEventsResponse', - 'headerParams' => [ - [ - 'keyName' => 'channel_connection', - 'fieldAccessors' => [ - 'getChannelConnection', - ], - ], - ], - ], - 'PublishEvents' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Eventarc\Publishing\V1\PublishEventsResponse', - 'headerParams' => [ - [ - 'keyName' => 'channel', - 'fieldAccessors' => [ - 'getChannel', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/EventarcPublishing/v1/src/V1/resources/publisher_rest_client_config.php b/owl-bot-staging/EventarcPublishing/v1/src/V1/resources/publisher_rest_client_config.php deleted file mode 100644 index 5730c0aa7b57..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/src/V1/resources/publisher_rest_client_config.php +++ /dev/null @@ -1,65 +0,0 @@ - [ - 'google.cloud.eventarc.publishing.v1.Publisher' => [ - 'Publish' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{message_bus=projects/*/locations/*/messageBuses/*}:publish', - 'body' => '*', - 'placeholders' => [ - 'message_bus' => [ - 'getters' => [ - 'getMessageBus', - ], - ], - ], - ], - 'PublishChannelConnectionEvents' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{channel_connection=projects/*/locations/*/channelConnections/*}:publishEvents', - 'body' => '*', - 'placeholders' => [ - 'channel_connection' => [ - 'getters' => [ - 'getChannelConnection', - ], - ], - ], - ], - 'PublishEvents' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{channel=projects/*/locations/*/channels/*}:publishEvents', - 'body' => '*', - 'placeholders' => [ - 'channel' => [ - 'getters' => [ - 'getChannel', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/EventarcPublishing/v1/tests/Unit/V1/Client/PublisherClientTest.php b/owl-bot-staging/EventarcPublishing/v1/tests/Unit/V1/Client/PublisherClientTest.php deleted file mode 100644 index 95da35ac2278..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/tests/Unit/V1/Client/PublisherClientTest.php +++ /dev/null @@ -1,263 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return PublisherClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new PublisherClient($options); - } - - /** @test */ - public function publishTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new PublishResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $messageBus = 'messageBus-872787384'; - $request = (new PublishRequest()) - ->setMessageBus($messageBus); - $response = $gapicClient->publish($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.eventarc.publishing.v1.Publisher/Publish', $actualFuncCall); - $actualValue = $actualRequestObject->getMessageBus(); - $this->assertProtobufEquals($messageBus, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function publishExceptionTest() - { - $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 - $messageBus = 'messageBus-872787384'; - $request = (new PublishRequest()) - ->setMessageBus($messageBus); - try { - $gapicClient->publish($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 publishChannelConnectionEventsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new PublishChannelConnectionEventsResponse(); - $transport->addResponse($expectedResponse); - $request = new PublishChannelConnectionEventsRequest(); - $response = $gapicClient->publishChannelConnectionEvents($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.eventarc.publishing.v1.Publisher/PublishChannelConnectionEvents', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function publishChannelConnectionEventsExceptionTest() - { - $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 PublishChannelConnectionEventsRequest(); - try { - $gapicClient->publishChannelConnectionEvents($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 publishEventsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new PublishEventsResponse(); - $transport->addResponse($expectedResponse); - $request = new PublishEventsRequest(); - $response = $gapicClient->publishEvents($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.eventarc.publishing.v1.Publisher/PublishEvents', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function publishEventsExceptionTest() - { - $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 PublishEventsRequest(); - try { - $gapicClient->publishEvents($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 publishAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new PublishResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $messageBus = 'messageBus-872787384'; - $request = (new PublishRequest()) - ->setMessageBus($messageBus); - $response = $gapicClient->publishAsync($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.eventarc.publishing.v1.Publisher/Publish', $actualFuncCall); - $actualValue = $actualRequestObject->getMessageBus(); - $this->assertProtobufEquals($messageBus, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Filestore/v1/proto/src/GPBMetadata/Google/Cloud/Filestore/V1/CloudFilestoreService.php b/owl-bot-staging/Filestore/v1/proto/src/GPBMetadata/Google/Cloud/Filestore/V1/CloudFilestoreService.php deleted file mode 100644 index f08ac0c00d59..000000000000 Binary files a/owl-bot-staging/Filestore/v1/proto/src/GPBMetadata/Google/Cloud/Filestore/V1/CloudFilestoreService.php and /dev/null differ diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup.php deleted file mode 100644 index 6e3a95d681dd..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup.php +++ /dev/null @@ -1,592 +0,0 @@ -google.cloud.filestore.v1.Backup - */ -class Backup extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the backup, in the format - * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * A description of the backup with 2048 characters or less. - * Requests with longer descriptions will be rejected. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Output only. The backup state. - * - * Generated from protobuf field .google.cloud.filestore.v1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time when the backup was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 5; - */ - private $labels; - /** - * Output only. Capacity of the source file share when the backup was created. - * - * Generated from protobuf field int64 capacity_gb = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $capacity_gb = 0; - /** - * Output only. The size of the storage used by the backup. As backups share - * storage, this number is expected to change with backup creation/deletion. - * - * Generated from protobuf field int64 storage_bytes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $storage_bytes = 0; - /** - * The resource name of the source Filestore instance, in the format - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`, - * used to create this backup. - * - * Generated from protobuf field string source_instance = 8 [(.google.api.resource_reference) = { - */ - protected $source_instance = ''; - /** - * Name of the file share in the source Filestore instance that the - * backup is created from. - * - * Generated from protobuf field string source_file_share = 9; - */ - protected $source_file_share = ''; - /** - * Output only. The service tier of the source Filestore instance that this - * backup is created from. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source_instance_tier = 0; - /** - * Output only. Amount of bytes that will be downloaded if the backup is - * restored. This may be different than storage bytes, since sequential - * backups of the same disk will share storage. - * - * Generated from protobuf field int64 download_bytes = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $download_bytes = 0; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzs = null; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzi = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzi = false; - /** - * Immutable. KMS key name used for data encryption. - * - * Generated from protobuf field string kms_key = 13 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $kms_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the backup, in the format - * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. - * @type string $description - * A description of the backup with 2048 characters or less. - * Requests with longer descriptions will be rejected. - * @type int $state - * Output only. The backup state. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the backup was created. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Resource labels to represent user provided metadata. - * @type int|string $capacity_gb - * Output only. Capacity of the source file share when the backup was created. - * @type int|string $storage_bytes - * Output only. The size of the storage used by the backup. As backups share - * storage, this number is expected to change with backup creation/deletion. - * @type string $source_instance - * The resource name of the source Filestore instance, in the format - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`, - * used to create this backup. - * @type string $source_file_share - * Name of the file share in the source Filestore instance that the - * backup is created from. - * @type int $source_instance_tier - * Output only. The service tier of the source Filestore instance that this - * backup is created from. - * @type int|string $download_bytes - * Output only. Amount of bytes that will be downloaded if the backup is - * restored. This may be different than storage bytes, since sequential - * backups of the same disk will share storage. - * @type \Google\Protobuf\BoolValue $satisfies_pzs - * Output only. Reserved for future use. - * @type bool $satisfies_pzi - * Output only. Reserved for future use. - * @type string $kms_key - * Immutable. KMS key name used for data encryption. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the backup, in the format - * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. - * - * 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 of the backup, in the format - * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. - * - * 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; - } - - /** - * A description of the backup with 2048 characters or less. - * Requests with longer descriptions will be rejected. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A description of the backup with 2048 characters or less. - * Requests with longer descriptions will be rejected. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The backup state. - * - * Generated from protobuf field .google.cloud.filestore.v1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The backup state. - * - * Generated from protobuf field .google.cloud.filestore.v1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Filestore\V1\Backup\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time when the backup 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 when the backup 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; - } - - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 5; - * @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; - } - - /** - * Output only. Capacity of the source file share when the backup was created. - * - * Generated from protobuf field int64 capacity_gb = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getCapacityGb() - { - return $this->capacity_gb; - } - - /** - * Output only. Capacity of the source file share when the backup was created. - * - * Generated from protobuf field int64 capacity_gb = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setCapacityGb($var) - { - GPBUtil::checkInt64($var); - $this->capacity_gb = $var; - - return $this; - } - - /** - * Output only. The size of the storage used by the backup. As backups share - * storage, this number is expected to change with backup creation/deletion. - * - * Generated from protobuf field int64 storage_bytes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getStorageBytes() - { - return $this->storage_bytes; - } - - /** - * Output only. The size of the storage used by the backup. As backups share - * storage, this number is expected to change with backup creation/deletion. - * - * Generated from protobuf field int64 storage_bytes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setStorageBytes($var) - { - GPBUtil::checkInt64($var); - $this->storage_bytes = $var; - - return $this; - } - - /** - * The resource name of the source Filestore instance, in the format - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`, - * used to create this backup. - * - * Generated from protobuf field string source_instance = 8 [(.google.api.resource_reference) = { - * @return string - */ - public function getSourceInstance() - { - return $this->source_instance; - } - - /** - * The resource name of the source Filestore instance, in the format - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`, - * used to create this backup. - * - * Generated from protobuf field string source_instance = 8 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSourceInstance($var) - { - GPBUtil::checkString($var, True); - $this->source_instance = $var; - - return $this; - } - - /** - * Name of the file share in the source Filestore instance that the - * backup is created from. - * - * Generated from protobuf field string source_file_share = 9; - * @return string - */ - public function getSourceFileShare() - { - return $this->source_file_share; - } - - /** - * Name of the file share in the source Filestore instance that the - * backup is created from. - * - * Generated from protobuf field string source_file_share = 9; - * @param string $var - * @return $this - */ - public function setSourceFileShare($var) - { - GPBUtil::checkString($var, True); - $this->source_file_share = $var; - - return $this; - } - - /** - * Output only. The service tier of the source Filestore instance that this - * backup is created from. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getSourceInstanceTier() - { - return $this->source_instance_tier; - } - - /** - * Output only. The service tier of the source Filestore instance that this - * backup is created from. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setSourceInstanceTier($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Filestore\V1\Instance\Tier::class); - $this->source_instance_tier = $var; - - return $this; - } - - /** - * Output only. Amount of bytes that will be downloaded if the backup is - * restored. This may be different than storage bytes, since sequential - * backups of the same disk will share storage. - * - * Generated from protobuf field int64 download_bytes = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getDownloadBytes() - { - return $this->download_bytes; - } - - /** - * Output only. Amount of bytes that will be downloaded if the backup is - * restored. This may be different than storage bytes, since sequential - * backups of the same disk will share storage. - * - * Generated from protobuf field int64 download_bytes = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setDownloadBytes($var) - { - GPBUtil::checkInt64($var); - $this->download_bytes = $var; - - return $this; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\BoolValue|null - */ - public function getSatisfiesPzs() - { - return $this->satisfies_pzs; - } - - public function hasSatisfiesPzs() - { - return isset($this->satisfies_pzs); - } - - public function clearSatisfiesPzs() - { - unset($this->satisfies_pzs); - } - - /** - * Returns the unboxed value from getSatisfiesPzs() - - * Output only. Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool|null - */ - public function getSatisfiesPzsUnwrapped() - { - return $this->readWrapperValue("satisfies_pzs"); - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->satisfies_pzs = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Output only. Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool|null $var - * @return $this - */ - public function setSatisfiesPzsUnwrapped($var) - { - $this->writeWrapperValue("satisfies_pzs", $var); - return $this;} - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzi = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzi() - { - return $this->satisfies_pzi; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzi = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzi($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzi = $var; - - return $this; - } - - /** - * Immutable. KMS key name used for data encryption. - * - * Generated from protobuf field string kms_key = 13 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getKmsKey() - { - return $this->kms_key; - } - - /** - * Immutable. KMS key name used for data encryption. - * - * Generated from protobuf field string kms_key = 13 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setKmsKey($var) - { - GPBUtil::checkString($var, True); - $this->kms_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup/State.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup/State.php deleted file mode 100644 index 05658bd4159f..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup/State.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.filestore.v1.Backup.State - */ -class State -{ - /** - * State not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Backup is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Backup has been taken and the operation is being finalized. At this - * point, changes to the file share will not be reflected in the backup. - * - * Generated from protobuf enum FINALIZING = 2; - */ - const FINALIZING = 2; - /** - * Backup is available for use. - * - * Generated from protobuf enum READY = 3; - */ - const READY = 3; - /** - * Backup is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - /** - * Backup is not valid and cannot be used for creating new instances or - * restoring existing instances. - * - * Generated from protobuf enum INVALID = 5; - */ - const INVALID = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::FINALIZING => 'FINALIZING', - self::READY => 'READY', - self::DELETING => 'DELETING', - self::INVALID => 'INVALID', - ]; - - 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\Filestore\V1\Backup_State::class); - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateBackupRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateBackupRequest.php deleted file mode 100644 index 424464671ce1..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateBackupRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.filestore.v1.CreateBackupRequest - */ -class CreateBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The backup's project and location, in the format - * `projects/{project_number}/locations/{location}`. In Filestore, - * backup locations map to Google Cloud regions, for example **us-west1**. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. A [backup resource][google.cloud.filestore.v1.Backup] - * - * Generated from protobuf field .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup = null; - /** - * Required. The ID to use for the backup. - * The ID must be unique within the specified project and location. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * Values that do not match this pattern will trigger an INVALID_ARGUMENT - * error. - * - * Generated from protobuf field string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_id = ''; - - /** - * @param string $parent Required. The backup's project and location, in the format - * `projects/{project_number}/locations/{location}`. In Filestore, - * backup locations map to Google Cloud regions, for example **us-west1**. Please see - * {@see CloudFilestoreManagerClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Filestore\V1\Backup $backup Required. A [backup resource][google.cloud.filestore.v1.Backup] - * @param string $backupId Required. The ID to use for the backup. - * The ID must be unique within the specified project and location. - * - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * Values that do not match this pattern will trigger an INVALID_ARGUMENT - * error. - * - * @return \Google\Cloud\Filestore\V1\CreateBackupRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Filestore\V1\Backup $backup, string $backupId): self - { - return (new self()) - ->setParent($parent) - ->setBackup($backup) - ->setBackupId($backupId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The backup's project and location, in the format - * `projects/{project_number}/locations/{location}`. In Filestore, - * backup locations map to Google Cloud regions, for example **us-west1**. - * @type \Google\Cloud\Filestore\V1\Backup $backup - * Required. A [backup resource][google.cloud.filestore.v1.Backup] - * @type string $backup_id - * Required. The ID to use for the backup. - * The ID must be unique within the specified project and location. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * Values that do not match this pattern will trigger an INVALID_ARGUMENT - * error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The backup's project and location, in the format - * `projects/{project_number}/locations/{location}`. In Filestore, - * backup locations map to Google Cloud regions, for example **us-west1**. - * - * 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 backup's project and location, in the format - * `projects/{project_number}/locations/{location}`. In Filestore, - * backup locations map to Google Cloud regions, for example **us-west1**. - * - * 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 [backup resource][google.cloud.filestore.v1.Backup] - * - * Generated from protobuf field .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Filestore\V1\Backup|null - */ - public function getBackup() - { - return $this->backup; - } - - public function hasBackup() - { - return isset($this->backup); - } - - public function clearBackup() - { - unset($this->backup); - } - - /** - * Required. A [backup resource][google.cloud.filestore.v1.Backup] - * - * Generated from protobuf field .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Filestore\V1\Backup $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Filestore\V1\Backup::class); - $this->backup = $var; - - return $this; - } - - /** - * Required. The ID to use for the backup. - * The ID must be unique within the specified project and location. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * Values that do not match this pattern will trigger an INVALID_ARGUMENT - * error. - * - * Generated from protobuf field string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBackupId() - { - return $this->backup_id; - } - - /** - * Required. The ID to use for the backup. - * The ID must be unique within the specified project and location. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * Values that do not match this pattern will trigger an INVALID_ARGUMENT - * error. - * - * Generated from protobuf field string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBackupId($var) - { - GPBUtil::checkString($var, True); - $this->backup_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateInstanceRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateInstanceRequest.php deleted file mode 100644 index 1e1334b891cb..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateInstanceRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.filestore.v1.CreateInstanceRequest - */ -class CreateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The instance's project and location, in the format - * `projects/{project_id}/locations/{location}`. In Filestore, - * locations map to Google Cloud zones, for example **us-west1-b**. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The name of the instance to create. - * The name must be unique for the specified project and location. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance_id = ''; - /** - * Required. An [instance resource][google.cloud.filestore.v1.Instance] - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - - /** - * @param string $parent Required. The instance's project and location, in the format - * `projects/{project_id}/locations/{location}`. In Filestore, - * locations map to Google Cloud zones, for example **us-west1-b**. Please see - * {@see CloudFilestoreManagerClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Filestore\V1\Instance $instance Required. An [instance resource][google.cloud.filestore.v1.Instance] - * @param string $instanceId Required. The name of the instance to create. - * The name must be unique for the specified project and location. - * - * @return \Google\Cloud\Filestore\V1\CreateInstanceRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Filestore\V1\Instance $instance, string $instanceId): self - { - return (new self()) - ->setParent($parent) - ->setInstance($instance) - ->setInstanceId($instanceId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The instance's project and location, in the format - * `projects/{project_id}/locations/{location}`. In Filestore, - * locations map to Google Cloud zones, for example **us-west1-b**. - * @type string $instance_id - * Required. The name of the instance to create. - * The name must be unique for the specified project and location. - * @type \Google\Cloud\Filestore\V1\Instance $instance - * Required. An [instance resource][google.cloud.filestore.v1.Instance] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The instance's project and location, in the format - * `projects/{project_id}/locations/{location}`. In Filestore, - * locations map to Google Cloud zones, for example **us-west1-b**. - * - * 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 instance's project and location, in the format - * `projects/{project_id}/locations/{location}`. In Filestore, - * locations map to Google Cloud zones, for example **us-west1-b**. - * - * 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. The name of the instance to create. - * The name must be unique for the specified project and location. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInstanceId() - { - return $this->instance_id; - } - - /** - * Required. The name of the instance to create. - * The name must be unique for the specified project and location. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInstanceId($var) - { - GPBUtil::checkString($var, True); - $this->instance_id = $var; - - return $this; - } - - /** - * Required. An [instance resource][google.cloud.filestore.v1.Instance] - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Filestore\V1\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. An [instance resource][google.cloud.filestore.v1.Instance] - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Filestore\V1\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Filestore\V1\Instance::class); - $this->instance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateSnapshotRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateSnapshotRequest.php deleted file mode 100644 index 314fbaba9cc4..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateSnapshotRequest.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.filestore.v1.CreateSnapshotRequest - */ -class CreateSnapshotRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Filestore Instance to create the snapshots of, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID to use for the snapshot. - * The ID must be unique within the specified instance. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * - * Generated from protobuf field string snapshot_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $snapshot_id = ''; - /** - * Required. A snapshot resource. - * - * Generated from protobuf field .google.cloud.filestore.v1.Snapshot snapshot = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $snapshot = null; - - /** - * @param string $parent Required. The Filestore Instance to create the snapshots of, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * Please see {@see CloudFilestoreManagerClient::instanceName()} for help formatting this field. - * @param \Google\Cloud\Filestore\V1\Snapshot $snapshot Required. A snapshot resource. - * @param string $snapshotId Required. The ID to use for the snapshot. - * The ID must be unique within the specified instance. - * - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * - * @return \Google\Cloud\Filestore\V1\CreateSnapshotRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Filestore\V1\Snapshot $snapshot, string $snapshotId): self - { - return (new self()) - ->setParent($parent) - ->setSnapshot($snapshot) - ->setSnapshotId($snapshotId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The Filestore Instance to create the snapshots of, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @type string $snapshot_id - * Required. The ID to use for the snapshot. - * The ID must be unique within the specified instance. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * @type \Google\Cloud\Filestore\V1\Snapshot $snapshot - * Required. A snapshot resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Filestore Instance to create the snapshots of, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * 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 Filestore Instance to create the snapshots of, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * 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. The ID to use for the snapshot. - * The ID must be unique within the specified instance. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * - * Generated from protobuf field string snapshot_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSnapshotId() - { - return $this->snapshot_id; - } - - /** - * Required. The ID to use for the snapshot. - * The ID must be unique within the specified instance. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * - * Generated from protobuf field string snapshot_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSnapshotId($var) - { - GPBUtil::checkString($var, True); - $this->snapshot_id = $var; - - return $this; - } - - /** - * Required. A snapshot resource. - * - * Generated from protobuf field .google.cloud.filestore.v1.Snapshot snapshot = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Filestore\V1\Snapshot|null - */ - public function getSnapshot() - { - return $this->snapshot; - } - - public function hasSnapshot() - { - return isset($this->snapshot); - } - - public function clearSnapshot() - { - unset($this->snapshot); - } - - /** - * Required. A snapshot resource. - * - * Generated from protobuf field .google.cloud.filestore.v1.Snapshot snapshot = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Filestore\V1\Snapshot $var - * @return $this - */ - public function setSnapshot($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Filestore\V1\Snapshot::class); - $this->snapshot = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteBackupRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteBackupRequest.php deleted file mode 100644 index 62048dd9520f..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteBackupRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.filestore.v1.DeleteBackupRequest - */ -class DeleteBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The backup resource name, in the format - * `projects/{project_number}/locations/{location}/backups/{backup_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The backup resource name, in the format - * `projects/{project_number}/locations/{location}/backups/{backup_id}` - * Please see {@see CloudFilestoreManagerClient::backupName()} for help formatting this field. - * - * @return \Google\Cloud\Filestore\V1\DeleteBackupRequest - * - * @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 backup resource name, in the format - * `projects/{project_number}/locations/{location}/backups/{backup_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The backup resource name, in the format - * `projects/{project_number}/locations/{location}/backups/{backup_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. The backup resource name, in the format - * `projects/{project_number}/locations/{location}/backups/{backup_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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteInstanceRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteInstanceRequest.php deleted file mode 100644 index 02964f58e99a..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteInstanceRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.filestore.v1.DeleteInstanceRequest - */ -class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If set to true, all snapshots of the instance will also be deleted. - * (Otherwise, the request will only work if the instance has no snapshots.) - * - * Generated from protobuf field bool force = 2; - */ - protected $force = false; - - /** - * @param string $name Required. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * Please see {@see CloudFilestoreManagerClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Filestore\V1\DeleteInstanceRequest - * - * @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 instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @type bool $force - * If set to true, all snapshots of the instance will also be deleted. - * (Otherwise, the request will only work if the instance has no snapshots.) - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_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. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_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; - } - - /** - * If set to true, all snapshots of the instance will also be deleted. - * (Otherwise, the request will only work if the instance has no snapshots.) - * - * Generated from protobuf field bool force = 2; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * If set to true, all snapshots of the instance will also be deleted. - * (Otherwise, the request will only work if the instance has no snapshots.) - * - * Generated from protobuf field bool force = 2; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteSnapshotRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteSnapshotRequest.php deleted file mode 100644 index ef16ddaceaf3..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteSnapshotRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.filestore.v1.DeleteSnapshotRequest - */ -class DeleteSnapshotRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The snapshot resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The snapshot resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}` - * Please see {@see CloudFilestoreManagerClient::snapshotName()} for help formatting this field. - * - * @return \Google\Cloud\Filestore\V1\DeleteSnapshotRequest - * - * @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 snapshot resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The snapshot resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_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. The snapshot resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/FileShareConfig.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/FileShareConfig.php deleted file mode 100644 index dc1cb573dd40..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/FileShareConfig.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.filestore.v1.FileShareConfig - */ -class FileShareConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the file share. Must use 1-16 characters for the - * basic service tier and 1-63 characters for all other service tiers. - * Must use lowercase letters, numbers, or underscores `[a-z0-9_]`. Must - * start with a letter. Immutable. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * File share capacity in gigabytes (GB). - * Filestore defines 1 GB as 1024^3 bytes. - * - * Generated from protobuf field int64 capacity_gb = 2; - */ - protected $capacity_gb = 0; - /** - * Nfs Export Options. - * There is a limit of 10 export options per file share. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - private $nfs_export_options; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the file share. Must use 1-16 characters for the - * basic service tier and 1-63 characters for all other service tiers. - * Must use lowercase letters, numbers, or underscores `[a-z0-9_]`. Must - * start with a letter. Immutable. - * @type int|string $capacity_gb - * File share capacity in gigabytes (GB). - * Filestore defines 1 GB as 1024^3 bytes. - * @type string $source_backup - * The resource name of the backup, in the format - * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`, - * that this file share has been restored from. - * @type array<\Google\Cloud\Filestore\V1\NfsExportOptions>|\Google\Protobuf\Internal\RepeatedField $nfs_export_options - * Nfs Export Options. - * There is a limit of 10 export options per file share. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the file share. Must use 1-16 characters for the - * basic service tier and 1-63 characters for all other service tiers. - * Must use lowercase letters, numbers, or underscores `[a-z0-9_]`. Must - * start with a letter. Immutable. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the file share. Must use 1-16 characters for the - * basic service tier and 1-63 characters for all other service tiers. - * Must use lowercase letters, numbers, or underscores `[a-z0-9_]`. Must - * start with a letter. Immutable. - * - * 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; - } - - /** - * File share capacity in gigabytes (GB). - * Filestore defines 1 GB as 1024^3 bytes. - * - * Generated from protobuf field int64 capacity_gb = 2; - * @return int|string - */ - public function getCapacityGb() - { - return $this->capacity_gb; - } - - /** - * File share capacity in gigabytes (GB). - * Filestore defines 1 GB as 1024^3 bytes. - * - * Generated from protobuf field int64 capacity_gb = 2; - * @param int|string $var - * @return $this - */ - public function setCapacityGb($var) - { - GPBUtil::checkInt64($var); - $this->capacity_gb = $var; - - return $this; - } - - /** - * The resource name of the backup, in the format - * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`, - * that this file share has been restored from. - * - * Generated from protobuf field string source_backup = 8 [(.google.api.resource_reference) = { - * @return string - */ - public function getSourceBackup() - { - return $this->readOneof(8); - } - - public function hasSourceBackup() - { - return $this->hasOneof(8); - } - - /** - * The resource name of the backup, in the format - * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`, - * that this file share has been restored from. - * - * Generated from protobuf field string source_backup = 8 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSourceBackup($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Nfs Export Options. - * There is a limit of 10 export options per file share. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNfsExportOptions() - { - return $this->nfs_export_options; - } - - /** - * Nfs Export Options. - * There is a limit of 10 export options per file share. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - * @param array<\Google\Cloud\Filestore\V1\NfsExportOptions>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNfsExportOptions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Filestore\V1\NfsExportOptions::class); - $this->nfs_export_options = $arr; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetBackupRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetBackupRequest.php deleted file mode 100644 index 89d8bdb44e69..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetBackupRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.filestore.v1.GetBackupRequest - */ -class GetBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The backup resource name, in the format - * `projects/{project_number}/locations/{location}/backups/{backup_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The backup resource name, in the format - * `projects/{project_number}/locations/{location}/backups/{backup_id}`. Please see - * {@see CloudFilestoreManagerClient::backupName()} for help formatting this field. - * - * @return \Google\Cloud\Filestore\V1\GetBackupRequest - * - * @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 backup resource name, in the format - * `projects/{project_number}/locations/{location}/backups/{backup_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The backup resource name, in the format - * `projects/{project_number}/locations/{location}/backups/{backup_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. The backup resource name, in the format - * `projects/{project_number}/locations/{location}/backups/{backup_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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetInstanceRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetInstanceRequest.php deleted file mode 100644 index a034a1692709..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetInstanceRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.filestore.v1.GetInstanceRequest - */ -class GetInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}`. Please see - * {@see CloudFilestoreManagerClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Filestore\V1\GetInstanceRequest - * - * @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 instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_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. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetSnapshotRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetSnapshotRequest.php deleted file mode 100644 index a5831ec43669..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetSnapshotRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.filestore.v1.GetSnapshotRequest - */ -class GetSnapshotRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The snapshot resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The snapshot resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}` - * Please see {@see CloudFilestoreManagerClient::snapshotName()} for help formatting this field. - * - * @return \Google\Cloud\Filestore\V1\GetSnapshotRequest - * - * @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 snapshot resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The snapshot resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_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. The snapshot resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance.php deleted file mode 100644 index 0fce99d9b268..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance.php +++ /dev/null @@ -1,576 +0,0 @@ -google.cloud.filestore.v1.Instance - */ -class Instance extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the instance, in the format - * `projects/{project}/locations/{location}/instances/{instance}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The description of the instance (2048 characters or less). - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Output only. The instance state. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Additional information about the instance state, if available. - * - * Generated from protobuf field string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. The time when the instance was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * The service tier of the instance. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance.Tier tier = 8; - */ - protected $tier = 0; - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 9; - */ - private $labels; - /** - * File system shares on the instance. - * For this version, only a single file share is supported. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - private $file_shares; - /** - * VPC networks to which the instance is connected. - * For this version, only a single network is supported. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - private $networks; - /** - * Server-specified ETag for the instance resource to prevent simultaneous - * updates from overwriting each other. - * - * Generated from protobuf field string etag = 12; - */ - protected $etag = ''; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzs = null; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzi = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzi = false; - /** - * KMS key name used for data encryption. - * - * Generated from protobuf field string kms_key_name = 14; - */ - protected $kms_key_name = ''; - /** - * Output only. Field indicates all the reasons the instance is in "SUSPENDED" - * state. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.Instance.SuspensionReason suspension_reasons = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $suspension_reasons; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the instance, in the format - * `projects/{project}/locations/{location}/instances/{instance}`. - * @type string $description - * The description of the instance (2048 characters or less). - * @type int $state - * Output only. The instance state. - * @type string $status_message - * Output only. Additional information about the instance state, if available. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the instance was created. - * @type int $tier - * The service tier of the instance. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Resource labels to represent user provided metadata. - * @type array<\Google\Cloud\Filestore\V1\FileShareConfig>|\Google\Protobuf\Internal\RepeatedField $file_shares - * File system shares on the instance. - * For this version, only a single file share is supported. - * @type array<\Google\Cloud\Filestore\V1\NetworkConfig>|\Google\Protobuf\Internal\RepeatedField $networks - * VPC networks to which the instance is connected. - * For this version, only a single network is supported. - * @type string $etag - * Server-specified ETag for the instance resource to prevent simultaneous - * updates from overwriting each other. - * @type \Google\Protobuf\BoolValue $satisfies_pzs - * Output only. Reserved for future use. - * @type bool $satisfies_pzi - * Output only. Reserved for future use. - * @type string $kms_key_name - * KMS key name used for data encryption. - * @type array|\Google\Protobuf\Internal\RepeatedField $suspension_reasons - * Output only. Field indicates all the reasons the instance is in "SUSPENDED" - * state. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the instance, in the format - * `projects/{project}/locations/{location}/instances/{instance}`. - * - * 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 of the instance, in the format - * `projects/{project}/locations/{location}/instances/{instance}`. - * - * 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 description of the instance (2048 characters or less). - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description of the instance (2048 characters or less). - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The instance state. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The instance state. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Filestore\V1\Instance\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Additional information about the instance state, if available. - * - * Generated from protobuf field string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Additional information about the instance state, if available. - * - * Generated from protobuf field string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. The time when the instance was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.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 when the instance was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.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; - } - - /** - * The service tier of the instance. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance.Tier tier = 8; - * @return int - */ - public function getTier() - { - return $this->tier; - } - - /** - * The service tier of the instance. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance.Tier tier = 8; - * @param int $var - * @return $this - */ - public function setTier($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Filestore\V1\Instance\Tier::class); - $this->tier = $var; - - return $this; - } - - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 9; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 9; - * @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; - } - - /** - * File system shares on the instance. - * For this version, only a single file share is supported. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFileShares() - { - return $this->file_shares; - } - - /** - * File system shares on the instance. - * For this version, only a single file share is supported. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - * @param array<\Google\Cloud\Filestore\V1\FileShareConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFileShares($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Filestore\V1\FileShareConfig::class); - $this->file_shares = $arr; - - return $this; - } - - /** - * VPC networks to which the instance is connected. - * For this version, only a single network is supported. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworks() - { - return $this->networks; - } - - /** - * VPC networks to which the instance is connected. - * For this version, only a single network is supported. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - * @param array<\Google\Cloud\Filestore\V1\NetworkConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Filestore\V1\NetworkConfig::class); - $this->networks = $arr; - - return $this; - } - - /** - * Server-specified ETag for the instance resource to prevent simultaneous - * updates from overwriting each other. - * - * Generated from protobuf field string etag = 12; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Server-specified ETag for the instance resource to prevent simultaneous - * updates from overwriting each other. - * - * Generated from protobuf field string etag = 12; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\BoolValue|null - */ - public function getSatisfiesPzs() - { - return $this->satisfies_pzs; - } - - public function hasSatisfiesPzs() - { - return isset($this->satisfies_pzs); - } - - public function clearSatisfiesPzs() - { - unset($this->satisfies_pzs); - } - - /** - * Returns the unboxed value from getSatisfiesPzs() - - * Output only. Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool|null - */ - public function getSatisfiesPzsUnwrapped() - { - return $this->readWrapperValue("satisfies_pzs"); - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->satisfies_pzs = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Output only. Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool|null $var - * @return $this - */ - public function setSatisfiesPzsUnwrapped($var) - { - $this->writeWrapperValue("satisfies_pzs", $var); - return $this;} - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzi = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzi() - { - return $this->satisfies_pzi; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzi = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzi($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzi = $var; - - return $this; - } - - /** - * KMS key name used for data encryption. - * - * Generated from protobuf field string kms_key_name = 14; - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * KMS key name used for data encryption. - * - * Generated from protobuf field string kms_key_name = 14; - * @param string $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_name = $var; - - return $this; - } - - /** - * Output only. Field indicates all the reasons the instance is in "SUSPENDED" - * state. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.Instance.SuspensionReason suspension_reasons = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSuspensionReasons() - { - return $this->suspension_reasons; - } - - /** - * Output only. Field indicates all the reasons the instance is in "SUSPENDED" - * state. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.Instance.SuspensionReason suspension_reasons = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSuspensionReasons($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Filestore\V1\Instance\SuspensionReason::class); - $this->suspension_reasons = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/State.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/State.php deleted file mode 100644 index 3a7c0eef9b47..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/State.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.filestore.v1.Instance.State - */ -class State -{ - /** - * State not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The instance is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The instance is available for use. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * Work is being done on the instance. You can get further details from the - * `statusMessage` field of the `Instance` resource. - * - * Generated from protobuf enum REPAIRING = 3; - */ - const REPAIRING = 3; - /** - * The instance is shutting down. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - /** - * The instance is experiencing an issue and might be unusable. You can get - * further details from the `statusMessage` field of the `Instance` - * resource. - * - * Generated from protobuf enum ERROR = 6; - */ - const ERROR = 6; - /** - * The instance is restoring a backup to an existing file share and may be - * unusable during this time. - * - * Generated from protobuf enum RESTORING = 7; - */ - const RESTORING = 7; - /** - * The instance is suspended. You can get further details from - * the `suspension_reasons` field of the `Instance` resource. - * - * Generated from protobuf enum SUSPENDED = 8; - */ - const SUSPENDED = 8; - /** - * The instance is in the process of becoming suspended. - * - * Generated from protobuf enum SUSPENDING = 9; - */ - const SUSPENDING = 9; - /** - * The instance is in the process of becoming active. - * - * Generated from protobuf enum RESUMING = 10; - */ - const RESUMING = 10; - /** - * The instance is reverting to a snapshot. - * - * Generated from protobuf enum REVERTING = 12; - */ - const REVERTING = 12; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::REPAIRING => 'REPAIRING', - self::DELETING => 'DELETING', - self::ERROR => 'ERROR', - self::RESTORING => 'RESTORING', - self::SUSPENDED => 'SUSPENDED', - self::SUSPENDING => 'SUSPENDING', - self::RESUMING => 'RESUMING', - self::REVERTING => 'REVERTING', - ]; - - 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\Filestore\V1\Instance_State::class); - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/SuspensionReason.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/SuspensionReason.php deleted file mode 100644 index 0d85473b237d..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/SuspensionReason.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.filestore.v1.Instance.SuspensionReason - */ -class SuspensionReason -{ - /** - * Not set. - * - * Generated from protobuf enum SUSPENSION_REASON_UNSPECIFIED = 0; - */ - const SUSPENSION_REASON_UNSPECIFIED = 0; - /** - * The KMS key used by the instance is either revoked or denied access to. - * - * Generated from protobuf enum KMS_KEY_ISSUE = 1; - */ - const KMS_KEY_ISSUE = 1; - - private static $valueToName = [ - self::SUSPENSION_REASON_UNSPECIFIED => 'SUSPENSION_REASON_UNSPECIFIED', - self::KMS_KEY_ISSUE => 'KMS_KEY_ISSUE', - ]; - - 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(SuspensionReason::class, \Google\Cloud\Filestore\V1\Instance_SuspensionReason::class); - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/Tier.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/Tier.php deleted file mode 100644 index 074b36d09241..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/Tier.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.filestore.v1.Instance.Tier - */ -class Tier -{ - /** - * Not set. - * - * Generated from protobuf enum TIER_UNSPECIFIED = 0; - */ - const TIER_UNSPECIFIED = 0; - /** - * STANDARD tier. BASIC_HDD is the preferred term for this tier. - * - * Generated from protobuf enum STANDARD = 1; - */ - const STANDARD = 1; - /** - * PREMIUM tier. BASIC_SSD is the preferred term for this tier. - * - * Generated from protobuf enum PREMIUM = 2; - */ - const PREMIUM = 2; - /** - * BASIC instances offer a maximum capacity of 63.9 TB. - * BASIC_HDD is an alias for STANDARD Tier, offering economical - * performance backed by HDD. - * - * Generated from protobuf enum BASIC_HDD = 3; - */ - const BASIC_HDD = 3; - /** - * BASIC instances offer a maximum capacity of 63.9 TB. - * BASIC_SSD is an alias for PREMIUM Tier, and offers improved - * performance backed by SSD. - * - * Generated from protobuf enum BASIC_SSD = 4; - */ - const BASIC_SSD = 4; - /** - * HIGH_SCALE instances offer expanded capacity and performance scaling - * capabilities. - * - * Generated from protobuf enum HIGH_SCALE_SSD = 5; - */ - const HIGH_SCALE_SSD = 5; - /** - * ENTERPRISE instances offer the features and availability needed for - * mission-critical workloads. - * - * Generated from protobuf enum ENTERPRISE = 6; - */ - const ENTERPRISE = 6; - /** - * ZONAL instances offer expanded capacity and performance scaling - * capabilities. - * - * Generated from protobuf enum ZONAL = 7; - */ - const ZONAL = 7; - /** - * REGIONAL instances offer the features and availability needed for - * mission-critical workloads. - * - * Generated from protobuf enum REGIONAL = 8; - */ - const REGIONAL = 8; - - private static $valueToName = [ - self::TIER_UNSPECIFIED => 'TIER_UNSPECIFIED', - self::STANDARD => 'STANDARD', - self::PREMIUM => 'PREMIUM', - self::BASIC_HDD => 'BASIC_HDD', - self::BASIC_SSD => 'BASIC_SSD', - self::HIGH_SCALE_SSD => 'HIGH_SCALE_SSD', - self::ENTERPRISE => 'ENTERPRISE', - self::ZONAL => 'ZONAL', - self::REGIONAL => 'REGIONAL', - ]; - - 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(Tier::class, \Google\Cloud\Filestore\V1\Instance_Tier::class); - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListBackupsRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListBackupsRequest.php deleted file mode 100644 index 2e8d840adf8e..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListBackupsRequest.php +++ /dev/null @@ -1,246 +0,0 @@ -google.cloud.filestore.v1.ListBackupsRequest - */ -class ListBackupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location for which to retrieve backup - * information, in the format - * `projects/{project_number}/locations/{location}`. In Filestore, backup - * locations map to Google Cloud regions, for example **us-west1**. To - * retrieve backup information for all locations, use "-" for the - * `{location}` value. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - */ - protected $order_by = ''; - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The project and location for which to retrieve backup - * information, in the format - * `projects/{project_number}/locations/{location}`. In Filestore, backup - * locations map to Google Cloud regions, for example **us-west1**. To - * retrieve backup information for all locations, use "-" for the - * `{location}` value. Please see - * {@see CloudFilestoreManagerClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Filestore\V1\ListBackupsRequest - * - * @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 and location for which to retrieve backup - * information, in the format - * `projects/{project_number}/locations/{location}`. In Filestore, backup - * locations map to Google Cloud regions, for example **us-west1**. To - * retrieve backup information for all locations, use "-" for the - * `{location}` value. - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @type string $order_by - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @type string $filter - * List filter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location for which to retrieve backup - * information, in the format - * `projects/{project_number}/locations/{location}`. In Filestore, backup - * locations map to Google Cloud regions, for example **us-west1**. To - * retrieve backup information for all locations, use "-" for the - * `{location}` value. - * - * 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 and location for which to retrieve backup - * information, in the format - * `projects/{project_number}/locations/{location}`. In Filestore, backup - * locations map to Google Cloud regions, for example **us-west1**. To - * retrieve backup information for all locations, use "-" for the - * `{location}` value. - * - * 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; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListBackupsResponse.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListBackupsResponse.php deleted file mode 100644 index 166221aae3bc..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListBackupsResponse.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.filestore.v1.ListBackupsResponse - */ -class ListBackupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of backups in the project for the specified location. - * If the `{location}` value in the request is "-", the response contains a - * list of backups from all locations. If any location is unreachable, the - * response will only return backups in reachable locations and the - * "unreachable" field will be populated with a list of unreachable - * locations. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - private $backups; - /** - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Filestore\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $backups - * A list of backups in the project for the specified location. - * If the `{location}` value in the request is "-", the response contains a - * list of backups from all locations. If any location is unreachable, the - * response will only return backups in reachable locations and the - * "unreachable" field will be populated with a list of unreachable - * locations. - * @type string $next_page_token - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * A list of backups in the project for the specified location. - * If the `{location}` value in the request is "-", the response contains a - * list of backups from all locations. If any location is unreachable, the - * response will only return backups in reachable locations and the - * "unreachable" field will be populated with a list of unreachable - * locations. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.Backup backups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBackups() - { - return $this->backups; - } - - /** - * A list of backups in the project for the specified location. - * If the `{location}` value in the request is "-", the response contains a - * list of backups from all locations. If any location is unreachable, the - * response will only return backups in reachable locations and the - * "unreachable" field will be populated with a list of unreachable - * locations. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.Backup backups = 1; - * @param array<\Google\Cloud\Filestore\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBackups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Filestore\V1\Backup::class); - $this->backups = $arr; - - return $this; - } - - /** - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * - * 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; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListInstancesRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListInstancesRequest.php deleted file mode 100644 index 07408da70f18..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListInstancesRequest.php +++ /dev/null @@ -1,246 +0,0 @@ -google.cloud.filestore.v1.ListInstancesRequest - */ -class ListInstancesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location for which to retrieve instance - * information, in the format `projects/{project_id}/locations/{location}`. In - * Cloud Filestore, locations map to Google Cloud zones, for example - * **us-west1-b**. To retrieve instance information for all locations, use "-" - * for the - * `{location}` value. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - */ - protected $order_by = ''; - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The project and location for which to retrieve instance - * information, in the format `projects/{project_id}/locations/{location}`. In - * Cloud Filestore, locations map to Google Cloud zones, for example - * **us-west1-b**. To retrieve instance information for all locations, use "-" - * for the - * `{location}` value. Please see - * {@see CloudFilestoreManagerClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Filestore\V1\ListInstancesRequest - * - * @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 and location for which to retrieve instance - * information, in the format `projects/{project_id}/locations/{location}`. In - * Cloud Filestore, locations map to Google Cloud zones, for example - * **us-west1-b**. To retrieve instance information for all locations, use "-" - * for the - * `{location}` value. - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @type string $order_by - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @type string $filter - * List filter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location for which to retrieve instance - * information, in the format `projects/{project_id}/locations/{location}`. In - * Cloud Filestore, locations map to Google Cloud zones, for example - * **us-west1-b**. To retrieve instance information for all locations, use "-" - * for the - * `{location}` value. - * - * 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 and location for which to retrieve instance - * information, in the format `projects/{project_id}/locations/{location}`. In - * Cloud Filestore, locations map to Google Cloud zones, for example - * **us-west1-b**. To retrieve instance information for all locations, use "-" - * for the - * `{location}` value. - * - * 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; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListInstancesResponse.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListInstancesResponse.php deleted file mode 100644 index 96c73342d44c..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListInstancesResponse.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.filestore.v1.ListInstancesResponse - */ -class ListInstancesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of instances in the project for the specified location. - * If the `{location}` value in the request is "-", the response contains a - * list of instances from all locations. If any location is unreachable, the - * response will only return instances in reachable locations and the - * "unreachable" field will be populated with a list of unreachable locations. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - private $instances; - /** - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Filestore\V1\Instance>|\Google\Protobuf\Internal\RepeatedField $instances - * A list of instances in the project for the specified location. - * If the `{location}` value in the request is "-", the response contains a - * list of instances from all locations. If any location is unreachable, the - * response will only return instances in reachable locations and the - * "unreachable" field will be populated with a list of unreachable locations. - * @type string $next_page_token - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * A list of instances in the project for the specified location. - * If the `{location}` value in the request is "-", the response contains a - * list of instances from all locations. If any location is unreachable, the - * response will only return instances in reachable locations and the - * "unreachable" field will be populated with a list of unreachable locations. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.Instance instances = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstances() - { - return $this->instances; - } - - /** - * A list of instances in the project for the specified location. - * If the `{location}` value in the request is "-", the response contains a - * list of instances from all locations. If any location is unreachable, the - * response will only return instances in reachable locations and the - * "unreachable" field will be populated with a list of unreachable locations. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.Instance instances = 1; - * @param array<\Google\Cloud\Filestore\V1\Instance>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Filestore\V1\Instance::class); - $this->instances = $arr; - - return $this; - } - - /** - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * - * 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; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListSnapshotsRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListSnapshotsRequest.php deleted file mode 100644 index eaa004774f70..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListSnapshotsRequest.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.filestore.v1.ListSnapshotsRequest - */ -class ListSnapshotsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The instance for which to retrieve snapshot information, - * in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - */ - protected $order_by = ''; - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The instance for which to retrieve snapshot information, - * in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}`. Please see - * {@see CloudFilestoreManagerClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Filestore\V1\ListSnapshotsRequest - * - * @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 instance for which to retrieve snapshot information, - * in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}`. - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @type string $order_by - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @type string $filter - * List filter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The instance for which to retrieve snapshot information, - * in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}`. - * - * 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 instance for which to retrieve snapshot information, - * in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}`. - * - * 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; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListSnapshotsResponse.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListSnapshotsResponse.php deleted file mode 100644 index 172b7189d452..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListSnapshotsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.filestore.v1.ListSnapshotsResponse - */ -class ListSnapshotsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of snapshots in the project for the specified instance. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.Snapshot snapshots = 1; - */ - private $snapshots; - /** - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * - * 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\Filestore\V1\Snapshot>|\Google\Protobuf\Internal\RepeatedField $snapshots - * A list of snapshots in the project for the specified instance. - * @type string $next_page_token - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * A list of snapshots in the project for the specified instance. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.Snapshot snapshots = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSnapshots() - { - return $this->snapshots; - } - - /** - * A list of snapshots in the project for the specified instance. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.Snapshot snapshots = 1; - * @param array<\Google\Cloud\Filestore\V1\Snapshot>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSnapshots($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Filestore\V1\Snapshot::class); - $this->snapshots = $arr; - - return $this; - } - - /** - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * - * 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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig.php deleted file mode 100644 index 201ade29815d..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig.php +++ /dev/null @@ -1,291 +0,0 @@ -google.cloud.filestore.v1.NetworkConfig - */ -class NetworkConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the Google Compute Engine - * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the - * instance is connected. - * - * Generated from protobuf field string network = 1; - */ - protected $network = ''; - /** - * Internet protocol versions for which the instance has IP addresses - * assigned. For this version, only MODE_IPV4 is supported. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - */ - private $modes; - /** - * Optional, reserved_ip_range can have one of the following two types of - * values. - * * CIDR range value when using DIRECT_PEERING connect mode. - * * [Allocated IP address - * range](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-internal-ip-address) - * when using PRIVATE_SERVICE_ACCESS connect mode. - * When the name of an allocated IP address range is specified, it must be one - * of the ranges associated with the private service access connection. - * When specified as a direct CIDR value, it must be a /29 CIDR block for - * Basic tier, a /24 CIDR block for High Scale tier, or a /26 CIDR block for - * Enterprise tier in one of the [internal IP address - * ranges](https://www.arin.net/reference/research/statistics/address_filters/) - * that identifies the range of IP addresses reserved for this instance. For - * example, 10.0.0.0/29, 192.168.0.0/24 or 192.168.0.0/26, respectively. The - * range you specify can't overlap with either existing subnets or assigned IP - * address ranges for other Filestore instances in the selected VPC - * network. - * - * Generated from protobuf field string reserved_ip_range = 4; - */ - protected $reserved_ip_range = ''; - /** - * Output only. IPv4 addresses in the format - * `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format - * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`. - * - * Generated from protobuf field repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $ip_addresses; - /** - * The network connect mode of the Filestore instance. - * If not provided, the connect mode defaults to DIRECT_PEERING. - * - * Generated from protobuf field .google.cloud.filestore.v1.NetworkConfig.ConnectMode connect_mode = 6; - */ - protected $connect_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network - * The name of the Google Compute Engine - * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the - * instance is connected. - * @type array|\Google\Protobuf\Internal\RepeatedField $modes - * Internet protocol versions for which the instance has IP addresses - * assigned. For this version, only MODE_IPV4 is supported. - * @type string $reserved_ip_range - * Optional, reserved_ip_range can have one of the following two types of - * values. - * * CIDR range value when using DIRECT_PEERING connect mode. - * * [Allocated IP address - * range](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-internal-ip-address) - * when using PRIVATE_SERVICE_ACCESS connect mode. - * When the name of an allocated IP address range is specified, it must be one - * of the ranges associated with the private service access connection. - * When specified as a direct CIDR value, it must be a /29 CIDR block for - * Basic tier, a /24 CIDR block for High Scale tier, or a /26 CIDR block for - * Enterprise tier in one of the [internal IP address - * ranges](https://www.arin.net/reference/research/statistics/address_filters/) - * that identifies the range of IP addresses reserved for this instance. For - * example, 10.0.0.0/29, 192.168.0.0/24 or 192.168.0.0/26, respectively. The - * range you specify can't overlap with either existing subnets or assigned IP - * address ranges for other Filestore instances in the selected VPC - * network. - * @type array|\Google\Protobuf\Internal\RepeatedField $ip_addresses - * Output only. IPv4 addresses in the format - * `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format - * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`. - * @type int $connect_mode - * The network connect mode of the Filestore instance. - * If not provided, the connect mode defaults to DIRECT_PEERING. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * The name of the Google Compute Engine - * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the - * instance is connected. - * - * Generated from protobuf field string network = 1; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * The name of the Google Compute Engine - * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the - * instance is connected. - * - * Generated from protobuf field string network = 1; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Internet protocol versions for which the instance has IP addresses - * assigned. For this version, only MODE_IPV4 is supported. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getModes() - { - return $this->modes; - } - - /** - * Internet protocol versions for which the instance has IP addresses - * assigned. For this version, only MODE_IPV4 is supported. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setModes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Filestore\V1\NetworkConfig\AddressMode::class); - $this->modes = $arr; - - return $this; - } - - /** - * Optional, reserved_ip_range can have one of the following two types of - * values. - * * CIDR range value when using DIRECT_PEERING connect mode. - * * [Allocated IP address - * range](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-internal-ip-address) - * when using PRIVATE_SERVICE_ACCESS connect mode. - * When the name of an allocated IP address range is specified, it must be one - * of the ranges associated with the private service access connection. - * When specified as a direct CIDR value, it must be a /29 CIDR block for - * Basic tier, a /24 CIDR block for High Scale tier, or a /26 CIDR block for - * Enterprise tier in one of the [internal IP address - * ranges](https://www.arin.net/reference/research/statistics/address_filters/) - * that identifies the range of IP addresses reserved for this instance. For - * example, 10.0.0.0/29, 192.168.0.0/24 or 192.168.0.0/26, respectively. The - * range you specify can't overlap with either existing subnets or assigned IP - * address ranges for other Filestore instances in the selected VPC - * network. - * - * Generated from protobuf field string reserved_ip_range = 4; - * @return string - */ - public function getReservedIpRange() - { - return $this->reserved_ip_range; - } - - /** - * Optional, reserved_ip_range can have one of the following two types of - * values. - * * CIDR range value when using DIRECT_PEERING connect mode. - * * [Allocated IP address - * range](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-internal-ip-address) - * when using PRIVATE_SERVICE_ACCESS connect mode. - * When the name of an allocated IP address range is specified, it must be one - * of the ranges associated with the private service access connection. - * When specified as a direct CIDR value, it must be a /29 CIDR block for - * Basic tier, a /24 CIDR block for High Scale tier, or a /26 CIDR block for - * Enterprise tier in one of the [internal IP address - * ranges](https://www.arin.net/reference/research/statistics/address_filters/) - * that identifies the range of IP addresses reserved for this instance. For - * example, 10.0.0.0/29, 192.168.0.0/24 or 192.168.0.0/26, respectively. The - * range you specify can't overlap with either existing subnets or assigned IP - * address ranges for other Filestore instances in the selected VPC - * network. - * - * Generated from protobuf field string reserved_ip_range = 4; - * @param string $var - * @return $this - */ - public function setReservedIpRange($var) - { - GPBUtil::checkString($var, True); - $this->reserved_ip_range = $var; - - return $this; - } - - /** - * Output only. IPv4 addresses in the format - * `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format - * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`. - * - * Generated from protobuf field repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIpAddresses() - { - return $this->ip_addresses; - } - - /** - * Output only. IPv4 addresses in the format - * `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format - * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`. - * - * Generated from protobuf field repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIpAddresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->ip_addresses = $arr; - - return $this; - } - - /** - * The network connect mode of the Filestore instance. - * If not provided, the connect mode defaults to DIRECT_PEERING. - * - * Generated from protobuf field .google.cloud.filestore.v1.NetworkConfig.ConnectMode connect_mode = 6; - * @return int - */ - public function getConnectMode() - { - return $this->connect_mode; - } - - /** - * The network connect mode of the Filestore instance. - * If not provided, the connect mode defaults to DIRECT_PEERING. - * - * Generated from protobuf field .google.cloud.filestore.v1.NetworkConfig.ConnectMode connect_mode = 6; - * @param int $var - * @return $this - */ - public function setConnectMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Filestore\V1\NetworkConfig\ConnectMode::class); - $this->connect_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig/AddressMode.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig/AddressMode.php deleted file mode 100644 index bb502dfe926e..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig/AddressMode.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.filestore.v1.NetworkConfig.AddressMode - */ -class AddressMode -{ - /** - * Internet protocol not set. - * - * Generated from protobuf enum ADDRESS_MODE_UNSPECIFIED = 0; - */ - const ADDRESS_MODE_UNSPECIFIED = 0; - /** - * Use the IPv4 internet protocol. - * - * Generated from protobuf enum MODE_IPV4 = 1; - */ - const MODE_IPV4 = 1; - - private static $valueToName = [ - self::ADDRESS_MODE_UNSPECIFIED => 'ADDRESS_MODE_UNSPECIFIED', - self::MODE_IPV4 => 'MODE_IPV4', - ]; - - 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(AddressMode::class, \Google\Cloud\Filestore\V1\NetworkConfig_AddressMode::class); - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig/ConnectMode.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig/ConnectMode.php deleted file mode 100644 index fcb3a514872a..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig/ConnectMode.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.filestore.v1.NetworkConfig.ConnectMode - */ -class ConnectMode -{ - /** - * Not set. - * - * Generated from protobuf enum CONNECT_MODE_UNSPECIFIED = 0; - */ - const CONNECT_MODE_UNSPECIFIED = 0; - /** - * Connect via direct peering to the Filestore service. - * - * Generated from protobuf enum DIRECT_PEERING = 1; - */ - const DIRECT_PEERING = 1; - /** - * Connect to your Filestore instance using Private Service - * Access. Private services access provides an IP address range for multiple - * Google Cloud services, including Filestore. - * - * Generated from protobuf enum PRIVATE_SERVICE_ACCESS = 2; - */ - const PRIVATE_SERVICE_ACCESS = 2; - - private static $valueToName = [ - self::CONNECT_MODE_UNSPECIFIED => 'CONNECT_MODE_UNSPECIFIED', - self::DIRECT_PEERING => 'DIRECT_PEERING', - self::PRIVATE_SERVICE_ACCESS => 'PRIVATE_SERVICE_ACCESS', - ]; - - 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(ConnectMode::class, \Google\Cloud\Filestore\V1\NetworkConfig_ConnectMode::class); - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions.php deleted file mode 100644 index 9e58d779e63d..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions.php +++ /dev/null @@ -1,271 +0,0 @@ -google.cloud.filestore.v1.NfsExportOptions - */ -class NfsExportOptions extends \Google\Protobuf\Internal\Message -{ - /** - * List of either an IPv4 addresses in the format - * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format - * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the - * file share. - * Overlapping IP ranges are not allowed, both within and across - * NfsExportOptions. An error will be returned. - * The limit is 64 IP ranges/addresses for each FileShareConfig among all - * NfsExportOptions. - * - * Generated from protobuf field repeated string ip_ranges = 1; - */ - private $ip_ranges; - /** - * Either READ_ONLY, for allowing only read requests on the exported - * directory, or READ_WRITE, for allowing both read and write requests. - * The default is READ_WRITE. - * - * Generated from protobuf field .google.cloud.filestore.v1.NfsExportOptions.AccessMode access_mode = 2; - */ - protected $access_mode = 0; - /** - * Either NO_ROOT_SQUASH, for allowing root access on the exported directory, - * or ROOT_SQUASH, for not allowing root access. The default is - * NO_ROOT_SQUASH. - * - * Generated from protobuf field .google.cloud.filestore.v1.NfsExportOptions.SquashMode squash_mode = 3; - */ - protected $squash_mode = 0; - /** - * An integer representing the anonymous user id with a default value of - * 65534. - * Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be - * returned if this field is specified for other squash_mode settings. - * - * Generated from protobuf field int64 anon_uid = 4; - */ - protected $anon_uid = 0; - /** - * An integer representing the anonymous group id with a default value of - * 65534. - * Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be - * returned if this field is specified for other squash_mode settings. - * - * Generated from protobuf field int64 anon_gid = 5; - */ - protected $anon_gid = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $ip_ranges - * List of either an IPv4 addresses in the format - * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format - * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the - * file share. - * Overlapping IP ranges are not allowed, both within and across - * NfsExportOptions. An error will be returned. - * The limit is 64 IP ranges/addresses for each FileShareConfig among all - * NfsExportOptions. - * @type int $access_mode - * Either READ_ONLY, for allowing only read requests on the exported - * directory, or READ_WRITE, for allowing both read and write requests. - * The default is READ_WRITE. - * @type int $squash_mode - * Either NO_ROOT_SQUASH, for allowing root access on the exported directory, - * or ROOT_SQUASH, for not allowing root access. The default is - * NO_ROOT_SQUASH. - * @type int|string $anon_uid - * An integer representing the anonymous user id with a default value of - * 65534. - * Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be - * returned if this field is specified for other squash_mode settings. - * @type int|string $anon_gid - * An integer representing the anonymous group id with a default value of - * 65534. - * Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be - * returned if this field is specified for other squash_mode settings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * List of either an IPv4 addresses in the format - * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format - * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the - * file share. - * Overlapping IP ranges are not allowed, both within and across - * NfsExportOptions. An error will be returned. - * The limit is 64 IP ranges/addresses for each FileShareConfig among all - * NfsExportOptions. - * - * Generated from protobuf field repeated string ip_ranges = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIpRanges() - { - return $this->ip_ranges; - } - - /** - * List of either an IPv4 addresses in the format - * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format - * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the - * file share. - * Overlapping IP ranges are not allowed, both within and across - * NfsExportOptions. An error will be returned. - * The limit is 64 IP ranges/addresses for each FileShareConfig among all - * NfsExportOptions. - * - * Generated from protobuf field repeated string ip_ranges = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIpRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->ip_ranges = $arr; - - return $this; - } - - /** - * Either READ_ONLY, for allowing only read requests on the exported - * directory, or READ_WRITE, for allowing both read and write requests. - * The default is READ_WRITE. - * - * Generated from protobuf field .google.cloud.filestore.v1.NfsExportOptions.AccessMode access_mode = 2; - * @return int - */ - public function getAccessMode() - { - return $this->access_mode; - } - - /** - * Either READ_ONLY, for allowing only read requests on the exported - * directory, or READ_WRITE, for allowing both read and write requests. - * The default is READ_WRITE. - * - * Generated from protobuf field .google.cloud.filestore.v1.NfsExportOptions.AccessMode access_mode = 2; - * @param int $var - * @return $this - */ - public function setAccessMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Filestore\V1\NfsExportOptions\AccessMode::class); - $this->access_mode = $var; - - return $this; - } - - /** - * Either NO_ROOT_SQUASH, for allowing root access on the exported directory, - * or ROOT_SQUASH, for not allowing root access. The default is - * NO_ROOT_SQUASH. - * - * Generated from protobuf field .google.cloud.filestore.v1.NfsExportOptions.SquashMode squash_mode = 3; - * @return int - */ - public function getSquashMode() - { - return $this->squash_mode; - } - - /** - * Either NO_ROOT_SQUASH, for allowing root access on the exported directory, - * or ROOT_SQUASH, for not allowing root access. The default is - * NO_ROOT_SQUASH. - * - * Generated from protobuf field .google.cloud.filestore.v1.NfsExportOptions.SquashMode squash_mode = 3; - * @param int $var - * @return $this - */ - public function setSquashMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Filestore\V1\NfsExportOptions\SquashMode::class); - $this->squash_mode = $var; - - return $this; - } - - /** - * An integer representing the anonymous user id with a default value of - * 65534. - * Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be - * returned if this field is specified for other squash_mode settings. - * - * Generated from protobuf field int64 anon_uid = 4; - * @return int|string - */ - public function getAnonUid() - { - return $this->anon_uid; - } - - /** - * An integer representing the anonymous user id with a default value of - * 65534. - * Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be - * returned if this field is specified for other squash_mode settings. - * - * Generated from protobuf field int64 anon_uid = 4; - * @param int|string $var - * @return $this - */ - public function setAnonUid($var) - { - GPBUtil::checkInt64($var); - $this->anon_uid = $var; - - return $this; - } - - /** - * An integer representing the anonymous group id with a default value of - * 65534. - * Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be - * returned if this field is specified for other squash_mode settings. - * - * Generated from protobuf field int64 anon_gid = 5; - * @return int|string - */ - public function getAnonGid() - { - return $this->anon_gid; - } - - /** - * An integer representing the anonymous group id with a default value of - * 65534. - * Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be - * returned if this field is specified for other squash_mode settings. - * - * Generated from protobuf field int64 anon_gid = 5; - * @param int|string $var - * @return $this - */ - public function setAnonGid($var) - { - GPBUtil::checkInt64($var); - $this->anon_gid = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions/AccessMode.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions/AccessMode.php deleted file mode 100644 index 22e3a736af2a..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions/AccessMode.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.filestore.v1.NfsExportOptions.AccessMode - */ -class AccessMode -{ - /** - * AccessMode not set. - * - * Generated from protobuf enum ACCESS_MODE_UNSPECIFIED = 0; - */ - const ACCESS_MODE_UNSPECIFIED = 0; - /** - * The client can only read the file share. - * - * Generated from protobuf enum READ_ONLY = 1; - */ - const READ_ONLY = 1; - /** - * The client can read and write the file share (default). - * - * Generated from protobuf enum READ_WRITE = 2; - */ - const READ_WRITE = 2; - - private static $valueToName = [ - self::ACCESS_MODE_UNSPECIFIED => 'ACCESS_MODE_UNSPECIFIED', - self::READ_ONLY => 'READ_ONLY', - self::READ_WRITE => 'READ_WRITE', - ]; - - 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(AccessMode::class, \Google\Cloud\Filestore\V1\NfsExportOptions_AccessMode::class); - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions/SquashMode.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions/SquashMode.php deleted file mode 100644 index 5cc43da713a5..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions/SquashMode.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.filestore.v1.NfsExportOptions.SquashMode - */ -class SquashMode -{ - /** - * SquashMode not set. - * - * Generated from protobuf enum SQUASH_MODE_UNSPECIFIED = 0; - */ - const SQUASH_MODE_UNSPECIFIED = 0; - /** - * The Root user has root access to the file share (default). - * - * Generated from protobuf enum NO_ROOT_SQUASH = 1; - */ - const NO_ROOT_SQUASH = 1; - /** - * The Root user has squashed access to the anonymous uid/gid. - * - * Generated from protobuf enum ROOT_SQUASH = 2; - */ - const ROOT_SQUASH = 2; - - private static $valueToName = [ - self::SQUASH_MODE_UNSPECIFIED => 'SQUASH_MODE_UNSPECIFIED', - self::NO_ROOT_SQUASH => 'NO_ROOT_SQUASH', - self::ROOT_SQUASH => 'ROOT_SQUASH', - ]; - - 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(SquashMode::class, \Google\Cloud\Filestore\V1\NfsExportOptions_SquashMode::class); - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/RestoreInstanceRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/RestoreInstanceRequest.php deleted file mode 100644 index 85a76b2484c5..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/RestoreInstanceRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.filestore.v1.RestoreInstanceRequest - */ -class RestoreInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the instance, in the format - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. Name of the file share in the Filestore instance that the backup - * is being restored to. - * - * Generated from protobuf field string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $file_share = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the instance, in the format - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. - * @type string $file_share - * Required. Name of the file share in the Filestore instance that the backup - * is being restored to. - * @type string $source_backup - * The resource name of the backup, in the format - * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the instance, in the format - * `projects/{project_number}/locations/{location_id}/instances/{instance_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. The resource name of the instance, in the format - * `projects/{project_number}/locations/{location_id}/instances/{instance_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; - } - - /** - * Required. Name of the file share in the Filestore instance that the backup - * is being restored to. - * - * Generated from protobuf field string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFileShare() - { - return $this->file_share; - } - - /** - * Required. Name of the file share in the Filestore instance that the backup - * is being restored to. - * - * Generated from protobuf field string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFileShare($var) - { - GPBUtil::checkString($var, True); - $this->file_share = $var; - - return $this; - } - - /** - * The resource name of the backup, in the format - * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. - * - * Generated from protobuf field string source_backup = 3 [(.google.api.resource_reference) = { - * @return string - */ - public function getSourceBackup() - { - return $this->readOneof(3); - } - - public function hasSourceBackup() - { - return $this->hasOneof(3); - } - - /** - * The resource name of the backup, in the format - * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. - * - * Generated from protobuf field string source_backup = 3 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSourceBackup($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/RevertInstanceRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/RevertInstanceRequest.php deleted file mode 100644 index 581d86803255..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/RevertInstanceRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.filestore.v1.RevertInstanceRequest - */ -class RevertInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. - * The resource name of the instance, in the format - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The snapshot resource ID, in the format 'my-snapshot', where the - * specified ID is the {snapshot_id} of the fully qualified name like - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}` - * - * Generated from protobuf field string target_snapshot_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $target_snapshot_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. - * The resource name of the instance, in the format - * @type string $target_snapshot_id - * Required. The snapshot resource ID, in the format 'my-snapshot', where the - * specified ID is the {snapshot_id} of the fully qualified name like - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. - * The resource name of the instance, in the format - * - * 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. - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. - * The resource name of the instance, in the format - * - * 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 snapshot resource ID, in the format 'my-snapshot', where the - * specified ID is the {snapshot_id} of the fully qualified name like - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}` - * - * Generated from protobuf field string target_snapshot_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTargetSnapshotId() - { - return $this->target_snapshot_id; - } - - /** - * Required. The snapshot resource ID, in the format 'my-snapshot', where the - * specified ID is the {snapshot_id} of the fully qualified name like - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}` - * - * Generated from protobuf field string target_snapshot_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTargetSnapshotId($var) - { - GPBUtil::checkString($var, True); - $this->target_snapshot_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Snapshot.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Snapshot.php deleted file mode 100644 index aba33831cf48..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Snapshot.php +++ /dev/null @@ -1,259 +0,0 @@ -google.cloud.filestore.v1.Snapshot - */ -class Snapshot extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the snapshot, in the format - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * A description of the snapshot with 2048 characters or less. - * Requests with longer descriptions will be rejected. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Output only. The snapshot state. - * - * Generated from protobuf field .google.cloud.filestore.v1.Snapshot.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time when the snapshot was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 5; - */ - private $labels; - /** - * Output only. The amount of bytes needed to allocate a full copy of the - * snapshot content - * - * Generated from protobuf field int64 filesystem_used_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $filesystem_used_bytes = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the snapshot, in the format - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`. - * @type string $description - * A description of the snapshot with 2048 characters or less. - * Requests with longer descriptions will be rejected. - * @type int $state - * Output only. The snapshot state. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the snapshot was created. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Resource labels to represent user provided metadata. - * @type int|string $filesystem_used_bytes - * Output only. The amount of bytes needed to allocate a full copy of the - * snapshot content - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the snapshot, in the format - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`. - * - * 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 of the snapshot, in the format - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`. - * - * 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; - } - - /** - * A description of the snapshot with 2048 characters or less. - * Requests with longer descriptions will be rejected. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A description of the snapshot with 2048 characters or less. - * Requests with longer descriptions will be rejected. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The snapshot state. - * - * Generated from protobuf field .google.cloud.filestore.v1.Snapshot.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The snapshot state. - * - * Generated from protobuf field .google.cloud.filestore.v1.Snapshot.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Filestore\V1\Snapshot\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time when the snapshot 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 when the snapshot 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; - } - - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 5; - * @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; - } - - /** - * Output only. The amount of bytes needed to allocate a full copy of the - * snapshot content - * - * Generated from protobuf field int64 filesystem_used_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getFilesystemUsedBytes() - { - return $this->filesystem_used_bytes; - } - - /** - * Output only. The amount of bytes needed to allocate a full copy of the - * snapshot content - * - * Generated from protobuf field int64 filesystem_used_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setFilesystemUsedBytes($var) - { - GPBUtil::checkInt64($var); - $this->filesystem_used_bytes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Snapshot/State.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Snapshot/State.php deleted file mode 100644 index 6b5f420f0641..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Snapshot/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.filestore.v1.Snapshot.State - */ -class State -{ - /** - * State not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Snapshot is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Snapshot is available for use. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * Snapshot is being deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::DELETING => 'DELETING', - ]; - - 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\Filestore\V1\Snapshot_State::class); - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateBackupRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateBackupRequest.php deleted file mode 100644 index 1af115b57bb8..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateBackupRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.filestore.v1.UpdateBackupRequest - */ -class UpdateBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A [backup resource][google.cloud.filestore.v1.Backup] - * - * Generated from protobuf field .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup = null; - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Filestore\V1\Backup $backup Required. A [backup resource][google.cloud.filestore.v1.Backup] - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. - * - * @return \Google\Cloud\Filestore\V1\UpdateBackupRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Filestore\V1\Backup $backup, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setBackup($backup) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Filestore\V1\Backup $backup - * Required. A [backup resource][google.cloud.filestore.v1.Backup] - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. A [backup resource][google.cloud.filestore.v1.Backup] - * - * Generated from protobuf field .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Filestore\V1\Backup|null - */ - public function getBackup() - { - return $this->backup; - } - - public function hasBackup() - { - return isset($this->backup); - } - - public function clearBackup() - { - unset($this->backup); - } - - /** - * Required. A [backup resource][google.cloud.filestore.v1.Backup] - * - * Generated from protobuf field .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Filestore\V1\Backup $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Filestore\V1\Backup::class); - $this->backup = $var; - - return $this; - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * - * 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. Mask of fields to update. At least one path must be supplied in - * this field. - * - * 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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateInstanceRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateInstanceRequest.php deleted file mode 100644 index 5a1930af15f1..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateInstanceRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.filestore.v1.UpdateInstanceRequest - */ -class UpdateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Mask of fields to update. At least one path must be supplied in this - * field. The elements of the repeated paths field may only include these - * fields: - * * "description" - * * "file_shares" - * * "labels" - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - */ - protected $update_mask = null; - /** - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance instance = 2; - */ - protected $instance = null; - - /** - * @param \Google\Cloud\Filestore\V1\Instance $instance Only fields specified in update_mask are updated. - * @param \Google\Protobuf\FieldMask $updateMask Mask of fields to update. At least one path must be supplied in this - * field. The elements of the repeated paths field may only include these - * fields: - * - * * "description" - * * "file_shares" - * * "labels" - * - * @return \Google\Cloud\Filestore\V1\UpdateInstanceRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Filestore\V1\Instance $instance, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setInstance($instance) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Mask of fields to update. At least one path must be supplied in this - * field. The elements of the repeated paths field may only include these - * fields: - * * "description" - * * "file_shares" - * * "labels" - * @type \Google\Cloud\Filestore\V1\Instance $instance - * Only fields specified in update_mask are updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Mask of fields to update. At least one path must be supplied in this - * field. The elements of the repeated paths field may only include these - * fields: - * * "description" - * * "file_shares" - * * "labels" - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - * @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); - } - - /** - * Mask of fields to update. At least one path must be supplied in this - * field. The elements of the repeated paths field may only include these - * fields: - * * "description" - * * "file_shares" - * * "labels" - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance instance = 2; - * @return \Google\Cloud\Filestore\V1\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance instance = 2; - * @param \Google\Cloud\Filestore\V1\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Filestore\V1\Instance::class); - $this->instance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateSnapshotRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateSnapshotRequest.php deleted file mode 100644 index a2afac066a32..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateSnapshotRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.filestore.v1.UpdateSnapshotRequest - */ -class UpdateSnapshotRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. A snapshot resource. - * - * Generated from protobuf field .google.cloud.filestore.v1.Snapshot snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $snapshot = null; - - /** - * @param \Google\Cloud\Filestore\V1\Snapshot $snapshot Required. A snapshot resource. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. - * - * @return \Google\Cloud\Filestore\V1\UpdateSnapshotRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Filestore\V1\Snapshot $snapshot, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSnapshot($snapshot) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * @type \Google\Cloud\Filestore\V1\Snapshot $snapshot - * Required. A snapshot resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Mask of fields to update. At least one path must be supplied in - * this field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; - } - - /** - * Required. A snapshot resource. - * - * Generated from protobuf field .google.cloud.filestore.v1.Snapshot snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Filestore\V1\Snapshot|null - */ - public function getSnapshot() - { - return $this->snapshot; - } - - public function hasSnapshot() - { - return isset($this->snapshot); - } - - public function clearSnapshot() - { - unset($this->snapshot); - } - - /** - * Required. A snapshot resource. - * - * Generated from protobuf field .google.cloud.filestore.v1.Snapshot snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Filestore\V1\Snapshot $var - * @return $this - */ - public function setSnapshot($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Filestore\V1\Snapshot::class); - $this->snapshot = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_backup.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_backup.php deleted file mode 100644 index 947bdb22755d..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_backup.php +++ /dev/null @@ -1,96 +0,0 @@ -setParent($formattedParent) - ->setBackup($backup) - ->setBackupId($backupId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudFilestoreManagerClient->createBackup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Backup $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 = CloudFilestoreManagerClient::locationName('[PROJECT]', '[LOCATION]'); - $backupId = '[BACKUP_ID]'; - - create_backup_sample($formattedParent, $backupId); -} -// [END file_v1_generated_CloudFilestoreManager_CreateBackup_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_instance.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_instance.php deleted file mode 100644 index be50d870a674..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_instance.php +++ /dev/null @@ -1,94 +0,0 @@ -setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudFilestoreManagerClient->createInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $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 = CloudFilestoreManagerClient::locationName('[PROJECT]', '[LOCATION]'); - $instanceId = '[INSTANCE_ID]'; - - create_instance_sample($formattedParent, $instanceId); -} -// [END file_v1_generated_CloudFilestoreManager_CreateInstance_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_snapshot.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_snapshot.php deleted file mode 100644 index 036467d2af79..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_snapshot.php +++ /dev/null @@ -1,97 +0,0 @@ -setParent($formattedParent) - ->setSnapshotId($snapshotId) - ->setSnapshot($snapshot); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudFilestoreManagerClient->createSnapshot($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Snapshot $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 = CloudFilestoreManagerClient::instanceName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]' - ); - $snapshotId = '[SNAPSHOT_ID]'; - - create_snapshot_sample($formattedParent, $snapshotId); -} -// [END file_v1_generated_CloudFilestoreManager_CreateSnapshot_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_backup.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_backup.php deleted file mode 100644 index 08065d334666..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_backup.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudFilestoreManagerClient->deleteBackup($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 = CloudFilestoreManagerClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - - delete_backup_sample($formattedName); -} -// [END file_v1_generated_CloudFilestoreManager_DeleteBackup_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_instance.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_instance.php deleted file mode 100644 index e8feb5860aa2..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_instance.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudFilestoreManagerClient->deleteInstance($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 = CloudFilestoreManagerClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - delete_instance_sample($formattedName); -} -// [END file_v1_generated_CloudFilestoreManager_DeleteInstance_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_snapshot.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_snapshot.php deleted file mode 100644 index 4cf02b0ca1fb..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_snapshot.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudFilestoreManagerClient->deleteSnapshot($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 = CloudFilestoreManagerClient::snapshotName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]', - '[SNAPSHOT]' - ); - - delete_snapshot_sample($formattedName); -} -// [END file_v1_generated_CloudFilestoreManager_DeleteSnapshot_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_backup.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_backup.php deleted file mode 100644 index 55d7aa278be1..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_backup.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Backup $response */ - $response = $cloudFilestoreManagerClient->getBackup($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 = CloudFilestoreManagerClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - - get_backup_sample($formattedName); -} -// [END file_v1_generated_CloudFilestoreManager_GetBackup_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_instance.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_instance.php deleted file mode 100644 index 932a7e50802a..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_instance.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Instance $response */ - $response = $cloudFilestoreManagerClient->getInstance($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 = CloudFilestoreManagerClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - get_instance_sample($formattedName); -} -// [END file_v1_generated_CloudFilestoreManager_GetInstance_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_snapshot.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_snapshot.php deleted file mode 100644 index cdc2860d1a0a..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_snapshot.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Snapshot $response */ - $response = $cloudFilestoreManagerClient->getSnapshot($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 = CloudFilestoreManagerClient::snapshotName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]', - '[SNAPSHOT]' - ); - - get_snapshot_sample($formattedName); -} -// [END file_v1_generated_CloudFilestoreManager_GetSnapshot_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_backups.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_backups.php deleted file mode 100644 index bc677130a252..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_backups.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $cloudFilestoreManagerClient->listBackups($request); - - /** @var Backup $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 = CloudFilestoreManagerClient::locationName('[PROJECT]', '[LOCATION]'); - - list_backups_sample($formattedParent); -} -// [END file_v1_generated_CloudFilestoreManager_ListBackups_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_instances.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_instances.php deleted file mode 100644 index 8b359cd8a178..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_instances.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $cloudFilestoreManagerClient->listInstances($request); - - /** @var Instance $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 = CloudFilestoreManagerClient::locationName('[PROJECT]', '[LOCATION]'); - - list_instances_sample($formattedParent); -} -// [END file_v1_generated_CloudFilestoreManager_ListInstances_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_snapshots.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_snapshots.php deleted file mode 100644 index df07188daeed..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_snapshots.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $cloudFilestoreManagerClient->listSnapshots($request); - - /** @var Snapshot $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 = CloudFilestoreManagerClient::instanceName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]' - ); - - list_snapshots_sample($formattedParent); -} -// [END file_v1_generated_CloudFilestoreManager_ListSnapshots_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/restore_instance.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/restore_instance.php deleted file mode 100644 index 86b0b314e0b0..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/restore_instance.php +++ /dev/null @@ -1,92 +0,0 @@ -setName($formattedName) - ->setFileShare($fileShare); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudFilestoreManagerClient->restoreInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $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 = CloudFilestoreManagerClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $fileShare = '[FILE_SHARE]'; - - restore_instance_sample($formattedName, $fileShare); -} -// [END file_v1_generated_CloudFilestoreManager_RestoreInstance_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/revert_instance.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/revert_instance.php deleted file mode 100644 index df648baf77ca..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/revert_instance.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName) - ->setTargetSnapshotId($targetSnapshotId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudFilestoreManagerClient->revertInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $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 = CloudFilestoreManagerClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $targetSnapshotId = '[TARGET_SNAPSHOT_ID]'; - - revert_instance_sample($formattedName, $targetSnapshotId); -} -// [END file_v1_generated_CloudFilestoreManager_RevertInstance_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_backup.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_backup.php deleted file mode 100644 index ed153391fd82..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_backup.php +++ /dev/null @@ -1,74 +0,0 @@ -setBackup($backup) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudFilestoreManagerClient->updateBackup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Backup $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()); - } -} -// [END file_v1_generated_CloudFilestoreManager_UpdateBackup_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_instance.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_instance.php deleted file mode 100644 index e423fa6b8caa..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_instance.php +++ /dev/null @@ -1,69 +0,0 @@ -updateInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $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()); - } -} -// [END file_v1_generated_CloudFilestoreManager_UpdateInstance_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_snapshot.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_snapshot.php deleted file mode 100644 index 6e8689435adf..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_snapshot.php +++ /dev/null @@ -1,74 +0,0 @@ -setUpdateMask($updateMask) - ->setSnapshot($snapshot); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudFilestoreManagerClient->updateSnapshot($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Snapshot $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()); - } -} -// [END file_v1_generated_CloudFilestoreManager_UpdateSnapshot_sync] diff --git a/owl-bot-staging/Filestore/v1/src/V1/Client/CloudFilestoreManagerClient.php b/owl-bot-staging/Filestore/v1/src/V1/Client/CloudFilestoreManagerClient.php deleted file mode 100644 index b9bc176f3650..000000000000 --- a/owl-bot-staging/Filestore/v1/src/V1/Client/CloudFilestoreManagerClient.php +++ /dev/null @@ -1,837 +0,0 @@ - createBackupAsync(CreateBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface createSnapshotAsync(CreateSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBackupAsync(DeleteBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSnapshotAsync(DeleteSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBackupAsync(GetBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSnapshotAsync(GetSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBackupsAsync(ListBackupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSnapshotsAsync(ListSnapshotsRequest $request, array $optionalArgs = []) - * @method PromiseInterface restoreInstanceAsync(RestoreInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface revertInstanceAsync(RevertInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBackupAsync(UpdateBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateInstanceAsync(UpdateInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSnapshotAsync(UpdateSnapshotRequest $request, array $optionalArgs = []) - */ -final class CloudFilestoreManagerClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.filestore.v1.CloudFilestoreManager'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'file.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'file.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', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/cloud_filestore_manager_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/cloud_filestore_manager_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/cloud_filestore_manager_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/cloud_filestore_manager_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 = isset($this->descriptors[$methodName]['longRunning']) ? $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 backup - * resource. - * - * @param string $project - * @param string $location - * @param string $backup - * - * @return string The formatted backup resource. - */ - public static function backupName(string $project, string $location, string $backup): string - { - return self::getPathTemplate('backup')->render([ - 'project' => $project, - 'location' => $location, - 'backup' => $backup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $location - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName(string $project, string $location, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - ]); - } - - /** - * 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 snapshot - * resource. - * - * @param string $project - * @param string $location - * @param string $instance - * @param string $snapshot - * - * @return string The formatted snapshot resource. - */ - public static function snapshotName(string $project, string $location, string $instance, string $snapshot): string - { - return self::getPathTemplate('snapshot')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - 'snapshot' => $snapshot, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - backup: projects/{project}/locations/{location}/backups/{backup} - * - instance: projects/{project}/locations/{location}/instances/{instance} - * - location: projects/{project}/locations/{location} - * - snapshot: projects/{project}/locations/{location}/instances/{instance}/snapshots/{snapshot} - * - * 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 $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 'file.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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 backup. - * - * The async variant is {@see CloudFilestoreManagerClient::createBackupAsync()} . - * - * @example samples/V1/CloudFilestoreManagerClient/create_backup.php - * - * @param CreateBackupRequest $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 createBackup(CreateBackupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateBackup', $request, $callOptions)->wait(); - } - - /** - * Creates an instance. - * When creating from a backup, the capacity of the new instance needs to be - * equal to or larger than the capacity of the backup (and also equal to or - * larger than the minimum capacity of the tier). - * - * The async variant is {@see CloudFilestoreManagerClient::createInstanceAsync()} . - * - * @example samples/V1/CloudFilestoreManagerClient/create_instance.php - * - * @param CreateInstanceRequest $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 createInstance(CreateInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateInstance', $request, $callOptions)->wait(); - } - - /** - * Creates a snapshot. - * - * The async variant is {@see CloudFilestoreManagerClient::createSnapshotAsync()} . - * - * @example samples/V1/CloudFilestoreManagerClient/create_snapshot.php - * - * @param CreateSnapshotRequest $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 createSnapshot(CreateSnapshotRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateSnapshot', $request, $callOptions)->wait(); - } - - /** - * Deletes a backup. - * - * The async variant is {@see CloudFilestoreManagerClient::deleteBackupAsync()} . - * - * @example samples/V1/CloudFilestoreManagerClient/delete_backup.php - * - * @param DeleteBackupRequest $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 deleteBackup(DeleteBackupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteBackup', $request, $callOptions)->wait(); - } - - /** - * Deletes an instance. - * - * The async variant is {@see CloudFilestoreManagerClient::deleteInstanceAsync()} . - * - * @example samples/V1/CloudFilestoreManagerClient/delete_instance.php - * - * @param DeleteInstanceRequest $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 deleteInstance(DeleteInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteInstance', $request, $callOptions)->wait(); - } - - /** - * Deletes a snapshot. - * - * The async variant is {@see CloudFilestoreManagerClient::deleteSnapshotAsync()} . - * - * @example samples/V1/CloudFilestoreManagerClient/delete_snapshot.php - * - * @param DeleteSnapshotRequest $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 deleteSnapshot(DeleteSnapshotRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteSnapshot', $request, $callOptions)->wait(); - } - - /** - * Gets the details of a specific backup. - * - * The async variant is {@see CloudFilestoreManagerClient::getBackupAsync()} . - * - * @example samples/V1/CloudFilestoreManagerClient/get_backup.php - * - * @param GetBackupRequest $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 Backup - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBackup(GetBackupRequest $request, array $callOptions = []): Backup - { - return $this->startApiCall('GetBackup', $request, $callOptions)->wait(); - } - - /** - * Gets the details of a specific instance. - * - * The async variant is {@see CloudFilestoreManagerClient::getInstanceAsync()} . - * - * @example samples/V1/CloudFilestoreManagerClient/get_instance.php - * - * @param GetInstanceRequest $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 Instance - * - * @throws ApiException Thrown if the API call fails. - */ - public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance - { - return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); - } - - /** - * Gets the details of a specific snapshot. - * - * The async variant is {@see CloudFilestoreManagerClient::getSnapshotAsync()} . - * - * @example samples/V1/CloudFilestoreManagerClient/get_snapshot.php - * - * @param GetSnapshotRequest $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 Snapshot - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSnapshot(GetSnapshotRequest $request, array $callOptions = []): Snapshot - { - return $this->startApiCall('GetSnapshot', $request, $callOptions)->wait(); - } - - /** - * Lists all backups in a project for either a specified location or for all - * locations. - * - * The async variant is {@see CloudFilestoreManagerClient::listBackupsAsync()} . - * - * @example samples/V1/CloudFilestoreManagerClient/list_backups.php - * - * @param ListBackupsRequest $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 listBackups(ListBackupsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListBackups', $request, $callOptions); - } - - /** - * Lists all instances in a project for either a specified location - * or for all locations. - * - * The async variant is {@see CloudFilestoreManagerClient::listInstancesAsync()} . - * - * @example samples/V1/CloudFilestoreManagerClient/list_instances.php - * - * @param ListInstancesRequest $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 listInstances(ListInstancesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListInstances', $request, $callOptions); - } - - /** - * Lists all snapshots in a project for either a specified location - * or for all locations. - * - * The async variant is {@see CloudFilestoreManagerClient::listSnapshotsAsync()} . - * - * @example samples/V1/CloudFilestoreManagerClient/list_snapshots.php - * - * @param ListSnapshotsRequest $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 listSnapshots(ListSnapshotsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSnapshots', $request, $callOptions); - } - - /** - * Restores an existing instance's file share from a backup. - * - * The capacity of the instance needs to be equal to or larger than the - * capacity of the backup (and also equal to or larger than the minimum - * capacity of the tier). - * - * The async variant is {@see CloudFilestoreManagerClient::restoreInstanceAsync()} - * . - * - * @example samples/V1/CloudFilestoreManagerClient/restore_instance.php - * - * @param RestoreInstanceRequest $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 restoreInstance(RestoreInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RestoreInstance', $request, $callOptions)->wait(); - } - - /** - * Revert an existing instance's file system to a specified snapshot. - * - * The async variant is {@see CloudFilestoreManagerClient::revertInstanceAsync()} . - * - * @example samples/V1/CloudFilestoreManagerClient/revert_instance.php - * - * @param RevertInstanceRequest $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 revertInstance(RevertInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RevertInstance', $request, $callOptions)->wait(); - } - - /** - * Updates the settings of a specific backup. - * - * The async variant is {@see CloudFilestoreManagerClient::updateBackupAsync()} . - * - * @example samples/V1/CloudFilestoreManagerClient/update_backup.php - * - * @param UpdateBackupRequest $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 updateBackup(UpdateBackupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateBackup', $request, $callOptions)->wait(); - } - - /** - * Updates the settings of a specific instance. - * - * The async variant is {@see CloudFilestoreManagerClient::updateInstanceAsync()} . - * - * @example samples/V1/CloudFilestoreManagerClient/update_instance.php - * - * @param UpdateInstanceRequest $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 updateInstance(UpdateInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateInstance', $request, $callOptions)->wait(); - } - - /** - * Updates the settings of a specific snapshot. - * - * The async variant is {@see CloudFilestoreManagerClient::updateSnapshotAsync()} . - * - * @example samples/V1/CloudFilestoreManagerClient/update_snapshot.php - * - * @param UpdateSnapshotRequest $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 updateSnapshot(UpdateSnapshotRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateSnapshot', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Filestore/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Filestore/v1/src/V1/gapic_metadata.json deleted file mode 100644 index f04450681c16..000000000000 --- a/owl-bot-staging/Filestore/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.filestore.v1", - "libraryPackage": "Google\\Cloud\\Filestore\\V1", - "services": { - "CloudFilestoreManager": { - "clients": { - "grpc": { - "libraryClient": "CloudFilestoreManagerGapicClient", - "rpcs": { - "CreateBackup": { - "methods": [ - "createBackup" - ] - }, - "CreateInstance": { - "methods": [ - "createInstance" - ] - }, - "CreateSnapshot": { - "methods": [ - "createSnapshot" - ] - }, - "DeleteBackup": { - "methods": [ - "deleteBackup" - ] - }, - "DeleteInstance": { - "methods": [ - "deleteInstance" - ] - }, - "DeleteSnapshot": { - "methods": [ - "deleteSnapshot" - ] - }, - "GetBackup": { - "methods": [ - "getBackup" - ] - }, - "GetInstance": { - "methods": [ - "getInstance" - ] - }, - "GetSnapshot": { - "methods": [ - "getSnapshot" - ] - }, - "ListBackups": { - "methods": [ - "listBackups" - ] - }, - "ListInstances": { - "methods": [ - "listInstances" - ] - }, - "ListSnapshots": { - "methods": [ - "listSnapshots" - ] - }, - "RestoreInstance": { - "methods": [ - "restoreInstance" - ] - }, - "RevertInstance": { - "methods": [ - "revertInstance" - ] - }, - "UpdateBackup": { - "methods": [ - "updateBackup" - ] - }, - "UpdateInstance": { - "methods": [ - "updateInstance" - ] - }, - "UpdateSnapshot": { - "methods": [ - "updateSnapshot" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_client_config.json b/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_client_config.json deleted file mode 100644 index c30412692363..000000000000 --- a/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_client_config.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "interfaces": { - "google.cloud.filestore.v1.CloudFilestoreManager": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [], - "no_retry_2_codes": [], - "no_retry_3_codes": [] - }, - "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": 250, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 32000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000000, - "total_timeout_millis": 60000000 - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 14400000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 14400000, - "total_timeout_millis": 14400000 - }, - "no_retry_3_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CreateBackup": { - "timeout_millis": 60000000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateInstance": { - "timeout_millis": 60000000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteBackup": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" - }, - "DeleteInstance": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" - }, - "DeleteSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetBackup": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetInstance": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListBackups": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListInstances": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListSnapshots": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RestoreInstance": { - "timeout_millis": 60000000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RevertInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateBackup": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" - }, - "UpdateInstance": { - "timeout_millis": 14400000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "UpdateSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_descriptor_config.php b/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_descriptor_config.php deleted file mode 100644 index 880722cf3201..000000000000 --- a/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_descriptor_config.php +++ /dev/null @@ -1,342 +0,0 @@ - [ - 'google.cloud.filestore.v1.CloudFilestoreManager' => [ - 'CreateBackup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Filestore\V1\Backup', - 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Filestore\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSnapshot' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Filestore\V1\Snapshot', - 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteBackup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSnapshot' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RestoreInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Filestore\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RevertInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Filestore\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateBackup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Filestore\V1\Backup', - 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'backup.name', - 'fieldAccessors' => [ - 'getBackup', - 'getName', - ], - ], - ], - ], - 'UpdateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Filestore\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'instance.name', - 'fieldAccessors' => [ - 'getInstance', - 'getName', - ], - ], - ], - ], - 'UpdateSnapshot' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Filestore\V1\Snapshot', - 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'snapshot.name', - 'fieldAccessors' => [ - 'getSnapshot', - 'getName', - ], - ], - ], - ], - 'GetBackup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Filestore\V1\Backup', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetInstance' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Filestore\V1\Instance', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSnapshot' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Filestore\V1\Snapshot', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListBackups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBackups', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Filestore\V1\ListBackupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListInstances' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getInstances', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Filestore\V1\ListInstancesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSnapshots' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSnapshots', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Filestore\V1\ListSnapshotsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'backup' => 'projects/{project}/locations/{location}/backups/{backup}', - 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', - 'location' => 'projects/{project}/locations/{location}', - 'snapshot' => 'projects/{project}/locations/{location}/instances/{instance}/snapshots/{snapshot}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_rest_client_config.php b/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_rest_client_config.php deleted file mode 100644 index d54edee24228..000000000000 --- a/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_rest_client_config.php +++ /dev/null @@ -1,313 +0,0 @@ - [ - 'google.cloud.filestore.v1.CloudFilestoreManager' => [ - 'CreateBackup' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backups', - 'body' => 'backup', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'backup_id', - ], - ], - 'CreateInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', - 'body' => 'instance', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'instance_id', - ], - ], - 'CreateSnapshot' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/snapshots', - 'body' => 'snapshot', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'snapshot_id', - ], - ], - 'DeleteBackup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteInstance' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSnapshot' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/snapshots/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBackup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetInstance' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSnapshot' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/snapshots/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListBackups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListInstances' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSnapshots' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/snapshots', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RestoreInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:restore', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RevertInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:revert', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateBackup' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{backup.name=projects/*/locations/*/backups/*}', - 'body' => 'backup', - 'placeholders' => [ - 'backup.name' => [ - 'getters' => [ - 'getBackup', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateInstance' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{instance.name=projects/*/locations/*/instances/*}', - 'body' => 'instance', - 'placeholders' => [ - 'instance.name' => [ - 'getters' => [ - 'getInstance', - 'getName', - ], - ], - ], - ], - 'UpdateSnapshot' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{snapshot.name=projects/*/locations/*/instances/*/snapshots/*}', - 'body' => 'snapshot', - 'placeholders' => [ - 'snapshot.name' => [ - 'getters' => [ - 'getSnapshot', - '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.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Filestore/v1/tests/Unit/V1/Client/CloudFilestoreManagerClientTest.php b/owl-bot-staging/Filestore/v1/tests/Unit/V1/Client/CloudFilestoreManagerClientTest.php deleted file mode 100644 index 9e24a830313b..000000000000 --- a/owl-bot-staging/Filestore/v1/tests/Unit/V1/Client/CloudFilestoreManagerClientTest.php +++ /dev/null @@ -1,2096 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CloudFilestoreManagerClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CloudFilestoreManagerClient($options); - } - - /** @test */ - public function createBackupTest() - { - $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/createBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $capacityGb = 1923585408; - $storageBytes = 2035244455; - $sourceInstance = 'sourceInstance-677426119'; - $sourceFileShare = 'sourceFileShare-1224476160'; - $downloadBytes = 971924980; - $satisfiesPzi = false; - $kmsKey = 'kmsKey-591635343'; - $expectedResponse = new Backup(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacityGb($capacityGb); - $expectedResponse->setStorageBytes($storageBytes); - $expectedResponse->setSourceInstance($sourceInstance); - $expectedResponse->setSourceFileShare($sourceFileShare); - $expectedResponse->setDownloadBytes($downloadBytes); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $expectedResponse->setKmsKey($kmsKey); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createBackupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $backup = new Backup(); - $backupId = 'backupId1355353272'; - $request = (new CreateBackupRequest()) - ->setParent($formattedParent) - ->setBackup($backup) - ->setBackupId($backupId); - $response = $gapicClient->createBackup($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.filestore.v1.CloudFilestoreManager/CreateBackup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getBackup(); - $this->assertProtobufEquals($backup, $actualValue); - $actualValue = $actualApiRequestObject->getBackupId(); - $this->assertProtobufEquals($backupId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackupTest'); - $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 createBackupExceptionTest() - { - $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/createBackupTest'); - $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]'); - $backup = new Backup(); - $backupId = 'backupId1355353272'; - $request = (new CreateBackupRequest()) - ->setParent($formattedParent) - ->setBackup($backup) - ->setBackupId($backupId); - $response = $gapicClient->createBackup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackupTest'); - 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 createInstanceTest() - { - $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/createInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $statusMessage = 'statusMessage-239442758'; - $etag = 'etag3123477'; - $satisfiesPzi = false; - $kmsKeyName = 'kmsKeyName2094986649'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setStatusMessage($statusMessage); - $expectedResponse->setEtag($etag); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $expectedResponse->setKmsKeyName($kmsKeyName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $instanceId = 'instanceId-2101995259'; - $instance = new Instance(); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - $response = $gapicClient->createInstance($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.filestore.v1.CloudFilestoreManager/CreateInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getInstanceId(); - $this->assertProtobufEquals($instanceId, $actualValue); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - $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 createInstanceExceptionTest() - { - $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/createInstanceTest'); - $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]'); - $instanceId = 'instanceId-2101995259'; - $instance = new Instance(); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - $response = $gapicClient->createInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - 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 createSnapshotTest() - { - $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/createSnapshotTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $filesystemUsedBytes = 387235709; - $expectedResponse = new Snapshot(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setFilesystemUsedBytes($filesystemUsedBytes); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createSnapshotTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $snapshotId = 'snapshotId-168585866'; - $snapshot = new Snapshot(); - $request = (new CreateSnapshotRequest()) - ->setParent($formattedParent) - ->setSnapshotId($snapshotId) - ->setSnapshot($snapshot); - $response = $gapicClient->createSnapshot($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.filestore.v1.CloudFilestoreManager/CreateSnapshot', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSnapshotId(); - $this->assertProtobufEquals($snapshotId, $actualValue); - $actualValue = $actualApiRequestObject->getSnapshot(); - $this->assertProtobufEquals($snapshot, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSnapshotTest'); - $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 createSnapshotExceptionTest() - { - $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/createSnapshotTest'); - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $snapshotId = 'snapshotId-168585866'; - $snapshot = new Snapshot(); - $request = (new CreateSnapshotRequest()) - ->setParent($formattedParent) - ->setSnapshotId($snapshotId) - ->setSnapshot($snapshot); - $response = $gapicClient->createSnapshot($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSnapshotTest'); - 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 deleteBackupTest() - { - $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/deleteBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteBackupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $request = (new DeleteBackupRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteBackup($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.filestore.v1.CloudFilestoreManager/DeleteBackup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteBackupTest'); - $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 deleteBackupExceptionTest() - { - $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/deleteBackupTest'); - $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->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $request = (new DeleteBackupRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteBackup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteBackupTest'); - 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 deleteInstanceTest() - { - $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/deleteInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new DeleteInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteInstance($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.filestore.v1.CloudFilestoreManager/DeleteInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); - $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 deleteInstanceExceptionTest() - { - $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/deleteInstanceTest'); - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new DeleteInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); - 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 deleteSnapshotTest() - { - $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/deleteSnapshotTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteSnapshotTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->snapshotName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[SNAPSHOT]'); - $request = (new DeleteSnapshotRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSnapshot($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.filestore.v1.CloudFilestoreManager/DeleteSnapshot', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSnapshotTest'); - $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 deleteSnapshotExceptionTest() - { - $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/deleteSnapshotTest'); - $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->snapshotName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[SNAPSHOT]'); - $request = (new DeleteSnapshotRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSnapshot($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSnapshotTest'); - 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 getBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $capacityGb = 1923585408; - $storageBytes = 2035244455; - $sourceInstance = 'sourceInstance-677426119'; - $sourceFileShare = 'sourceFileShare-1224476160'; - $downloadBytes = 971924980; - $satisfiesPzi = false; - $kmsKey = 'kmsKey-591635343'; - $expectedResponse = new Backup(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacityGb($capacityGb); - $expectedResponse->setStorageBytes($storageBytes); - $expectedResponse->setSourceInstance($sourceInstance); - $expectedResponse->setSourceFileShare($sourceFileShare); - $expectedResponse->setDownloadBytes($downloadBytes); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $expectedResponse->setKmsKey($kmsKey); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $request = (new GetBackupRequest()) - ->setName($formattedName); - $response = $gapicClient->getBackup($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.filestore.v1.CloudFilestoreManager/GetBackup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupExceptionTest() - { - $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->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $request = (new GetBackupRequest()) - ->setName($formattedName); - try { - $gapicClient->getBackup($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 getInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $statusMessage = 'statusMessage-239442758'; - $etag = 'etag3123477'; - $satisfiesPzi = false; - $kmsKeyName = 'kmsKeyName2094986649'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setStatusMessage($statusMessage); - $expectedResponse->setEtag($etag); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $expectedResponse->setKmsKeyName($kmsKeyName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->getInstance($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.filestore.v1.CloudFilestoreManager/GetInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInstanceExceptionTest() - { - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - try { - $gapicClient->getInstance($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 getSnapshotTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $filesystemUsedBytes = 387235709; - $expectedResponse = new Snapshot(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setFilesystemUsedBytes($filesystemUsedBytes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->snapshotName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[SNAPSHOT]'); - $request = (new GetSnapshotRequest()) - ->setName($formattedName); - $response = $gapicClient->getSnapshot($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.filestore.v1.CloudFilestoreManager/GetSnapshot', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSnapshotExceptionTest() - { - $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->snapshotName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[SNAPSHOT]'); - $request = (new GetSnapshotRequest()) - ->setName($formattedName); - try { - $gapicClient->getSnapshot($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 listBackupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $backupsElement = new Backup(); - $backups = [ - $backupsElement, - ]; - $expectedResponse = new ListBackupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBackups($backups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListBackupsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBackups($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBackups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.filestore.v1.CloudFilestoreManager/ListBackups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupsExceptionTest() - { - $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 ListBackupsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listBackups($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 listInstancesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $instancesElement = new Instance(); - $instances = [ - $instancesElement, - ]; - $expectedResponse = new ListInstancesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setInstances($instances); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInstancesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listInstances($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.filestore.v1.CloudFilestoreManager/ListInstances', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInstancesExceptionTest() - { - $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 ListInstancesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listInstances($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 listSnapshotsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $snapshotsElement = new Snapshot(); - $snapshots = [ - $snapshotsElement, - ]; - $expectedResponse = new ListSnapshotsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSnapshots($snapshots); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ListSnapshotsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSnapshots($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSnapshots()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.filestore.v1.CloudFilestoreManager/ListSnapshots', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSnapshotsExceptionTest() - { - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ListSnapshotsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSnapshots($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 restoreInstanceTest() - { - $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/restoreInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $statusMessage = 'statusMessage-239442758'; - $etag = 'etag3123477'; - $satisfiesPzi = false; - $kmsKeyName = 'kmsKeyName2094986649'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setStatusMessage($statusMessage); - $expectedResponse->setEtag($etag); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $expectedResponse->setKmsKeyName($kmsKeyName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/restoreInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $fileShare = 'fileShare2143984476'; - $request = (new RestoreInstanceRequest()) - ->setName($formattedName) - ->setFileShare($fileShare); - $response = $gapicClient->restoreInstance($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.filestore.v1.CloudFilestoreManager/RestoreInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getFileShare(); - $this->assertProtobufEquals($fileShare, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreInstanceTest'); - $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 restoreInstanceExceptionTest() - { - $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/restoreInstanceTest'); - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $fileShare = 'fileShare2143984476'; - $request = (new RestoreInstanceRequest()) - ->setName($formattedName) - ->setFileShare($fileShare); - $response = $gapicClient->restoreInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreInstanceTest'); - 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 revertInstanceTest() - { - $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/revertInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $statusMessage = 'statusMessage-239442758'; - $etag = 'etag3123477'; - $satisfiesPzi = false; - $kmsKeyName = 'kmsKeyName2094986649'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setStatusMessage($statusMessage); - $expectedResponse->setEtag($etag); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $expectedResponse->setKmsKeyName($kmsKeyName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/revertInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $targetSnapshotId = 'targetSnapshotId1030984648'; - $request = (new RevertInstanceRequest()) - ->setName($formattedName) - ->setTargetSnapshotId($targetSnapshotId); - $response = $gapicClient->revertInstance($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.filestore.v1.CloudFilestoreManager/RevertInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getTargetSnapshotId(); - $this->assertProtobufEquals($targetSnapshotId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/revertInstanceTest'); - $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 revertInstanceExceptionTest() - { - $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/revertInstanceTest'); - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $targetSnapshotId = 'targetSnapshotId1030984648'; - $request = (new RevertInstanceRequest()) - ->setName($formattedName) - ->setTargetSnapshotId($targetSnapshotId); - $response = $gapicClient->revertInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/revertInstanceTest'); - 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 updateBackupTest() - { - $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/updateBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $capacityGb = 1923585408; - $storageBytes = 2035244455; - $sourceInstance = 'sourceInstance-677426119'; - $sourceFileShare = 'sourceFileShare-1224476160'; - $downloadBytes = 971924980; - $satisfiesPzi = false; - $kmsKey = 'kmsKey-591635343'; - $expectedResponse = new Backup(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacityGb($capacityGb); - $expectedResponse->setStorageBytes($storageBytes); - $expectedResponse->setSourceInstance($sourceInstance); - $expectedResponse->setSourceFileShare($sourceFileShare); - $expectedResponse->setDownloadBytes($downloadBytes); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $expectedResponse->setKmsKey($kmsKey); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateBackupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $backup = new Backup(); - $updateMask = new FieldMask(); - $request = (new UpdateBackupRequest()) - ->setBackup($backup) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateBackup($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.filestore.v1.CloudFilestoreManager/UpdateBackup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getBackup(); - $this->assertProtobufEquals($backup, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBackupTest'); - $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 updateBackupExceptionTest() - { - $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/updateBackupTest'); - $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 - $backup = new Backup(); - $updateMask = new FieldMask(); - $request = (new UpdateBackupRequest()) - ->setBackup($backup) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateBackup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBackupTest'); - 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 updateInstanceTest() - { - $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/updateInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $statusMessage = 'statusMessage-239442758'; - $etag = 'etag3123477'; - $satisfiesPzi = false; - $kmsKeyName = 'kmsKeyName2094986649'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setStatusMessage($statusMessage); - $expectedResponse->setEtag($etag); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $expectedResponse->setKmsKeyName($kmsKeyName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $request = new UpdateInstanceRequest(); - $response = $gapicClient->updateInstance($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.filestore.v1.CloudFilestoreManager/UpdateInstance', $actualApiFuncCall); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); - $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 updateInstanceExceptionTest() - { - $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/updateInstanceTest'); - $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); - $request = new UpdateInstanceRequest(); - $response = $gapicClient->updateInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); - 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 updateSnapshotTest() - { - $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/updateSnapshotTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $filesystemUsedBytes = 387235709; - $expectedResponse = new Snapshot(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setFilesystemUsedBytes($filesystemUsedBytes); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateSnapshotTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $snapshot = new Snapshot(); - $request = (new UpdateSnapshotRequest()) - ->setUpdateMask($updateMask) - ->setSnapshot($snapshot); - $response = $gapicClient->updateSnapshot($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.filestore.v1.CloudFilestoreManager/UpdateSnapshot', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getSnapshot(); - $this->assertProtobufEquals($snapshot, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSnapshotTest'); - $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 updateSnapshotExceptionTest() - { - $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/updateSnapshotTest'); - $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 - $updateMask = new FieldMask(); - $snapshot = new Snapshot(); - $request = (new UpdateSnapshotRequest()) - ->setUpdateMask($updateMask) - ->setSnapshot($snapshot); - $response = $gapicClient->updateSnapshot($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSnapshotTest'); - 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 createBackupAsyncTest() - { - $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/createBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $capacityGb = 1923585408; - $storageBytes = 2035244455; - $sourceInstance = 'sourceInstance-677426119'; - $sourceFileShare = 'sourceFileShare-1224476160'; - $downloadBytes = 971924980; - $satisfiesPzi = false; - $kmsKey = 'kmsKey-591635343'; - $expectedResponse = new Backup(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacityGb($capacityGb); - $expectedResponse->setStorageBytes($storageBytes); - $expectedResponse->setSourceInstance($sourceInstance); - $expectedResponse->setSourceFileShare($sourceFileShare); - $expectedResponse->setDownloadBytes($downloadBytes); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $expectedResponse->setKmsKey($kmsKey); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createBackupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $backup = new Backup(); - $backupId = 'backupId1355353272'; - $request = (new CreateBackupRequest()) - ->setParent($formattedParent) - ->setBackup($backup) - ->setBackupId($backupId); - $response = $gapicClient->createBackupAsync($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.filestore.v1.CloudFilestoreManager/CreateBackup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getBackup(); - $this->assertProtobufEquals($backup, $actualValue); - $actualValue = $actualApiRequestObject->getBackupId(); - $this->assertProtobufEquals($backupId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackupTest'); - $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/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Backup.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Backup.php deleted file mode 100644 index fe3fbc3e94b3..000000000000 Binary files a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Backup.php and /dev/null differ diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php deleted file mode 100644 index 10dda6afa70b..000000000000 Binary files a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php and /dev/null differ diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php deleted file mode 100644 index f9245a9df940..000000000000 Binary files a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php and /dev/null differ diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/FirestoreAdmin.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/FirestoreAdmin.php deleted file mode 100644 index 838dd94d161a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/FirestoreAdmin.php +++ /dev/null @@ -1,192 +0,0 @@ -internalAddGeneratedFile( - ' -ÿH -/google/firestore/admin/v1/firestore_admin.protogoogle.firestore.admin.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto&google/firestore/admin/v1/backup.proto(google/firestore/admin/v1/database.proto%google/firestore/admin/v1/field.proto%google/firestore/admin/v1/index.proto)google/firestore/admin/v1/operation.proto(google/firestore/admin/v1/schedule.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"g -ListDatabasesRequest9 -parent ( B)àAúA#!firestore.googleapis.com/Database - show_deleted ("¨ -CreateDatabaseRequest9 -parent ( B)àAúA#!firestore.googleapis.com/Database: -database ( 2#.google.firestore.admin.v1.DatabaseBàA - database_id ( BàA" -CreateDatabaseMetadata"d -ListDatabasesResponse6 - databases ( 2#.google.firestore.admin.v1.Database - unreachable ( "M -GetDatabaseRequest7 -name ( B)àAúA# -!firestore.googleapis.com/Database"„ -UpdateDatabaseRequest: -database ( 2#.google.firestore.admin.v1.DatabaseBàA/ - update_mask ( 2.google.protobuf.FieldMask" -UpdateDatabaseMetadata"^ -DeleteDatabaseRequest7 -name ( B)àAúA# -!firestore.googleapis.com/Database -etag ( " -DeleteDatabaseMetadata"¡ -CreateBackupScheduleRequest9 -parent ( B)àAúA# -!firestore.googleapis.com/DatabaseG -backup_schedule ( 2).google.firestore.admin.v1.BackupScheduleBàA"Y -GetBackupScheduleRequest= -name ( B/àAúA) -\'firestore.googleapis.com/BackupSchedule"— -UpdateBackupScheduleRequestG -backup_schedule ( 2).google.firestore.admin.v1.BackupScheduleBàA/ - update_mask ( 2.google.protobuf.FieldMask"W -ListBackupSchedulesRequest9 -parent ( B)àAúA# -!firestore.googleapis.com/Database"b -ListBackupSchedulesResponseC -backup_schedules ( 2).google.firestore.admin.v1.BackupSchedule"\\ -DeleteBackupScheduleRequest= -name ( B/àAúA) -\'firestore.googleapis.com/BackupSchedule"Œ -CreateIndexRequest@ -parent ( B0àAúA* -(firestore.googleapis.com/CollectionGroup4 -index ( 2 .google.firestore.admin.v1.IndexBàA" -ListIndexesRequest@ -parent ( B0àAúA* -(firestore.googleapis.com/CollectionGroup -filter (  - page_size ( - -page_token ( "a -ListIndexesResponse1 -indexes ( 2 .google.firestore.admin.v1.Index -next_page_token ( "G -GetIndexRequest4 -name ( B&àAúA -firestore.googleapis.com/Index"J -DeleteIndexRequest4 -name ( B&àAúA -firestore.googleapis.com/Index"{ -UpdateFieldRequest4 -field ( 2 .google.firestore.admin.v1.FieldBàA/ - update_mask ( 2.google.protobuf.FieldMask"G -GetFieldRequest4 -name ( B&àAúA -firestore.googleapis.com/Field"Œ -ListFieldsRequest@ -parent ( B0àAúA* -(firestore.googleapis.com/CollectionGroup -filter (  - page_size ( - -page_token ( "_ -ListFieldsResponse0 -fields ( 2 .google.firestore.admin.v1.Field -next_page_token ( "Î -ExportDocumentsRequest7 -name ( B)àAúA# -!firestore.googleapis.com/Database -collection_ids (  -output_uri_prefix (  - namespace_ids ( 1 - snapshot_time ( 2.google.protobuf.Timestamp"š -ImportDocumentsRequest7 -name ( B)àAúA# -!firestore.googleapis.com/Database -collection_ids (  -input_uri_prefix (  - namespace_ids ( "Ž -BulkDeleteDocumentsRequest7 -name ( B)àAúA# -!firestore.googleapis.com/Database -collection_ids ( BàA - namespace_ids ( BàA" -BulkDeleteDocumentsResponse"I -GetBackupRequest5 -name ( B\'àAúA! -firestore.googleapis.com/Backup"O -ListBackupsRequest9 -parent ( B)àAúA# -!firestore.googleapis.com/Location"^ -ListBackupsResponse2 -backups ( 2!.google.firestore.admin.v1.Backup - unreachable ( "L -DeleteBackupRequest5 -name ( B\'àAúA! -firestore.googleapis.com/Backup"ü -RestoreDatabaseRequest9 -parent ( B)àAúA#!firestore.googleapis.com/Database - database_id ( BàA7 -backup ( B\'àAúA! -firestore.googleapis.com/BackupT -encryption_config ( 24.google.firestore.admin.v1.Database.EncryptionConfigBàA2Ë% -FirestoreAdminÛ - CreateIndex-.google.firestore.admin.v1.CreateIndexRequest.google.longrunning.Operation"~ÊA -IndexIndexOperationMetadataÚA parent,index‚Óä“G">/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes:index½ - ListIndexes-.google.firestore.admin.v1.ListIndexesRequest..google.firestore.admin.v1.ListIndexesResponse"OÚAparent‚Óä“@>/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes§ -GetIndex*.google.firestore.admin.v1.GetIndexRequest .google.firestore.admin.v1.Index"MÚAname‚Óä“@>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}£ - DeleteIndex-.google.firestore.admin.v1.DeleteIndexRequest.google.protobuf.Empty"MÚAname‚Óä“@*>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}¦ -GetField*.google.firestore.admin.v1.GetFieldRequest .google.firestore.admin.v1.Field"LÚAname‚Óä“?=/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}Ù - UpdateField-.google.firestore.admin.v1.UpdateFieldRequest.google.longrunning.Operation"|ÊA -FieldFieldOperationMetadataÚAfield‚Óä“L2C/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}:field¹ - -ListFields,.google.firestore.admin.v1.ListFieldsRequest-.google.firestore.admin.v1.ListFieldsResponse"NÚAparent‚Óä“?=/v1/{parent=projects/*/databases/*/collectionGroups/*}/fieldsÝ -ExportDocuments1.google.firestore.admin.v1.ExportDocumentsRequest.google.longrunning.Operation"xÊA2 -ExportDocumentsResponseExportDocumentsMetadataÚAname‚Óä“6"1/v1/{name=projects/*/databases/*}:exportDocuments:*Û -ImportDocuments1.google.firestore.admin.v1.ImportDocumentsRequest.google.longrunning.Operation"vÊA0 -google.protobuf.EmptyImportDocumentsMetadataÚAname‚Óä“6"1/v1/{name=projects/*/databases/*}:importDocuments:*ò -BulkDeleteDocuments5.google.firestore.admin.v1.BulkDeleteDocumentsRequest.google.longrunning.Operation"„ÊA: -BulkDeleteDocumentsResponseBulkDeleteDocumentsMetadataÚAname‚Óä“:"5/v1/{name=projects/*/databases/*}:bulkDeleteDocuments:*Ù -CreateDatabase0.google.firestore.admin.v1.CreateDatabaseRequest.google.longrunning.Operation"vÊA" -DatabaseCreateDatabaseMetadataÚAparent,database,database_id‚Óä“-"!/v1/{parent=projects/*}/databases:database“ - GetDatabase-.google.firestore.admin.v1.GetDatabaseRequest#.google.firestore.admin.v1.Database"0ÚAname‚Óä“#!/v1/{name=projects/*/databases/*}¦ - ListDatabases/.google.firestore.admin.v1.ListDatabasesRequest0.google.firestore.admin.v1.ListDatabasesResponse"2ÚAparent‚Óä“#!/v1/{parent=projects/*}/databasesÛ -UpdateDatabase0.google.firestore.admin.v1.UpdateDatabaseRequest.google.longrunning.Operation"xÊA" -DatabaseUpdateDatabaseMetadataÚAdatabase,update_mask‚Óä“62*/v1/{database.name=projects/*/databases/*}:database¸ -DeleteDatabase0.google.firestore.admin.v1.DeleteDatabaseRequest.google.longrunning.Operation"UÊA" -DatabaseDeleteDatabaseMetadataÚAname‚Óä“#*!/v1/{name=projects/*/databases/*}— - GetBackup+.google.firestore.admin.v1.GetBackupRequest!.google.firestore.admin.v1.Backup":ÚAname‚Óä“-+/v1/{name=projects/*/locations/*/backups/*}ª - ListBackups-.google.firestore.admin.v1.ListBackupsRequest..google.firestore.admin.v1.ListBackupsResponse"<ÚAparent‚Óä“-+/v1/{parent=projects/*/locations/*}/backups’ - DeleteBackup..google.firestore.admin.v1.DeleteBackupRequest.google.protobuf.Empty":ÚAname‚Óä“-*+/v1/{name=projects/*/locations/*/backups/*}¿ -RestoreDatabase1.google.firestore.admin.v1.RestoreDatabaseRequest.google.longrunning.Operation"ZÊA# -DatabaseRestoreDatabaseMetadata‚Óä“.")/v1/{parent=projects/*}/databases:restore:*à -CreateBackupSchedule6.google.firestore.admin.v1.CreateBackupScheduleRequest).google.firestore.admin.v1.BackupSchedule"eÚAparent,backup_schedule‚Óä“F"3/v1/{parent=projects/*/databases/*}/backupSchedules:backup_schedule· -GetBackupSchedule3.google.firestore.admin.v1.GetBackupScheduleRequest).google.firestore.admin.v1.BackupSchedule"BÚAname‚Óä“53/v1/{name=projects/*/databases/*/backupSchedules/*}Ê -ListBackupSchedules5.google.firestore.admin.v1.ListBackupSchedulesRequest6.google.firestore.admin.v1.ListBackupSchedulesResponse"DÚAparent‚Óä“53/v1/{parent=projects/*/databases/*}/backupSchedulesõ -UpdateBackupSchedule6.google.firestore.admin.v1.UpdateBackupScheduleRequest).google.firestore.admin.v1.BackupSchedule"zÚAbackup_schedule,update_mask‚Óä“V2C/v1/{backup_schedule.name=projects/*/databases/*/backupSchedules/*}:backup_scheduleª -DeleteBackupSchedule6.google.firestore.admin.v1.DeleteBackupScheduleRequest.google.protobuf.Empty"BÚAname‚Óä“5*3/v1/{name=projects/*/databases/*/backupSchedules/*}vÊAfirestore.googleapis.comÒAXhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/datastoreB¥ -com.google.firestore.admin.v1BFirestoreAdminProtoPZ9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb¢GCFSªGoogle.Cloud.Firestore.Admin.V1ÊGoogle\\Cloud\\Firestore\\Admin\\V1ê#Google::Cloud::Firestore::Admin::V1êAL -!firestore.googleapis.com/Location\'projects/{project}/locations/{location}êAq -(firestore.googleapis.com/CollectionGroupEprojects/{project}/databases/{database}/collectionGroups/{collection}bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php deleted file mode 100644 index 9c0e6c1657d3..000000000000 Binary files a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php and /dev/null differ diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php deleted file mode 100644 index 3c93ac4fddbd..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - ' -À -(google/firestore/admin/v1/location.protogoogle.firestore.admin.v1" -LocationMetadataBÜ -com.google.firestore.admin.v1B LocationProtoPZ9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb¢GCFSªGoogle.Cloud.Firestore.Admin.V1ÊGoogle\\Cloud\\Firestore\\Admin\\V1ê#Google::Cloud::Firestore::Admin::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php deleted file mode 100644 index 2bba74bd463f..000000000000 Binary files a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php and /dev/null differ diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Schedule.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Schedule.php deleted file mode 100644 index 6b7a44d3274c..000000000000 Binary files a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Schedule.php and /dev/null differ diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup.php deleted file mode 100644 index 2ff6e412fa0e..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup.php +++ /dev/null @@ -1,327 +0,0 @@ -google.firestore.admin.v1.Backup - */ -class Backup extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The unique resource name of the Backup. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Name of the Firestore database that the backup is from. - * Format is `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string database = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $database = ''; - /** - * Output only. The system-generated UUID4 for the Firestore database that the - * backup is from. - * - * Generated from protobuf field string database_uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $database_uid = ''; - /** - * Output only. The backup contains an externally consistent copy of the - * database at this time. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $snapshot_time = null; - /** - * Output only. The timestamp at which this backup expires. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - /** - * Output only. Statistics about the backup. - * This data only becomes available after the backup is fully materialized to - * secondary storage. This field will be empty till then. - * - * Generated from protobuf field .google.firestore.admin.v1.Backup.Stats stats = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $stats = null; - /** - * Output only. The current state of the backup. - * - * Generated from protobuf field .google.firestore.admin.v1.Backup.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The unique resource name of the Backup. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * @type string $database - * Output only. Name of the Firestore database that the backup is from. - * Format is `projects/{project}/databases/{database}`. - * @type string $database_uid - * Output only. The system-generated UUID4 for the Firestore database that the - * backup is from. - * @type \Google\Protobuf\Timestamp $snapshot_time - * Output only. The backup contains an externally consistent copy of the - * database at this time. - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. The timestamp at which this backup expires. - * @type \Google\Cloud\Firestore\Admin\V1\Backup\Stats $stats - * Output only. Statistics about the backup. - * This data only becomes available after the backup is fully materialized to - * secondary storage. This field will be empty till then. - * @type int $state - * Output only. The current state of the backup. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Backup::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The unique resource name of the Backup. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The unique resource name of the Backup. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * 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. Name of the Firestore database that the backup is from. - * Format is `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string database = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Output only. Name of the Firestore database that the backup is from. - * Format is `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string database = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * Output only. The system-generated UUID4 for the Firestore database that the - * backup is from. - * - * Generated from protobuf field string database_uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDatabaseUid() - { - return $this->database_uid; - } - - /** - * Output only. The system-generated UUID4 for the Firestore database that the - * backup is from. - * - * Generated from protobuf field string database_uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDatabaseUid($var) - { - GPBUtil::checkString($var, True); - $this->database_uid = $var; - - return $this; - } - - /** - * Output only. The backup contains an externally consistent copy of the - * database at this time. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSnapshotTime() - { - return $this->snapshot_time; - } - - public function hasSnapshotTime() - { - return isset($this->snapshot_time); - } - - public function clearSnapshotTime() - { - unset($this->snapshot_time); - } - - /** - * Output only. The backup contains an externally consistent copy of the - * database at this time. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSnapshotTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->snapshot_time = $var; - - return $this; - } - - /** - * Output only. The timestamp at which this backup expires. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.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 timestamp at which this backup expires. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.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. Statistics about the backup. - * This data only becomes available after the backup is fully materialized to - * secondary storage. This field will be empty till then. - * - * Generated from protobuf field .google.firestore.admin.v1.Backup.Stats stats = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Firestore\Admin\V1\Backup\Stats|null - */ - public function getStats() - { - return $this->stats; - } - - public function hasStats() - { - return isset($this->stats); - } - - public function clearStats() - { - unset($this->stats); - } - - /** - * Output only. Statistics about the backup. - * This data only becomes available after the backup is fully materialized to - * secondary storage. This field will be empty till then. - * - * Generated from protobuf field .google.firestore.admin.v1.Backup.Stats stats = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Firestore\Admin\V1\Backup\Stats $var - * @return $this - */ - public function setStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Backup\Stats::class); - $this->stats = $var; - - return $this; - } - - /** - * Output only. The current state of the backup. - * - * Generated from protobuf field .google.firestore.admin.v1.Backup.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the backup. - * - * Generated from protobuf field .google.firestore.admin.v1.Backup.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Backup\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/State.php deleted file mode 100644 index b868abc36995..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/State.php +++ /dev/null @@ -1,72 +0,0 @@ -google.firestore.admin.v1.Backup.State - */ -class State -{ - /** - * The state is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The pending backup is still being created. Operations on the - * backup will be rejected in this state. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The backup is complete and ready to use. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * The backup is not available at this moment. - * - * Generated from protobuf enum NOT_AVAILABLE = 3; - */ - const NOT_AVAILABLE = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::NOT_AVAILABLE => 'NOT_AVAILABLE', - ]; - - 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\Firestore\Admin\V1\Backup_State::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/Stats.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/Stats.php deleted file mode 100644 index 8e69131d5215..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/Stats.php +++ /dev/null @@ -1,142 +0,0 @@ -google.firestore.admin.v1.Backup.Stats - */ -class Stats extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Summation of the size of all documents and index entries in - * the backup, measured in bytes. - * - * Generated from protobuf field int64 size_bytes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $size_bytes = 0; - /** - * Output only. The total number of documents contained in the backup. - * - * Generated from protobuf field int64 document_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $document_count = 0; - /** - * Output only. The total number of index entries contained in the backup. - * - * Generated from protobuf field int64 index_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $index_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $size_bytes - * Output only. Summation of the size of all documents and index entries in - * the backup, measured in bytes. - * @type int|string $document_count - * Output only. The total number of documents contained in the backup. - * @type int|string $index_count - * Output only. The total number of index entries contained in the backup. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Backup::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Summation of the size of all documents and index entries in - * the backup, measured in bytes. - * - * Generated from protobuf field int64 size_bytes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getSizeBytes() - { - return $this->size_bytes; - } - - /** - * Output only. Summation of the size of all documents and index entries in - * the backup, measured in bytes. - * - * Generated from protobuf field int64 size_bytes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->size_bytes = $var; - - return $this; - } - - /** - * Output only. The total number of documents contained in the backup. - * - * Generated from protobuf field int64 document_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getDocumentCount() - { - return $this->document_count; - } - - /** - * Output only. The total number of documents contained in the backup. - * - * Generated from protobuf field int64 document_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setDocumentCount($var) - { - GPBUtil::checkInt64($var); - $this->document_count = $var; - - return $this; - } - - /** - * Output only. The total number of index entries contained in the backup. - * - * Generated from protobuf field int64 index_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getIndexCount() - { - return $this->index_count; - } - - /** - * Output only. The total number of index entries contained in the backup. - * - * Generated from protobuf field int64 index_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setIndexCount($var) - { - GPBUtil::checkInt64($var); - $this->index_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Stats::class, \Google\Cloud\Firestore\Admin\V1\Backup_Stats::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BackupSchedule.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BackupSchedule.php deleted file mode 100644 index cfa5781d5f40..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BackupSchedule.php +++ /dev/null @@ -1,316 +0,0 @@ -google.firestore.admin.v1.BackupSchedule - */ -class BackupSchedule extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The unique backup schedule identifier across all locations and - * databases for the given project. - * This will be auto-assigned. - * Format is - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The timestamp at which this backup schedule was created and - * effective since. - * No backups will be created for this schedule before this time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp at which this backup schedule was most recently - * updated. When a backup schedule is first created, this is the same as - * create_time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * At what relative time in the future, compared to its creation time, - * the backup should be deleted, e.g. keep backups for 7 days. - * The maximum supported retention period is 14 weeks. - * - * Generated from protobuf field .google.protobuf.Duration retention = 6; - */ - protected $retention = null; - protected $recurrence; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The unique backup schedule identifier across all locations and - * databases for the given project. - * This will be auto-assigned. - * Format is - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp at which this backup schedule was created and - * effective since. - * No backups will be created for this schedule before this time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp at which this backup schedule was most recently - * updated. When a backup schedule is first created, this is the same as - * create_time. - * @type \Google\Protobuf\Duration $retention - * At what relative time in the future, compared to its creation time, - * the backup should be deleted, e.g. keep backups for 7 days. - * The maximum supported retention period is 14 weeks. - * @type \Google\Cloud\Firestore\Admin\V1\DailyRecurrence $daily_recurrence - * For a schedule that runs daily. - * @type \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence $weekly_recurrence - * For a schedule that runs weekly on a specific day. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Schedule::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The unique backup schedule identifier across all locations and - * databases for the given project. - * This will be auto-assigned. - * Format is - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The unique backup schedule identifier across all locations and - * databases for the given project. - * This will be auto-assigned. - * Format is - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * 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 timestamp at which this backup schedule was created and - * effective since. - * No backups will be created for this schedule before this time. - * - * 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 timestamp at which this backup schedule was created and - * effective since. - * No backups will be created for this schedule before this time. - * - * 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 timestamp at which this backup schedule was most recently - * updated. When a backup schedule is first created, this is the same as - * create_time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp at which this backup schedule was most recently - * updated. When a backup schedule is first created, this is the same as - * create_time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * At what relative time in the future, compared to its creation time, - * the backup should be deleted, e.g. keep backups for 7 days. - * The maximum supported retention period is 14 weeks. - * - * Generated from protobuf field .google.protobuf.Duration retention = 6; - * @return \Google\Protobuf\Duration|null - */ - public function getRetention() - { - return $this->retention; - } - - public function hasRetention() - { - return isset($this->retention); - } - - public function clearRetention() - { - unset($this->retention); - } - - /** - * At what relative time in the future, compared to its creation time, - * the backup should be deleted, e.g. keep backups for 7 days. - * The maximum supported retention period is 14 weeks. - * - * Generated from protobuf field .google.protobuf.Duration retention = 6; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setRetention($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->retention = $var; - - return $this; - } - - /** - * For a schedule that runs daily. - * - * Generated from protobuf field .google.firestore.admin.v1.DailyRecurrence daily_recurrence = 7; - * @return \Google\Cloud\Firestore\Admin\V1\DailyRecurrence|null - */ - public function getDailyRecurrence() - { - return $this->readOneof(7); - } - - public function hasDailyRecurrence() - { - return $this->hasOneof(7); - } - - /** - * For a schedule that runs daily. - * - * Generated from protobuf field .google.firestore.admin.v1.DailyRecurrence daily_recurrence = 7; - * @param \Google\Cloud\Firestore\Admin\V1\DailyRecurrence $var - * @return $this - */ - public function setDailyRecurrence($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\DailyRecurrence::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * For a schedule that runs weekly on a specific day. - * - * Generated from protobuf field .google.firestore.admin.v1.WeeklyRecurrence weekly_recurrence = 8; - * @return \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence|null - */ - public function getWeeklyRecurrence() - { - return $this->readOneof(8); - } - - public function hasWeeklyRecurrence() - { - return $this->hasOneof(8); - } - - /** - * For a schedule that runs weekly on a specific day. - * - * Generated from protobuf field .google.firestore.admin.v1.WeeklyRecurrence weekly_recurrence = 8; - * @param \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence $var - * @return $this - */ - public function setWeeklyRecurrence($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * @return string - */ - public function getRecurrence() - { - return $this->whichOneof("recurrence"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsMetadata.php deleted file mode 100644 index 86589b066bd9..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsMetadata.php +++ /dev/null @@ -1,373 +0,0 @@ -google.firestore.admin.v1.BulkDeleteDocumentsMetadata - */ -class BulkDeleteDocumentsMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - */ - protected $operation_state = 0; - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - */ - protected $progress_documents = null; - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - */ - protected $progress_bytes = null; - /** - * The IDs of the collection groups that are being deleted. - * - * Generated from protobuf field repeated string collection_ids = 6; - */ - private $collection_ids; - /** - * Which namespace IDs are being deleted. - * - * Generated from protobuf field repeated string namespace_ids = 7; - */ - private $namespace_ids; - /** - * The timestamp that corresponds to the version of the database that is being - * read to get the list of documents to delete. This time can also be used as - * the timestamp of PITR in case of disaster recovery (subject to PITR window - * limit). - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 8; - */ - protected $snapshot_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * The time this operation completed. Will be unset if operation still in - * progress. - * @type int $operation_state - * The state of the operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents - * The progress, in documents, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes - * The progress, in bytes, of this operation. - * @type array|\Google\Protobuf\Internal\RepeatedField $collection_ids - * The IDs of the collection groups that are being deleted. - * @type array|\Google\Protobuf\Internal\RepeatedField $namespace_ids - * Which namespace IDs are being deleted. - * @type \Google\Protobuf\Timestamp $snapshot_time - * The timestamp that corresponds to the version of the database that is being - * read to get the list of documents to delete. This time can also be used as - * the timestamp of PITR in case of disaster recovery (subject to PITR window - * limit). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @return int - */ - public function getOperationState() - { - return $this->operation_state; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @param int $var - * @return $this - */ - public function setOperationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->operation_state = $var; - - return $this; - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressDocuments() - { - return $this->progress_documents; - } - - public function hasProgressDocuments() - { - return isset($this->progress_documents); - } - - public function clearProgressDocuments() - { - unset($this->progress_documents); - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_documents = $var; - - return $this; - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressBytes() - { - return $this->progress_bytes; - } - - public function hasProgressBytes() - { - return isset($this->progress_bytes); - } - - public function clearProgressBytes() - { - unset($this->progress_bytes); - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressBytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_bytes = $var; - - return $this; - } - - /** - * The IDs of the collection groups that are being deleted. - * - * Generated from protobuf field repeated string collection_ids = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * The IDs of the collection groups that are being deleted. - * - * Generated from protobuf field repeated string collection_ids = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * Which namespace IDs are being deleted. - * - * Generated from protobuf field repeated string namespace_ids = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNamespaceIds() - { - return $this->namespace_ids; - } - - /** - * Which namespace IDs are being deleted. - * - * Generated from protobuf field repeated string namespace_ids = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNamespaceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespace_ids = $arr; - - return $this; - } - - /** - * The timestamp that corresponds to the version of the database that is being - * read to get the list of documents to delete. This time can also be used as - * the timestamp of PITR in case of disaster recovery (subject to PITR window - * limit). - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 8; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSnapshotTime() - { - return $this->snapshot_time; - } - - public function hasSnapshotTime() - { - return isset($this->snapshot_time); - } - - public function clearSnapshotTime() - { - unset($this->snapshot_time); - } - - /** - * The timestamp that corresponds to the version of the database that is being - * read to get the list of documents to delete. This time can also be used as - * the timestamp of PITR in case of disaster recovery (subject to PITR window - * limit). - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 8; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSnapshotTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->snapshot_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsRequest.php deleted file mode 100644 index 0d14c82fb131..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsRequest.php +++ /dev/null @@ -1,193 +0,0 @@ -google.firestore.admin.v1.BulkDeleteDocumentsRequest - */ -class BulkDeleteDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Database to operate. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. IDs of the collection groups to delete. Unspecified means all - * collection groups. - * Each collection group in this list must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $collection_ids; - /** - * Optional. Namespaces to delete. - * An empty list means all namespaces. This is the recommended - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to delete from them. - * Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $namespace_ids; - - /** - * @param string $name Required. Database to operate. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. Please see - * {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\BulkDeleteDocumentsRequest - * - * @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. Database to operate. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * @type array|\Google\Protobuf\Internal\RepeatedField $collection_ids - * Optional. IDs of the collection groups to delete. Unspecified means all - * collection groups. - * Each collection group in this list must be unique. - * @type array|\Google\Protobuf\Internal\RepeatedField $namespace_ids - * Optional. Namespaces to delete. - * An empty list means all namespaces. This is the recommended - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to delete from them. - * Each namespace in this list must be unique. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Database to operate. Should be of the form: - * `projects/{project_id}/databases/{database_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. Database to operate. Should be of the form: - * `projects/{project_id}/databases/{database_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; - } - - /** - * Optional. IDs of the collection groups to delete. Unspecified means all - * collection groups. - * Each collection group in this list must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * Optional. IDs of the collection groups to delete. Unspecified means all - * collection groups. - * Each collection group in this list must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * Optional. Namespaces to delete. - * An empty list means all namespaces. This is the recommended - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to delete from them. - * Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNamespaceIds() - { - return $this->namespace_ids; - } - - /** - * Optional. Namespaces to delete. - * An empty list means all namespaces. This is the recommended - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to delete from them. - * Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNamespaceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespace_ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsResponse.php deleted file mode 100644 index a1d244d022c1..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsResponse.php +++ /dev/null @@ -1,34 +0,0 @@ -google.firestore.admin.v1.BulkDeleteDocumentsResponse - */ -class BulkDeleteDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateBackupScheduleRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateBackupScheduleRequest.php deleted file mode 100644 index bebd307d5f85..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateBackupScheduleRequest.php +++ /dev/null @@ -1,134 +0,0 @@ -google.firestore.admin.v1.CreateBackupScheduleRequest - */ -class CreateBackupScheduleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent database. - * Format `projects/{project}/databases/{database}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The backup schedule to create. - * - * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_schedule = null; - - /** - * @param string $parent Required. The parent database. - * - * Format `projects/{project}/databases/{database}` - * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backupSchedule Required. The backup schedule to create. - * - * @return \Google\Cloud\Firestore\Admin\V1\CreateBackupScheduleRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backupSchedule): self - { - return (new self()) - ->setParent($parent) - ->setBackupSchedule($backupSchedule); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent database. - * Format `projects/{project}/databases/{database}` - * @type \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backup_schedule - * Required. The backup schedule to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent database. - * Format `projects/{project}/databases/{database}` - * - * 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 parent database. - * Format `projects/{project}/databases/{database}` - * - * 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. The backup schedule to create. - * - * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\BackupSchedule|null - */ - public function getBackupSchedule() - { - return $this->backup_schedule; - } - - public function hasBackupSchedule() - { - return isset($this->backup_schedule); - } - - public function clearBackupSchedule() - { - unset($this->backup_schedule); - } - - /** - * Required. The backup schedule to create. - * - * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule $var - * @return $this - */ - public function setBackupSchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\BackupSchedule::class); - $this->backup_schedule = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseMetadata.php deleted file mode 100644 index 3a33d72e60b6..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseMetadata.php +++ /dev/null @@ -1,33 +0,0 @@ -google.firestore.admin.v1.CreateDatabaseMetadata - */ -class CreateDatabaseMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseRequest.php deleted file mode 100644 index f56ded28064e..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseRequest.php +++ /dev/null @@ -1,196 +0,0 @@ -google.firestore.admin.v1.CreateDatabaseRequest - */ -class CreateDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent name of the form - * `projects/{project_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The Database to create. - * - * Generated from protobuf field .google.firestore.admin.v1.Database database = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = null; - /** - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid. - * - * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database_id = ''; - - /** - * @param string $parent Required. A parent name of the form - * `projects/{project_id}` - * Please see {@see FirestoreAdminClient::projectName()} for help formatting this field. - * @param \Google\Cloud\Firestore\Admin\V1\Database $database Required. The Database to create. - * @param string $databaseId Required. The ID to use for the database, which will become the final - * component of the database's resource name. - * - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * - * "(default)" database ID is also valid. - * - * @return \Google\Cloud\Firestore\Admin\V1\CreateDatabaseRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Firestore\Admin\V1\Database $database, string $databaseId): self - { - return (new self()) - ->setParent($parent) - ->setDatabase($database) - ->setDatabaseId($databaseId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. A parent name of the form - * `projects/{project_id}` - * @type \Google\Cloud\Firestore\Admin\V1\Database $database - * Required. The Database to create. - * @type string $database_id - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent name of the form - * `projects/{project_id}` - * - * 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. A parent name of the form - * `projects/{project_id}` - * - * 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. The Database to create. - * - * Generated from protobuf field .google.firestore.admin.v1.Database database = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\Database|null - */ - public function getDatabase() - { - return $this->database; - } - - public function hasDatabase() - { - return isset($this->database); - } - - public function clearDatabase() - { - unset($this->database); - } - - /** - * Required. The Database to create. - * - * Generated from protobuf field .google.firestore.admin.v1.Database database = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\Database $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database::class); - $this->database = $var; - - return $this; - } - - /** - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid. - * - * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabaseId() - { - return $this->database_id; - } - - /** - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid. - * - * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabaseId($var) - { - GPBUtil::checkString($var, True); - $this->database_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateIndexRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateIndexRequest.php deleted file mode 100644 index a09b8194ce62..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateIndexRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.firestore.admin.v1.CreateIndexRequest - */ -class CreateIndexRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The composite index to create. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $index = null; - - /** - * @param string $parent Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * Please see {@see FirestoreAdminClient::collectionGroupName()} for help formatting this field. - * @param \Google\Cloud\Firestore\Admin\V1\Index $index Required. The composite index to create. - * - * @return \Google\Cloud\Firestore\Admin\V1\CreateIndexRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Firestore\Admin\V1\Index $index): self - { - return (new self()) - ->setParent($parent) - ->setIndex($index); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * @type \Google\Cloud\Firestore\Admin\V1\Index $index - * Required. The composite index to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * 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. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * 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. The composite index to create. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\Index|null - */ - public function getIndex() - { - return $this->index; - } - - public function hasIndex() - { - return isset($this->index); - } - - public function clearIndex() - { - unset($this->index); - } - - /** - * Required. The composite index to create. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\Index $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index::class); - $this->index = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DailyRecurrence.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DailyRecurrence.php deleted file mode 100644 index 0e6c88db898c..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DailyRecurrence.php +++ /dev/null @@ -1,34 +0,0 @@ -google.firestore.admin.v1.DailyRecurrence - */ -class DailyRecurrence extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Schedule::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php deleted file mode 100644 index fd75657657f7..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php +++ /dev/null @@ -1,831 +0,0 @@ -google.firestore.admin.v1.Database - */ -class Database extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the Database. - * Format: `projects/{project}/databases/{database}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The system-generated UUID4 for this Database. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The timestamp at which this database was created. Databases - * created before 2016 do not populate create_time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp at which this database was most recently - * updated. Note this only includes updates to the database resource and not - * data contained by the database. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The timestamp at which this database was deleted. Only set if - * the database has been deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * The location of the database. Available locations are listed at - * https://cloud.google.com/firestore/docs/locations. - * - * Generated from protobuf field string location_id = 9; - */ - protected $location_id = ''; - /** - * The type of the database. - * See https://cloud.google.com/datastore/docs/firestore-or-datastore for - * information about how to choose. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseType type = 10; - */ - protected $type = 0; - /** - * The concurrency control mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; - */ - protected $concurrency_mode = 0; - /** - * Output only. The period during which past versions of data are retained in - * the database. - * Any [read][google.firestore.v1.GetDocumentRequest.read_time] - * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify - * a `read_time` within this window, and will read the state of the database - * at that time. - * If the PITR feature is enabled, the retention period is 7 days. Otherwise, - * the retention period is 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $version_retention_period = null; - /** - * Output only. The earliest timestamp at which older versions of the data can - * be read from the database. See [version_retention_period] above; this field - * is populated with `now - version_retention_period`. - * This value is continuously updated, and becomes stale the moment it is - * queried. If you are using this value to recover data, make sure to account - * for the time from the moment when the value is queried to the moment when - * you initiate the recovery. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $earliest_version_time = null; - /** - * Whether to enable the PITR feature on this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; - */ - protected $point_in_time_recovery_enablement = 0; - /** - * The App Engine integration mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; - */ - protected $app_engine_integration_mode = 0; - /** - * Output only. The key_prefix for this database. This key_prefix is used, in - * combination with the project ID ("~") to construct - * the application ID that is returned from the Cloud Datastore APIs in Google - * App Engine first generation runtimes. - * This value may be empty in which case the appid to use for URL-encoded keys - * is the project_id (eg: foo instead of v~foo). - * - * Generated from protobuf field string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $key_prefix = ''; - /** - * State of delete protection for the database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; - */ - protected $delete_protection_state = 0; - /** - * Optional. Presence indicates CMEK is enabled for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cmek_config = null; - /** - * Output only. The database resource's prior database ID. This field is only - * populated for deleted databases. - * - * Generated from protobuf field string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $previous_id = ''; - /** - * Output only. Information about the provenance of this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source_info = null; - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 99; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the Database. - * Format: `projects/{project}/databases/{database}` - * @type string $uid - * Output only. The system-generated UUID4 for this Database. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp at which this database was created. Databases - * created before 2016 do not populate create_time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp at which this database was most recently - * updated. Note this only includes updates to the database resource and not - * data contained by the database. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. The timestamp at which this database was deleted. Only set if - * the database has been deleted. - * @type string $location_id - * The location of the database. Available locations are listed at - * https://cloud.google.com/firestore/docs/locations. - * @type int $type - * The type of the database. - * See https://cloud.google.com/datastore/docs/firestore-or-datastore for - * information about how to choose. - * @type int $concurrency_mode - * The concurrency control mode to use for this database. - * @type \Google\Protobuf\Duration $version_retention_period - * Output only. The period during which past versions of data are retained in - * the database. - * Any [read][google.firestore.v1.GetDocumentRequest.read_time] - * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify - * a `read_time` within this window, and will read the state of the database - * at that time. - * If the PITR feature is enabled, the retention period is 7 days. Otherwise, - * the retention period is 1 hour. - * @type \Google\Protobuf\Timestamp $earliest_version_time - * Output only. The earliest timestamp at which older versions of the data can - * be read from the database. See [version_retention_period] above; this field - * is populated with `now - version_retention_period`. - * This value is continuously updated, and becomes stale the moment it is - * queried. If you are using this value to recover data, make sure to account - * for the time from the moment when the value is queried to the moment when - * you initiate the recovery. - * @type int $point_in_time_recovery_enablement - * Whether to enable the PITR feature on this database. - * @type int $app_engine_integration_mode - * The App Engine integration mode to use for this database. - * @type string $key_prefix - * Output only. The key_prefix for this database. This key_prefix is used, in - * combination with the project ID ("~") to construct - * the application ID that is returned from the Cloud Datastore APIs in Google - * App Engine first generation runtimes. - * This value may be empty in which case the appid to use for URL-encoded keys - * is the project_id (eg: foo instead of v~foo). - * @type int $delete_protection_state - * State of delete protection for the database. - * @type \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig $cmek_config - * Optional. Presence indicates CMEK is enabled for this database. - * @type string $previous_id - * Output only. The database resource's prior database ID. This field is only - * populated for deleted databases. - * @type \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo $source_info - * Output only. Information about the provenance of this database. - * @type string $etag - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the Database. - * Format: `projects/{project}/databases/{database}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the Database. - * Format: `projects/{project}/databases/{database}` - * - * 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; - } - - /** - * Output only. The system-generated UUID4 for this Database. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. The system-generated UUID4 for this Database. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The timestamp at which this database was created. Databases - * created before 2016 do not populate create_time. - * - * 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 timestamp at which this database was created. Databases - * created before 2016 do not populate create_time. - * - * 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; - } - - /** - * Output only. The timestamp at which this database was most recently - * updated. Note this only includes updates to the database resource and not - * data contained by the database. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp at which this database was most recently - * updated. Note this only includes updates to the database resource and not - * data contained by the database. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. The timestamp at which this database was deleted. Only set if - * the database has been deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.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 timestamp at which this database was deleted. Only set if - * the database has been deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.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; - } - - /** - * The location of the database. Available locations are listed at - * https://cloud.google.com/firestore/docs/locations. - * - * Generated from protobuf field string location_id = 9; - * @return string - */ - public function getLocationId() - { - return $this->location_id; - } - - /** - * The location of the database. Available locations are listed at - * https://cloud.google.com/firestore/docs/locations. - * - * Generated from protobuf field string location_id = 9; - * @param string $var - * @return $this - */ - public function setLocationId($var) - { - GPBUtil::checkString($var, True); - $this->location_id = $var; - - return $this; - } - - /** - * The type of the database. - * See https://cloud.google.com/datastore/docs/firestore-or-datastore for - * information about how to choose. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseType type = 10; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the database. - * See https://cloud.google.com/datastore/docs/firestore-or-datastore for - * information about how to choose. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseType type = 10; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DatabaseType::class); - $this->type = $var; - - return $this; - } - - /** - * The concurrency control mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; - * @return int - */ - public function getConcurrencyMode() - { - return $this->concurrency_mode; - } - - /** - * The concurrency control mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; - * @param int $var - * @return $this - */ - public function setConcurrencyMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\ConcurrencyMode::class); - $this->concurrency_mode = $var; - - return $this; - } - - /** - * Output only. The period during which past versions of data are retained in - * the database. - * Any [read][google.firestore.v1.GetDocumentRequest.read_time] - * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify - * a `read_time` within this window, and will read the state of the database - * at that time. - * If the PITR feature is enabled, the retention period is 7 days. Otherwise, - * the retention period is 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Duration|null - */ - public function getVersionRetentionPeriod() - { - return $this->version_retention_period; - } - - public function hasVersionRetentionPeriod() - { - return isset($this->version_retention_period); - } - - public function clearVersionRetentionPeriod() - { - unset($this->version_retention_period); - } - - /** - * Output only. The period during which past versions of data are retained in - * the database. - * Any [read][google.firestore.v1.GetDocumentRequest.read_time] - * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify - * a `read_time` within this window, and will read the state of the database - * at that time. - * If the PITR feature is enabled, the retention period is 7 days. Otherwise, - * the retention period is 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setVersionRetentionPeriod($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->version_retention_period = $var; - - return $this; - } - - /** - * Output only. The earliest timestamp at which older versions of the data can - * be read from the database. See [version_retention_period] above; this field - * is populated with `now - version_retention_period`. - * This value is continuously updated, and becomes stale the moment it is - * queried. If you are using this value to recover data, make sure to account - * for the time from the moment when the value is queried to the moment when - * you initiate the recovery. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEarliestVersionTime() - { - return $this->earliest_version_time; - } - - public function hasEarliestVersionTime() - { - return isset($this->earliest_version_time); - } - - public function clearEarliestVersionTime() - { - unset($this->earliest_version_time); - } - - /** - * Output only. The earliest timestamp at which older versions of the data can - * be read from the database. See [version_retention_period] above; this field - * is populated with `now - version_retention_period`. - * This value is continuously updated, and becomes stale the moment it is - * queried. If you are using this value to recover data, make sure to account - * for the time from the moment when the value is queried to the moment when - * you initiate the recovery. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEarliestVersionTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->earliest_version_time = $var; - - return $this; - } - - /** - * Whether to enable the PITR feature on this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; - * @return int - */ - public function getPointInTimeRecoveryEnablement() - { - return $this->point_in_time_recovery_enablement; - } - - /** - * Whether to enable the PITR feature on this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; - * @param int $var - * @return $this - */ - public function setPointInTimeRecoveryEnablement($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\PointInTimeRecoveryEnablement::class); - $this->point_in_time_recovery_enablement = $var; - - return $this; - } - - /** - * The App Engine integration mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; - * @return int - */ - public function getAppEngineIntegrationMode() - { - return $this->app_engine_integration_mode; - } - - /** - * The App Engine integration mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; - * @param int $var - * @return $this - */ - public function setAppEngineIntegrationMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\AppEngineIntegrationMode::class); - $this->app_engine_integration_mode = $var; - - return $this; - } - - /** - * Output only. The key_prefix for this database. This key_prefix is used, in - * combination with the project ID ("~") to construct - * the application ID that is returned from the Cloud Datastore APIs in Google - * App Engine first generation runtimes. - * This value may be empty in which case the appid to use for URL-encoded keys - * is the project_id (eg: foo instead of v~foo). - * - * Generated from protobuf field string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getKeyPrefix() - { - return $this->key_prefix; - } - - /** - * Output only. The key_prefix for this database. This key_prefix is used, in - * combination with the project ID ("~") to construct - * the application ID that is returned from the Cloud Datastore APIs in Google - * App Engine first generation runtimes. - * This value may be empty in which case the appid to use for URL-encoded keys - * is the project_id (eg: foo instead of v~foo). - * - * Generated from protobuf field string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setKeyPrefix($var) - { - GPBUtil::checkString($var, True); - $this->key_prefix = $var; - - return $this; - } - - /** - * State of delete protection for the database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; - * @return int - */ - public function getDeleteProtectionState() - { - return $this->delete_protection_state; - } - - /** - * State of delete protection for the database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; - * @param int $var - * @return $this - */ - public function setDeleteProtectionState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DeleteProtectionState::class); - $this->delete_protection_state = $var; - - return $this; - } - - /** - * Optional. Presence indicates CMEK is enabled for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig|null - */ - public function getCmekConfig() - { - return $this->cmek_config; - } - - public function hasCmekConfig() - { - return isset($this->cmek_config); - } - - public function clearCmekConfig() - { - unset($this->cmek_config); - } - - /** - * Optional. Presence indicates CMEK is enabled for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig $var - * @return $this - */ - public function setCmekConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig::class); - $this->cmek_config = $var; - - return $this; - } - - /** - * Output only. The database resource's prior database ID. This field is only - * populated for deleted databases. - * - * Generated from protobuf field string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPreviousId() - { - return $this->previous_id; - } - - /** - * Output only. The database resource's prior database ID. This field is only - * populated for deleted databases. - * - * Generated from protobuf field string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPreviousId($var) - { - GPBUtil::checkString($var, True); - $this->previous_id = $var; - - return $this; - } - - /** - * Output only. Information about the provenance of this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo|null - */ - public function getSourceInfo() - { - return $this->source_info; - } - - public function hasSourceInfo() - { - return isset($this->source_info); - } - - public function clearSourceInfo() - { - unset($this->source_info); - } - - /** - * Output only. Information about the provenance of this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo $var - * @return $this - */ - public function setSourceInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo::class); - $this->source_info = $var; - - return $this; - } - - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 99; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 99; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php deleted file mode 100644 index 2a871f5971f6..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php +++ /dev/null @@ -1,69 +0,0 @@ -google.firestore.admin.v1.Database.AppEngineIntegrationMode - */ -class AppEngineIntegrationMode -{ - /** - * Not used. - * - * Generated from protobuf enum APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED = 0; - */ - const APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED = 0; - /** - * If an App Engine application exists in the same region as this database, - * App Engine configuration will impact this database. This includes - * disabling of the application & database, as well as disabling writes to - * the database. - * - * Generated from protobuf enum ENABLED = 1; - */ - const ENABLED = 1; - /** - * App Engine has no effect on the ability of this database to serve - * requests. - * This is the default setting for databases created with the Firestore API. - * - * Generated from protobuf enum DISABLED = 2; - */ - const DISABLED = 2; - - private static $valueToName = [ - self::APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED => 'APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED', - self::ENABLED => 'ENABLED', - 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(AppEngineIntegrationMode::class, \Google\Cloud\Firestore\Admin\V1\Database_AppEngineIntegrationMode::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/CmekConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/CmekConfig.php deleted file mode 100644 index 3869c3ed18fe..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/CmekConfig.php +++ /dev/null @@ -1,154 +0,0 @@ -google.firestore.admin.v1.Database.CmekConfig - */ -class CmekConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Only keys in the same location as this database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $kms_key_name = ''; - /** - * Output only. Currently in-use [KMS key - * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). - * During [key rotation](https://cloud.google.com/kms/docs/key-rotation), - * there can be multiple in-use key versions. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. - * - * Generated from protobuf field repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $active_key_version; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kms_key_name - * Required. Only keys in the same location as this database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * @type array|\Google\Protobuf\Internal\RepeatedField $active_key_version - * Output only. Currently in-use [KMS key - * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). - * During [key rotation](https://cloud.google.com/kms/docs/key-rotation), - * there can be multiple in-use key versions. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - - /** - * Required. Only keys in the same location as this database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * Required. Only keys in the same location as this database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_name = $var; - - return $this; - } - - /** - * Output only. Currently in-use [KMS key - * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). - * During [key rotation](https://cloud.google.com/kms/docs/key-rotation), - * there can be multiple in-use key versions. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. - * - * Generated from protobuf field repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getActiveKeyVersion() - { - return $this->active_key_version; - } - - /** - * Output only. Currently in-use [KMS key - * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). - * During [key rotation](https://cloud.google.com/kms/docs/key-rotation), - * there can be multiple in-use key versions. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. - * - * Generated from protobuf field repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setActiveKeyVersion($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->active_key_version = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CmekConfig::class, \Google\Cloud\Firestore\Admin\V1\Database_CmekConfig::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php deleted file mode 100644 index 2e88fde688f8..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php +++ /dev/null @@ -1,77 +0,0 @@ -google.firestore.admin.v1.Database.ConcurrencyMode - */ -class ConcurrencyMode -{ - /** - * Not used. - * - * Generated from protobuf enum CONCURRENCY_MODE_UNSPECIFIED = 0; - */ - const CONCURRENCY_MODE_UNSPECIFIED = 0; - /** - * Use optimistic concurrency control by default. This mode is available - * for Cloud Firestore databases. - * - * Generated from protobuf enum OPTIMISTIC = 1; - */ - const OPTIMISTIC = 1; - /** - * Use pessimistic concurrency control by default. This mode is available - * for Cloud Firestore databases. - * This is the default setting for Cloud Firestore. - * - * Generated from protobuf enum PESSIMISTIC = 2; - */ - const PESSIMISTIC = 2; - /** - * Use optimistic concurrency control with entity groups by default. - * This is the only available mode for Cloud Datastore. - * This mode is also available for Cloud Firestore with Datastore Mode but - * is not recommended. - * - * Generated from protobuf enum OPTIMISTIC_WITH_ENTITY_GROUPS = 3; - */ - const OPTIMISTIC_WITH_ENTITY_GROUPS = 3; - - private static $valueToName = [ - self::CONCURRENCY_MODE_UNSPECIFIED => 'CONCURRENCY_MODE_UNSPECIFIED', - self::OPTIMISTIC => 'OPTIMISTIC', - self::PESSIMISTIC => 'PESSIMISTIC', - self::OPTIMISTIC_WITH_ENTITY_GROUPS => 'OPTIMISTIC_WITH_ENTITY_GROUPS', - ]; - - 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(ConcurrencyMode::class, \Google\Cloud\Firestore\Admin\V1\Database_ConcurrencyMode::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php deleted file mode 100644 index 8fed66a0fc28..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php +++ /dev/null @@ -1,67 +0,0 @@ -google.firestore.admin.v1.Database.DatabaseType - */ -class DatabaseType -{ - /** - * Not used. - * - * Generated from protobuf enum DATABASE_TYPE_UNSPECIFIED = 0; - */ - const DATABASE_TYPE_UNSPECIFIED = 0; - /** - * Firestore Native Mode - * - * Generated from protobuf enum FIRESTORE_NATIVE = 1; - */ - const FIRESTORE_NATIVE = 1; - /** - * Firestore in Datastore Mode. - * - * Generated from protobuf enum DATASTORE_MODE = 2; - */ - const DATASTORE_MODE = 2; - - private static $valueToName = [ - self::DATABASE_TYPE_UNSPECIFIED => 'DATABASE_TYPE_UNSPECIFIED', - self::FIRESTORE_NATIVE => 'FIRESTORE_NATIVE', - self::DATASTORE_MODE => 'DATASTORE_MODE', - ]; - - 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(DatabaseType::class, \Google\Cloud\Firestore\Admin\V1\Database_DatabaseType::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DeleteProtectionState.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DeleteProtectionState.php deleted file mode 100644 index 34ade3e23333..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DeleteProtectionState.php +++ /dev/null @@ -1,64 +0,0 @@ -google.firestore.admin.v1.Database.DeleteProtectionState - */ -class DeleteProtectionState -{ - /** - * The default value. Delete protection type is not specified - * - * Generated from protobuf enum DELETE_PROTECTION_STATE_UNSPECIFIED = 0; - */ - const DELETE_PROTECTION_STATE_UNSPECIFIED = 0; - /** - * Delete protection is disabled - * - * Generated from protobuf enum DELETE_PROTECTION_DISABLED = 1; - */ - const DELETE_PROTECTION_DISABLED = 1; - /** - * Delete protection is enabled - * - * Generated from protobuf enum DELETE_PROTECTION_ENABLED = 2; - */ - const DELETE_PROTECTION_ENABLED = 2; - - private static $valueToName = [ - self::DELETE_PROTECTION_STATE_UNSPECIFIED => 'DELETE_PROTECTION_STATE_UNSPECIFIED', - self::DELETE_PROTECTION_DISABLED => 'DELETE_PROTECTION_DISABLED', - self::DELETE_PROTECTION_ENABLED => 'DELETE_PROTECTION_ENABLED', - ]; - - 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(DeleteProtectionState::class, \Google\Cloud\Firestore\Admin\V1\Database_DeleteProtectionState::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig.php deleted file mode 100644 index b6f8262797ce..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig.php +++ /dev/null @@ -1,146 +0,0 @@ -google.firestore.admin.v1.Database.EncryptionConfig - */ -class EncryptionConfig extends \Google\Protobuf\Internal\Message -{ - protected $encryption_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\GoogleDefaultEncryptionOptions $google_default_encryption - * Use Google default encryption. - * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\SourceEncryptionOptions $use_source_encryption - * The database will use the same encryption configuration as the source. - * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\CustomerManagedEncryptionOptions $customer_managed_encryption - * Use Customer Managed Encryption Keys (CMEK) for encryption. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - - /** - * Use Google default encryption. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; - * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\GoogleDefaultEncryptionOptions|null - */ - public function getGoogleDefaultEncryption() - { - return $this->readOneof(1); - } - - public function hasGoogleDefaultEncryption() - { - return $this->hasOneof(1); - } - - /** - * Use Google default encryption. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; - * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\GoogleDefaultEncryptionOptions $var - * @return $this - */ - public function setGoogleDefaultEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\GoogleDefaultEncryptionOptions::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The database will use the same encryption configuration as the source. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; - * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\SourceEncryptionOptions|null - */ - public function getUseSourceEncryption() - { - return $this->readOneof(2); - } - - public function hasUseSourceEncryption() - { - return $this->hasOneof(2); - } - - /** - * The database will use the same encryption configuration as the source. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; - * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\SourceEncryptionOptions $var - * @return $this - */ - public function setUseSourceEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\SourceEncryptionOptions::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Use Customer Managed Encryption Keys (CMEK) for encryption. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; - * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\CustomerManagedEncryptionOptions|null - */ - public function getCustomerManagedEncryption() - { - return $this->readOneof(3); - } - - public function hasCustomerManagedEncryption() - { - return $this->hasOneof(3); - } - - /** - * Use Customer Managed Encryption Keys (CMEK) for encryption. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; - * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\CustomerManagedEncryptionOptions $var - * @return $this - */ - public function setCustomerManagedEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\CustomerManagedEncryptionOptions::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getEncryptionType() - { - return $this->whichOneof("encryption_type"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EncryptionConfig::class, \Google\Cloud\Firestore\Admin\V1\Database_EncryptionConfig::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/CustomerManagedEncryptionOptions.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/CustomerManagedEncryptionOptions.php deleted file mode 100644 index d00df462c9c5..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/CustomerManagedEncryptionOptions.php +++ /dev/null @@ -1,99 +0,0 @@ -google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions - */ -class CustomerManagedEncryptionOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Only keys in the same location as the database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $kms_key_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kms_key_name - * Required. Only keys in the same location as the database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - - /** - * Required. Only keys in the same location as the database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * Required. Only keys in the same location as the database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CustomerManagedEncryptionOptions::class, \Google\Cloud\Firestore\Admin\V1\Database_EncryptionConfig_CustomerManagedEncryptionOptions::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/GoogleDefaultEncryptionOptions.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/GoogleDefaultEncryptionOptions.php deleted file mode 100644 index 6a47d15b6b48..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/GoogleDefaultEncryptionOptions.php +++ /dev/null @@ -1,36 +0,0 @@ -google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions - */ -class GoogleDefaultEncryptionOptions extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GoogleDefaultEncryptionOptions::class, \Google\Cloud\Firestore\Admin\V1\Database_EncryptionConfig_GoogleDefaultEncryptionOptions::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/SourceEncryptionOptions.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/SourceEncryptionOptions.php deleted file mode 100644 index 6bf765a0fb15..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/SourceEncryptionOptions.php +++ /dev/null @@ -1,37 +0,0 @@ -google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions - */ -class SourceEncryptionOptions extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SourceEncryptionOptions::class, \Google\Cloud\Firestore\Admin\V1\Database_EncryptionConfig_SourceEncryptionOptions::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/PointInTimeRecoveryEnablement.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/PointInTimeRecoveryEnablement.php deleted file mode 100644 index 14a69b79b174..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/PointInTimeRecoveryEnablement.php +++ /dev/null @@ -1,70 +0,0 @@ -google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement - */ -class PointInTimeRecoveryEnablement -{ - /** - * Not used. - * - * Generated from protobuf enum POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED = 0; - */ - const POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED = 0; - /** - * Reads are supported on selected versions of the data from within the past - * 7 days: - * * Reads against any timestamp within the past hour - * * Reads against 1-minute snapshots beyond 1 hour and within 7 days - * `version_retention_period` and `earliest_version_time` can be - * used to determine the supported versions. - * - * Generated from protobuf enum POINT_IN_TIME_RECOVERY_ENABLED = 1; - */ - const POINT_IN_TIME_RECOVERY_ENABLED = 1; - /** - * Reads are supported on any version of the data from within the past 1 - * hour. - * - * Generated from protobuf enum POINT_IN_TIME_RECOVERY_DISABLED = 2; - */ - const POINT_IN_TIME_RECOVERY_DISABLED = 2; - - private static $valueToName = [ - self::POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED => 'POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED', - self::POINT_IN_TIME_RECOVERY_ENABLED => 'POINT_IN_TIME_RECOVERY_ENABLED', - self::POINT_IN_TIME_RECOVERY_DISABLED => 'POINT_IN_TIME_RECOVERY_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(PointInTimeRecoveryEnablement::class, \Google\Cloud\Firestore\Admin\V1\Database_PointInTimeRecoveryEnablement::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo.php deleted file mode 100644 index 198612e6dfbd..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo.php +++ /dev/null @@ -1,123 +0,0 @@ -google.firestore.admin.v1.Database.SourceInfo - */ -class SourceInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The associated long-running operation. This field may not be set after - * the operation has completed. Format: - * `projects/{project}/databases/{database}/operations/{operation}`. - * - * Generated from protobuf field string operation = 3 [(.google.api.resource_reference) = { - */ - protected $operation = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo\BackupSource $backup - * If set, this database was restored from the specified backup (or a - * snapshot thereof). - * @type string $operation - * The associated long-running operation. This field may not be set after - * the operation has completed. Format: - * `projects/{project}/databases/{database}/operations/{operation}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - - /** - * If set, this database was restored from the specified backup (or a - * snapshot thereof). - * - * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; - * @return \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo\BackupSource|null - */ - public function getBackup() - { - return $this->readOneof(1); - } - - public function hasBackup() - { - return $this->hasOneof(1); - } - - /** - * If set, this database was restored from the specified backup (or a - * snapshot thereof). - * - * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; - * @param \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo\BackupSource $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo\BackupSource::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The associated long-running operation. This field may not be set after - * the operation has completed. Format: - * `projects/{project}/databases/{database}/operations/{operation}`. - * - * Generated from protobuf field string operation = 3 [(.google.api.resource_reference) = { - * @return string - */ - public function getOperation() - { - return $this->operation; - } - - /** - * The associated long-running operation. This field may not be set after - * the operation has completed. Format: - * `projects/{project}/databases/{database}/operations/{operation}`. - * - * Generated from protobuf field string operation = 3 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setOperation($var) - { - GPBUtil::checkString($var, True); - $this->operation = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SourceInfo::class, \Google\Cloud\Firestore\Admin\V1\Database_SourceInfo::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo/BackupSource.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo/BackupSource.php deleted file mode 100644 index 4f0caa63d22d..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo/BackupSource.php +++ /dev/null @@ -1,78 +0,0 @@ -google.firestore.admin.v1.Database.SourceInfo.BackupSource - */ -class BackupSource extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the backup that was used to restore this - * database. Format: - * `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string backup = 1 [(.google.api.resource_reference) = { - */ - protected $backup = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $backup - * The resource name of the backup that was used to restore this - * database. Format: - * `projects/{project}/locations/{location}/backups/{backup}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the backup that was used to restore this - * database. Format: - * `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string backup = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getBackup() - { - return $this->backup; - } - - /** - * The resource name of the backup that was used to restore this - * database. Format: - * `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string backup = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkString($var, True); - $this->backup = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BackupSource::class, \Google\Cloud\Firestore\Admin\V1\Database_SourceInfo_BackupSource::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupRequest.php deleted file mode 100644 index b1c17f2db7ce..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupRequest.php +++ /dev/null @@ -1,88 +0,0 @@ -google.firestore.admin.v1.DeleteBackupRequest - */ -class DeleteBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the backup to delete. - * format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * 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 backup to delete. - * - * format is `projects/{project}/locations/{location}/backups/{backup}`. Please see - * {@see FirestoreAdminClient::backupName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\DeleteBackupRequest - * - * @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 backup to delete. - * format is `projects/{project}/locations/{location}/backups/{backup}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the backup to delete. - * format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * 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 backup to delete. - * format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupScheduleRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupScheduleRequest.php deleted file mode 100644 index 9d3bc056d176..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupScheduleRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.firestore.admin.v1.DeleteBackupScheduleRequest - */ -class DeleteBackupScheduleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the backup schedule. - * - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * Please see {@see FirestoreAdminClient::backupScheduleName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\DeleteBackupScheduleRequest - * - * @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 of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * 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 of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseMetadata.php deleted file mode 100644 index c411410ff5b5..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseMetadata.php +++ /dev/null @@ -1,33 +0,0 @@ -google.firestore.admin.v1.DeleteDatabaseMetadata - */ -class DeleteDatabaseMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseRequest.php deleted file mode 100644 index 5118ae7c1271..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -google.firestore.admin.v1.DeleteDatabaseRequest - */ -class DeleteDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The current etag of the Database. - * If an etag is provided and does not match the current etag of the database, - * deletion will be blocked and a FAILED_PRECONDITION error will be returned. - * - * Generated from protobuf field string etag = 3; - */ - protected $etag = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}` - * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\DeleteDatabaseRequest - * - * @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. A name of the form - * `projects/{project_id}/databases/{database_id}` - * @type string $etag - * The current etag of the Database. - * If an etag is provided and does not match the current etag of the database, - * deletion will be blocked and a FAILED_PRECONDITION error will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_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. A name of the form - * `projects/{project_id}/databases/{database_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; - } - - /** - * The current etag of the Database. - * If an etag is provided and does not match the current etag of the database, - * deletion will be blocked and a FAILED_PRECONDITION error will be returned. - * - * Generated from protobuf field string etag = 3; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * The current etag of the Database. - * If an etag is provided and does not match the current etag of the database, - * deletion will be blocked and a FAILED_PRECONDITION error will be returned. - * - * Generated from protobuf field string etag = 3; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteIndexRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteIndexRequest.php deleted file mode 100644 index 0ff8c174cfd6..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteIndexRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.DeleteIndexRequest - */ -class DeleteIndexRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * Please see {@see FirestoreAdminClient::indexName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\DeleteIndexRequest - * - * @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. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php deleted file mode 100644 index 0f208185cfa5..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php +++ /dev/null @@ -1,403 +0,0 @@ -google.firestore.admin.v1.ExportDocumentsMetadata - */ -class ExportDocumentsMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The state of the export operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - */ - protected $operation_state = 0; - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - */ - protected $progress_documents = null; - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - */ - protected $progress_bytes = null; - /** - * Which collection IDs are being exported. - * - * Generated from protobuf field repeated string collection_ids = 6; - */ - private $collection_ids; - /** - * Where the documents are being exported to. - * - * Generated from protobuf field string output_uri_prefix = 7; - */ - protected $output_uri_prefix = ''; - /** - * Which namespace IDs are being exported. - * - * Generated from protobuf field repeated string namespace_ids = 8; - */ - private $namespace_ids; - /** - * The timestamp that corresponds to the version of the database that is being - * exported. If unspecified, there are no guarantees about the consistency of - * the documents being exported. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 9; - */ - protected $snapshot_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * The time this operation completed. Will be unset if operation still in - * progress. - * @type int $operation_state - * The state of the export operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents - * The progress, in documents, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes - * The progress, in bytes, of this operation. - * @type array|\Google\Protobuf\Internal\RepeatedField $collection_ids - * Which collection IDs are being exported. - * @type string $output_uri_prefix - * Where the documents are being exported to. - * @type array|\Google\Protobuf\Internal\RepeatedField $namespace_ids - * Which namespace IDs are being exported. - * @type \Google\Protobuf\Timestamp $snapshot_time - * The timestamp that corresponds to the version of the database that is being - * exported. If unspecified, there are no guarantees about the consistency of - * the documents being exported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The state of the export operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @return int - */ - public function getOperationState() - { - return $this->operation_state; - } - - /** - * The state of the export operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @param int $var - * @return $this - */ - public function setOperationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->operation_state = $var; - - return $this; - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressDocuments() - { - return $this->progress_documents; - } - - public function hasProgressDocuments() - { - return isset($this->progress_documents); - } - - public function clearProgressDocuments() - { - unset($this->progress_documents); - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_documents = $var; - - return $this; - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressBytes() - { - return $this->progress_bytes; - } - - public function hasProgressBytes() - { - return isset($this->progress_bytes); - } - - public function clearProgressBytes() - { - unset($this->progress_bytes); - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressBytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_bytes = $var; - - return $this; - } - - /** - * Which collection IDs are being exported. - * - * Generated from protobuf field repeated string collection_ids = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * Which collection IDs are being exported. - * - * Generated from protobuf field repeated string collection_ids = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * Where the documents are being exported to. - * - * Generated from protobuf field string output_uri_prefix = 7; - * @return string - */ - public function getOutputUriPrefix() - { - return $this->output_uri_prefix; - } - - /** - * Where the documents are being exported to. - * - * Generated from protobuf field string output_uri_prefix = 7; - * @param string $var - * @return $this - */ - public function setOutputUriPrefix($var) - { - GPBUtil::checkString($var, True); - $this->output_uri_prefix = $var; - - return $this; - } - - /** - * Which namespace IDs are being exported. - * - * Generated from protobuf field repeated string namespace_ids = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNamespaceIds() - { - return $this->namespace_ids; - } - - /** - * Which namespace IDs are being exported. - * - * Generated from protobuf field repeated string namespace_ids = 8; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNamespaceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespace_ids = $arr; - - return $this; - } - - /** - * The timestamp that corresponds to the version of the database that is being - * exported. If unspecified, there are no guarantees about the consistency of - * the documents being exported. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 9; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSnapshotTime() - { - return $this->snapshot_time; - } - - public function hasSnapshotTime() - { - return isset($this->snapshot_time); - } - - public function clearSnapshotTime() - { - unset($this->snapshot_time); - } - - /** - * The timestamp that corresponds to the version of the database that is being - * exported. If unspecified, there are no guarantees about the consistency of - * the documents being exported. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 9; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSnapshotTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->snapshot_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php deleted file mode 100644 index b0bdac928f3a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php +++ /dev/null @@ -1,305 +0,0 @@ -google.firestore.admin.v1.ExportDocumentsRequest - */ -class ExportDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Database to export. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Which collection IDs to export. Unspecified means all collections. Each - * collection ID in this list must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2; - */ - private $collection_ids; - /** - * The output URI. Currently only supports Google Cloud Storage URIs of the - * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name - * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional - * Google Cloud Storage namespace path. When - * choosing a name, be sure to consider Google Cloud Storage naming - * guidelines: https://cloud.google.com/storage/docs/naming. - * If the URI is a bucket (without a namespace path), a prefix will be - * generated based on the start time. - * - * Generated from protobuf field string output_uri_prefix = 3; - */ - protected $output_uri_prefix = ''; - /** - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 4; - */ - private $namespace_ids; - /** - * The timestamp that corresponds to the version of the database to be - * exported. The timestamp must be in the past, rounded to the minute and not - * older than - * [earliestVersionTime][google.firestore.admin.v1.Database.earliest_version_time]. - * If specified, then the exported documents will represent a consistent view - * of the database at the provided time. Otherwise, there are no guarantees - * about the consistency of the exported documents. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 5; - */ - protected $snapshot_time = null; - - /** - * @param string $name Required. Database to export. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. Please see - * {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ExportDocumentsRequest - * - * @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. Database to export. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * @type array|\Google\Protobuf\Internal\RepeatedField $collection_ids - * Which collection IDs to export. Unspecified means all collections. Each - * collection ID in this list must be unique. - * @type string $output_uri_prefix - * The output URI. Currently only supports Google Cloud Storage URIs of the - * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name - * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional - * Google Cloud Storage namespace path. When - * choosing a name, be sure to consider Google Cloud Storage naming - * guidelines: https://cloud.google.com/storage/docs/naming. - * If the URI is a bucket (without a namespace path), a prefix will be - * generated based on the start time. - * @type array|\Google\Protobuf\Internal\RepeatedField $namespace_ids - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * @type \Google\Protobuf\Timestamp $snapshot_time - * The timestamp that corresponds to the version of the database to be - * exported. The timestamp must be in the past, rounded to the minute and not - * older than - * [earliestVersionTime][google.firestore.admin.v1.Database.earliest_version_time]. - * If specified, then the exported documents will represent a consistent view - * of the database at the provided time. Otherwise, there are no guarantees - * about the consistency of the exported documents. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Database to export. Should be of the form: - * `projects/{project_id}/databases/{database_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. Database to export. Should be of the form: - * `projects/{project_id}/databases/{database_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; - } - - /** - * Which collection IDs to export. Unspecified means all collections. Each - * collection ID in this list must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * Which collection IDs to export. Unspecified means all collections. Each - * collection ID in this list must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * The output URI. Currently only supports Google Cloud Storage URIs of the - * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name - * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional - * Google Cloud Storage namespace path. When - * choosing a name, be sure to consider Google Cloud Storage naming - * guidelines: https://cloud.google.com/storage/docs/naming. - * If the URI is a bucket (without a namespace path), a prefix will be - * generated based on the start time. - * - * Generated from protobuf field string output_uri_prefix = 3; - * @return string - */ - public function getOutputUriPrefix() - { - return $this->output_uri_prefix; - } - - /** - * The output URI. Currently only supports Google Cloud Storage URIs of the - * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name - * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional - * Google Cloud Storage namespace path. When - * choosing a name, be sure to consider Google Cloud Storage naming - * guidelines: https://cloud.google.com/storage/docs/naming. - * If the URI is a bucket (without a namespace path), a prefix will be - * generated based on the start time. - * - * Generated from protobuf field string output_uri_prefix = 3; - * @param string $var - * @return $this - */ - public function setOutputUriPrefix($var) - { - GPBUtil::checkString($var, True); - $this->output_uri_prefix = $var; - - return $this; - } - - /** - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNamespaceIds() - { - return $this->namespace_ids; - } - - /** - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNamespaceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespace_ids = $arr; - - return $this; - } - - /** - * The timestamp that corresponds to the version of the database to be - * exported. The timestamp must be in the past, rounded to the minute and not - * older than - * [earliestVersionTime][google.firestore.admin.v1.Database.earliest_version_time]. - * If specified, then the exported documents will represent a consistent view - * of the database at the provided time. Otherwise, there are no guarantees - * about the consistency of the exported documents. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSnapshotTime() - { - return $this->snapshot_time; - } - - public function hasSnapshotTime() - { - return isset($this->snapshot_time); - } - - public function clearSnapshotTime() - { - unset($this->snapshot_time); - } - - /** - * The timestamp that corresponds to the version of the database to be - * exported. The timestamp must be in the past, rounded to the minute and not - * older than - * [earliestVersionTime][google.firestore.admin.v1.Database.earliest_version_time]. - * If specified, then the exported documents will represent a consistent view - * of the database at the provided time. Otherwise, there are no guarantees - * about the consistency of the exported documents. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSnapshotTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->snapshot_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php deleted file mode 100644 index 98d2d38246b1..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php +++ /dev/null @@ -1,76 +0,0 @@ -google.firestore.admin.v1.ExportDocumentsResponse - */ -class ExportDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Location of the output files. This can be used to begin an import - * into Cloud Firestore (this project or another project) after the operation - * completes successfully. - * - * Generated from protobuf field string output_uri_prefix = 1; - */ - protected $output_uri_prefix = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $output_uri_prefix - * Location of the output files. This can be used to begin an import - * into Cloud Firestore (this project or another project) after the operation - * completes successfully. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * Location of the output files. This can be used to begin an import - * into Cloud Firestore (this project or another project) after the operation - * completes successfully. - * - * Generated from protobuf field string output_uri_prefix = 1; - * @return string - */ - public function getOutputUriPrefix() - { - return $this->output_uri_prefix; - } - - /** - * Location of the output files. This can be used to begin an import - * into Cloud Firestore (this project or another project) after the operation - * completes successfully. - * - * Generated from protobuf field string output_uri_prefix = 1; - * @param string $var - * @return $this - */ - public function setOutputUriPrefix($var) - { - GPBUtil::checkString($var, True); - $this->output_uri_prefix = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php deleted file mode 100644 index 3a9433d22017..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php +++ /dev/null @@ -1,253 +0,0 @@ -google.firestore.admin.v1.Field - */ -class Field extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A field name of the form: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * A field path can be a simple field name, e.g. `address` or a path to fields - * within `map_value` , e.g. `address.city`, - * or a special field path. The only valid special field is `*`, which - * represents any field. - * Field paths can be quoted using `` ` `` (backtick). The only character that - * must be escaped within a quoted field path is the backtick character - * itself, escaped using a backslash. Special characters in field paths that - * must be quoted include: `*`, `.`, - * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. - * Examples: - * `` `address.city` `` represents a field named `address.city`, not the map - * key `city` in the field `address`. `` `*` `` represents a field named `*`, - * not any field. - * A special `Field` contains the default indexing settings for all fields. - * This field's resource name is: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` - * Indexes defined on this `Field` will be applied to all fields which do not - * have their own `Field` index configuration. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * The index configuration for this field. If unset, field indexing will - * revert to the configuration defined by the `ancestor_field`. To - * explicitly remove all indexes for this field, specify an index config - * with an empty list of indexes. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.IndexConfig index_config = 2; - */ - protected $index_config = null; - /** - * The TTL configuration for this `Field`. - * Setting or unsetting this will enable or disable the TTL for - * documents that have this `Field`. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig ttl_config = 3; - */ - protected $ttl_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A field name of the form: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * A field path can be a simple field name, e.g. `address` or a path to fields - * within `map_value` , e.g. `address.city`, - * or a special field path. The only valid special field is `*`, which - * represents any field. - * Field paths can be quoted using `` ` `` (backtick). The only character that - * must be escaped within a quoted field path is the backtick character - * itself, escaped using a backslash. Special characters in field paths that - * must be quoted include: `*`, `.`, - * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. - * Examples: - * `` `address.city` `` represents a field named `address.city`, not the map - * key `city` in the field `address`. `` `*` `` represents a field named `*`, - * not any field. - * A special `Field` contains the default indexing settings for all fields. - * This field's resource name is: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` - * Indexes defined on this `Field` will be applied to all fields which do not - * have their own `Field` index configuration. - * @type \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig $index_config - * The index configuration for this field. If unset, field indexing will - * revert to the configuration defined by the `ancestor_field`. To - * explicitly remove all indexes for this field, specify an index config - * with an empty list of indexes. - * @type \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig $ttl_config - * The TTL configuration for this `Field`. - * Setting or unsetting this will enable or disable the TTL for - * documents that have this `Field`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Field::initOnce(); - parent::__construct($data); - } - - /** - * Required. A field name of the form: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * A field path can be a simple field name, e.g. `address` or a path to fields - * within `map_value` , e.g. `address.city`, - * or a special field path. The only valid special field is `*`, which - * represents any field. - * Field paths can be quoted using `` ` `` (backtick). The only character that - * must be escaped within a quoted field path is the backtick character - * itself, escaped using a backslash. Special characters in field paths that - * must be quoted include: `*`, `.`, - * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. - * Examples: - * `` `address.city` `` represents a field named `address.city`, not the map - * key `city` in the field `address`. `` `*` `` represents a field named `*`, - * not any field. - * A special `Field` contains the default indexing settings for all fields. - * This field's resource name is: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` - * Indexes defined on this `Field` will be applied to all fields which do not - * have their own `Field` index configuration. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A field name of the form: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * A field path can be a simple field name, e.g. `address` or a path to fields - * within `map_value` , e.g. `address.city`, - * or a special field path. The only valid special field is `*`, which - * represents any field. - * Field paths can be quoted using `` ` `` (backtick). The only character that - * must be escaped within a quoted field path is the backtick character - * itself, escaped using a backslash. Special characters in field paths that - * must be quoted include: `*`, `.`, - * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. - * Examples: - * `` `address.city` `` represents a field named `address.city`, not the map - * key `city` in the field `address`. `` `*` `` represents a field named `*`, - * not any field. - * A special `Field` contains the default indexing settings for all fields. - * This field's resource name is: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` - * Indexes defined on this `Field` will be applied to all fields which do not - * have their own `Field` index configuration. - * - * 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; - } - - /** - * The index configuration for this field. If unset, field indexing will - * revert to the configuration defined by the `ancestor_field`. To - * explicitly remove all indexes for this field, specify an index config - * with an empty list of indexes. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.IndexConfig index_config = 2; - * @return \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig|null - */ - public function getIndexConfig() - { - return $this->index_config; - } - - public function hasIndexConfig() - { - return isset($this->index_config); - } - - public function clearIndexConfig() - { - unset($this->index_config); - } - - /** - * The index configuration for this field. If unset, field indexing will - * revert to the configuration defined by the `ancestor_field`. To - * explicitly remove all indexes for this field, specify an index config - * with an empty list of indexes. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.IndexConfig index_config = 2; - * @param \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig $var - * @return $this - */ - public function setIndexConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig::class); - $this->index_config = $var; - - return $this; - } - - /** - * The TTL configuration for this `Field`. - * Setting or unsetting this will enable or disable the TTL for - * documents that have this `Field`. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig ttl_config = 3; - * @return \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig|null - */ - public function getTtlConfig() - { - return $this->ttl_config; - } - - public function hasTtlConfig() - { - return isset($this->ttl_config); - } - - public function clearTtlConfig() - { - unset($this->ttl_config); - } - - /** - * The TTL configuration for this `Field`. - * Setting or unsetting this will enable or disable the TTL for - * documents that have this `Field`. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig ttl_config = 3; - * @param \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig $var - * @return $this - */ - public function setTtlConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig::class); - $this->ttl_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php deleted file mode 100644 index 42a4d5ce8fd3..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php +++ /dev/null @@ -1,208 +0,0 @@ -google.firestore.admin.v1.Field.IndexConfig - */ -class IndexConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The indexes supported for this field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - */ - private $indexes; - /** - * Output only. When true, the `Field`'s index configuration is set from the - * configuration specified by the `ancestor_field`. - * When false, the `Field`'s index configuration is defined explicitly. - * - * Generated from protobuf field bool uses_ancestor_config = 2; - */ - protected $uses_ancestor_config = false; - /** - * Output only. Specifies the resource name of the `Field` from which this - * field's index configuration is set (when `uses_ancestor_config` is true), - * or from which it *would* be set if this field had no index configuration - * (when `uses_ancestor_config` is false). - * - * Generated from protobuf field string ancestor_field = 3; - */ - protected $ancestor_field = ''; - /** - * Output only - * When true, the `Field`'s index configuration is in the process of being - * reverted. Once complete, the index config will transition to the same - * state as the field specified by `ancestor_field`, at which point - * `uses_ancestor_config` will be `true` and `reverting` will be `false`. - * - * Generated from protobuf field bool reverting = 4; - */ - protected $reverting = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Firestore\Admin\V1\Index>|\Google\Protobuf\Internal\RepeatedField $indexes - * The indexes supported for this field. - * @type bool $uses_ancestor_config - * Output only. When true, the `Field`'s index configuration is set from the - * configuration specified by the `ancestor_field`. - * When false, the `Field`'s index configuration is defined explicitly. - * @type string $ancestor_field - * Output only. Specifies the resource name of the `Field` from which this - * field's index configuration is set (when `uses_ancestor_config` is true), - * or from which it *would* be set if this field had no index configuration - * (when `uses_ancestor_config` is false). - * @type bool $reverting - * Output only - * When true, the `Field`'s index configuration is in the process of being - * reverted. Once complete, the index config will transition to the same - * state as the field specified by `ancestor_field`, at which point - * `uses_ancestor_config` will be `true` and `reverting` will be `false`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Field::initOnce(); - parent::__construct($data); - } - - /** - * The indexes supported for this field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIndexes() - { - return $this->indexes; - } - - /** - * The indexes supported for this field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - * @param array<\Google\Cloud\Firestore\Admin\V1\Index>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIndexes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Index::class); - $this->indexes = $arr; - - return $this; - } - - /** - * Output only. When true, the `Field`'s index configuration is set from the - * configuration specified by the `ancestor_field`. - * When false, the `Field`'s index configuration is defined explicitly. - * - * Generated from protobuf field bool uses_ancestor_config = 2; - * @return bool - */ - public function getUsesAncestorConfig() - { - return $this->uses_ancestor_config; - } - - /** - * Output only. When true, the `Field`'s index configuration is set from the - * configuration specified by the `ancestor_field`. - * When false, the `Field`'s index configuration is defined explicitly. - * - * Generated from protobuf field bool uses_ancestor_config = 2; - * @param bool $var - * @return $this - */ - public function setUsesAncestorConfig($var) - { - GPBUtil::checkBool($var); - $this->uses_ancestor_config = $var; - - return $this; - } - - /** - * Output only. Specifies the resource name of the `Field` from which this - * field's index configuration is set (when `uses_ancestor_config` is true), - * or from which it *would* be set if this field had no index configuration - * (when `uses_ancestor_config` is false). - * - * Generated from protobuf field string ancestor_field = 3; - * @return string - */ - public function getAncestorField() - { - return $this->ancestor_field; - } - - /** - * Output only. Specifies the resource name of the `Field` from which this - * field's index configuration is set (when `uses_ancestor_config` is true), - * or from which it *would* be set if this field had no index configuration - * (when `uses_ancestor_config` is false). - * - * Generated from protobuf field string ancestor_field = 3; - * @param string $var - * @return $this - */ - public function setAncestorField($var) - { - GPBUtil::checkString($var, True); - $this->ancestor_field = $var; - - return $this; - } - - /** - * Output only - * When true, the `Field`'s index configuration is in the process of being - * reverted. Once complete, the index config will transition to the same - * state as the field specified by `ancestor_field`, at which point - * `uses_ancestor_config` will be `true` and `reverting` will be `false`. - * - * Generated from protobuf field bool reverting = 4; - * @return bool - */ - public function getReverting() - { - return $this->reverting; - } - - /** - * Output only - * When true, the `Field`'s index configuration is in the process of being - * reverted. Once complete, the index config will transition to the same - * state as the field specified by `ancestor_field`, at which point - * `uses_ancestor_config` will be `true` and `reverting` will be `false`. - * - * Generated from protobuf field bool reverting = 4; - * @param bool $var - * @return $this - */ - public function setReverting($var) - { - GPBUtil::checkBool($var); - $this->reverting = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IndexConfig::class, \Google\Cloud\Firestore\Admin\V1\Field_IndexConfig::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php deleted file mode 100644 index 7bb0a4304ab4..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php +++ /dev/null @@ -1,76 +0,0 @@ -google.firestore.admin.v1.Field.TtlConfig - */ -class TtlConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The state of the TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Output only. The state of the TTL configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Field::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The state of the TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig\State::class); - $this->state = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TtlConfig::class, \Google\Cloud\Firestore\Admin\V1\Field_TtlConfig::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php deleted file mode 100644 index 7722ca6e7e0a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.firestore.admin.v1.Field.TtlConfig.State - */ -class State -{ - /** - * The state is unspecified or unknown. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The TTL is being applied. There is an active long-running operation to - * track the change. Newly written documents will have TTLs applied as - * requested. Requested TTLs on existing documents are still being - * processed. When TTLs on all existing documents have been processed, the - * state will move to 'ACTIVE'. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The TTL is active for all documents. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The TTL configuration could not be enabled for all existing documents. - * Newly written documents will continue to have their TTL applied. - * The LRO returned when last attempting to enable TTL for this `Field` - * has failed, and may have more details. - * - * Generated from protobuf enum NEEDS_REPAIR = 3; - */ - const NEEDS_REPAIR = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::ACTIVE => 'ACTIVE', - self::NEEDS_REPAIR => 'NEEDS_REPAIR', - ]; - - 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\Firestore\Admin\V1\Field_TtlConfig_State::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php deleted file mode 100644 index 1d5d2218c70e..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php +++ /dev/null @@ -1,373 +0,0 @@ -google.firestore.admin.v1.FieldOperationMetadata - */ -class FieldOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The field resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * - * Generated from protobuf field string field = 3; - */ - protected $field = ''; - /** - * A list of - * [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], - * which describe the intent of this operation. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; - */ - private $index_config_deltas; - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 5; - */ - protected $state = 0; - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 6; - */ - protected $progress_documents = null; - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 7; - */ - protected $progress_bytes = null; - /** - * Describes the deltas of TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta ttl_config_delta = 8; - */ - protected $ttl_config_delta = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * The time this operation completed. Will be unset if operation still in - * progress. - * @type string $field - * The field resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * @type array<\Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta>|\Google\Protobuf\Internal\RepeatedField $index_config_deltas - * A list of - * [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], - * which describe the intent of this operation. - * @type int $state - * The state of the operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents - * The progress, in documents, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes - * The progress, in bytes, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta $ttl_config_delta - * Describes the deltas of TTL configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The field resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * - * Generated from protobuf field string field = 3; - * @return string - */ - public function getField() - { - return $this->field; - } - - /** - * The field resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * - * Generated from protobuf field string field = 3; - * @param string $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkString($var, True); - $this->field = $var; - - return $this; - } - - /** - * A list of - * [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], - * which describe the intent of this operation. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIndexConfigDeltas() - { - return $this->index_config_deltas; - } - - /** - * A list of - * [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], - * which describe the intent of this operation. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; - * @param array<\Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIndexConfigDeltas($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta::class); - $this->index_config_deltas = $arr; - - return $this; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 5; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 5; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 6; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressDocuments() - { - return $this->progress_documents; - } - - public function hasProgressDocuments() - { - return isset($this->progress_documents); - } - - public function clearProgressDocuments() - { - unset($this->progress_documents); - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 6; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_documents = $var; - - return $this; - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 7; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressBytes() - { - return $this->progress_bytes; - } - - public function hasProgressBytes() - { - return isset($this->progress_bytes); - } - - public function clearProgressBytes() - { - unset($this->progress_bytes); - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 7; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressBytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_bytes = $var; - - return $this; - } - - /** - * Describes the deltas of TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta ttl_config_delta = 8; - * @return \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta|null - */ - public function getTtlConfigDelta() - { - return $this->ttl_config_delta; - } - - public function hasTtlConfigDelta() - { - return isset($this->ttl_config_delta); - } - - public function clearTtlConfigDelta() - { - unset($this->ttl_config_delta); - } - - /** - * Describes the deltas of TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta ttl_config_delta = 8; - * @param \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta $var - * @return $this - */ - public function setTtlConfigDelta($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta::class); - $this->ttl_config_delta = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php deleted file mode 100644 index 1ad9e51b4401..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php +++ /dev/null @@ -1,114 +0,0 @@ -google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta - */ -class IndexConfigDelta extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies how the index is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; - */ - protected $change_type = 0; - /** - * The index being changed. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2; - */ - protected $index = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $change_type - * Specifies how the index is changing. - * @type \Google\Cloud\Firestore\Admin\V1\Index $index - * The index being changed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * Specifies how the index is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; - * @return int - */ - public function getChangeType() - { - return $this->change_type; - } - - /** - * Specifies how the index is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; - * @param int $var - * @return $this - */ - public function setChangeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta\ChangeType::class); - $this->change_type = $var; - - return $this; - } - - /** - * The index being changed. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2; - * @return \Google\Cloud\Firestore\Admin\V1\Index|null - */ - public function getIndex() - { - return $this->index; - } - - public function hasIndex() - { - return isset($this->index); - } - - public function clearIndex() - { - unset($this->index); - } - - /** - * The index being changed. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2; - * @param \Google\Cloud\Firestore\Admin\V1\Index $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index::class); - $this->index = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IndexConfigDelta::class, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata_IndexConfigDelta::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php deleted file mode 100644 index df7d29035371..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType - */ -class ChangeType -{ - /** - * The type of change is not specified or known. - * - * Generated from protobuf enum CHANGE_TYPE_UNSPECIFIED = 0; - */ - const CHANGE_TYPE_UNSPECIFIED = 0; - /** - * The single field index is being added. - * - * Generated from protobuf enum ADD = 1; - */ - const ADD = 1; - /** - * The single field index is being removed. - * - * Generated from protobuf enum REMOVE = 2; - */ - const REMOVE = 2; - - private static $valueToName = [ - self::CHANGE_TYPE_UNSPECIFIED => 'CHANGE_TYPE_UNSPECIFIED', - self::ADD => 'ADD', - self::REMOVE => 'REMOVE', - ]; - - 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(ChangeType::class, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata_IndexConfigDelta_ChangeType::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php deleted file mode 100644 index a9d9a6a54440..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php +++ /dev/null @@ -1,70 +0,0 @@ -google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta - */ -class TtlConfigDelta extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies how the TTL configuration is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType change_type = 1; - */ - protected $change_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $change_type - * Specifies how the TTL configuration is changing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * Specifies how the TTL configuration is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType change_type = 1; - * @return int - */ - public function getChangeType() - { - return $this->change_type; - } - - /** - * Specifies how the TTL configuration is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType change_type = 1; - * @param int $var - * @return $this - */ - public function setChangeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta\ChangeType::class); - $this->change_type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TtlConfigDelta::class, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata_TtlConfigDelta::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php deleted file mode 100644 index 600dbab57322..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType - */ -class ChangeType -{ - /** - * The type of change is not specified or known. - * - * Generated from protobuf enum CHANGE_TYPE_UNSPECIFIED = 0; - */ - const CHANGE_TYPE_UNSPECIFIED = 0; - /** - * The TTL config is being added. - * - * Generated from protobuf enum ADD = 1; - */ - const ADD = 1; - /** - * The TTL config is being removed. - * - * Generated from protobuf enum REMOVE = 2; - */ - const REMOVE = 2; - - private static $valueToName = [ - self::CHANGE_TYPE_UNSPECIFIED => 'CHANGE_TYPE_UNSPECIFIED', - self::ADD => 'ADD', - self::REMOVE => 'REMOVE', - ]; - - 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(ChangeType::class, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata_TtlConfigDelta_ChangeType::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupRequest.php deleted file mode 100644 index 9663203b71d3..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupRequest.php +++ /dev/null @@ -1,88 +0,0 @@ -google.firestore.admin.v1.GetBackupRequest - */ -class GetBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the backup to fetch. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * 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 backup to fetch. - * - * Format is `projects/{project}/locations/{location}/backups/{backup}`. Please see - * {@see FirestoreAdminClient::backupName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\GetBackupRequest - * - * @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 backup to fetch. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the backup to fetch. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * 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 backup to fetch. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupScheduleRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupScheduleRequest.php deleted file mode 100644 index ce2dfbc7e39f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupScheduleRequest.php +++ /dev/null @@ -1,93 +0,0 @@ -google.firestore.admin.v1.GetBackupScheduleRequest - */ -class GetBackupScheduleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the backup schedule. - * - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * Please see {@see FirestoreAdminClient::backupScheduleName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\GetBackupScheduleRequest - * - * @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 of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * 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 of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php deleted file mode 100644 index 21451d1b0a94..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.GetDatabaseRequest - */ -class GetDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}` - * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\GetDatabaseRequest - * - * @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. A name of the form - * `projects/{project_id}/databases/{database_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_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. A name of the form - * `projects/{project_id}/databases/{database_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php deleted file mode 100644 index 3b25bbe324d8..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.GetFieldRequest - */ -class GetFieldRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` - * Please see {@see FirestoreAdminClient::fieldName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\GetFieldRequest - * - * @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. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_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. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php deleted file mode 100644 index 5b700df02b53..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.GetIndexRequest - */ -class GetIndexRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * Please see {@see FirestoreAdminClient::indexName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\GetIndexRequest - * - * @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. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php deleted file mode 100644 index 35b530fe12b7..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php +++ /dev/null @@ -1,351 +0,0 @@ -google.firestore.admin.v1.ImportDocumentsMetadata - */ -class ImportDocumentsMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The state of the import operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - */ - protected $operation_state = 0; - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - */ - protected $progress_documents = null; - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - */ - protected $progress_bytes = null; - /** - * Which collection IDs are being imported. - * - * Generated from protobuf field repeated string collection_ids = 6; - */ - private $collection_ids; - /** - * The location of the documents being imported. - * - * Generated from protobuf field string input_uri_prefix = 7; - */ - protected $input_uri_prefix = ''; - /** - * Which namespace IDs are being imported. - * - * Generated from protobuf field repeated string namespace_ids = 8; - */ - private $namespace_ids; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * The time this operation completed. Will be unset if operation still in - * progress. - * @type int $operation_state - * The state of the import operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents - * The progress, in documents, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes - * The progress, in bytes, of this operation. - * @type array|\Google\Protobuf\Internal\RepeatedField $collection_ids - * Which collection IDs are being imported. - * @type string $input_uri_prefix - * The location of the documents being imported. - * @type array|\Google\Protobuf\Internal\RepeatedField $namespace_ids - * Which namespace IDs are being imported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The state of the import operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @return int - */ - public function getOperationState() - { - return $this->operation_state; - } - - /** - * The state of the import operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @param int $var - * @return $this - */ - public function setOperationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->operation_state = $var; - - return $this; - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressDocuments() - { - return $this->progress_documents; - } - - public function hasProgressDocuments() - { - return isset($this->progress_documents); - } - - public function clearProgressDocuments() - { - unset($this->progress_documents); - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_documents = $var; - - return $this; - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressBytes() - { - return $this->progress_bytes; - } - - public function hasProgressBytes() - { - return isset($this->progress_bytes); - } - - public function clearProgressBytes() - { - unset($this->progress_bytes); - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressBytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_bytes = $var; - - return $this; - } - - /** - * Which collection IDs are being imported. - * - * Generated from protobuf field repeated string collection_ids = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * Which collection IDs are being imported. - * - * Generated from protobuf field repeated string collection_ids = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * The location of the documents being imported. - * - * Generated from protobuf field string input_uri_prefix = 7; - * @return string - */ - public function getInputUriPrefix() - { - return $this->input_uri_prefix; - } - - /** - * The location of the documents being imported. - * - * Generated from protobuf field string input_uri_prefix = 7; - * @param string $var - * @return $this - */ - public function setInputUriPrefix($var) - { - GPBUtil::checkString($var, True); - $this->input_uri_prefix = $var; - - return $this; - } - - /** - * Which namespace IDs are being imported. - * - * Generated from protobuf field repeated string namespace_ids = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNamespaceIds() - { - return $this->namespace_ids; - } - - /** - * Which namespace IDs are being imported. - * - * Generated from protobuf field repeated string namespace_ids = 8; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNamespaceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespace_ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php deleted file mode 100644 index 56488d0a8ef9..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php +++ /dev/null @@ -1,225 +0,0 @@ -google.firestore.admin.v1.ImportDocumentsRequest - */ -class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Which collection IDs to import. Unspecified means all collections included - * in the import. Each collection ID in this list must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2; - */ - private $collection_ids; - /** - * Location of the exported files. - * This must match the output_uri_prefix of an ExportDocumentsResponse from - * an export that has completed successfully. - * See: - * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. - * - * Generated from protobuf field string input_uri_prefix = 3; - */ - protected $input_uri_prefix = ''; - /** - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 4; - */ - private $namespace_ids; - - /** - * @param string $name Required. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. Please see - * {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ImportDocumentsRequest - * - * @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. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * @type array|\Google\Protobuf\Internal\RepeatedField $collection_ids - * Which collection IDs to import. Unspecified means all collections included - * in the import. Each collection ID in this list must be unique. - * @type string $input_uri_prefix - * Location of the exported files. - * This must match the output_uri_prefix of an ExportDocumentsResponse from - * an export that has completed successfully. - * See: - * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. - * @type array|\Google\Protobuf\Internal\RepeatedField $namespace_ids - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_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. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_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; - } - - /** - * Which collection IDs to import. Unspecified means all collections included - * in the import. Each collection ID in this list must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * Which collection IDs to import. Unspecified means all collections included - * in the import. Each collection ID in this list must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * Location of the exported files. - * This must match the output_uri_prefix of an ExportDocumentsResponse from - * an export that has completed successfully. - * See: - * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. - * - * Generated from protobuf field string input_uri_prefix = 3; - * @return string - */ - public function getInputUriPrefix() - { - return $this->input_uri_prefix; - } - - /** - * Location of the exported files. - * This must match the output_uri_prefix of an ExportDocumentsResponse from - * an export that has completed successfully. - * See: - * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. - * - * Generated from protobuf field string input_uri_prefix = 3; - * @param string $var - * @return $this - */ - public function setInputUriPrefix($var) - { - GPBUtil::checkString($var, True); - $this->input_uri_prefix = $var; - - return $this; - } - - /** - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNamespaceIds() - { - return $this->namespace_ids; - } - - /** - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNamespaceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespace_ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php deleted file mode 100644 index f1d8114eafe6..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php +++ /dev/null @@ -1,268 +0,0 @@ -google.firestore.admin.v1.Index - */ -class Index extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. A server defined name for this index. - * The form of this name for composite indexes will be: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` - * For single field indexes, this field will be empty. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Indexes with a collection query scope specified allow queries - * against a collection that is the child of a specific document, specified at - * query time, and that has the same collection ID. - * Indexes with a collection group query scope specified allow queries against - * all collections descended from a specific document, specified at query - * time, and that have the same collection ID as this index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.QueryScope query_scope = 2; - */ - protected $query_scope = 0; - /** - * The API scope supported by this index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.ApiScope api_scope = 5; - */ - protected $api_scope = 0; - /** - * The fields supported by this index. - * For composite indexes, this requires a minimum of 2 and a maximum of 100 - * fields. The last field entry is always for the field path `__name__`. If, - * on creation, `__name__` was not specified as the last field, it will be - * added automatically with the same direction as that of the last field - * defined. If the final field in a composite index is not directional, the - * `__name__` will be ordered ASCENDING (unless explicitly specified). - * For single field indexes, this will always be exactly one entry with a - * field path equal to the field path of the associated field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index.IndexField fields = 3; - */ - private $fields; - /** - * Output only. The serving state of the index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.State state = 4; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. A server defined name for this index. - * The form of this name for composite indexes will be: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` - * For single field indexes, this field will be empty. - * @type int $query_scope - * Indexes with a collection query scope specified allow queries - * against a collection that is the child of a specific document, specified at - * query time, and that has the same collection ID. - * Indexes with a collection group query scope specified allow queries against - * all collections descended from a specific document, specified at query - * time, and that have the same collection ID as this index. - * @type int $api_scope - * The API scope supported by this index. - * @type array<\Google\Cloud\Firestore\Admin\V1\Index\IndexField>|\Google\Protobuf\Internal\RepeatedField $fields - * The fields supported by this index. - * For composite indexes, this requires a minimum of 2 and a maximum of 100 - * fields. The last field entry is always for the field path `__name__`. If, - * on creation, `__name__` was not specified as the last field, it will be - * added automatically with the same direction as that of the last field - * defined. If the final field in a composite index is not directional, the - * `__name__` will be ordered ASCENDING (unless explicitly specified). - * For single field indexes, this will always be exactly one entry with a - * field path equal to the field path of the associated field. - * @type int $state - * Output only. The serving state of the index. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); - parent::__construct($data); - } - - /** - * Output only. A server defined name for this index. - * The form of this name for composite indexes will be: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` - * For single field indexes, this field will be empty. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. A server defined name for this index. - * The form of this name for composite indexes will be: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` - * For single field indexes, this field will be empty. - * - * 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; - } - - /** - * Indexes with a collection query scope specified allow queries - * against a collection that is the child of a specific document, specified at - * query time, and that has the same collection ID. - * Indexes with a collection group query scope specified allow queries against - * all collections descended from a specific document, specified at query - * time, and that have the same collection ID as this index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.QueryScope query_scope = 2; - * @return int - */ - public function getQueryScope() - { - return $this->query_scope; - } - - /** - * Indexes with a collection query scope specified allow queries - * against a collection that is the child of a specific document, specified at - * query time, and that has the same collection ID. - * Indexes with a collection group query scope specified allow queries against - * all collections descended from a specific document, specified at query - * time, and that have the same collection ID as this index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.QueryScope query_scope = 2; - * @param int $var - * @return $this - */ - public function setQueryScope($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\QueryScope::class); - $this->query_scope = $var; - - return $this; - } - - /** - * The API scope supported by this index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.ApiScope api_scope = 5; - * @return int - */ - public function getApiScope() - { - return $this->api_scope; - } - - /** - * The API scope supported by this index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.ApiScope api_scope = 5; - * @param int $var - * @return $this - */ - public function setApiScope($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\ApiScope::class); - $this->api_scope = $var; - - return $this; - } - - /** - * The fields supported by this index. - * For composite indexes, this requires a minimum of 2 and a maximum of 100 - * fields. The last field entry is always for the field path `__name__`. If, - * on creation, `__name__` was not specified as the last field, it will be - * added automatically with the same direction as that of the last field - * defined. If the final field in a composite index is not directional, the - * `__name__` will be ordered ASCENDING (unless explicitly specified). - * For single field indexes, this will always be exactly one entry with a - * field path equal to the field path of the associated field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index.IndexField fields = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * The fields supported by this index. - * For composite indexes, this requires a minimum of 2 and a maximum of 100 - * fields. The last field entry is always for the field path `__name__`. If, - * on creation, `__name__` was not specified as the last field, it will be - * added automatically with the same direction as that of the last field - * defined. If the final field in a composite index is not directional, the - * `__name__` will be ordered ASCENDING (unless explicitly specified). - * For single field indexes, this will always be exactly one entry with a - * field path equal to the field path of the associated field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index.IndexField fields = 3; - * @param array<\Google\Cloud\Firestore\Admin\V1\Index\IndexField>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Index\IndexField::class); - $this->fields = $arr; - - return $this; - } - - /** - * Output only. The serving state of the index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.State state = 4; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The serving state of the index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.State state = 4; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/ApiScope.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/ApiScope.php deleted file mode 100644 index d85fe6616eec..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/ApiScope.php +++ /dev/null @@ -1,59 +0,0 @@ -google.firestore.admin.v1.Index.ApiScope - */ -class ApiScope -{ - /** - * The index can only be used by the Firestore Native query API. - * This is the default. - * - * Generated from protobuf enum ANY_API = 0; - */ - const ANY_API = 0; - /** - * The index can only be used by the Firestore in Datastore Mode query API. - * - * Generated from protobuf enum DATASTORE_MODE_API = 1; - */ - const DATASTORE_MODE_API = 1; - - private static $valueToName = [ - self::ANY_API => 'ANY_API', - self::DATASTORE_MODE_API => 'DATASTORE_MODE_API', - ]; - - 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(ApiScope::class, \Google\Cloud\Firestore\Admin\V1\Index_ApiScope::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php deleted file mode 100644 index 0f49391e6a9f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php +++ /dev/null @@ -1,194 +0,0 @@ -google.firestore.admin.v1.Index.IndexField - */ -class IndexField extends \Google\Protobuf\Internal\Message -{ - /** - * Can be __name__. - * For single field indexes, this must match the name of the field or may - * be omitted. - * - * Generated from protobuf field string field_path = 1; - */ - protected $field_path = ''; - protected $value_mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field_path - * Can be __name__. - * For single field indexes, this must match the name of the field or may - * be omitted. - * @type int $order - * Indicates that this field supports ordering by the specified order or - * comparing using =, !=, <, <=, >, >=. - * @type int $array_config - * Indicates that this field supports operations on `array_value`s. - * @type \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig $vector_config - * Indicates that this field supports nearest neighbor and distance - * operations on vector. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); - parent::__construct($data); - } - - /** - * Can be __name__. - * For single field indexes, this must match the name of the field or may - * be omitted. - * - * Generated from protobuf field string field_path = 1; - * @return string - */ - public function getFieldPath() - { - return $this->field_path; - } - - /** - * Can be __name__. - * For single field indexes, this must match the name of the field or may - * be omitted. - * - * Generated from protobuf field string field_path = 1; - * @param string $var - * @return $this - */ - public function setFieldPath($var) - { - GPBUtil::checkString($var, True); - $this->field_path = $var; - - return $this; - } - - /** - * Indicates that this field supports ordering by the specified order or - * comparing using =, !=, <, <=, >, >=. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.Order order = 2; - * @return int - */ - public function getOrder() - { - return $this->readOneof(2); - } - - public function hasOrder() - { - return $this->hasOneof(2); - } - - /** - * Indicates that this field supports ordering by the specified order or - * comparing using =, !=, <, <=, >, >=. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.Order order = 2; - * @param int $var - * @return $this - */ - public function setOrder($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\Order::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Indicates that this field supports operations on `array_value`s. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; - * @return int - */ - public function getArrayConfig() - { - return $this->readOneof(3); - } - - public function hasArrayConfig() - { - return $this->hasOneof(3); - } - - /** - * Indicates that this field supports operations on `array_value`s. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; - * @param int $var - * @return $this - */ - public function setArrayConfig($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\ArrayConfig::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Indicates that this field supports nearest neighbor and distance - * operations on vector. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4; - * @return \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig|null - */ - public function getVectorConfig() - { - return $this->readOneof(4); - } - - public function hasVectorConfig() - { - return $this->hasOneof(4); - } - - /** - * Indicates that this field supports nearest neighbor and distance - * operations on vector. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4; - * @param \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig $var - * @return $this - */ - public function setVectorConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getValueMode() - { - return $this->whichOneof("value_mode"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IndexField::class, \Google\Cloud\Firestore\Admin\V1\Index_IndexField::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php deleted file mode 100644 index e7ba6fe94de4..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php +++ /dev/null @@ -1,57 +0,0 @@ -google.firestore.admin.v1.Index.IndexField.ArrayConfig - */ -class ArrayConfig -{ - /** - * The index does not support additional array queries. - * - * Generated from protobuf enum ARRAY_CONFIG_UNSPECIFIED = 0; - */ - const ARRAY_CONFIG_UNSPECIFIED = 0; - /** - * The index supports array containment queries. - * - * Generated from protobuf enum CONTAINS = 1; - */ - const CONTAINS = 1; - - private static $valueToName = [ - self::ARRAY_CONFIG_UNSPECIFIED => 'ARRAY_CONFIG_UNSPECIFIED', - self::CONTAINS => 'CONTAINS', - ]; - - 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(ArrayConfig::class, \Google\Cloud\Firestore\Admin\V1\Index_IndexField_ArrayConfig::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php deleted file mode 100644 index d523938322b4..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php +++ /dev/null @@ -1,64 +0,0 @@ -google.firestore.admin.v1.Index.IndexField.Order - */ -class Order -{ - /** - * The ordering is unspecified. Not a valid option. - * - * Generated from protobuf enum ORDER_UNSPECIFIED = 0; - */ - const ORDER_UNSPECIFIED = 0; - /** - * The field is ordered by ascending field value. - * - * Generated from protobuf enum ASCENDING = 1; - */ - const ASCENDING = 1; - /** - * The field is ordered by descending field value. - * - * Generated from protobuf enum DESCENDING = 2; - */ - const DESCENDING = 2; - - private static $valueToName = [ - self::ORDER_UNSPECIFIED => 'ORDER_UNSPECIFIED', - self::ASCENDING => 'ASCENDING', - self::DESCENDING => 'DESCENDING', - ]; - - 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(Order::class, \Google\Cloud\Firestore\Admin\V1\Index_IndexField_Order::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig.php deleted file mode 100644 index 7f7d1a63104c..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig.php +++ /dev/null @@ -1,120 +0,0 @@ -google.firestore.admin.v1.Index.IndexField.VectorConfig - */ -class VectorConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The vector dimension this configuration applies to. - * The resulting index will only include vectors of this dimension, and - * can be used for vector search with the same dimension. - * - * Generated from protobuf field int32 dimension = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $dimension = 0; - protected $type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $dimension - * Required. The vector dimension this configuration applies to. - * The resulting index will only include vectors of this dimension, and - * can be used for vector search with the same dimension. - * @type \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex $flat - * Indicates the vector index is a flat index. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); - parent::__construct($data); - } - - /** - * Required. The vector dimension this configuration applies to. - * The resulting index will only include vectors of this dimension, and - * can be used for vector search with the same dimension. - * - * Generated from protobuf field int32 dimension = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getDimension() - { - return $this->dimension; - } - - /** - * Required. The vector dimension this configuration applies to. - * The resulting index will only include vectors of this dimension, and - * can be used for vector search with the same dimension. - * - * Generated from protobuf field int32 dimension = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setDimension($var) - { - GPBUtil::checkInt32($var); - $this->dimension = $var; - - return $this; - } - - /** - * Indicates the vector index is a flat index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex flat = 2; - * @return \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex|null - */ - public function getFlat() - { - return $this->readOneof(2); - } - - public function hasFlat() - { - return $this->hasOneof(2); - } - - /** - * Indicates the vector index is a flat index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex flat = 2; - * @param \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex $var - * @return $this - */ - public function setFlat($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VectorConfig::class, \Google\Cloud\Firestore\Admin\V1\Index_IndexField_VectorConfig::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig/FlatIndex.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig/FlatIndex.php deleted file mode 100644 index b2321214c64d..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig/FlatIndex.php +++ /dev/null @@ -1,37 +0,0 @@ -google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex - */ -class FlatIndex extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FlatIndex::class, \Google\Cloud\Firestore\Admin\V1\Index_IndexField_VectorConfig_FlatIndex::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php deleted file mode 100644 index f368fa80f89d..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php +++ /dev/null @@ -1,77 +0,0 @@ -google.firestore.admin.v1.Index.QueryScope - */ -class QueryScope -{ - /** - * The query scope is unspecified. Not a valid option. - * - * Generated from protobuf enum QUERY_SCOPE_UNSPECIFIED = 0; - */ - const QUERY_SCOPE_UNSPECIFIED = 0; - /** - * Indexes with a collection query scope specified allow queries - * against a collection that is the child of a specific document, specified - * at query time, and that has the collection ID specified by the index. - * - * Generated from protobuf enum COLLECTION = 1; - */ - const COLLECTION = 1; - /** - * Indexes with a collection group query scope specified allow queries - * against all collections that has the collection ID specified by the - * index. - * - * Generated from protobuf enum COLLECTION_GROUP = 2; - */ - const COLLECTION_GROUP = 2; - /** - * Include all the collections's ancestor in the index. Only available for - * Datastore Mode databases. - * - * Generated from protobuf enum COLLECTION_RECURSIVE = 3; - */ - const COLLECTION_RECURSIVE = 3; - - private static $valueToName = [ - self::QUERY_SCOPE_UNSPECIFIED => 'QUERY_SCOPE_UNSPECIFIED', - self::COLLECTION => 'COLLECTION', - self::COLLECTION_GROUP => 'COLLECTION_GROUP', - self::COLLECTION_RECURSIVE => 'COLLECTION_RECURSIVE', - ]; - - 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(QueryScope::class, \Google\Cloud\Firestore\Admin\V1\Index_QueryScope::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php deleted file mode 100644 index d9f96475cd8e..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php +++ /dev/null @@ -1,86 +0,0 @@ -google.firestore.admin.v1.Index.State - */ -class State -{ - /** - * The state is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The index is being created. - * There is an active long-running operation for the index. - * The index is updated when writing a document. - * Some index data may exist. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The index is ready to be used. - * The index is updated when writing a document. - * The index is fully populated from all stored documents it applies to. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * The index was being created, but something went wrong. - * There is no active long-running operation for the index, - * and the most recently finished long-running operation failed. - * The index is not updated when writing a document. - * Some index data may exist. - * Use the google.longrunning.Operations API to determine why the operation - * that last attempted to create this index failed, then re-create the - * index. - * - * Generated from protobuf enum NEEDS_REPAIR = 3; - */ - const NEEDS_REPAIR = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::NEEDS_REPAIR => 'NEEDS_REPAIR', - ]; - - 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\Firestore\Admin\V1\Index_State::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php deleted file mode 100644 index 4144b5459434..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php +++ /dev/null @@ -1,287 +0,0 @@ -google.firestore.admin.v1.IndexOperationMetadata - */ -class IndexOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The index resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * - * Generated from protobuf field string index = 3; - */ - protected $index = ''; - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 4; - */ - protected $state = 0; - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 5; - */ - protected $progress_documents = null; - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 6; - */ - protected $progress_bytes = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * The time this operation completed. Will be unset if operation still in - * progress. - * @type string $index - * The index resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * @type int $state - * The state of the operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents - * The progress, in documents, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes - * The progress, in bytes, of this operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The index resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * - * Generated from protobuf field string index = 3; - * @return string - */ - public function getIndex() - { - return $this->index; - } - - /** - * The index resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * - * Generated from protobuf field string index = 3; - * @param string $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkString($var, True); - $this->index = $var; - - return $this; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 4; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 4; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 5; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressDocuments() - { - return $this->progress_documents; - } - - public function hasProgressDocuments() - { - return isset($this->progress_documents); - } - - public function clearProgressDocuments() - { - unset($this->progress_documents); - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 5; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_documents = $var; - - return $this; - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 6; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressBytes() - { - return $this->progress_bytes; - } - - public function hasProgressBytes() - { - return isset($this->progress_bytes); - } - - public function clearProgressBytes() - { - unset($this->progress_bytes); - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 6; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressBytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_bytes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesRequest.php deleted file mode 100644 index ad8c349dacd6..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesRequest.php +++ /dev/null @@ -1,88 +0,0 @@ -google.firestore.admin.v1.ListBackupSchedulesRequest - */ -class ListBackupSchedulesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent database. - * Format is `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - - /** - * @param string $parent Required. The parent database. - * - * Format is `projects/{project}/databases/{database}`. Please see - * {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ListBackupSchedulesRequest - * - * @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 parent database. - * Format is `projects/{project}/databases/{database}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent database. - * Format is `projects/{project}/databases/{database}`. - * - * 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 parent database. - * Format is `projects/{project}/databases/{database}`. - * - * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesResponse.php deleted file mode 100644 index bda082e013e8..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.firestore.admin.v1.ListBackupSchedulesResponse - */ -class ListBackupSchedulesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of all backup schedules. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.BackupSchedule backup_schedules = 1; - */ - private $backup_schedules; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Firestore\Admin\V1\BackupSchedule>|\Google\Protobuf\Internal\RepeatedField $backup_schedules - * List of all backup schedules. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * List of all backup schedules. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.BackupSchedule backup_schedules = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBackupSchedules() - { - return $this->backup_schedules; - } - - /** - * List of all backup schedules. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.BackupSchedule backup_schedules = 1; - * @param array<\Google\Cloud\Firestore\Admin\V1\BackupSchedule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBackupSchedules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\BackupSchedule::class); - $this->backup_schedules = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsRequest.php deleted file mode 100644 index fa8525ee48bc..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsRequest.php +++ /dev/null @@ -1,103 +0,0 @@ -google.firestore.admin.v1.ListBackupsRequest - */ -class ListBackupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location to list backups from. - * Format is `projects/{project}/locations/{location}`. - * Use `{location} = '-'` to list backups from all locations for the given - * project. This allows listing backups from a single location or from all - * locations. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - - /** - * @param string $parent Required. The location to list backups from. - * - * Format is `projects/{project}/locations/{location}`. - * Use `{location} = '-'` to list backups from all locations for the given - * project. This allows listing backups from a single location or from all - * locations. Please see - * {@see FirestoreAdminClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ListBackupsRequest - * - * @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 location to list backups from. - * Format is `projects/{project}/locations/{location}`. - * Use `{location} = '-'` to list backups from all locations for the given - * project. This allows listing backups from a single location or from all - * locations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location to list backups from. - * Format is `projects/{project}/locations/{location}`. - * Use `{location} = '-'` to list backups from all locations for the given - * project. This allows listing backups from a single location or from all - * 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 location to list backups from. - * Format is `projects/{project}/locations/{location}`. - * Use `{location} = '-'` to list backups from all locations for the given - * project. This allows listing backups from a single location or from all - * 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; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsResponse.php deleted file mode 100644 index b3fa74286dcb..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsResponse.php +++ /dev/null @@ -1,118 +0,0 @@ -google.firestore.admin.v1.ListBackupsResponse - */ -class ListBackupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of all backups for the project. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Backup backups = 1; - */ - private $backups; - /** - * List of locations that existing backups were not able to be fetched from. - * Instead of failing the entire requests when a single location is - * unreachable, this response returns a partial result set and list of - * locations unable to be reached here. The request can be retried against a - * single location to get a concrete error. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Firestore\Admin\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $backups - * List of all backups for the project. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * List of locations that existing backups were not able to be fetched from. - * Instead of failing the entire requests when a single location is - * unreachable, this response returns a partial result set and list of - * locations unable to be reached here. The request can be retried against a - * single location to get a concrete error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * List of all backups for the project. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Backup backups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBackups() - { - return $this->backups; - } - - /** - * List of all backups for the project. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Backup backups = 1; - * @param array<\Google\Cloud\Firestore\Admin\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBackups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Backup::class); - $this->backups = $arr; - - return $this; - } - - /** - * List of locations that existing backups were not able to be fetched from. - * Instead of failing the entire requests when a single location is - * unreachable, this response returns a partial result set and list of - * locations unable to be reached here. The request can be retried against a - * single location to get a concrete error. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * List of locations that existing backups were not able to be fetched from. - * Instead of failing the entire requests when a single location is - * unreachable, this response returns a partial result set and list of - * locations unable to be reached here. The request can be retried against a - * single location to get a concrete error. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesRequest.php deleted file mode 100644 index afeeb262a56b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.firestore.admin.v1.ListDatabasesRequest - */ -class ListDatabasesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent name of the form - * `projects/{project_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * If true, also returns deleted resources. - * - * Generated from protobuf field bool show_deleted = 4; - */ - protected $show_deleted = false; - - /** - * @param string $parent Required. A parent name of the form - * `projects/{project_id}` - * Please see {@see FirestoreAdminClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ListDatabasesRequest - * - * @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. A parent name of the form - * `projects/{project_id}` - * @type bool $show_deleted - * If true, also returns deleted resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent name of the form - * `projects/{project_id}` - * - * 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. A parent name of the form - * `projects/{project_id}` - * - * 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; - } - - /** - * If true, also returns deleted resources. - * - * Generated from protobuf field bool show_deleted = 4; - * @return bool - */ - public function getShowDeleted() - { - return $this->show_deleted; - } - - /** - * If true, also returns deleted resources. - * - * Generated from protobuf field bool show_deleted = 4; - * @param bool $var - * @return $this - */ - public function setShowDeleted($var) - { - GPBUtil::checkBool($var); - $this->show_deleted = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php deleted file mode 100644 index efe6b7b4ae83..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php +++ /dev/null @@ -1,129 +0,0 @@ -google.firestore.admin.v1.ListDatabasesResponse - */ -class ListDatabasesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The databases in the project. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Database databases = 1; - */ - private $databases; - /** - * In the event that data about individual databases cannot be listed they - * will be recorded here. - * An example entry might be: projects/some_project/locations/some_location - * This can happen if the Cloud Region that the Database resides in is - * currently unavailable. In this case we can't fetch all the details about - * the database. You may be able to get a more detailed error message - * (or possibly fetch the resource) by sending a 'Get' request for the - * resource or a 'List' request for the specific location. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Firestore\Admin\V1\Database>|\Google\Protobuf\Internal\RepeatedField $databases - * The databases in the project. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * In the event that data about individual databases cannot be listed they - * will be recorded here. - * An example entry might be: projects/some_project/locations/some_location - * This can happen if the Cloud Region that the Database resides in is - * currently unavailable. In this case we can't fetch all the details about - * the database. You may be able to get a more detailed error message - * (or possibly fetch the resource) by sending a 'Get' request for the - * resource or a 'List' request for the specific location. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The databases in the project. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Database databases = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDatabases() - { - return $this->databases; - } - - /** - * The databases in the project. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Database databases = 1; - * @param array<\Google\Cloud\Firestore\Admin\V1\Database>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDatabases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Database::class); - $this->databases = $arr; - - return $this; - } - - /** - * In the event that data about individual databases cannot be listed they - * will be recorded here. - * An example entry might be: projects/some_project/locations/some_location - * This can happen if the Cloud Region that the Database resides in is - * currently unavailable. In this case we can't fetch all the details about - * the database. You may be able to get a more detailed error message - * (or possibly fetch the resource) by sending a 'Get' request for the - * resource or a 'List' request for the specific location. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * In the event that data about individual databases cannot be listed they - * will be recorded here. - * An example entry might be: projects/some_project/locations/some_location - * This can happen if the Cloud Region that the Database resides in is - * currently unavailable. In this case we can't fetch all the details about - * the database. You may be able to get a more detailed error message - * (or possibly fetch the resource) by sending a 'Get' request for the - * resource or a 'List' request for the specific location. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php deleted file mode 100644 index c027afa975ac..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.firestore.admin.v1.ListFieldsRequest - */ -class ListFieldsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The filter to apply to list results. Currently, - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * only supports listing fields that have been explicitly overridden. To issue - * this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with a filter that includes `indexConfig.usesAncestorConfig:false` or - * `ttlConfig:*`. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * The number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * A page token, returned from a previous call to - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], - * that may be used to get the next page of results. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * Please see {@see FirestoreAdminClient::collectionGroupName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ListFieldsRequest - * - * @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. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * @type string $filter - * The filter to apply to list results. Currently, - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * only supports listing fields that have been explicitly overridden. To issue - * this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with a filter that includes `indexConfig.usesAncestorConfig:false` or - * `ttlConfig:*`. - * @type int $page_size - * The number of results to return. - * @type string $page_token - * A page token, returned from a previous call to - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], - * that may be used to get the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * 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. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * 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; - } - - /** - * The filter to apply to list results. Currently, - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * only supports listing fields that have been explicitly overridden. To issue - * this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with a filter that includes `indexConfig.usesAncestorConfig:false` or - * `ttlConfig:*`. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter to apply to list results. Currently, - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * only supports listing fields that have been explicitly overridden. To issue - * this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with a filter that includes `indexConfig.usesAncestorConfig:false` or - * `ttlConfig:*`. - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * The number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, returned from a previous call to - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], - * that may be used to get the next page of results. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, returned from a previous call to - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], - * that may be used to get the next page of results. - * - * Generated from protobuf field string page_token = 4; - * @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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php deleted file mode 100644 index 58d931b50c93..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.firestore.admin.v1.ListFieldsResponse - */ -class ListFieldsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The requested fields. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Field fields = 1; - */ - private $fields; - /** - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * - * 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\Firestore\Admin\V1\Field>|\Google\Protobuf\Internal\RepeatedField $fields - * The requested fields. - * @type string $next_page_token - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The requested fields. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Field fields = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * The requested fields. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Field fields = 1; - * @param array<\Google\Cloud\Firestore\Admin\V1\Field>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Field::class); - $this->fields = $arr; - - return $this; - } - - /** - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * - * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php deleted file mode 100644 index a0d52b953646..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php +++ /dev/null @@ -1,197 +0,0 @@ -google.firestore.admin.v1.ListIndexesRequest - */ -class ListIndexesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The filter to apply to list results. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * The number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * A page token, returned from a previous call to - * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], - * that may be used to get the next page of results. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * Please see {@see FirestoreAdminClient::collectionGroupName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ListIndexesRequest - * - * @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. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * @type string $filter - * The filter to apply to list results. - * @type int $page_size - * The number of results to return. - * @type string $page_token - * A page token, returned from a previous call to - * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], - * that may be used to get the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * 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. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * 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; - } - - /** - * The filter to apply to list results. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter to apply to list results. - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * The number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, returned from a previous call to - * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], - * that may be used to get the next page of results. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, returned from a previous call to - * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], - * that may be used to get the next page of results. - * - * Generated from protobuf field string page_token = 4; - * @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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php deleted file mode 100644 index 6b6ba380cd71..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.firestore.admin.v1.ListIndexesResponse - */ -class ListIndexesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The requested indexes. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - */ - private $indexes; - /** - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * - * 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\Firestore\Admin\V1\Index>|\Google\Protobuf\Internal\RepeatedField $indexes - * The requested indexes. - * @type string $next_page_token - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The requested indexes. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIndexes() - { - return $this->indexes; - } - - /** - * The requested indexes. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - * @param array<\Google\Cloud\Firestore\Admin\V1\Index>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIndexes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Index::class); - $this->indexes = $arr; - - return $this; - } - - /** - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * - * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php deleted file mode 100644 index 36d656955673..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php +++ /dev/null @@ -1,34 +0,0 @@ -google.firestore.admin.v1.LocationMetadata - */ -class LocationMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Location::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php deleted file mode 100644 index 73244df17d28..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php +++ /dev/null @@ -1,98 +0,0 @@ -google.firestore.admin.v1.OperationState - */ -class OperationState -{ - /** - * Unspecified. - * - * Generated from protobuf enum OPERATION_STATE_UNSPECIFIED = 0; - */ - const OPERATION_STATE_UNSPECIFIED = 0; - /** - * Request is being prepared for processing. - * - * Generated from protobuf enum INITIALIZING = 1; - */ - const INITIALIZING = 1; - /** - * Request is actively being processed. - * - * Generated from protobuf enum PROCESSING = 2; - */ - const PROCESSING = 2; - /** - * Request is in the process of being cancelled after user called - * google.longrunning.Operations.CancelOperation on the operation. - * - * Generated from protobuf enum CANCELLING = 3; - */ - const CANCELLING = 3; - /** - * Request has been processed and is in its finalization stage. - * - * Generated from protobuf enum FINALIZING = 4; - */ - const FINALIZING = 4; - /** - * Request has completed successfully. - * - * Generated from protobuf enum SUCCESSFUL = 5; - */ - const SUCCESSFUL = 5; - /** - * Request has finished being processed, but encountered an error. - * - * Generated from protobuf enum FAILED = 6; - */ - const FAILED = 6; - /** - * Request has finished being cancelled after user called - * google.longrunning.Operations.CancelOperation. - * - * Generated from protobuf enum CANCELLED = 7; - */ - const CANCELLED = 7; - - private static $valueToName = [ - self::OPERATION_STATE_UNSPECIFIED => 'OPERATION_STATE_UNSPECIFIED', - self::INITIALIZING => 'INITIALIZING', - self::PROCESSING => 'PROCESSING', - self::CANCELLING => 'CANCELLING', - self::FINALIZING => 'FINALIZING', - self::SUCCESSFUL => 'SUCCESSFUL', - self::FAILED => 'FAILED', - self::CANCELLED => 'CANCELLED', - ]; - - 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php deleted file mode 100644 index 24ea17a96c10..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php +++ /dev/null @@ -1,103 +0,0 @@ -google.firestore.admin.v1.Progress - */ -class Progress extends \Google\Protobuf\Internal\Message -{ - /** - * The amount of work estimated. - * - * Generated from protobuf field int64 estimated_work = 1; - */ - protected $estimated_work = 0; - /** - * The amount of work completed. - * - * Generated from protobuf field int64 completed_work = 2; - */ - protected $completed_work = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $estimated_work - * The amount of work estimated. - * @type int|string $completed_work - * The amount of work completed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The amount of work estimated. - * - * Generated from protobuf field int64 estimated_work = 1; - * @return int|string - */ - public function getEstimatedWork() - { - return $this->estimated_work; - } - - /** - * The amount of work estimated. - * - * Generated from protobuf field int64 estimated_work = 1; - * @param int|string $var - * @return $this - */ - public function setEstimatedWork($var) - { - GPBUtil::checkInt64($var); - $this->estimated_work = $var; - - return $this; - } - - /** - * The amount of work completed. - * - * Generated from protobuf field int64 completed_work = 2; - * @return int|string - */ - public function getCompletedWork() - { - return $this->completed_work; - } - - /** - * The amount of work completed. - * - * Generated from protobuf field int64 completed_work = 2; - * @param int|string $var - * @return $this - */ - public function setCompletedWork($var) - { - GPBUtil::checkInt64($var); - $this->completed_work = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseMetadata.php deleted file mode 100644 index 526f1cacab72..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseMetadata.php +++ /dev/null @@ -1,268 +0,0 @@ -google.firestore.admin.v1.RestoreDatabaseMetadata - */ -class RestoreDatabaseMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time the restore was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time the restore finished, unset for ongoing restores. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The operation state of the restore. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - */ - protected $operation_state = 0; - /** - * The name of the database being restored to. - * - * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { - */ - protected $database = ''; - /** - * The name of the backup restoring from. - * - * Generated from protobuf field string backup = 5 [(.google.api.resource_reference) = { - */ - protected $backup = ''; - /** - * How far along the restore is as an estimated percentage of remaining time. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 8; - */ - protected $progress_percentage = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time the restore was started. - * @type \Google\Protobuf\Timestamp $end_time - * The time the restore finished, unset for ongoing restores. - * @type int $operation_state - * The operation state of the restore. - * @type string $database - * The name of the database being restored to. - * @type string $backup - * The name of the backup restoring from. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_percentage - * How far along the restore is as an estimated percentage of remaining time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time the restore was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time the restore was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time the restore finished, unset for ongoing restores. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time the restore finished, unset for ongoing restores. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The operation state of the restore. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @return int - */ - public function getOperationState() - { - return $this->operation_state; - } - - /** - * The operation state of the restore. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @param int $var - * @return $this - */ - public function setOperationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->operation_state = $var; - - return $this; - } - - /** - * The name of the database being restored to. - * - * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * The name of the database being restored to. - * - * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The name of the backup restoring from. - * - * Generated from protobuf field string backup = 5 [(.google.api.resource_reference) = { - * @return string - */ - public function getBackup() - { - return $this->backup; - } - - /** - * The name of the backup restoring from. - * - * Generated from protobuf field string backup = 5 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkString($var, True); - $this->backup = $var; - - return $this; - } - - /** - * How far along the restore is as an estimated percentage of remaining time. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 8; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressPercentage() - { - return $this->progress_percentage; - } - - public function hasProgressPercentage() - { - return isset($this->progress_percentage); - } - - public function clearProgressPercentage() - { - unset($this->progress_percentage); - } - - /** - * How far along the restore is as an estimated percentage of remaining time. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 8; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressPercentage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_percentage = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseRequest.php deleted file mode 100644 index 768f05b0a071..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseRequest.php +++ /dev/null @@ -1,236 +0,0 @@ -google.firestore.admin.v1.RestoreDatabaseRequest - */ -class RestoreDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project to restore the database in. Format is - * `projects/{project_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. This database ID must not be - * associated with an existing database. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid. - * - * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database_id = ''; - /** - * Required. Backup to restore from. Must be from the same project as the - * parent. - * The restored database will be created in the same location as the source - * backup. - * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` - * - * Generated from protobuf field string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $backup = ''; - /** - * Optional. Encryption configuration for the restored database. - * If this field is not specified, the restored database will use - * the same encryption configuration as the backup, namely - * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encryption_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project to restore the database in. Format is - * `projects/{project_id}`. - * @type string $database_id - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. This database ID must not be - * associated with an existing database. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid. - * @type string $backup - * Required. Backup to restore from. Must be from the same project as the - * parent. - * The restored database will be created in the same location as the source - * backup. - * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` - * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig $encryption_config - * Optional. Encryption configuration for the restored database. - * If this field is not specified, the restored database will use - * the same encryption configuration as the backup, namely - * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project to restore the database in. Format is - * `projects/{project_id}`. - * - * 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 to restore the database in. Format is - * `projects/{project_id}`. - * - * 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. The ID to use for the database, which will become the final - * component of the database's resource name. This database ID must not be - * associated with an existing database. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid. - * - * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabaseId() - { - return $this->database_id; - } - - /** - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. This database ID must not be - * associated with an existing database. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid. - * - * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabaseId($var) - { - GPBUtil::checkString($var, True); - $this->database_id = $var; - - return $this; - } - - /** - * Required. Backup to restore from. Must be from the same project as the - * parent. - * The restored database will be created in the same location as the source - * backup. - * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` - * - * Generated from protobuf field string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getBackup() - { - return $this->backup; - } - - /** - * Required. Backup to restore from. Must be from the same project as the - * parent. - * The restored database will be created in the same location as the source - * backup. - * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` - * - * Generated from protobuf field string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkString($var, True); - $this->backup = $var; - - return $this; - } - - /** - * Optional. Encryption configuration for the restored database. - * If this field is not specified, the restored database will use - * the same encryption configuration as the backup, namely - * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig|null - */ - public function getEncryptionConfig() - { - return $this->encryption_config; - } - - public function hasEncryptionConfig() - { - return isset($this->encryption_config); - } - - public function clearEncryptionConfig() - { - unset($this->encryption_config); - } - - /** - * Optional. Encryption configuration for the restored database. - * If this field is not specified, the restored database will use - * the same encryption configuration as the backup, namely - * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig $var - * @return $this - */ - public function setEncryptionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig::class); - $this->encryption_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateBackupScheduleRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateBackupScheduleRequest.php deleted file mode 100644 index cdc9e8b0e306..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateBackupScheduleRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.firestore.admin.v1.UpdateBackupScheduleRequest - */ -class UpdateBackupScheduleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The backup schedule to update. - * - * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_schedule = null; - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backupSchedule Required. The backup schedule to update. - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. - * - * @return \Google\Cloud\Firestore\Admin\V1\UpdateBackupScheduleRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Firestore\Admin\V1\BackupSchedule $backupSchedule, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setBackupSchedule($backupSchedule) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backup_schedule - * Required. The backup schedule to update. - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The backup schedule to update. - * - * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\BackupSchedule|null - */ - public function getBackupSchedule() - { - return $this->backup_schedule; - } - - public function hasBackupSchedule() - { - return isset($this->backup_schedule); - } - - public function clearBackupSchedule() - { - unset($this->backup_schedule); - } - - /** - * Required. The backup schedule to update. - * - * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule $var - * @return $this - */ - public function setBackupSchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\BackupSchedule::class); - $this->backup_schedule = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @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); - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php deleted file mode 100644 index bc68c8671ec8..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php +++ /dev/null @@ -1,33 +0,0 @@ -google.firestore.admin.v1.UpdateDatabaseMetadata - */ -class UpdateDatabaseMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php deleted file mode 100644 index 71f72a8e54b1..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.firestore.admin.v1.UpdateDatabaseRequest - */ -class UpdateDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database to update. - * - * Generated from protobuf field .google.firestore.admin.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = null; - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Firestore\Admin\V1\Database $database Required. The database to update. - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. - * - * @return \Google\Cloud\Firestore\Admin\V1\UpdateDatabaseRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Firestore\Admin\V1\Database $database, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDatabase($database) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\Database $database - * Required. The database to update. - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database to update. - * - * Generated from protobuf field .google.firestore.admin.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\Database|null - */ - public function getDatabase() - { - return $this->database; - } - - public function hasDatabase() - { - return isset($this->database); - } - - public function clearDatabase() - { - unset($this->database); - } - - /** - * Required. The database to update. - * - * Generated from protobuf field .google.firestore.admin.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\Database $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database::class); - $this->database = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @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); - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php deleted file mode 100644 index a860a8be36a7..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php +++ /dev/null @@ -1,139 +0,0 @@ -google.firestore.admin.v1.UpdateFieldRequest - */ -class UpdateFieldRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The field to be updated. - * - * Generated from protobuf field .google.firestore.admin.v1.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $field = null; - /** - * A mask, relative to the field. If specified, only configuration specified - * by this field_mask will be updated in the field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Firestore\Admin\V1\Field $field Required. The field to be updated. - * - * @return \Google\Cloud\Firestore\Admin\V1\UpdateFieldRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Firestore\Admin\V1\Field $field): self - { - return (new self()) - ->setField($field); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\Field $field - * Required. The field to be updated. - * @type \Google\Protobuf\FieldMask $update_mask - * A mask, relative to the field. If specified, only configuration specified - * by this field_mask will be updated in the field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The field to be updated. - * - * Generated from protobuf field .google.firestore.admin.v1.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\Field|null - */ - public function getField() - { - return $this->field; - } - - public function hasField() - { - return isset($this->field); - } - - public function clearField() - { - unset($this->field); - } - - /** - * Required. The field to be updated. - * - * Generated from protobuf field .google.firestore.admin.v1.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\Field $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field::class); - $this->field = $var; - - return $this; - } - - /** - * A mask, relative to the field. If specified, only configuration specified - * by this field_mask will be updated in the field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @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); - } - - /** - * A mask, relative to the field. If specified, only configuration specified - * by this field_mask will be updated in the field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/WeeklyRecurrence.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/WeeklyRecurrence.php deleted file mode 100644 index e7c64ebae899..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/WeeklyRecurrence.php +++ /dev/null @@ -1,72 +0,0 @@ -google.firestore.admin.v1.WeeklyRecurrence - */ -class WeeklyRecurrence extends \Google\Protobuf\Internal\Message -{ - /** - * The day of week to run. - * DAY_OF_WEEK_UNSPECIFIED is not allowed. - * - * Generated from protobuf field .google.type.DayOfWeek day = 2; - */ - protected $day = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $day - * The day of week to run. - * DAY_OF_WEEK_UNSPECIFIED is not allowed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Schedule::initOnce(); - parent::__construct($data); - } - - /** - * The day of week to run. - * DAY_OF_WEEK_UNSPECIFIED is not allowed. - * - * Generated from protobuf field .google.type.DayOfWeek day = 2; - * @return int - */ - public function getDay() - { - return $this->day; - } - - /** - * The day of week to run. - * DAY_OF_WEEK_UNSPECIFIED is not allowed. - * - * Generated from protobuf field .google.type.DayOfWeek day = 2; - * @param int $var - * @return $this - */ - public function setDay($var) - { - GPBUtil::checkEnum($var, \Google\Type\DayOfWeek::class); - $this->day = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/bulk_delete_documents.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/bulk_delete_documents.php deleted file mode 100644 index 68aeec0bfc87..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/bulk_delete_documents.php +++ /dev/null @@ -1,91 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->bulkDeleteDocuments($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BulkDeleteDocumentsResponse $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 = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - bulk_delete_documents_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_backup_schedule.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_backup_schedule.php deleted file mode 100644 index 0e83e8d00dee..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_backup_schedule.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent) - ->setBackupSchedule($backupSchedule); - - // Call the API and handle any network failures. - try { - /** @var BackupSchedule $response */ - $response = $firestoreAdminClient->createBackupSchedule($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 = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - create_backup_schedule_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_CreateBackupSchedule_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_database.php deleted file mode 100644 index 0c47185439d6..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_database.php +++ /dev/null @@ -1,96 +0,0 @@ -setParent($formattedParent) - ->setDatabase($database) - ->setDatabaseId($databaseId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->createDatabase($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Database $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 = FirestoreAdminClient::projectName('[PROJECT]'); - $databaseId = '[DATABASE_ID]'; - - create_database_sample($formattedParent, $databaseId); -} -// [END firestore_v1_generated_FirestoreAdmin_CreateDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php deleted file mode 100644 index b3868089e22d..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php +++ /dev/null @@ -1,94 +0,0 @@ -setParent($formattedParent) - ->setIndex($index); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->createIndex($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Index $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 = FirestoreAdminClient::collectionGroupName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]' - ); - - create_index_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_CreateIndex_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup.php deleted file mode 100644 index fe41a64237fc..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $firestoreAdminClient->deleteBackup($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 = FirestoreAdminClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - - delete_backup_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_DeleteBackup_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup_schedule.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup_schedule.php deleted file mode 100644 index 53a4b98405a4..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup_schedule.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $firestoreAdminClient->deleteBackupSchedule($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 = FirestoreAdminClient::backupScheduleName( - '[PROJECT]', - '[DATABASE]', - '[BACKUP_SCHEDULE]' - ); - - delete_backup_schedule_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_DeleteBackupSchedule_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_database.php deleted file mode 100644 index e9e63f6359ab..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_database.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->deleteDatabase($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Database $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 = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - delete_database_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_DeleteDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php deleted file mode 100644 index 1da8adead502..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $firestoreAdminClient->deleteIndex($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 = FirestoreAdminClient::indexName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]', - '[INDEX]' - ); - - delete_index_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_DeleteIndex_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php deleted file mode 100644 index 9fde0db173ba..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php +++ /dev/null @@ -1,94 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->exportDocuments($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ExportDocumentsResponse $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 = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - export_documents_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_ExportDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup.php deleted file mode 100644 index a6be739032e1..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Backup $response */ - $response = $firestoreAdminClient->getBackup($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 = FirestoreAdminClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - - get_backup_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_GetBackup_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup_schedule.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup_schedule.php deleted file mode 100644 index d3912a59df7d..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup_schedule.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var BackupSchedule $response */ - $response = $firestoreAdminClient->getBackupSchedule($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 = FirestoreAdminClient::backupScheduleName( - '[PROJECT]', - '[DATABASE]', - '[BACKUP_SCHEDULE]' - ); - - get_backup_schedule_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_GetBackupSchedule_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php deleted file mode 100644 index 8206f7a163fc..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Database $response */ - $response = $firestoreAdminClient->getDatabase($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 = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - get_database_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_GetDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php deleted file mode 100644 index e6fea83d16c5..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Field $response */ - $response = $firestoreAdminClient->getField($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 = FirestoreAdminClient::fieldName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]', - '[FIELD]' - ); - - get_field_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_GetField_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php deleted file mode 100644 index 1b4ad8918c85..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Index $response */ - $response = $firestoreAdminClient->getIndex($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 = FirestoreAdminClient::indexName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]', - '[INDEX]' - ); - - get_index_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_GetIndex_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php deleted file mode 100644 index 9a2a04e7a9f5..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->importDocuments($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 = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - import_documents_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_ImportDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backup_schedules.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backup_schedules.php deleted file mode 100644 index fc8d6552d54d..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backup_schedules.php +++ /dev/null @@ -1,73 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var ListBackupSchedulesResponse $response */ - $response = $firestoreAdminClient->listBackupSchedules($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 = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - list_backup_schedules_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_ListBackupSchedules_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backups.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backups.php deleted file mode 100644 index 79980c681c3e..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backups.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var ListBackupsResponse $response */ - $response = $firestoreAdminClient->listBackups($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 = FirestoreAdminClient::locationName('[PROJECT]', '[LOCATION]'); - - list_backups_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_ListBackups_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php deleted file mode 100644 index 695b54581c8c..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php +++ /dev/null @@ -1,72 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var ListDatabasesResponse $response */ - $response = $firestoreAdminClient->listDatabases($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 = FirestoreAdminClient::projectName('[PROJECT]'); - - list_databases_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_ListDatabases_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php deleted file mode 100644 index 6a38c4d901ae..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php +++ /dev/null @@ -1,89 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $firestoreAdminClient->listFields($request); - - /** @var Field $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 = FirestoreAdminClient::collectionGroupName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]' - ); - - list_fields_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_ListFields_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php deleted file mode 100644 index 4b1b4a26a49e..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $firestoreAdminClient->listIndexes($request); - - /** @var Index $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 = FirestoreAdminClient::collectionGroupName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]' - ); - - list_indexes_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_ListIndexes_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/restore_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/restore_database.php deleted file mode 100644 index d897c1a1c23f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/restore_database.php +++ /dev/null @@ -1,124 +0,0 @@ -setParent($formattedParent) - ->setDatabaseId($databaseId) - ->setBackup($formattedBackup); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->restoreDatabase($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Database $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 = FirestoreAdminClient::projectName('[PROJECT]'); - $databaseId = '[DATABASE_ID]'; - $formattedBackup = FirestoreAdminClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - - restore_database_sample($formattedParent, $databaseId, $formattedBackup); -} -// [END firestore_v1_generated_FirestoreAdmin_RestoreDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_backup_schedule.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_backup_schedule.php deleted file mode 100644 index eaa50535ba29..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_backup_schedule.php +++ /dev/null @@ -1,59 +0,0 @@ -setBackupSchedule($backupSchedule); - - // Call the API and handle any network failures. - try { - /** @var BackupSchedule $response */ - $response = $firestoreAdminClient->updateBackupSchedule($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END firestore_v1_generated_FirestoreAdmin_UpdateBackupSchedule_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php deleted file mode 100644 index c98f5c894ff9..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php +++ /dev/null @@ -1,71 +0,0 @@ -setDatabase($database); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->updateDatabase($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Database $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()); - } -} -// [END firestore_v1_generated_FirestoreAdmin_UpdateDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php deleted file mode 100644 index 9b249c701a51..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php +++ /dev/null @@ -1,122 +0,0 @@ -setName($fieldName); - $request = (new UpdateFieldRequest()) - ->setField($field); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->updateField($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Field $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 -{ - $fieldName = '[NAME]'; - - update_field_sample($fieldName); -} -// [END firestore_v1_generated_FirestoreAdmin_UpdateField_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/Client/FirestoreAdminClient.php b/owl-bot-staging/Firestore/v1/Admin/src/V1/Client/FirestoreAdminClient.php deleted file mode 100644 index 8aaac30ebea9..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/src/V1/Client/FirestoreAdminClient.php +++ /dev/null @@ -1,1177 +0,0 @@ - bulkDeleteDocumentsAsync(BulkDeleteDocumentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface createBackupScheduleAsync(CreateBackupScheduleRequest $request, array $optionalArgs = []) - * @method PromiseInterface createDatabaseAsync(CreateDatabaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface createIndexAsync(CreateIndexRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBackupAsync(DeleteBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBackupScheduleAsync(DeleteBackupScheduleRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDatabaseAsync(DeleteDatabaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteIndexAsync(DeleteIndexRequest $request, array $optionalArgs = []) - * @method PromiseInterface exportDocumentsAsync(ExportDocumentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBackupAsync(GetBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBackupScheduleAsync(GetBackupScheduleRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDatabaseAsync(GetDatabaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface getFieldAsync(GetFieldRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIndexAsync(GetIndexRequest $request, array $optionalArgs = []) - * @method PromiseInterface importDocumentsAsync(ImportDocumentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBackupSchedulesAsync(ListBackupSchedulesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBackupsAsync(ListBackupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDatabasesAsync(ListDatabasesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listFieldsAsync(ListFieldsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listIndexesAsync(ListIndexesRequest $request, array $optionalArgs = []) - * @method PromiseInterface restoreDatabaseAsync(RestoreDatabaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBackupScheduleAsync(UpdateBackupScheduleRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDatabaseAsync(UpdateDatabaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateFieldAsync(UpdateFieldRequest $request, array $optionalArgs = []) - */ -final class FirestoreAdminClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.firestore.admin.v1.FirestoreAdmin'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'firestore.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'firestore.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/datastore', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/firestore_admin_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/firestore_admin_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/firestore_admin_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/firestore_admin_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 = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a backup - * resource. - * - * @param string $project - * @param string $location - * @param string $backup - * - * @return string The formatted backup resource. - */ - public static function backupName(string $project, string $location, string $backup): string - { - return self::getPathTemplate('backup')->render([ - 'project' => $project, - 'location' => $location, - 'backup' => $backup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * backup_schedule resource. - * - * @param string $project - * @param string $database - * @param string $backupSchedule - * - * @return string The formatted backup_schedule resource. - */ - public static function backupScheduleName(string $project, string $database, string $backupSchedule): string - { - return self::getPathTemplate('backupSchedule')->render([ - 'project' => $project, - 'database' => $database, - 'backup_schedule' => $backupSchedule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * collection_group resource. - * - * @param string $project - * @param string $database - * @param string $collection - * - * @return string The formatted collection_group resource. - */ - public static function collectionGroupName(string $project, string $database, string $collection): string - { - return self::getPathTemplate('collectionGroup')->render([ - 'project' => $project, - 'database' => $database, - 'collection' => $collection, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a database - * resource. - * - * @param string $project - * @param string $database - * - * @return string The formatted database resource. - */ - public static function databaseName(string $project, string $database): string - { - return self::getPathTemplate('database')->render([ - 'project' => $project, - 'database' => $database, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a field - * resource. - * - * @param string $project - * @param string $database - * @param string $collection - * @param string $field - * - * @return string The formatted field resource. - */ - public static function fieldName(string $project, string $database, string $collection, string $field): string - { - return self::getPathTemplate('field')->render([ - 'project' => $project, - 'database' => $database, - 'collection' => $collection, - 'field' => $field, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a index - * resource. - * - * @param string $project - * @param string $database - * @param string $collection - * @param string $index - * - * @return string The formatted index resource. - */ - public static function indexName(string $project, string $database, string $collection, string $index): string - { - return self::getPathTemplate('index')->render([ - 'project' => $project, - 'database' => $database, - 'collection' => $collection, - 'index' => $index, - ]); - } - - /** - * 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 operation - * resource. - * - * @param string $project - * @param string $database - * @param string $operation - * - * @return string The formatted operation resource. - */ - public static function operationName(string $project, string $database, string $operation): string - { - return self::getPathTemplate('operation')->render([ - 'project' => $project, - 'database' => $database, - 'operation' => $operation, - ]); - } - - /** - * 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, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - backup: projects/{project}/locations/{location}/backups/{backup} - * - backupSchedule: projects/{project}/databases/{database}/backupSchedules/{backup_schedule} - * - collectionGroup: projects/{project}/databases/{database}/collectionGroups/{collection} - * - database: projects/{project}/databases/{database} - * - field: projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field} - * - index: projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index} - * - location: projects/{project}/locations/{location} - * - operation: projects/{project}/databases/{database}/operations/{operation} - * - project: projects/{project} - * - * 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 $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 'firestore.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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); - } - - /** - * Bulk deletes a subset of documents from Google Cloud Firestore. - * Documents created or updated after the underlying system starts to process - * the request will not be deleted. The bulk delete occurs in the background - * and its progress can be monitored and managed via the Operation resource - * that is created. - * - * For more details on bulk delete behavior, refer to: - * https://cloud.google.com/firestore/docs/manage-data/bulk-delete - * - * The async variant is {@see FirestoreAdminClient::bulkDeleteDocumentsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/bulk_delete_documents.php - * - * @param BulkDeleteDocumentsRequest $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 bulkDeleteDocuments(BulkDeleteDocumentsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('BulkDeleteDocuments', $request, $callOptions)->wait(); - } - - /** - * Creates a backup schedule on a database. - * At most two backup schedules can be configured on a database, one daily - * backup schedule and one weekly backup schedule. - * - * The async variant is {@see FirestoreAdminClient::createBackupScheduleAsync()} . - * - * @example samples/V1/FirestoreAdminClient/create_backup_schedule.php - * - * @param CreateBackupScheduleRequest $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 BackupSchedule - * - * @throws ApiException Thrown if the API call fails. - */ - public function createBackupSchedule(CreateBackupScheduleRequest $request, array $callOptions = []): BackupSchedule - { - return $this->startApiCall('CreateBackupSchedule', $request, $callOptions)->wait(); - } - - /** - * Create a database. - * - * The async variant is {@see FirestoreAdminClient::createDatabaseAsync()} . - * - * @example samples/V1/FirestoreAdminClient/create_database.php - * - * @param CreateDatabaseRequest $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 createDatabase(CreateDatabaseRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateDatabase', $request, $callOptions)->wait(); - } - - /** - * Creates a composite index. This returns a - * [google.longrunning.Operation][google.longrunning.Operation] which may be - * used to track the status of the creation. The metadata for the operation - * will be the type - * [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata]. - * - * The async variant is {@see FirestoreAdminClient::createIndexAsync()} . - * - * @example samples/V1/FirestoreAdminClient/create_index.php - * - * @param CreateIndexRequest $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 createIndex(CreateIndexRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateIndex', $request, $callOptions)->wait(); - } - - /** - * Deletes a backup. - * - * The async variant is {@see FirestoreAdminClient::deleteBackupAsync()} . - * - * @example samples/V1/FirestoreAdminClient/delete_backup.php - * - * @param DeleteBackupRequest $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 deleteBackup(DeleteBackupRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteBackup', $request, $callOptions)->wait(); - } - - /** - * Deletes a backup schedule. - * - * The async variant is {@see FirestoreAdminClient::deleteBackupScheduleAsync()} . - * - * @example samples/V1/FirestoreAdminClient/delete_backup_schedule.php - * - * @param DeleteBackupScheduleRequest $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 deleteBackupSchedule(DeleteBackupScheduleRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteBackupSchedule', $request, $callOptions)->wait(); - } - - /** - * Deletes a database. - * - * The async variant is {@see FirestoreAdminClient::deleteDatabaseAsync()} . - * - * @example samples/V1/FirestoreAdminClient/delete_database.php - * - * @param DeleteDatabaseRequest $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 deleteDatabase(DeleteDatabaseRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteDatabase', $request, $callOptions)->wait(); - } - - /** - * Deletes a composite index. - * - * The async variant is {@see FirestoreAdminClient::deleteIndexAsync()} . - * - * @example samples/V1/FirestoreAdminClient/delete_index.php - * - * @param DeleteIndexRequest $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 deleteIndex(DeleteIndexRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteIndex', $request, $callOptions)->wait(); - } - - /** - * Exports a copy of all or a subset of documents from Google Cloud Firestore - * to another storage system, such as Google Cloud Storage. Recent updates to - * documents may not be reflected in the export. The export occurs in the - * background and its progress can be monitored and managed via the - * Operation resource that is created. The output of an export may only be - * used once the associated operation is done. If an export operation is - * cancelled before completion it may leave partial data behind in Google - * Cloud Storage. - * - * For more details on export behavior and output format, refer to: - * https://cloud.google.com/firestore/docs/manage-data/export-import - * - * The async variant is {@see FirestoreAdminClient::exportDocumentsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/export_documents.php - * - * @param ExportDocumentsRequest $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 exportDocuments(ExportDocumentsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ExportDocuments', $request, $callOptions)->wait(); - } - - /** - * Gets information about a backup. - * - * The async variant is {@see FirestoreAdminClient::getBackupAsync()} . - * - * @example samples/V1/FirestoreAdminClient/get_backup.php - * - * @param GetBackupRequest $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 Backup - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBackup(GetBackupRequest $request, array $callOptions = []): Backup - { - return $this->startApiCall('GetBackup', $request, $callOptions)->wait(); - } - - /** - * Gets information about a backup schedule. - * - * The async variant is {@see FirestoreAdminClient::getBackupScheduleAsync()} . - * - * @example samples/V1/FirestoreAdminClient/get_backup_schedule.php - * - * @param GetBackupScheduleRequest $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 BackupSchedule - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBackupSchedule(GetBackupScheduleRequest $request, array $callOptions = []): BackupSchedule - { - return $this->startApiCall('GetBackupSchedule', $request, $callOptions)->wait(); - } - - /** - * Gets information about a database. - * - * The async variant is {@see FirestoreAdminClient::getDatabaseAsync()} . - * - * @example samples/V1/FirestoreAdminClient/get_database.php - * - * @param GetDatabaseRequest $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 Database - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDatabase(GetDatabaseRequest $request, array $callOptions = []): Database - { - return $this->startApiCall('GetDatabase', $request, $callOptions)->wait(); - } - - /** - * Gets the metadata and configuration for a Field. - * - * The async variant is {@see FirestoreAdminClient::getFieldAsync()} . - * - * @example samples/V1/FirestoreAdminClient/get_field.php - * - * @param GetFieldRequest $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 Field - * - * @throws ApiException Thrown if the API call fails. - */ - public function getField(GetFieldRequest $request, array $callOptions = []): Field - { - return $this->startApiCall('GetField', $request, $callOptions)->wait(); - } - - /** - * Gets a composite index. - * - * The async variant is {@see FirestoreAdminClient::getIndexAsync()} . - * - * @example samples/V1/FirestoreAdminClient/get_index.php - * - * @param GetIndexRequest $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 Index - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIndex(GetIndexRequest $request, array $callOptions = []): Index - { - return $this->startApiCall('GetIndex', $request, $callOptions)->wait(); - } - - /** - * Imports documents into Google Cloud Firestore. Existing documents with the - * same name are overwritten. The import occurs in the background and its - * progress can be monitored and managed via the Operation resource that is - * created. If an ImportDocuments operation is cancelled, it is possible - * that a subset of the data has already been imported to Cloud Firestore. - * - * The async variant is {@see FirestoreAdminClient::importDocumentsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/import_documents.php - * - * @param ImportDocumentsRequest $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 importDocuments(ImportDocumentsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ImportDocuments', $request, $callOptions)->wait(); - } - - /** - * List backup schedules. - * - * The async variant is {@see FirestoreAdminClient::listBackupSchedulesAsync()} . - * - * @example samples/V1/FirestoreAdminClient/list_backup_schedules.php - * - * @param ListBackupSchedulesRequest $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 ListBackupSchedulesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listBackupSchedules(ListBackupSchedulesRequest $request, array $callOptions = []): ListBackupSchedulesResponse - { - return $this->startApiCall('ListBackupSchedules', $request, $callOptions)->wait(); - } - - /** - * Lists all the backups. - * - * The async variant is {@see FirestoreAdminClient::listBackupsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/list_backups.php - * - * @param ListBackupsRequest $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 ListBackupsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listBackups(ListBackupsRequest $request, array $callOptions = []): ListBackupsResponse - { - return $this->startApiCall('ListBackups', $request, $callOptions)->wait(); - } - - /** - * List all the databases in the project. - * - * The async variant is {@see FirestoreAdminClient::listDatabasesAsync()} . - * - * @example samples/V1/FirestoreAdminClient/list_databases.php - * - * @param ListDatabasesRequest $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 ListDatabasesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listDatabases(ListDatabasesRequest $request, array $callOptions = []): ListDatabasesResponse - { - return $this->startApiCall('ListDatabases', $request, $callOptions)->wait(); - } - - /** - * Lists the field configuration and metadata for this database. - * - * Currently, - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * only supports listing fields that have been explicitly overridden. To issue - * this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with the filter set to `indexConfig.usesAncestorConfig:false` or - * `ttlConfig:*`. - * - * The async variant is {@see FirestoreAdminClient::listFieldsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/list_fields.php - * - * @param ListFieldsRequest $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 listFields(ListFieldsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListFields', $request, $callOptions); - } - - /** - * Lists composite indexes. - * - * The async variant is {@see FirestoreAdminClient::listIndexesAsync()} . - * - * @example samples/V1/FirestoreAdminClient/list_indexes.php - * - * @param ListIndexesRequest $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 listIndexes(ListIndexesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListIndexes', $request, $callOptions); - } - - /** - * Creates a new database by restoring from an existing backup. - * - * The new database must be in the same cloud region or multi-region location - * as the existing backup. This behaves similar to - * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] - * except instead of creating a new empty database, a new database is created - * with the database type, index configuration, and documents from an existing - * backup. - * - * The [long-running operation][google.longrunning.Operation] can be used to - * track the progress of the restore, with the Operation's - * [metadata][google.longrunning.Operation.metadata] field type being the - * [RestoreDatabaseMetadata][google.firestore.admin.v1.RestoreDatabaseMetadata]. - * The [response][google.longrunning.Operation.response] type is the - * [Database][google.firestore.admin.v1.Database] if the restore was - * successful. The new database is not readable or writeable until the LRO has - * completed. - * - * The async variant is {@see FirestoreAdminClient::restoreDatabaseAsync()} . - * - * @example samples/V1/FirestoreAdminClient/restore_database.php - * - * @param RestoreDatabaseRequest $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 restoreDatabase(RestoreDatabaseRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RestoreDatabase', $request, $callOptions)->wait(); - } - - /** - * Updates a backup schedule. - * - * The async variant is {@see FirestoreAdminClient::updateBackupScheduleAsync()} . - * - * @example samples/V1/FirestoreAdminClient/update_backup_schedule.php - * - * @param UpdateBackupScheduleRequest $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 BackupSchedule - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateBackupSchedule(UpdateBackupScheduleRequest $request, array $callOptions = []): BackupSchedule - { - return $this->startApiCall('UpdateBackupSchedule', $request, $callOptions)->wait(); - } - - /** - * Updates a database. - * - * The async variant is {@see FirestoreAdminClient::updateDatabaseAsync()} . - * - * @example samples/V1/FirestoreAdminClient/update_database.php - * - * @param UpdateDatabaseRequest $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 updateDatabase(UpdateDatabaseRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateDatabase', $request, $callOptions)->wait(); - } - - /** - * Updates a field configuration. Currently, field updates apply only to - * single field index configuration. However, calls to - * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] - * should provide a field mask to avoid changing any configuration that the - * caller isn't aware of. The field mask should be specified as: `{ paths: - * "index_config" }`. - * - * This call returns a - * [google.longrunning.Operation][google.longrunning.Operation] which may be - * used to track the status of the field update. The metadata for the - * operation will be the type - * [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. - * - * To configure the default field settings for the database, use - * the special `Field` with resource name: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. - * - * The async variant is {@see FirestoreAdminClient::updateFieldAsync()} . - * - * @example samples/V1/FirestoreAdminClient/update_field.php - * - * @param UpdateFieldRequest $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 updateField(UpdateFieldRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateField', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/FirestoreAdminClient.php b/owl-bot-staging/Firestore/v1/Admin/src/V1/FirestoreAdminClient.php deleted file mode 100644 index c16524637b1e..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/src/V1/FirestoreAdminClient.php +++ /dev/null @@ -1,34 +0,0 @@ -databaseName('[PROJECT]', '[DATABASE]'); - * $operationResponse = $firestoreAdminClient->bulkDeleteDocuments($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $firestoreAdminClient->bulkDeleteDocuments($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $firestoreAdminClient->resumeOperation($operationName, 'bulkDeleteDocuments'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\Firestore\Admin\V1\Client\FirestoreAdminClient}. - */ -class FirestoreAdminGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.firestore.admin.v1.FirestoreAdmin'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'firestore.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'firestore.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - 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/datastore', - ]; - - private static $backupNameTemplate; - - private static $backupScheduleNameTemplate; - - private static $collectionGroupNameTemplate; - - private static $databaseNameTemplate; - - private static $fieldNameTemplate; - - private static $indexNameTemplate; - - private static $locationNameTemplate; - - private static $operationNameTemplate; - - private static $projectNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/firestore_admin_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/firestore_admin_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/firestore_admin_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/firestore_admin_rest_client_config.php', - ], - ], - ]; - } - - private static function getBackupNameTemplate() - { - if (self::$backupNameTemplate == null) { - self::$backupNameTemplate = new PathTemplate('projects/{project}/locations/{location}/backups/{backup}'); - } - - return self::$backupNameTemplate; - } - - private static function getBackupScheduleNameTemplate() - { - if (self::$backupScheduleNameTemplate == null) { - self::$backupScheduleNameTemplate = new PathTemplate('projects/{project}/databases/{database}/backupSchedules/{backup_schedule}'); - } - - return self::$backupScheduleNameTemplate; - } - - private static function getCollectionGroupNameTemplate() - { - if (self::$collectionGroupNameTemplate == null) { - self::$collectionGroupNameTemplate = new PathTemplate('projects/{project}/databases/{database}/collectionGroups/{collection}'); - } - - return self::$collectionGroupNameTemplate; - } - - private static function getDatabaseNameTemplate() - { - if (self::$databaseNameTemplate == null) { - self::$databaseNameTemplate = new PathTemplate('projects/{project}/databases/{database}'); - } - - return self::$databaseNameTemplate; - } - - private static function getFieldNameTemplate() - { - if (self::$fieldNameTemplate == null) { - self::$fieldNameTemplate = new PathTemplate('projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}'); - } - - return self::$fieldNameTemplate; - } - - private static function getIndexNameTemplate() - { - if (self::$indexNameTemplate == null) { - self::$indexNameTemplate = new PathTemplate('projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index}'); - } - - return self::$indexNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getOperationNameTemplate() - { - if (self::$operationNameTemplate == null) { - self::$operationNameTemplate = new PathTemplate('projects/{project}/databases/{database}/operations/{operation}'); - } - - return self::$operationNameTemplate; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'backup' => self::getBackupNameTemplate(), - 'backupSchedule' => self::getBackupScheduleNameTemplate(), - 'collectionGroup' => self::getCollectionGroupNameTemplate(), - 'database' => self::getDatabaseNameTemplate(), - 'field' => self::getFieldNameTemplate(), - 'index' => self::getIndexNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'operation' => self::getOperationNameTemplate(), - 'project' => self::getProjectNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a backup - * resource. - * - * @param string $project - * @param string $location - * @param string $backup - * - * @return string The formatted backup resource. - */ - public static function backupName($project, $location, $backup) - { - return self::getBackupNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'backup' => $backup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * backup_schedule resource. - * - * @param string $project - * @param string $database - * @param string $backupSchedule - * - * @return string The formatted backup_schedule resource. - */ - public static function backupScheduleName($project, $database, $backupSchedule) - { - return self::getBackupScheduleNameTemplate()->render([ - 'project' => $project, - 'database' => $database, - 'backup_schedule' => $backupSchedule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * collection_group resource. - * - * @param string $project - * @param string $database - * @param string $collection - * - * @return string The formatted collection_group resource. - */ - public static function collectionGroupName($project, $database, $collection) - { - return self::getCollectionGroupNameTemplate()->render([ - 'project' => $project, - 'database' => $database, - 'collection' => $collection, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a database - * resource. - * - * @param string $project - * @param string $database - * - * @return string The formatted database resource. - */ - public static function databaseName($project, $database) - { - return self::getDatabaseNameTemplate()->render([ - 'project' => $project, - 'database' => $database, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a field - * resource. - * - * @param string $project - * @param string $database - * @param string $collection - * @param string $field - * - * @return string The formatted field resource. - */ - public static function fieldName($project, $database, $collection, $field) - { - return self::getFieldNameTemplate()->render([ - 'project' => $project, - 'database' => $database, - 'collection' => $collection, - 'field' => $field, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a index - * resource. - * - * @param string $project - * @param string $database - * @param string $collection - * @param string $index - * - * @return string The formatted index resource. - */ - public static function indexName($project, $database, $collection, $index) - { - return self::getIndexNameTemplate()->render([ - 'project' => $project, - 'database' => $database, - 'collection' => $collection, - 'index' => $index, - ]); - } - - /** - * 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($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a operation - * resource. - * - * @param string $project - * @param string $database - * @param string $operation - * - * @return string The formatted operation resource. - */ - public static function operationName($project, $database, $operation) - { - return self::getOperationNameTemplate()->render([ - 'project' => $project, - 'database' => $database, - 'operation' => $operation, - ]); - } - - /** - * 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($project) - { - return self::getProjectNameTemplate()->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 - * - backup: projects/{project}/locations/{location}/backups/{backup} - * - backupSchedule: projects/{project}/databases/{database}/backupSchedules/{backup_schedule} - * - collectionGroup: projects/{project}/databases/{database}/collectionGroups/{collection} - * - database: projects/{project}/databases/{database} - * - field: projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field} - * - index: projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index} - * - location: projects/{project}/locations/{location} - * - operation: projects/{project}/databases/{database}/operations/{operation} - * - project: projects/{project} - * - * 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($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * 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 = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $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 'firestore.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Bulk deletes a subset of documents from Google Cloud Firestore. - * Documents created or updated after the underlying system starts to process - * the request will not be deleted. The bulk delete occurs in the background - * and its progress can be monitored and managed via the Operation resource - * that is created. - * - * For more details on bulk delete behavior, refer to: - * https://cloud.google.com/firestore/docs/manage-data/bulk-delete - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedName = $firestoreAdminClient->databaseName('[PROJECT]', '[DATABASE]'); - * $operationResponse = $firestoreAdminClient->bulkDeleteDocuments($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $firestoreAdminClient->bulkDeleteDocuments($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $firestoreAdminClient->resumeOperation($operationName, 'bulkDeleteDocuments'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $name Required. Database to operate. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type string[] $collectionIds - * Optional. IDs of the collection groups to delete. Unspecified means all - * collection groups. - * - * Each collection group in this list must be unique. - * @type string[] $namespaceIds - * Optional. Namespaces to delete. - * - * An empty list means all namespaces. This is the recommended - * usage for databases that don't use namespaces. - * - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to delete from them. - * - * Each namespace in this list must be unique. - * @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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function bulkDeleteDocuments($name, array $optionalArgs = []) - { - $request = new BulkDeleteDocumentsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['collectionIds'])) { - $request->setCollectionIds($optionalArgs['collectionIds']); - } - - if (isset($optionalArgs['namespaceIds'])) { - $request->setNamespaceIds($optionalArgs['namespaceIds']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('BulkDeleteDocuments', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a backup schedule on a database. - * At most two backup schedules can be configured on a database, one daily - * backup schedule and one weekly backup schedule. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedParent = $firestoreAdminClient->databaseName('[PROJECT]', '[DATABASE]'); - * $backupSchedule = new BackupSchedule(); - * $response = $firestoreAdminClient->createBackupSchedule($formattedParent, $backupSchedule); - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent database. - * - * Format `projects/{project}/databases/{database}` - * @param BackupSchedule $backupSchedule Required. The backup schedule to create. - * @param array $optionalArgs { - * 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 \Google\Cloud\Firestore\Admin\V1\BackupSchedule - * - * @throws ApiException if the remote call fails - */ - public function createBackupSchedule($parent, $backupSchedule, array $optionalArgs = []) - { - $request = new CreateBackupScheduleRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setBackupSchedule($backupSchedule); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateBackupSchedule', BackupSchedule::class, $optionalArgs, $request)->wait(); - } - - /** - * Create a database. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedParent = $firestoreAdminClient->projectName('[PROJECT]'); - * $database = new Database(); - * $databaseId = 'database_id'; - * $operationResponse = $firestoreAdminClient->createDatabase($formattedParent, $database, $databaseId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $firestoreAdminClient->createDatabase($formattedParent, $database, $databaseId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $firestoreAdminClient->resumeOperation($operationName, 'createDatabase'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. A parent name of the form - * `projects/{project_id}` - * @param Database $database Required. The Database to create. - * @param string $databaseId Required. The ID to use for the database, which will become the final - * component of the database's resource name. - * - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * - * "(default)" database ID is also valid. - * @param array $optionalArgs { - * 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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createDatabase($parent, $database, $databaseId, array $optionalArgs = []) - { - $request = new CreateDatabaseRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDatabase($database); - $request->setDatabaseId($databaseId); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateDatabase', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a composite index. This returns a - * [google.longrunning.Operation][google.longrunning.Operation] which may be - * used to track the status of the creation. The metadata for the operation - * will be the type - * [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata]. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedParent = $firestoreAdminClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - * $index = new Index(); - * $operationResponse = $firestoreAdminClient->createIndex($formattedParent, $index); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $firestoreAdminClient->createIndex($formattedParent, $index); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $firestoreAdminClient->resumeOperation($operationName, 'createIndex'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * @param Index $index Required. The composite index to create. - * @param array $optionalArgs { - * 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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createIndex($parent, $index, array $optionalArgs = []) - { - $request = new CreateIndexRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setIndex($index); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateIndex', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a backup. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedName = $firestoreAdminClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - * $firestoreAdminClient->deleteBackup($formattedName); - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the backup to delete. - * - * format is `projects/{project}/locations/{location}/backups/{backup}`. - * @param array $optionalArgs { - * 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 if the remote call fails - */ - public function deleteBackup($name, array $optionalArgs = []) - { - $request = new DeleteBackupRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteBackup', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a backup schedule. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedName = $firestoreAdminClient->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); - * $firestoreAdminClient->deleteBackupSchedule($formattedName); - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the backup schedule. - * - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * @param array $optionalArgs { - * 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 if the remote call fails - */ - public function deleteBackupSchedule($name, array $optionalArgs = []) - { - $request = new DeleteBackupScheduleRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteBackupSchedule', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a database. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedName = $firestoreAdminClient->databaseName('[PROJECT]', '[DATABASE]'); - * $operationResponse = $firestoreAdminClient->deleteDatabase($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $firestoreAdminClient->deleteDatabase($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $firestoreAdminClient->resumeOperation($operationName, 'deleteDatabase'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}` - * @param array $optionalArgs { - * Optional. - * - * @type string $etag - * The current etag of the Database. - * If an etag is provided and does not match the current etag of the database, - * deletion will be blocked and a FAILED_PRECONDITION error will be returned. - * @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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteDatabase($name, array $optionalArgs = []) - { - $request = new DeleteDatabaseRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteDatabase', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a composite index. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedName = $firestoreAdminClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - * $firestoreAdminClient->deleteIndex($formattedName); - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * @param array $optionalArgs { - * 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 if the remote call fails - */ - public function deleteIndex($name, array $optionalArgs = []) - { - $request = new DeleteIndexRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteIndex', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Exports a copy of all or a subset of documents from Google Cloud Firestore - * to another storage system, such as Google Cloud Storage. Recent updates to - * documents may not be reflected in the export. The export occurs in the - * background and its progress can be monitored and managed via the - * Operation resource that is created. The output of an export may only be - * used once the associated operation is done. If an export operation is - * cancelled before completion it may leave partial data behind in Google - * Cloud Storage. - * - * For more details on export behavior and output format, refer to: - * https://cloud.google.com/firestore/docs/manage-data/export-import - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedName = $firestoreAdminClient->databaseName('[PROJECT]', '[DATABASE]'); - * $operationResponse = $firestoreAdminClient->exportDocuments($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $firestoreAdminClient->exportDocuments($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $firestoreAdminClient->resumeOperation($operationName, 'exportDocuments'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $name Required. Database to export. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type string[] $collectionIds - * Which collection IDs to export. Unspecified means all collections. Each - * collection ID in this list must be unique. - * @type string $outputUriPrefix - * The output URI. Currently only supports Google Cloud Storage URIs of the - * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name - * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional - * Google Cloud Storage namespace path. When - * choosing a name, be sure to consider Google Cloud Storage naming - * guidelines: https://cloud.google.com/storage/docs/naming. - * If the URI is a bucket (without a namespace path), a prefix will be - * generated based on the start time. - * @type string[] $namespaceIds - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * @type Timestamp $snapshotTime - * The timestamp that corresponds to the version of the database to be - * exported. The timestamp must be in the past, rounded to the minute and not - * older than - * [earliestVersionTime][google.firestore.admin.v1.Database.earliest_version_time]. - * If specified, then the exported documents will represent a consistent view - * of the database at the provided time. Otherwise, there are no guarantees - * about the consistency of the exported documents. - * @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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function exportDocuments($name, array $optionalArgs = []) - { - $request = new ExportDocumentsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['collectionIds'])) { - $request->setCollectionIds($optionalArgs['collectionIds']); - } - - if (isset($optionalArgs['outputUriPrefix'])) { - $request->setOutputUriPrefix($optionalArgs['outputUriPrefix']); - } - - if (isset($optionalArgs['namespaceIds'])) { - $request->setNamespaceIds($optionalArgs['namespaceIds']); - } - - if (isset($optionalArgs['snapshotTime'])) { - $request->setSnapshotTime($optionalArgs['snapshotTime']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ExportDocuments', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets information about a backup. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedName = $firestoreAdminClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - * $response = $firestoreAdminClient->getBackup($formattedName); - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the backup to fetch. - * - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * @param array $optionalArgs { - * 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 \Google\Cloud\Firestore\Admin\V1\Backup - * - * @throws ApiException if the remote call fails - */ - public function getBackup($name, array $optionalArgs = []) - { - $request = new GetBackupRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetBackup', Backup::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a backup schedule. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedName = $firestoreAdminClient->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); - * $response = $firestoreAdminClient->getBackupSchedule($formattedName); - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the backup schedule. - * - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * @param array $optionalArgs { - * 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 \Google\Cloud\Firestore\Admin\V1\BackupSchedule - * - * @throws ApiException if the remote call fails - */ - public function getBackupSchedule($name, array $optionalArgs = []) - { - $request = new GetBackupScheduleRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetBackupSchedule', BackupSchedule::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a database. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedName = $firestoreAdminClient->databaseName('[PROJECT]', '[DATABASE]'); - * $response = $firestoreAdminClient->getDatabase($formattedName); - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}` - * @param array $optionalArgs { - * 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 \Google\Cloud\Firestore\Admin\V1\Database - * - * @throws ApiException if the remote call fails - */ - public function getDatabase($name, array $optionalArgs = []) - { - $request = new GetDatabaseRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDatabase', Database::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the metadata and configuration for a Field. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedName = $firestoreAdminClient->fieldName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[FIELD]'); - * $response = $firestoreAdminClient->getField($formattedName); - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` - * @param array $optionalArgs { - * 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 \Google\Cloud\Firestore\Admin\V1\Field - * - * @throws ApiException if the remote call fails - */ - public function getField($name, array $optionalArgs = []) - { - $request = new GetFieldRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetField', Field::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a composite index. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedName = $firestoreAdminClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - * $response = $firestoreAdminClient->getIndex($formattedName); - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * @param array $optionalArgs { - * 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 \Google\Cloud\Firestore\Admin\V1\Index - * - * @throws ApiException if the remote call fails - */ - public function getIndex($name, array $optionalArgs = []) - { - $request = new GetIndexRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIndex', Index::class, $optionalArgs, $request)->wait(); - } - - /** - * Imports documents into Google Cloud Firestore. Existing documents with the - * same name are overwritten. The import occurs in the background and its - * progress can be monitored and managed via the Operation resource that is - * created. If an ImportDocuments operation is cancelled, it is possible - * that a subset of the data has already been imported to Cloud Firestore. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedName = $firestoreAdminClient->databaseName('[PROJECT]', '[DATABASE]'); - * $operationResponse = $firestoreAdminClient->importDocuments($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $firestoreAdminClient->importDocuments($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $firestoreAdminClient->resumeOperation($operationName, 'importDocuments'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $name Required. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type string[] $collectionIds - * Which collection IDs to import. Unspecified means all collections included - * in the import. Each collection ID in this list must be unique. - * @type string $inputUriPrefix - * Location of the exported files. - * This must match the output_uri_prefix of an ExportDocumentsResponse from - * an export that has completed successfully. - * See: - * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. - * @type string[] $namespaceIds - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * @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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function importDocuments($name, array $optionalArgs = []) - { - $request = new ImportDocumentsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['collectionIds'])) { - $request->setCollectionIds($optionalArgs['collectionIds']); - } - - if (isset($optionalArgs['inputUriPrefix'])) { - $request->setInputUriPrefix($optionalArgs['inputUriPrefix']); - } - - if (isset($optionalArgs['namespaceIds'])) { - $request->setNamespaceIds($optionalArgs['namespaceIds']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ImportDocuments', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * List backup schedules. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedParent = $firestoreAdminClient->databaseName('[PROJECT]', '[DATABASE]'); - * $response = $firestoreAdminClient->listBackupSchedules($formattedParent); - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent database. - * - * Format is `projects/{project}/databases/{database}`. - * @param array $optionalArgs { - * 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 \Google\Cloud\Firestore\Admin\V1\ListBackupSchedulesResponse - * - * @throws ApiException if the remote call fails - */ - public function listBackupSchedules($parent, array $optionalArgs = []) - { - $request = new ListBackupSchedulesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ListBackupSchedules', ListBackupSchedulesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists all the backups. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedParent = $firestoreAdminClient->locationName('[PROJECT]', '[LOCATION]'); - * $response = $firestoreAdminClient->listBackups($formattedParent); - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. The location to list backups from. - * - * Format is `projects/{project}/locations/{location}`. - * Use `{location} = '-'` to list backups from all locations for the given - * project. This allows listing backups from a single location or from all - * locations. - * @param array $optionalArgs { - * 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 \Google\Cloud\Firestore\Admin\V1\ListBackupsResponse - * - * @throws ApiException if the remote call fails - */ - public function listBackups($parent, array $optionalArgs = []) - { - $request = new ListBackupsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ListBackups', ListBackupsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * List all the databases in the project. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedParent = $firestoreAdminClient->projectName('[PROJECT]'); - * $response = $firestoreAdminClient->listDatabases($formattedParent); - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. A parent name of the form - * `projects/{project_id}` - * @param array $optionalArgs { - * Optional. - * - * @type bool $showDeleted - * If true, also returns deleted resources. - * @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 \Google\Cloud\Firestore\Admin\V1\ListDatabasesResponse - * - * @throws ApiException if the remote call fails - */ - public function listDatabases($parent, array $optionalArgs = []) - { - $request = new ListDatabasesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['showDeleted'])) { - $request->setShowDeleted($optionalArgs['showDeleted']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ListDatabases', ListDatabasesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists the field configuration and metadata for this database. - * - * Currently, - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * only supports listing fields that have been explicitly overridden. To issue - * this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with the filter set to `indexConfig.usesAncestorConfig:false` or - * `ttlConfig:*`. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedParent = $firestoreAdminClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - * // Iterate over pages of elements - * $pagedResponse = $firestoreAdminClient->listFields($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $firestoreAdminClient->listFields($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * The filter to apply to list results. Currently, - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * only supports listing fields that have been explicitly overridden. To issue - * this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with a filter that includes `indexConfig.usesAncestorConfig:false` or - * `ttlConfig:*`. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listFields($parent, array $optionalArgs = []) - { - $request = new ListFieldsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListFields', $optionalArgs, ListFieldsResponse::class, $request); - } - - /** - * Lists composite indexes. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedParent = $firestoreAdminClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - * // Iterate over pages of elements - * $pagedResponse = $firestoreAdminClient->listIndexes($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $firestoreAdminClient->listIndexes($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * The filter to apply to list results. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listIndexes($parent, array $optionalArgs = []) - { - $request = new ListIndexesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListIndexes', $optionalArgs, ListIndexesResponse::class, $request); - } - - /** - * Creates a new database by restoring from an existing backup. - * - * The new database must be in the same cloud region or multi-region location - * as the existing backup. This behaves similar to - * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] - * except instead of creating a new empty database, a new database is created - * with the database type, index configuration, and documents from an existing - * backup. - * - * The [long-running operation][google.longrunning.Operation] can be used to - * track the progress of the restore, with the Operation's - * [metadata][google.longrunning.Operation.metadata] field type being the - * [RestoreDatabaseMetadata][google.firestore.admin.v1.RestoreDatabaseMetadata]. - * The [response][google.longrunning.Operation.response] type is the - * [Database][google.firestore.admin.v1.Database] if the restore was - * successful. The new database is not readable or writeable until the LRO has - * completed. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedParent = $firestoreAdminClient->projectName('[PROJECT]'); - * $databaseId = 'database_id'; - * $formattedBackup = $firestoreAdminClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - * $operationResponse = $firestoreAdminClient->restoreDatabase($formattedParent, $databaseId, $formattedBackup); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $firestoreAdminClient->restoreDatabase($formattedParent, $databaseId, $formattedBackup); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $firestoreAdminClient->resumeOperation($operationName, 'restoreDatabase'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. The project to restore the database in. Format is - * `projects/{project_id}`. - * @param string $databaseId Required. The ID to use for the database, which will become the final - * component of the database's resource name. This database ID must not be - * associated with an existing database. - * - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * - * "(default)" database ID is also valid. - * @param string $backup Required. Backup to restore from. Must be from the same project as the - * parent. - * - * The restored database will be created in the same location as the source - * backup. - * - * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` - * @param array $optionalArgs { - * Optional. - * - * @type EncryptionConfig $encryptionConfig - * Optional. Encryption configuration for the restored database. - * - * If this field is not specified, the restored database will use - * the same encryption configuration as the backup, namely - * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. - * @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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function restoreDatabase($parent, $databaseId, $backup, array $optionalArgs = []) - { - $request = new RestoreDatabaseRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDatabaseId($databaseId); - $request->setBackup($backup); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['encryptionConfig'])) { - $request->setEncryptionConfig($optionalArgs['encryptionConfig']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('RestoreDatabase', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates a backup schedule. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $backupSchedule = new BackupSchedule(); - * $response = $firestoreAdminClient->updateBackupSchedule($backupSchedule); - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param BackupSchedule $backupSchedule Required. The backup schedule to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The list of fields to be updated. - * @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 \Google\Cloud\Firestore\Admin\V1\BackupSchedule - * - * @throws ApiException if the remote call fails - */ - public function updateBackupSchedule($backupSchedule, array $optionalArgs = []) - { - $request = new UpdateBackupScheduleRequest(); - $requestParamHeaders = []; - $request->setBackupSchedule($backupSchedule); - $requestParamHeaders['backup_schedule.name'] = $backupSchedule->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateBackupSchedule', BackupSchedule::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a database. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $database = new Database(); - * $operationResponse = $firestoreAdminClient->updateDatabase($database); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $firestoreAdminClient->updateDatabase($database); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $firestoreAdminClient->resumeOperation($operationName, 'updateDatabase'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param Database $database Required. The database to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The list of fields to be updated. - * @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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateDatabase($database, array $optionalArgs = []) - { - $request = new UpdateDatabaseRequest(); - $requestParamHeaders = []; - $request->setDatabase($database); - $requestParamHeaders['database.name'] = $database->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateDatabase', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates a field configuration. Currently, field updates apply only to - * single field index configuration. However, calls to - * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] - * should provide a field mask to avoid changing any configuration that the - * caller isn't aware of. The field mask should be specified as: `{ paths: - * "index_config" }`. - * - * This call returns a - * [google.longrunning.Operation][google.longrunning.Operation] which may be - * used to track the status of the field update. The metadata for the - * operation will be the type - * [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. - * - * To configure the default field settings for the database, use - * the special `Field` with resource name: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $field = new Field(); - * $operationResponse = $firestoreAdminClient->updateField($field); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $firestoreAdminClient->updateField($field); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $firestoreAdminClient->resumeOperation($operationName, 'updateField'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param Field $field Required. The field to be updated. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * A mask, relative to the field. If specified, only configuration specified - * by this field_mask will be updated in the field. - * @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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateField($field, array $optionalArgs = []) - { - $request = new UpdateFieldRequest(); - $requestParamHeaders = []; - $request->setField($field); - $requestParamHeaders['field.name'] = $field->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateField', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } -} diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json b/owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json deleted file mode 100644 index 9b70c2e17bb1..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.firestore.admin.v1", - "libraryPackage": "Google\\Cloud\\Firestore\\Admin\\V1", - "services": { - "FirestoreAdmin": { - "clients": { - "grpc": { - "libraryClient": "FirestoreAdminGapicClient", - "rpcs": { - "BulkDeleteDocuments": { - "methods": [ - "bulkDeleteDocuments" - ] - }, - "CreateBackupSchedule": { - "methods": [ - "createBackupSchedule" - ] - }, - "CreateDatabase": { - "methods": [ - "createDatabase" - ] - }, - "CreateIndex": { - "methods": [ - "createIndex" - ] - }, - "DeleteBackup": { - "methods": [ - "deleteBackup" - ] - }, - "DeleteBackupSchedule": { - "methods": [ - "deleteBackupSchedule" - ] - }, - "DeleteDatabase": { - "methods": [ - "deleteDatabase" - ] - }, - "DeleteIndex": { - "methods": [ - "deleteIndex" - ] - }, - "ExportDocuments": { - "methods": [ - "exportDocuments" - ] - }, - "GetBackup": { - "methods": [ - "getBackup" - ] - }, - "GetBackupSchedule": { - "methods": [ - "getBackupSchedule" - ] - }, - "GetDatabase": { - "methods": [ - "getDatabase" - ] - }, - "GetField": { - "methods": [ - "getField" - ] - }, - "GetIndex": { - "methods": [ - "getIndex" - ] - }, - "ImportDocuments": { - "methods": [ - "importDocuments" - ] - }, - "ListBackupSchedules": { - "methods": [ - "listBackupSchedules" - ] - }, - "ListBackups": { - "methods": [ - "listBackups" - ] - }, - "ListDatabases": { - "methods": [ - "listDatabases" - ] - }, - "ListFields": { - "methods": [ - "listFields" - ] - }, - "ListIndexes": { - "methods": [ - "listIndexes" - ] - }, - "RestoreDatabase": { - "methods": [ - "restoreDatabase" - ] - }, - "UpdateBackupSchedule": { - "methods": [ - "updateBackupSchedule" - ] - }, - "UpdateDatabase": { - "methods": [ - "updateDatabase" - ] - }, - "UpdateField": { - "methods": [ - "updateField" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json deleted file mode 100644 index d9d11f0e1967..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json +++ /dev/null @@ -1,166 +0,0 @@ -{ - "interfaces": { - "google.firestore.admin.v1.FirestoreAdmin": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "INTERNAL", - "DEADLINE_EXCEEDED" - ], - "no_retry_1_codes": [] - }, - "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 - }, - "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 - } - }, - "methods": { - "BulkDeleteDocuments": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateBackupSchedule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateDatabase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateIndex": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteBackup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteBackupSchedule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteDatabase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteIndex": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ExportDocuments": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetBackup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetBackupSchedule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetDatabase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetField": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIndex": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ImportDocuments": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListBackupSchedules": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListBackups": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListDatabases": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListFields": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListIndexes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "RestoreDatabase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateBackupSchedule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateDatabase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateField": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php deleted file mode 100644 index 378dec237fa0..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php +++ /dev/null @@ -1,409 +0,0 @@ - [ - 'google.firestore.admin.v1.FirestoreAdmin' => [ - 'BulkDeleteDocuments' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\BulkDeleteDocumentsResponse', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\BulkDeleteDocumentsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateDatabase' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\CreateDatabaseMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateIndex' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Index', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\IndexOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDatabase' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\DeleteDatabaseMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ExportDocuments' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\ExportDocumentsResponse', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\ExportDocumentsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ImportDocuments' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\ImportDocumentsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RestoreDatabase' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\RestoreDatabaseMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateDatabase' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\UpdateDatabaseMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'database.name', - 'fieldAccessors' => [ - 'getDatabase', - 'getName', - ], - ], - ], - ], - 'UpdateField' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Field', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'field.name', - 'fieldAccessors' => [ - 'getField', - 'getName', - ], - ], - ], - ], - 'CreateBackupSchedule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\BackupSchedule', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteBackup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteBackupSchedule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteIndex' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetBackup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\Backup', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetBackupSchedule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\BackupSchedule', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDatabase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\Database', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetField' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\Field', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIndex' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\Index', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListBackupSchedules' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListBackupSchedulesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListBackups' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListBackupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDatabases' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListDatabasesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListFields' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getFields', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListFieldsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListIndexes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getIndexes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListIndexesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateBackupSchedule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\BackupSchedule', - 'headerParams' => [ - [ - 'keyName' => 'backup_schedule.name', - 'fieldAccessors' => [ - 'getBackupSchedule', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'backup' => 'projects/{project}/locations/{location}/backups/{backup}', - 'backupSchedule' => 'projects/{project}/databases/{database}/backupSchedules/{backup_schedule}', - 'collectionGroup' => 'projects/{project}/databases/{database}/collectionGroups/{collection}', - 'database' => 'projects/{project}/databases/{database}', - 'field' => 'projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}', - 'index' => 'projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index}', - 'location' => 'projects/{project}/locations/{location}', - 'operation' => 'projects/{project}/databases/{database}/operations/{operation}', - 'project' => 'projects/{project}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php deleted file mode 100644 index f5062d72f11e..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php +++ /dev/null @@ -1,356 +0,0 @@ - [ - 'google.firestore.admin.v1.FirestoreAdmin' => [ - 'BulkDeleteDocuments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}:bulkDeleteDocuments', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateBackupSchedule' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*}/backupSchedules', - 'body' => 'backup_schedule', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDatabase' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/databases', - 'body' => 'database', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'database_id', - ], - ], - 'CreateIndex' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes', - 'body' => 'index', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteBackup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteBackupSchedule' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/backupSchedules/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteDatabase' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteIndex' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExportDocuments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}:exportDocuments', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBackup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBackupSchedule' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/backupSchedules/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDatabase' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetField' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIndex' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportDocuments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}:importDocuments', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListBackupSchedules' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*}/backupSchedules', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListBackups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDatabases' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/databases', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListFields' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListIndexes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RestoreDatabase' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/databases:restore', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateBackupSchedule' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{backup_schedule.name=projects/*/databases/*/backupSchedules/*}', - 'body' => 'backup_schedule', - 'placeholders' => [ - 'backup_schedule.name' => [ - 'getters' => [ - 'getBackupSchedule', - 'getName', - ], - ], - ], - ], - 'UpdateDatabase' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{database.name=projects/*/databases/*}', - 'body' => 'database', - 'placeholders' => [ - 'database.name' => [ - 'getters' => [ - 'getDatabase', - 'getName', - ], - ], - ], - ], - 'UpdateField' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}', - 'body' => 'field', - 'placeholders' => [ - 'field.name' => [ - 'getters' => [ - 'getField', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/Client/FirestoreAdminClientTest.php b/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/Client/FirestoreAdminClientTest.php deleted file mode 100644 index 512fce66af8a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/Client/FirestoreAdminClientTest.php +++ /dev/null @@ -1,2323 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return FirestoreAdminClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new FirestoreAdminClient($options); - } - - /** @test */ - public function bulkDeleteDocumentsTest() - { - $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/bulkDeleteDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BulkDeleteDocumentsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/bulkDeleteDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new BulkDeleteDocumentsRequest()) - ->setName($formattedName); - $response = $gapicClient->bulkDeleteDocuments($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.firestore.admin.v1.FirestoreAdmin/BulkDeleteDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/bulkDeleteDocumentsTest'); - $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 bulkDeleteDocumentsExceptionTest() - { - $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/bulkDeleteDocumentsTest'); - $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->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new BulkDeleteDocumentsRequest()) - ->setName($formattedName); - $response = $gapicClient->bulkDeleteDocuments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/bulkDeleteDocumentsTest'); - 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 createBackupScheduleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new BackupSchedule(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $backupSchedule = new BackupSchedule(); - $request = (new CreateBackupScheduleRequest()) - ->setParent($formattedParent) - ->setBackupSchedule($backupSchedule); - $response = $gapicClient->createBackupSchedule($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/CreateBackupSchedule', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getBackupSchedule(); - $this->assertProtobufEquals($backupSchedule, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createBackupScheduleExceptionTest() - { - $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->databaseName('[PROJECT]', '[DATABASE]'); - $backupSchedule = new BackupSchedule(); - $request = (new CreateBackupScheduleRequest()) - ->setParent($formattedParent) - ->setBackupSchedule($backupSchedule); - try { - $gapicClient->createBackupSchedule($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 createDatabaseTest() - { - $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/createDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $previousId = 'previousId-1005863069'; - $etag = 'etag3123477'; - $expectedResponse = new Database(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setPreviousId($previousId); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $database = new Database(); - $databaseId = 'databaseId816491103'; - $request = (new CreateDatabaseRequest()) - ->setParent($formattedParent) - ->setDatabase($database) - ->setDatabaseId($databaseId); - $response = $gapicClient->createDatabase($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.firestore.admin.v1.FirestoreAdmin/CreateDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $actualValue = $actualApiRequestObject->getDatabaseId(); - $this->assertProtobufEquals($databaseId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDatabaseTest'); - $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 createDatabaseExceptionTest() - { - $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/createDatabaseTest'); - $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->projectName('[PROJECT]'); - $database = new Database(); - $databaseId = 'databaseId816491103'; - $request = (new CreateDatabaseRequest()) - ->setParent($formattedParent) - ->setDatabase($database) - ->setDatabaseId($databaseId); - $response = $gapicClient->createDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDatabaseTest'); - 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 createIndexTest() - { - $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/createIndexTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new Index(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createIndexTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $index = new Index(); - $request = (new CreateIndexRequest()) - ->setParent($formattedParent) - ->setIndex($index); - $response = $gapicClient->createIndex($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.firestore.admin.v1.FirestoreAdmin/CreateIndex', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getIndex(); - $this->assertProtobufEquals($index, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIndexTest'); - $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 createIndexExceptionTest() - { - $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/createIndexTest'); - $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->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $index = new Index(); - $request = (new CreateIndexRequest()) - ->setParent($formattedParent) - ->setIndex($index); - $response = $gapicClient->createIndex($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIndexTest'); - 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 deleteBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $request = (new DeleteBackupRequest()) - ->setName($formattedName); - $gapicClient->deleteBackup($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteBackup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBackupExceptionTest() - { - $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->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $request = (new DeleteBackupRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteBackup($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 deleteBackupScheduleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); - $request = (new DeleteBackupScheduleRequest()) - ->setName($formattedName); - $gapicClient->deleteBackupSchedule($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteBackupSchedule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBackupScheduleExceptionTest() - { - $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->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); - $request = (new DeleteBackupScheduleRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteBackupSchedule($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 deleteDatabaseTest() - { - $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/deleteDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $previousId = 'previousId-1005863069'; - $etag2 = 'etag2-1293302904'; - $expectedResponse = new Database(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setPreviousId($previousId); - $expectedResponse->setEtag($etag2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new DeleteDatabaseRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDatabase($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.firestore.admin.v1.FirestoreAdmin/DeleteDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDatabaseTest'); - $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 deleteDatabaseExceptionTest() - { - $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/deleteDatabaseTest'); - $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->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new DeleteDatabaseRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDatabaseTest'); - 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 deleteIndexTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - $request = (new DeleteIndexRequest()) - ->setName($formattedName); - $gapicClient->deleteIndex($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteIndex', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteIndexExceptionTest() - { - $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->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - $request = (new DeleteIndexRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteIndex($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 exportDocumentsTest() - { - $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/exportDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $outputUriPrefix2 = 'outputUriPrefix2-377757258'; - $expectedResponse = new ExportDocumentsResponse(); - $expectedResponse->setOutputUriPrefix($outputUriPrefix2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/exportDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new ExportDocumentsRequest()) - ->setName($formattedName); - $response = $gapicClient->exportDocuments($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.firestore.admin.v1.FirestoreAdmin/ExportDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportDocumentsTest'); - $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 exportDocumentsExceptionTest() - { - $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/exportDocumentsTest'); - $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->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new ExportDocumentsRequest()) - ->setName($formattedName); - $response = $gapicClient->exportDocuments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportDocumentsTest'); - 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 getBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $database = 'database1789464955'; - $databaseUid = 'databaseUid-458567796'; - $expectedResponse = new Backup(); - $expectedResponse->setName($name2); - $expectedResponse->setDatabase($database); - $expectedResponse->setDatabaseUid($databaseUid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $request = (new GetBackupRequest()) - ->setName($formattedName); - $response = $gapicClient->getBackup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetBackup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupExceptionTest() - { - $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->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $request = (new GetBackupRequest()) - ->setName($formattedName); - try { - $gapicClient->getBackup($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 getBackupScheduleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new BackupSchedule(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); - $request = (new GetBackupScheduleRequest()) - ->setName($formattedName); - $response = $gapicClient->getBackupSchedule($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetBackupSchedule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupScheduleExceptionTest() - { - $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->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); - $request = (new GetBackupScheduleRequest()) - ->setName($formattedName); - try { - $gapicClient->getBackupSchedule($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 getDatabaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $previousId = 'previousId-1005863069'; - $etag = 'etag3123477'; - $expectedResponse = new Database(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setPreviousId($previousId); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new GetDatabaseRequest()) - ->setName($formattedName); - $response = $gapicClient->getDatabase($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetDatabase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDatabaseExceptionTest() - { - $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->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new GetDatabaseRequest()) - ->setName($formattedName); - try { - $gapicClient->getDatabase($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 getFieldTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Field(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->fieldName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[FIELD]'); - $request = (new GetFieldRequest()) - ->setName($formattedName); - $response = $gapicClient->getField($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetField', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFieldExceptionTest() - { - $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->fieldName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[FIELD]'); - $request = (new GetFieldRequest()) - ->setName($formattedName); - try { - $gapicClient->getField($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 getIndexTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Index(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - $request = (new GetIndexRequest()) - ->setName($formattedName); - $response = $gapicClient->getIndex($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetIndex', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIndexExceptionTest() - { - $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->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - $request = (new GetIndexRequest()) - ->setName($formattedName); - try { - $gapicClient->getIndex($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 importDocumentsTest() - { - $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/importDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new ImportDocumentsRequest()) - ->setName($formattedName); - $response = $gapicClient->importDocuments($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.firestore.admin.v1.FirestoreAdmin/ImportDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); - $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 importDocumentsExceptionTest() - { - $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/importDocumentsTest'); - $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->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new ImportDocumentsRequest()) - ->setName($formattedName); - $response = $gapicClient->importDocuments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); - 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 listBackupSchedulesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListBackupSchedulesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new ListBackupSchedulesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBackupSchedules($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListBackupSchedules', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupSchedulesExceptionTest() - { - $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->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new ListBackupSchedulesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listBackupSchedules($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 listBackupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListBackupsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListBackupsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBackups($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListBackups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupsExceptionTest() - { - $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 ListBackupsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listBackups($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 listDatabasesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListDatabasesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListDatabasesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDatabases($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListDatabases', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDatabasesExceptionTest() - { - $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 ListDatabasesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDatabases($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 listFieldsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $fieldsElement = new Field(); - $fields = [ - $fieldsElement, - ]; - $expectedResponse = new ListFieldsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFields($fields); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $request = (new ListFieldsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listFields($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFields()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListFields', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFieldsExceptionTest() - { - $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->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $request = (new ListFieldsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listFields($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 listIndexesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $indexesElement = new Index(); - $indexes = [ - $indexesElement, - ]; - $expectedResponse = new ListIndexesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setIndexes($indexes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $request = (new ListIndexesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listIndexes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getIndexes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListIndexes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIndexesExceptionTest() - { - $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->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $request = (new ListIndexesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listIndexes($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 restoreDatabaseTest() - { - $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/restoreDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $previousId = 'previousId-1005863069'; - $etag = 'etag3123477'; - $expectedResponse = new Database(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setPreviousId($previousId); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/restoreDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $databaseId = 'databaseId816491103'; - $formattedBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $request = (new RestoreDatabaseRequest()) - ->setParent($formattedParent) - ->setDatabaseId($databaseId) - ->setBackup($formattedBackup); - $response = $gapicClient->restoreDatabase($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.firestore.admin.v1.FirestoreAdmin/RestoreDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDatabaseId(); - $this->assertProtobufEquals($databaseId, $actualValue); - $actualValue = $actualApiRequestObject->getBackup(); - $this->assertProtobufEquals($formattedBackup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreDatabaseTest'); - $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 restoreDatabaseExceptionTest() - { - $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/restoreDatabaseTest'); - $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->projectName('[PROJECT]'); - $databaseId = 'databaseId816491103'; - $formattedBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $request = (new RestoreDatabaseRequest()) - ->setParent($formattedParent) - ->setDatabaseId($databaseId) - ->setBackup($formattedBackup); - $response = $gapicClient->restoreDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreDatabaseTest'); - 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 updateBackupScheduleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new BackupSchedule(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $backupSchedule = new BackupSchedule(); - $request = (new UpdateBackupScheduleRequest()) - ->setBackupSchedule($backupSchedule); - $response = $gapicClient->updateBackupSchedule($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/UpdateBackupSchedule', $actualFuncCall); - $actualValue = $actualRequestObject->getBackupSchedule(); - $this->assertProtobufEquals($backupSchedule, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateBackupScheduleExceptionTest() - { - $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 - $backupSchedule = new BackupSchedule(); - $request = (new UpdateBackupScheduleRequest()) - ->setBackupSchedule($backupSchedule); - try { - $gapicClient->updateBackupSchedule($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 updateDatabaseTest() - { - $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/updateDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $previousId = 'previousId-1005863069'; - $etag = 'etag3123477'; - $expectedResponse = new Database(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setPreviousId($previousId); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $database = new Database(); - $request = (new UpdateDatabaseRequest()) - ->setDatabase($database); - $response = $gapicClient->updateDatabase($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.firestore.admin.v1.FirestoreAdmin/UpdateDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDatabaseTest'); - $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 updateDatabaseExceptionTest() - { - $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/updateDatabaseTest'); - $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 - $database = new Database(); - $request = (new UpdateDatabaseRequest()) - ->setDatabase($database); - $response = $gapicClient->updateDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDatabaseTest'); - 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 updateFieldTest() - { - $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/updateFieldTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new Field(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateFieldTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $field = new Field(); - $fieldName = 'fieldName1265009317'; - $field->setName($fieldName); - $request = (new UpdateFieldRequest()) - ->setField($field); - $response = $gapicClient->updateField($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.firestore.admin.v1.FirestoreAdmin/UpdateField', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getField(); - $this->assertProtobufEquals($field, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFieldTest'); - $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 updateFieldExceptionTest() - { - $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/updateFieldTest'); - $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 - $field = new Field(); - $fieldName = 'fieldName1265009317'; - $field->setName($fieldName); - $request = (new UpdateFieldRequest()) - ->setField($field); - $response = $gapicClient->updateField($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFieldTest'); - 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 bulkDeleteDocumentsAsyncTest() - { - $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/bulkDeleteDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BulkDeleteDocumentsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/bulkDeleteDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new BulkDeleteDocumentsRequest()) - ->setName($formattedName); - $response = $gapicClient->bulkDeleteDocumentsAsync($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.firestore.admin.v1.FirestoreAdmin/BulkDeleteDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/bulkDeleteDocumentsTest'); - $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/Firestore/v1/Admin/tests/Unit/V1/FirestoreAdminClientTest.php b/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/FirestoreAdminClientTest.php deleted file mode 100644 index 1f98bcbfe2eb..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/FirestoreAdminClientTest.php +++ /dev/null @@ -1,2127 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return FirestoreAdminClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new FirestoreAdminClient($options); - } - - /** @test */ - public function bulkDeleteDocumentsTest() - { - $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/bulkDeleteDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BulkDeleteDocumentsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/bulkDeleteDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $response = $gapicClient->bulkDeleteDocuments($formattedName); - $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.firestore.admin.v1.FirestoreAdmin/BulkDeleteDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/bulkDeleteDocumentsTest'); - $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 bulkDeleteDocumentsExceptionTest() - { - $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/bulkDeleteDocumentsTest'); - $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->databaseName('[PROJECT]', '[DATABASE]'); - $response = $gapicClient->bulkDeleteDocuments($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/bulkDeleteDocumentsTest'); - 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 createBackupScheduleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new BackupSchedule(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $backupSchedule = new BackupSchedule(); - $response = $gapicClient->createBackupSchedule($formattedParent, $backupSchedule); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/CreateBackupSchedule', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getBackupSchedule(); - $this->assertProtobufEquals($backupSchedule, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createBackupScheduleExceptionTest() - { - $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->databaseName('[PROJECT]', '[DATABASE]'); - $backupSchedule = new BackupSchedule(); - try { - $gapicClient->createBackupSchedule($formattedParent, $backupSchedule); - // 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 createDatabaseTest() - { - $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/createDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $previousId = 'previousId-1005863069'; - $etag = 'etag3123477'; - $expectedResponse = new Database(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setPreviousId($previousId); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $database = new Database(); - $databaseId = 'databaseId816491103'; - $response = $gapicClient->createDatabase($formattedParent, $database, $databaseId); - $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.firestore.admin.v1.FirestoreAdmin/CreateDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $actualValue = $actualApiRequestObject->getDatabaseId(); - $this->assertProtobufEquals($databaseId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDatabaseTest'); - $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 createDatabaseExceptionTest() - { - $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/createDatabaseTest'); - $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->projectName('[PROJECT]'); - $database = new Database(); - $databaseId = 'databaseId816491103'; - $response = $gapicClient->createDatabase($formattedParent, $database, $databaseId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDatabaseTest'); - 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 createIndexTest() - { - $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/createIndexTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new Index(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createIndexTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $index = new Index(); - $response = $gapicClient->createIndex($formattedParent, $index); - $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.firestore.admin.v1.FirestoreAdmin/CreateIndex', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getIndex(); - $this->assertProtobufEquals($index, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIndexTest'); - $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 createIndexExceptionTest() - { - $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/createIndexTest'); - $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->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $index = new Index(); - $response = $gapicClient->createIndex($formattedParent, $index); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIndexTest'); - 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 deleteBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $gapicClient->deleteBackup($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteBackup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBackupExceptionTest() - { - $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->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - try { - $gapicClient->deleteBackup($formattedName); - // 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 deleteBackupScheduleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); - $gapicClient->deleteBackupSchedule($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteBackupSchedule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBackupScheduleExceptionTest() - { - $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->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); - try { - $gapicClient->deleteBackupSchedule($formattedName); - // 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 deleteDatabaseTest() - { - $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/deleteDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $previousId = 'previousId-1005863069'; - $etag2 = 'etag2-1293302904'; - $expectedResponse = new Database(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setPreviousId($previousId); - $expectedResponse->setEtag($etag2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $response = $gapicClient->deleteDatabase($formattedName); - $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.firestore.admin.v1.FirestoreAdmin/DeleteDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDatabaseTest'); - $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 deleteDatabaseExceptionTest() - { - $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/deleteDatabaseTest'); - $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->databaseName('[PROJECT]', '[DATABASE]'); - $response = $gapicClient->deleteDatabase($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDatabaseTest'); - 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 deleteIndexTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - $gapicClient->deleteIndex($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteIndex', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteIndexExceptionTest() - { - $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->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - try { - $gapicClient->deleteIndex($formattedName); - // 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 exportDocumentsTest() - { - $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/exportDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $outputUriPrefix2 = 'outputUriPrefix2-377757258'; - $expectedResponse = new ExportDocumentsResponse(); - $expectedResponse->setOutputUriPrefix($outputUriPrefix2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/exportDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $response = $gapicClient->exportDocuments($formattedName); - $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.firestore.admin.v1.FirestoreAdmin/ExportDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportDocumentsTest'); - $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 exportDocumentsExceptionTest() - { - $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/exportDocumentsTest'); - $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->databaseName('[PROJECT]', '[DATABASE]'); - $response = $gapicClient->exportDocuments($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportDocumentsTest'); - 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 getBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $database = 'database1789464955'; - $databaseUid = 'databaseUid-458567796'; - $expectedResponse = new Backup(); - $expectedResponse->setName($name2); - $expectedResponse->setDatabase($database); - $expectedResponse->setDatabaseUid($databaseUid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $response = $gapicClient->getBackup($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetBackup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupExceptionTest() - { - $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->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - try { - $gapicClient->getBackup($formattedName); - // 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 getBackupScheduleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new BackupSchedule(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); - $response = $gapicClient->getBackupSchedule($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetBackupSchedule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupScheduleExceptionTest() - { - $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->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); - try { - $gapicClient->getBackupSchedule($formattedName); - // 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 getDatabaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $previousId = 'previousId-1005863069'; - $etag = 'etag3123477'; - $expectedResponse = new Database(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setPreviousId($previousId); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $response = $gapicClient->getDatabase($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetDatabase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDatabaseExceptionTest() - { - $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->databaseName('[PROJECT]', '[DATABASE]'); - try { - $gapicClient->getDatabase($formattedName); - // 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 getFieldTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Field(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->fieldName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[FIELD]'); - $response = $gapicClient->getField($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetField', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFieldExceptionTest() - { - $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->fieldName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[FIELD]'); - try { - $gapicClient->getField($formattedName); - // 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 getIndexTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Index(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - $response = $gapicClient->getIndex($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetIndex', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIndexExceptionTest() - { - $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->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - try { - $gapicClient->getIndex($formattedName); - // 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 importDocumentsTest() - { - $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/importDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $response = $gapicClient->importDocuments($formattedName); - $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.firestore.admin.v1.FirestoreAdmin/ImportDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); - $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 importDocumentsExceptionTest() - { - $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/importDocumentsTest'); - $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->databaseName('[PROJECT]', '[DATABASE]'); - $response = $gapicClient->importDocuments($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); - 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 listBackupSchedulesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListBackupSchedulesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $response = $gapicClient->listBackupSchedules($formattedParent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListBackupSchedules', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupSchedulesExceptionTest() - { - $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->databaseName('[PROJECT]', '[DATABASE]'); - try { - $gapicClient->listBackupSchedules($formattedParent); - // 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 listBackupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListBackupsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listBackups($formattedParent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListBackups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupsExceptionTest() - { - $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]'); - try { - $gapicClient->listBackups($formattedParent); - // 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 listDatabasesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListDatabasesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listDatabases($formattedParent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListDatabases', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDatabasesExceptionTest() - { - $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]'); - try { - $gapicClient->listDatabases($formattedParent); - // 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 listFieldsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $fieldsElement = new Field(); - $fields = [ - $fieldsElement, - ]; - $expectedResponse = new ListFieldsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFields($fields); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $response = $gapicClient->listFields($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFields()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListFields', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFieldsExceptionTest() - { - $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->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - try { - $gapicClient->listFields($formattedParent); - // 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 listIndexesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $indexesElement = new Index(); - $indexes = [ - $indexesElement, - ]; - $expectedResponse = new ListIndexesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setIndexes($indexes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $response = $gapicClient->listIndexes($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getIndexes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListIndexes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIndexesExceptionTest() - { - $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->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - try { - $gapicClient->listIndexes($formattedParent); - // 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 restoreDatabaseTest() - { - $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/restoreDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $previousId = 'previousId-1005863069'; - $etag = 'etag3123477'; - $expectedResponse = new Database(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setPreviousId($previousId); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/restoreDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $databaseId = 'databaseId816491103'; - $formattedBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $response = $gapicClient->restoreDatabase($formattedParent, $databaseId, $formattedBackup); - $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.firestore.admin.v1.FirestoreAdmin/RestoreDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDatabaseId(); - $this->assertProtobufEquals($databaseId, $actualValue); - $actualValue = $actualApiRequestObject->getBackup(); - $this->assertProtobufEquals($formattedBackup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreDatabaseTest'); - $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 restoreDatabaseExceptionTest() - { - $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/restoreDatabaseTest'); - $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->projectName('[PROJECT]'); - $databaseId = 'databaseId816491103'; - $formattedBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $response = $gapicClient->restoreDatabase($formattedParent, $databaseId, $formattedBackup); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreDatabaseTest'); - 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 updateBackupScheduleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new BackupSchedule(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $backupSchedule = new BackupSchedule(); - $response = $gapicClient->updateBackupSchedule($backupSchedule); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/UpdateBackupSchedule', $actualFuncCall); - $actualValue = $actualRequestObject->getBackupSchedule(); - $this->assertProtobufEquals($backupSchedule, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateBackupScheduleExceptionTest() - { - $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 - $backupSchedule = new BackupSchedule(); - try { - $gapicClient->updateBackupSchedule($backupSchedule); - // 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 updateDatabaseTest() - { - $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/updateDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $previousId = 'previousId-1005863069'; - $etag = 'etag3123477'; - $expectedResponse = new Database(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setPreviousId($previousId); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $database = new Database(); - $response = $gapicClient->updateDatabase($database); - $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.firestore.admin.v1.FirestoreAdmin/UpdateDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDatabaseTest'); - $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 updateDatabaseExceptionTest() - { - $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/updateDatabaseTest'); - $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 - $database = new Database(); - $response = $gapicClient->updateDatabase($database); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDatabaseTest'); - 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 updateFieldTest() - { - $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/updateFieldTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new Field(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateFieldTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $field = new Field(); - $fieldName = 'fieldName1265009317'; - $field->setName($fieldName); - $response = $gapicClient->updateField($field); - $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.firestore.admin.v1.FirestoreAdmin/UpdateField', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getField(); - $this->assertProtobufEquals($field, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFieldTest'); - $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 updateFieldExceptionTest() - { - $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/updateFieldTest'); - $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 - $field = new Field(); - $fieldName = 'fieldName1265009317'; - $field->setName($fieldName); - $response = $gapicClient->updateField($field); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFieldTest'); - 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()); - } -} diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php deleted file mode 100644 index 5f249ebfc8d4..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php +++ /dev/null @@ -1,33 +0,0 @@ -internalAddGeneratedFile( - ' -Ý -,google/firestore/v1/aggregation_result.protogoogle.firestore.v1"¾ -AggregationResultU -aggregate_fields ( 2;.google.firestore.v1.AggregationResult.AggregateFieldsEntryR -AggregateFieldsEntry -key ( ) -value ( 2.google.firestore.v1.Value:8BÎ -com.google.firestore.v1BAggregationResultProtoPZ;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb¢GCFSªGoogle.Cloud.Firestore.V1ÊGoogle\\Cloud\\Firestore\\V1êGoogle::Cloud::Firestore::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/BloomFilter.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/BloomFilter.php deleted file mode 100644 index 84249064625d..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/BloomFilter.php +++ /dev/null @@ -1,34 +0,0 @@ -internalAddGeneratedFile( - ' -“ -&google/firestore/v1/bloom_filter.protogoogle.firestore.v1". - BitSequence -bitmap (  -padding ("Q - BloomFilter. -bits ( 2 .google.firestore.v1.BitSequence - -hash_count (BÈ -com.google.firestore.v1BBloomFilterProtoPZ;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb¢GCFSªGoogle.Cloud.Firestore.V1ÊGoogle\\Cloud\\Firestore\\V1êGoogle::Cloud::Firestore::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Common.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Common.php deleted file mode 100644 index 57fc24775305..000000000000 Binary files a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Common.php and /dev/null differ diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php deleted file mode 100644 index fdb899ded9b7..000000000000 Binary files a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php and /dev/null differ diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Firestore.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Firestore.php deleted file mode 100644 index 88ea9ca5afc8..000000000000 Binary files a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Firestore.php and /dev/null differ diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php deleted file mode 100644 index 5e45bd4eea7e..000000000000 Binary files a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php and /dev/null differ diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/QueryProfile.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/QueryProfile.php deleted file mode 100644 index 515fe852eabe..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/QueryProfile.php +++ /dev/null @@ -1,42 +0,0 @@ -internalAddGeneratedFile( - ' -ê -\'google/firestore/v1/query_profile.protogoogle.firestore.v1google/protobuf/duration.protogoogle/protobuf/struct.proto"& -ExplainOptions -analyze (BàA"† -ExplainMetrics6 - plan_summary ( 2 .google.firestore.v1.PlanSummary< -execution_stats ( 2#.google.firestore.v1.ExecutionStats"< - PlanSummary- - indexes_used ( 2.google.protobuf.Struct"¨ -ExecutionStats -results_returned (5 -execution_duration ( 2.google.protobuf.Duration -read_operations (, - debug_stats ( 2.google.protobuf.StructBÉ -com.google.firestore.v1BQueryProfileProtoPZ;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb¢GCFSªGoogle.Cloud.Firestore.V1ÊGoogle\\Cloud\\Firestore\\V1êGoogle::Cloud::Firestore::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php deleted file mode 100644 index abcc4fb4abf9..000000000000 Binary files a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php and /dev/null differ diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/AggregationResult.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/AggregationResult.php deleted file mode 100644 index d98419955554..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/AggregationResult.php +++ /dev/null @@ -1,86 +0,0 @@ -google.firestore.v1.AggregationResult - */ -class AggregationResult extends \Google\Protobuf\Internal\Message -{ - /** - * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. - * The key is the - * [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] - * assigned to the aggregation function on input and the size of this map - * equals the number of aggregation functions in the query. - * - * Generated from protobuf field map aggregate_fields = 2; - */ - private $aggregate_fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $aggregate_fields - * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. - * The key is the - * [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] - * assigned to the aggregation function on input and the size of this map - * equals the number of aggregation functions in the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\AggregationResult::initOnce(); - parent::__construct($data); - } - - /** - * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. - * The key is the - * [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] - * assigned to the aggregation function on input and the size of this map - * equals the number of aggregation functions in the query. - * - * Generated from protobuf field map aggregate_fields = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAggregateFields() - { - return $this->aggregate_fields; - } - - /** - * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. - * The key is the - * [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] - * assigned to the aggregation function on input and the size of this map - * equals the number of aggregation functions in the query. - * - * Generated from protobuf field map aggregate_fields = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAggregateFields($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->aggregate_fields = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php deleted file mode 100644 index a5e67239f7a8..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php +++ /dev/null @@ -1,67 +0,0 @@ -google.firestore.v1.ArrayValue - */ -class ArrayValue extends \Google\Protobuf\Internal\Message -{ - /** - * Values in the array. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - */ - private $values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Firestore\V1\Value>|\Google\Protobuf\Internal\RepeatedField $values - * Values in the array. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Values in the array. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValues() - { - return $this->values; - } - - /** - * Values in the array. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - * @param array<\Google\Cloud\Firestore\V1\Value>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->values = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php deleted file mode 100644 index d6e70f8173e6..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php +++ /dev/null @@ -1,296 +0,0 @@ -google.firestore.v1.BatchGetDocumentsRequest - */ -class BatchGetDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of the - * given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - */ - private $documents; - /** - * The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field will - * not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - */ - protected $mask = null; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type array|\Google\Protobuf\Internal\RepeatedField $documents - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of the - * given `database`. Duplicate names will be elided. - * @type \Google\Cloud\Firestore\V1\DocumentMask $mask - * The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field will - * not be returned in the response. - * @type string $transaction - * Reads documents in a transaction. - * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * @type \Google\Protobuf\Timestamp $read_time - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of the - * given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDocuments() - { - return $this->documents; - } - - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of the - * given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDocuments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->documents = $arr; - - return $this; - } - - /** - * The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field will - * not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getMask() - { - return $this->mask; - } - - public function hasMask() - { - return isset($this->mask); - } - - public function clearMask() - { - unset($this->mask); - } - - /** - * The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field will - * not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->mask = $var; - - return $this; - } - - /** - * Reads documents in a transaction. - * - * Generated from protobuf field bytes transaction = 4; - * @return string - */ - public function getTransaction() - { - return $this->readOneof(4); - } - - public function hasTransaction() - { - return $this->hasOneof(4); - } - - /** - * Reads documents in a transaction. - * - * Generated from protobuf field bytes transaction = 4; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; - * @return \Google\Cloud\Firestore\V1\TransactionOptions|null - */ - public function getNewTransaction() - { - return $this->readOneof(5); - } - - public function hasNewTransaction() - { - return $this->hasOneof(5); - } - - /** - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; - * @param \Google\Cloud\Firestore\V1\TransactionOptions $var - * @return $this - */ - public function setNewTransaction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(7); - } - - public function hasReadTime() - { - return $this->hasOneof(7); - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php deleted file mode 100644 index 97801733b24f..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php +++ /dev/null @@ -1,214 +0,0 @@ -google.firestore.v1.BatchGetDocumentsResponse - */ -class BatchGetDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The transaction that was started as part of this request. - * Will only be set in the first response, and only if - * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] - * was set in the request. - * - * Generated from protobuf field bytes transaction = 3; - */ - protected $transaction = ''; - /** - * The time at which the document was read. - * This may be monotically increasing, in this case the previous documents in - * the result stream are guaranteed not to have changed between their - * read_time and this one. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - */ - protected $read_time = null; - protected $result; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Document $found - * A document that was requested. - * @type string $missing - * A document name that was requested but does not exist. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type string $transaction - * The transaction that was started as part of this request. - * Will only be set in the first response, and only if - * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] - * was set in the request. - * @type \Google\Protobuf\Timestamp $read_time - * The time at which the document was read. - * This may be monotically increasing, in this case the previous documents in - * the result stream are guaranteed not to have changed between their - * read_time and this one. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * A document that was requested. - * - * Generated from protobuf field .google.firestore.v1.Document found = 1; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getFound() - { - return $this->readOneof(1); - } - - public function hasFound() - { - return $this->hasOneof(1); - } - - /** - * A document that was requested. - * - * Generated from protobuf field .google.firestore.v1.Document found = 1; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setFound($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A document name that was requested but does not exist. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string missing = 2; - * @return string - */ - public function getMissing() - { - return $this->readOneof(2); - } - - public function hasMissing() - { - return $this->hasOneof(2); - } - - /** - * A document name that was requested but does not exist. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string missing = 2; - * @param string $var - * @return $this - */ - public function setMissing($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The transaction that was started as part of this request. - * Will only be set in the first response, and only if - * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] - * was set in the request. - * - * Generated from protobuf field bytes transaction = 3; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * The transaction that was started as part of this request. - * Will only be set in the first response, and only if - * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] - * was set in the request. - * - * Generated from protobuf field bytes transaction = 3; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - - /** - * The time at which the document was read. - * This may be monotically increasing, in this case the previous documents in - * the result stream are guaranteed not to have changed between their - * read_time and this one. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The time at which the document was read. - * This may be monotically increasing, in this case the previous documents in - * the result stream are guaranteed not to have changed between their - * read_time and this one. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getResult() - { - return $this->whichOneof("result"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php deleted file mode 100644 index bc22dba85194..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php +++ /dev/null @@ -1,152 +0,0 @@ -google.firestore.v1.BatchWriteRequest - */ -class BatchWriteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * The writes to apply. - * Method does not apply writes atomically and does not guarantee ordering. - * Each write succeeds or fails independently. You cannot write to the same - * document more than once per request. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - */ - private $writes; - /** - * Labels associated with this batch write. - * - * Generated from protobuf field map labels = 3; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type array<\Google\Cloud\Firestore\V1\Write>|\Google\Protobuf\Internal\RepeatedField $writes - * The writes to apply. - * Method does not apply writes atomically and does not guarantee ordering. - * Each write succeeds or fails independently. You cannot write to the same - * document more than once per request. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels associated with this batch write. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The writes to apply. - * Method does not apply writes atomically and does not guarantee ordering. - * Each write succeeds or fails independently. You cannot write to the same - * document more than once per request. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWrites() - { - return $this->writes; - } - - /** - * The writes to apply. - * Method does not apply writes atomically and does not guarantee ordering. - * Each write succeeds or fails independently. You cannot write to the same - * document more than once per request. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - * @param array<\Google\Cloud\Firestore\V1\Write>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWrites($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Write::class); - $this->writes = $arr; - - return $this; - } - - /** - * Labels associated with this batch write. - * - * Generated from protobuf field map labels = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels associated with this batch write. - * - * Generated from protobuf field map labels = 3; - * @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; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php deleted file mode 100644 index da43ca0a535b..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php +++ /dev/null @@ -1,118 +0,0 @@ -google.firestore.v1.BatchWriteResponse - */ -class BatchWriteResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - */ - private $write_results; - /** - * The status of applying the writes. - * This i-th write status corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.rpc.Status status = 2; - */ - private $status; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Firestore\V1\WriteResult>|\Google\Protobuf\Internal\RepeatedField $write_results - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $status - * The status of applying the writes. - * This i-th write status corresponds to the i-th write in the - * request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWriteResults() - { - return $this->write_results; - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - * @param array<\Google\Cloud\Firestore\V1\WriteResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWriteResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\WriteResult::class); - $this->write_results = $arr; - - return $this; - } - - /** - * The status of applying the writes. - * This i-th write status corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.rpc.Status status = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStatus() - { - return $this->status; - } - - /** - * The status of applying the writes. - * This i-th write status corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.rpc.Status status = 2; - * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStatus($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->status = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php deleted file mode 100644 index 08de515ed1e5..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php +++ /dev/null @@ -1,134 +0,0 @@ -google.firestore.v1.BeginTransactionRequest - */ -class BeginTransactionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * The options for the transaction. - * Defaults to a read-write transaction. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions options = 2; - */ - protected $options = null; - - /** - * @param string $database Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * @return \Google\Cloud\Firestore\V1\BeginTransactionRequest - * - * @experimental - */ - public static function build(string $database): self - { - return (new self()) - ->setDatabase($database); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type \Google\Cloud\Firestore\V1\TransactionOptions $options - * The options for the transaction. - * Defaults to a read-write transaction. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The options for the transaction. - * Defaults to a read-write transaction. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions options = 2; - * @return \Google\Cloud\Firestore\V1\TransactionOptions|null - */ - public function getOptions() - { - return $this->options; - } - - public function hasOptions() - { - return isset($this->options); - } - - public function clearOptions() - { - unset($this->options); - } - - /** - * The options for the transaction. - * Defaults to a read-write transaction. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions options = 2; - * @param \Google\Cloud\Firestore\V1\TransactionOptions $var - * @return $this - */ - public function setOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); - $this->options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php deleted file mode 100644 index 2dcf768331c3..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.firestore.v1.BeginTransactionResponse - */ -class BeginTransactionResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The transaction that was started. - * - * Generated from protobuf field bytes transaction = 1; - */ - protected $transaction = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $transaction - * The transaction that was started. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The transaction that was started. - * - * Generated from protobuf field bytes transaction = 1; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * The transaction that was started. - * - * Generated from protobuf field bytes transaction = 1; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BitSequence.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BitSequence.php deleted file mode 100644 index 7ce2da3b9590..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BitSequence.php +++ /dev/null @@ -1,124 +0,0 @@ -google.firestore.v1.BitSequence - */ -class BitSequence extends \Google\Protobuf\Internal\Message -{ - /** - * The bytes that encode the bit sequence. - * May have a length of zero. - * - * Generated from protobuf field bytes bitmap = 1; - */ - protected $bitmap = ''; - /** - * The number of bits of the last byte in `bitmap` to ignore as "padding". - * If the length of `bitmap` is zero, then this value must be `0`. - * Otherwise, this value must be between 0 and 7, inclusive. - * - * Generated from protobuf field int32 padding = 2; - */ - protected $padding = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $bitmap - * The bytes that encode the bit sequence. - * May have a length of zero. - * @type int $padding - * The number of bits of the last byte in `bitmap` to ignore as "padding". - * If the length of `bitmap` is zero, then this value must be `0`. - * Otherwise, this value must be between 0 and 7, inclusive. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\BloomFilter::initOnce(); - parent::__construct($data); - } - - /** - * The bytes that encode the bit sequence. - * May have a length of zero. - * - * Generated from protobuf field bytes bitmap = 1; - * @return string - */ - public function getBitmap() - { - return $this->bitmap; - } - - /** - * The bytes that encode the bit sequence. - * May have a length of zero. - * - * Generated from protobuf field bytes bitmap = 1; - * @param string $var - * @return $this - */ - public function setBitmap($var) - { - GPBUtil::checkString($var, False); - $this->bitmap = $var; - - return $this; - } - - /** - * The number of bits of the last byte in `bitmap` to ignore as "padding". - * If the length of `bitmap` is zero, then this value must be `0`. - * Otherwise, this value must be between 0 and 7, inclusive. - * - * Generated from protobuf field int32 padding = 2; - * @return int - */ - public function getPadding() - { - return $this->padding; - } - - /** - * The number of bits of the last byte in `bitmap` to ignore as "padding". - * If the length of `bitmap` is zero, then this value must be `0`. - * Otherwise, this value must be between 0 and 7, inclusive. - * - * Generated from protobuf field int32 padding = 2; - * @param int $var - * @return $this - */ - public function setPadding($var) - { - GPBUtil::checkInt32($var); - $this->padding = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BloomFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BloomFilter.php deleted file mode 100644 index 3a4b0b5d26af..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BloomFilter.php +++ /dev/null @@ -1,119 +0,0 @@ -google.firestore.v1.BloomFilter - */ -class BloomFilter extends \Google\Protobuf\Internal\Message -{ - /** - * The bloom filter data. - * - * Generated from protobuf field .google.firestore.v1.BitSequence bits = 1; - */ - protected $bits = null; - /** - * The number of hashes used by the algorithm. - * - * Generated from protobuf field int32 hash_count = 2; - */ - protected $hash_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\BitSequence $bits - * The bloom filter data. - * @type int $hash_count - * The number of hashes used by the algorithm. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\BloomFilter::initOnce(); - parent::__construct($data); - } - - /** - * The bloom filter data. - * - * Generated from protobuf field .google.firestore.v1.BitSequence bits = 1; - * @return \Google\Cloud\Firestore\V1\BitSequence|null - */ - public function getBits() - { - return $this->bits; - } - - public function hasBits() - { - return isset($this->bits); - } - - public function clearBits() - { - unset($this->bits); - } - - /** - * The bloom filter data. - * - * Generated from protobuf field .google.firestore.v1.BitSequence bits = 1; - * @param \Google\Cloud\Firestore\V1\BitSequence $var - * @return $this - */ - public function setBits($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\BitSequence::class); - $this->bits = $var; - - return $this; - } - - /** - * The number of hashes used by the algorithm. - * - * Generated from protobuf field int32 hash_count = 2; - * @return int - */ - public function getHashCount() - { - return $this->hash_count; - } - - /** - * The number of hashes used by the algorithm. - * - * Generated from protobuf field int32 hash_count = 2; - * @param int $var - * @return $this - */ - public function setHashCount($var) - { - GPBUtil::checkInt32($var); - $this->hash_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php deleted file mode 100644 index 01455af2f717..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.firestore.v1.CommitRequest - */ -class CommitRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * The writes to apply. - * Always executed atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - */ - private $writes; - /** - * If set, applies all writes in this transaction, and commits it. - * - * Generated from protobuf field bytes transaction = 3; - */ - protected $transaction = ''; - - /** - * @param string $database Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @param \Google\Cloud\Firestore\V1\Write[] $writes The writes to apply. - * - * Always executed atomically and in order. - * - * @return \Google\Cloud\Firestore\V1\CommitRequest - * - * @experimental - */ - public static function build(string $database, array $writes): self - { - return (new self()) - ->setDatabase($database) - ->setWrites($writes); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type array<\Google\Cloud\Firestore\V1\Write>|\Google\Protobuf\Internal\RepeatedField $writes - * The writes to apply. - * Always executed atomically and in order. - * @type string $transaction - * If set, applies all writes in this transaction, and commits it. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The writes to apply. - * Always executed atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWrites() - { - return $this->writes; - } - - /** - * The writes to apply. - * Always executed atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - * @param array<\Google\Cloud\Firestore\V1\Write>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWrites($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Write::class); - $this->writes = $arr; - - return $this; - } - - /** - * If set, applies all writes in this transaction, and commits it. - * - * Generated from protobuf field bytes transaction = 3; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * If set, applies all writes in this transaction, and commits it. - * - * Generated from protobuf field bytes transaction = 3; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php deleted file mode 100644 index aa52dc11399d..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php +++ /dev/null @@ -1,123 +0,0 @@ -google.firestore.v1.CommitResponse - */ -class CommitResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - */ - private $write_results; - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the commit. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 2; - */ - protected $commit_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Firestore\V1\WriteResult>|\Google\Protobuf\Internal\RepeatedField $write_results - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * @type \Google\Protobuf\Timestamp $commit_time - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the commit. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWriteResults() - { - return $this->write_results; - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - * @param array<\Google\Cloud\Firestore\V1\WriteResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWriteResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\WriteResult::class); - $this->write_results = $arr; - - return $this; - } - - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the commit. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCommitTime() - { - return $this->commit_time; - } - - public function hasCommitTime() - { - return isset($this->commit_time); - } - - public function clearCommitTime() - { - unset($this->commit_time); - } - - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the commit. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCommitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->commit_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php deleted file mode 100644 index 8e2171cf630c..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php +++ /dev/null @@ -1,248 +0,0 @@ -google.firestore.v1.CreateDocumentRequest - */ -class CreateDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource. For example: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. The collection ID, relative to `parent`, to list. For example: - * `chatrooms`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $collection_id = ''; - /** - * The client-assigned document ID to use for this document. - * Optional. If not specified, an ID will be assigned by the service. - * - * Generated from protobuf field string document_id = 3; - */ - protected $document_id = ''; - /** - * Required. The document to create. `name` must not be set. - * - * Generated from protobuf field .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 5; - */ - protected $mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource. For example: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - * @type string $collection_id - * Required. The collection ID, relative to `parent`, to list. For example: - * `chatrooms`. - * @type string $document_id - * The client-assigned document ID to use for this document. - * Optional. If not specified, an ID will be assigned by the service. - * @type \Google\Cloud\Firestore\V1\Document $document - * Required. The document to create. `name` must not be set. - * @type \Google\Cloud\Firestore\V1\DocumentMask $mask - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource. For example: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource. For example: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The collection ID, relative to `parent`, to list. For example: - * `chatrooms`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCollectionId() - { - return $this->collection_id; - } - - /** - * Required. The collection ID, relative to `parent`, to list. For example: - * `chatrooms`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCollectionId($var) - { - GPBUtil::checkString($var, True); - $this->collection_id = $var; - - return $this; - } - - /** - * The client-assigned document ID to use for this document. - * Optional. If not specified, an ID will be assigned by the service. - * - * Generated from protobuf field string document_id = 3; - * @return string - */ - public function getDocumentId() - { - return $this->document_id; - } - - /** - * The client-assigned document ID to use for this document. - * Optional. If not specified, an ID will be assigned by the service. - * - * Generated from protobuf field string document_id = 3; - * @param string $var - * @return $this - */ - public function setDocumentId($var) - { - GPBUtil::checkString($var, True); - $this->document_id = $var; - - return $this; - } - - /** - * Required. The document to create. `name` must not be set. - * - * Generated from protobuf field .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. The document to create. `name` must not be set. - * - * Generated from protobuf field .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 5; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getMask() - { - return $this->mask; - } - - public function hasMask() - { - return isset($this->mask); - } - - public function clearMask() - { - unset($this->mask); - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 5; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php deleted file mode 100644 index 9fdaf73c3abe..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php +++ /dev/null @@ -1,113 +0,0 @@ -google.firestore.v1.Cursor - */ -class Cursor extends \Google\Protobuf\Internal\Message -{ - /** - * The values that represent a position, in the order they appear in - * the order by clause of a query. - * Can contain fewer values than specified in the order by clause. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - */ - private $values; - /** - * If the position is just before or just after the given values, relative - * to the sort order defined by the query. - * - * Generated from protobuf field bool before = 2; - */ - protected $before = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Firestore\V1\Value>|\Google\Protobuf\Internal\RepeatedField $values - * The values that represent a position, in the order they appear in - * the order by clause of a query. - * Can contain fewer values than specified in the order by clause. - * @type bool $before - * If the position is just before or just after the given values, relative - * to the sort order defined by the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The values that represent a position, in the order they appear in - * the order by clause of a query. - * Can contain fewer values than specified in the order by clause. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValues() - { - return $this->values; - } - - /** - * The values that represent a position, in the order they appear in - * the order by clause of a query. - * Can contain fewer values than specified in the order by clause. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - * @param array<\Google\Cloud\Firestore\V1\Value>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->values = $arr; - - return $this; - } - - /** - * If the position is just before or just after the given values, relative - * to the sort order defined by the query. - * - * Generated from protobuf field bool before = 2; - * @return bool - */ - public function getBefore() - { - return $this->before; - } - - /** - * If the position is just before or just after the given values, relative - * to the sort order defined by the query. - * - * Generated from protobuf field bool before = 2; - * @param bool $var - * @return $this - */ - public function setBefore($var) - { - GPBUtil::checkBool($var); - $this->before = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php deleted file mode 100644 index 86172865d22c..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php +++ /dev/null @@ -1,134 +0,0 @@ -google.firestore.v1.DeleteDocumentRequest - */ -class DeleteDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Document to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 2; - */ - protected $current_document = null; - - /** - * @param string $name Required. The resource name of the Document to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * @return \Google\Cloud\Firestore\V1\DeleteDocumentRequest - * - * @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 Document to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type \Google\Cloud\Firestore\V1\Precondition $current_document - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Document to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * 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 Document to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * 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; - } - - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 2; - * @return \Google\Cloud\Firestore\V1\Precondition|null - */ - public function getCurrentDocument() - { - return $this->current_document; - } - - public function hasCurrentDocument() - { - return isset($this->current_document); - } - - public function clearCurrentDocument() - { - unset($this->current_document); - } - - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 2; - * @param \Google\Cloud\Firestore\V1\Precondition $var - * @return $this - */ - public function setCurrentDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Precondition::class); - $this->current_document = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php deleted file mode 100644 index 594b70eed952..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php +++ /dev/null @@ -1,290 +0,0 @@ -google.firestore.v1.Document - */ -class Document extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the document, for example - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The document's fields. - * The map keys represent field names. - * Field names matching the regular expression `__.*__` are reserved. Reserved - * field names are forbidden except in certain documented contexts. The field - * names, represented as UTF-8, must not exceed 1,500 bytes and cannot be - * empty. - * Field paths may be used in other contexts to refer to structured fields - * defined here. For `map_value`, the field path is represented by a - * dot-delimited (`.`) string of segments. Each segment is either a simple - * field name (defined below) or a quoted field name. For example, the - * structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" - * }}}` would be represented by the field path `` foo.`x&y` ``. - * A simple field name contains only characters `a` to `z`, `A` to `Z`, - * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, - * `foo_bar_17`. - * A quoted field name starts and ends with `` ` `` and - * may contain any character. Some characters, including `` ` ``, must be - * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and - * `` `bak\`tik` `` represents `` bak`tik ``. - * - * Generated from protobuf field map fields = 2; - */ - private $fields; - /** - * Output only. The time at which the document was created. - * This value increases monotonically when a document is deleted then - * recreated. It can also be compared to values from other documents and - * the `read_time` of a query. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - */ - protected $create_time = null; - /** - * Output only. The time at which the document was last changed. - * This value is initially set to the `create_time` then increases - * monotonically with each change to the document. It can also be - * compared to values from other documents and the `read_time` of a query. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the document, for example - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type array|\Google\Protobuf\Internal\MapField $fields - * The document's fields. - * The map keys represent field names. - * Field names matching the regular expression `__.*__` are reserved. Reserved - * field names are forbidden except in certain documented contexts. The field - * names, represented as UTF-8, must not exceed 1,500 bytes and cannot be - * empty. - * Field paths may be used in other contexts to refer to structured fields - * defined here. For `map_value`, the field path is represented by a - * dot-delimited (`.`) string of segments. Each segment is either a simple - * field name (defined below) or a quoted field name. For example, the - * structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" - * }}}` would be represented by the field path `` foo.`x&y` ``. - * A simple field name contains only characters `a` to `z`, `A` to `Z`, - * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, - * `foo_bar_17`. - * A quoted field name starts and ends with `` ` `` and - * may contain any character. Some characters, including `` ` ``, must be - * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and - * `` `bak\`tik` `` represents `` bak`tik ``. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the document was created. - * This value increases monotonically when a document is deleted then - * recreated. It can also be compared to values from other documents and - * the `read_time` of a query. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which the document was last changed. - * This value is initially set to the `create_time` then increases - * monotonically with each change to the document. It can also be - * compared to values from other documents and the `read_time` of a query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the document, for example - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the document, for example - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * 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 document's fields. - * The map keys represent field names. - * Field names matching the regular expression `__.*__` are reserved. Reserved - * field names are forbidden except in certain documented contexts. The field - * names, represented as UTF-8, must not exceed 1,500 bytes and cannot be - * empty. - * Field paths may be used in other contexts to refer to structured fields - * defined here. For `map_value`, the field path is represented by a - * dot-delimited (`.`) string of segments. Each segment is either a simple - * field name (defined below) or a quoted field name. For example, the - * structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" - * }}}` would be represented by the field path `` foo.`x&y` ``. - * A simple field name contains only characters `a` to `z`, `A` to `Z`, - * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, - * `foo_bar_17`. - * A quoted field name starts and ends with `` ` `` and - * may contain any character. Some characters, including `` ` ``, must be - * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and - * `` `bak\`tik` `` represents `` bak`tik ``. - * - * Generated from protobuf field map fields = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getFields() - { - return $this->fields; - } - - /** - * The document's fields. - * The map keys represent field names. - * Field names matching the regular expression `__.*__` are reserved. Reserved - * field names are forbidden except in certain documented contexts. The field - * names, represented as UTF-8, must not exceed 1,500 bytes and cannot be - * empty. - * Field paths may be used in other contexts to refer to structured fields - * defined here. For `map_value`, the field path is represented by a - * dot-delimited (`.`) string of segments. Each segment is either a simple - * field name (defined below) or a quoted field name. For example, the - * structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" - * }}}` would be represented by the field path `` foo.`x&y` ``. - * A simple field name contains only characters `a` to `z`, `A` to `Z`, - * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, - * `foo_bar_17`. - * A quoted field name starts and ends with `` ` `` and - * may contain any character. Some characters, including `` ` ``, must be - * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and - * `` `bak\`tik` `` represents `` bak`tik ``. - * - * Generated from protobuf field map fields = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->fields = $arr; - - return $this; - } - - /** - * Output only. The time at which the document was created. - * This value increases monotonically when a document is deleted then - * recreated. It can also be compared to values from other documents and - * the `read_time` of a query. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @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 document was created. - * This value increases monotonically when a document is deleted then - * recreated. It can also be compared to values from other documents and - * the `read_time` of a query. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @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 at which the document was last changed. - * This value is initially set to the `create_time` then increases - * monotonically with each change to the document. It can also be - * compared to values from other documents and the `read_time` of a query. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time at which the document was last changed. - * This value is initially set to the `create_time` then increases - * monotonically with each change to the document. It can also be - * compared to values from other documents and the `read_time` of a query. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php deleted file mode 100644 index f4e1a5181731..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php +++ /dev/null @@ -1,154 +0,0 @@ -google.firestore.v1.DocumentChange - */ -class DocumentChange extends \Google\Protobuf\Internal\Message -{ - /** - * The new state of the [Document][google.firestore.v1.Document]. - * If `mask` is set, contains only fields that were updated or added. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - */ - protected $document = null; - /** - * A set of target IDs of targets that match this document. - * - * Generated from protobuf field repeated int32 target_ids = 5; - */ - private $target_ids; - /** - * A set of target IDs for targets that no longer match this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - */ - private $removed_target_ids; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Document $document - * The new state of the [Document][google.firestore.v1.Document]. - * If `mask` is set, contains only fields that were updated or added. - * @type array|\Google\Protobuf\Internal\RepeatedField $target_ids - * A set of target IDs of targets that match this document. - * @type array|\Google\Protobuf\Internal\RepeatedField $removed_target_ids - * A set of target IDs for targets that no longer match this document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The new state of the [Document][google.firestore.v1.Document]. - * If `mask` is set, contains only fields that were updated or added. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * The new state of the [Document][google.firestore.v1.Document]. - * If `mask` is set, contains only fields that were updated or added. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * A set of target IDs of targets that match this document. - * - * Generated from protobuf field repeated int32 target_ids = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargetIds() - { - return $this->target_ids; - } - - /** - * A set of target IDs of targets that match this document. - * - * Generated from protobuf field repeated int32 target_ids = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->target_ids = $arr; - - return $this; - } - - /** - * A set of target IDs for targets that no longer match this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRemovedTargetIds() - { - return $this->removed_target_ids; - } - - /** - * A set of target IDs for targets that no longer match this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRemovedTargetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->removed_target_ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php deleted file mode 100644 index 94b0fb72fcd8..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php +++ /dev/null @@ -1,158 +0,0 @@ -google.firestore.v1.DocumentDelete - */ -class DocumentDelete extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the [Document][google.firestore.v1.Document] that was - * deleted. - * - * Generated from protobuf field string document = 1; - */ - protected $document = ''; - /** - * A set of target IDs for targets that previously matched this entity. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - */ - private $removed_target_ids; - /** - * The read timestamp at which the delete was observed. - * Greater or equal to the `commit_time` of the delete. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - */ - protected $read_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $document - * The resource name of the [Document][google.firestore.v1.Document] that was - * deleted. - * @type array|\Google\Protobuf\Internal\RepeatedField $removed_target_ids - * A set of target IDs for targets that previously matched this entity. - * @type \Google\Protobuf\Timestamp $read_time - * The read timestamp at which the delete was observed. - * Greater or equal to the `commit_time` of the delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the [Document][google.firestore.v1.Document] that was - * deleted. - * - * Generated from protobuf field string document = 1; - * @return string - */ - public function getDocument() - { - return $this->document; - } - - /** - * The resource name of the [Document][google.firestore.v1.Document] that was - * deleted. - * - * Generated from protobuf field string document = 1; - * @param string $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkString($var, True); - $this->document = $var; - - return $this; - } - - /** - * A set of target IDs for targets that previously matched this entity. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRemovedTargetIds() - { - return $this->removed_target_ids; - } - - /** - * A set of target IDs for targets that previously matched this entity. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRemovedTargetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->removed_target_ids = $arr; - - return $this; - } - - /** - * The read timestamp at which the delete was observed. - * Greater or equal to the `commit_time` of the delete. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The read timestamp at which the delete was observed. - * Greater or equal to the `commit_time` of the delete. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php deleted file mode 100644 index 10644f490192..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php +++ /dev/null @@ -1,80 +0,0 @@ -google.firestore.v1.DocumentMask - */ -class DocumentMask extends \Google\Protobuf\Internal\Message -{ - /** - * The list of field paths in the mask. See - * [Document.fields][google.firestore.v1.Document.fields] for a field path - * syntax reference. - * - * Generated from protobuf field repeated string field_paths = 1; - */ - private $field_paths; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $field_paths - * The list of field paths in the mask. See - * [Document.fields][google.firestore.v1.Document.fields] for a field path - * syntax reference. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The list of field paths in the mask. See - * [Document.fields][google.firestore.v1.Document.fields] for a field path - * syntax reference. - * - * Generated from protobuf field repeated string field_paths = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFieldPaths() - { - return $this->field_paths; - } - - /** - * The list of field paths in the mask. See - * [Document.fields][google.firestore.v1.Document.fields] for a field path - * syntax reference. - * - * Generated from protobuf field repeated string field_paths = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFieldPaths($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->field_paths = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php deleted file mode 100644 index 7a435ef42700..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php +++ /dev/null @@ -1,160 +0,0 @@ -google.firestore.v1.DocumentRemove - */ -class DocumentRemove extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the [Document][google.firestore.v1.Document] that has - * gone out of view. - * - * Generated from protobuf field string document = 1; - */ - protected $document = ''; - /** - * A set of target IDs for targets that previously matched this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 2; - */ - private $removed_target_ids; - /** - * The read timestamp at which the remove was observed. - * Greater or equal to the `commit_time` of the change/delete/remove. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - */ - protected $read_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $document - * The resource name of the [Document][google.firestore.v1.Document] that has - * gone out of view. - * @type array|\Google\Protobuf\Internal\RepeatedField $removed_target_ids - * A set of target IDs for targets that previously matched this document. - * @type \Google\Protobuf\Timestamp $read_time - * The read timestamp at which the remove was observed. - * Greater or equal to the `commit_time` of the change/delete/remove. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the [Document][google.firestore.v1.Document] that has - * gone out of view. - * - * Generated from protobuf field string document = 1; - * @return string - */ - public function getDocument() - { - return $this->document; - } - - /** - * The resource name of the [Document][google.firestore.v1.Document] that has - * gone out of view. - * - * Generated from protobuf field string document = 1; - * @param string $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkString($var, True); - $this->document = $var; - - return $this; - } - - /** - * A set of target IDs for targets that previously matched this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRemovedTargetIds() - { - return $this->removed_target_ids; - } - - /** - * A set of target IDs for targets that previously matched this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRemovedTargetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->removed_target_ids = $arr; - - return $this; - } - - /** - * The read timestamp at which the remove was observed. - * Greater or equal to the `commit_time` of the change/delete/remove. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The read timestamp at which the remove was observed. - * Greater or equal to the `commit_time` of the change/delete/remove. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php deleted file mode 100644 index 05828bedba2f..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php +++ /dev/null @@ -1,109 +0,0 @@ -google.firestore.v1.DocumentTransform - */ -class DocumentTransform extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the document to transform. - * - * Generated from protobuf field string document = 1; - */ - protected $document = ''; - /** - * The list of transformations to apply to the fields of the document, in - * order. - * This must not be empty. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; - */ - private $field_transforms; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $document - * The name of the document to transform. - * @type array<\Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform>|\Google\Protobuf\Internal\RepeatedField $field_transforms - * The list of transformations to apply to the fields of the document, in - * order. - * This must not be empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The name of the document to transform. - * - * Generated from protobuf field string document = 1; - * @return string - */ - public function getDocument() - { - return $this->document; - } - - /** - * The name of the document to transform. - * - * Generated from protobuf field string document = 1; - * @param string $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkString($var, True); - $this->document = $var; - - return $this; - } - - /** - * The list of transformations to apply to the fields of the document, in - * order. - * This must not be empty. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFieldTransforms() - { - return $this->field_transforms; - } - - /** - * The list of transformations to apply to the fields of the document, in - * order. - * This must not be empty. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; - * @param array<\Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFieldTransforms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform::class); - $this->field_transforms = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php deleted file mode 100644 index 1372f46bd038..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php +++ /dev/null @@ -1,417 +0,0 @@ -google.firestore.v1.DocumentTransform.FieldTransform - */ -class FieldTransform extends \Google\Protobuf\Internal\Message -{ - /** - * The path of the field. See - * [Document.fields][google.firestore.v1.Document.fields] for the field path - * syntax reference. - * - * Generated from protobuf field string field_path = 1; - */ - protected $field_path = ''; - protected $transform_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field_path - * The path of the field. See - * [Document.fields][google.firestore.v1.Document.fields] for the field path - * syntax reference. - * @type int $set_to_server_value - * Sets the field to the given server value. - * @type \Google\Cloud\Firestore\V1\Value $increment - * Adds the given value to the field's current value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If either of the given value or the current field value are doubles, - * both values will be interpreted as doubles. Double arithmetic and - * representation of double values follow IEEE 754 semantics. - * If there is positive/negative integer overflow, the field is resolved - * to the largest magnitude positive/negative integer. - * @type \Google\Cloud\Firestore\V1\Value $maximum - * Sets the field to the maximum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If a maximum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the larger operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and - * zero input value is always the stored value. - * The maximum of any numeric value x and NaN is NaN. - * @type \Google\Cloud\Firestore\V1\Value $minimum - * Sets the field to the minimum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the input value. - * If a minimum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the smaller operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and - * zero input value is always the stored value. - * The minimum of any numeric value x and NaN is NaN. - * @type \Google\Cloud\Firestore\V1\ArrayValue $append_missing_elements - * Append the given elements in order if they are not already present in - * the current field value. - * If the field is not an array, or if the field does not yet exist, it is - * first set to the empty array. - * Equivalent numbers of different types (e.g. 3L and 3.0) are - * considered equal when checking if a value is missing. - * NaN is equal to NaN, and Null is equal to Null. - * If the input contains multiple equivalent values, only the first will - * be considered. - * The corresponding transform_result will be the null value. - * @type \Google\Cloud\Firestore\V1\ArrayValue $remove_all_from_array - * Remove all of the given elements from the array in the field. - * If the field is not an array, or if the field does not yet exist, it is - * set to the empty array. - * Equivalent numbers of the different types (e.g. 3L and 3.0) are - * considered equal when deciding whether an element should be removed. - * NaN is equal to NaN, and Null is equal to Null. - * This will remove all equivalent values if there are duplicates. - * The corresponding transform_result will be the null value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The path of the field. See - * [Document.fields][google.firestore.v1.Document.fields] for the field path - * syntax reference. - * - * Generated from protobuf field string field_path = 1; - * @return string - */ - public function getFieldPath() - { - return $this->field_path; - } - - /** - * The path of the field. See - * [Document.fields][google.firestore.v1.Document.fields] for the field path - * syntax reference. - * - * Generated from protobuf field string field_path = 1; - * @param string $var - * @return $this - */ - public function setFieldPath($var) - { - GPBUtil::checkString($var, True); - $this->field_path = $var; - - return $this; - } - - /** - * Sets the field to the given server value. - * - * Generated from protobuf field .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; - * @return int - */ - public function getSetToServerValue() - { - return $this->readOneof(2); - } - - public function hasSetToServerValue() - { - return $this->hasOneof(2); - } - - /** - * Sets the field to the given server value. - * - * Generated from protobuf field .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; - * @param int $var - * @return $this - */ - public function setSetToServerValue($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform\ServerValue::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Adds the given value to the field's current value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If either of the given value or the current field value are doubles, - * both values will be interpreted as doubles. Double arithmetic and - * representation of double values follow IEEE 754 semantics. - * If there is positive/negative integer overflow, the field is resolved - * to the largest magnitude positive/negative integer. - * - * Generated from protobuf field .google.firestore.v1.Value increment = 3; - * @return \Google\Cloud\Firestore\V1\Value|null - */ - public function getIncrement() - { - return $this->readOneof(3); - } - - public function hasIncrement() - { - return $this->hasOneof(3); - } - - /** - * Adds the given value to the field's current value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If either of the given value or the current field value are doubles, - * both values will be interpreted as doubles. Double arithmetic and - * representation of double values follow IEEE 754 semantics. - * If there is positive/negative integer overflow, the field is resolved - * to the largest magnitude positive/negative integer. - * - * Generated from protobuf field .google.firestore.v1.Value increment = 3; - * @param \Google\Cloud\Firestore\V1\Value $var - * @return $this - */ - public function setIncrement($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Sets the field to the maximum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If a maximum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the larger operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and - * zero input value is always the stored value. - * The maximum of any numeric value x and NaN is NaN. - * - * Generated from protobuf field .google.firestore.v1.Value maximum = 4; - * @return \Google\Cloud\Firestore\V1\Value|null - */ - public function getMaximum() - { - return $this->readOneof(4); - } - - public function hasMaximum() - { - return $this->hasOneof(4); - } - - /** - * Sets the field to the maximum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If a maximum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the larger operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and - * zero input value is always the stored value. - * The maximum of any numeric value x and NaN is NaN. - * - * Generated from protobuf field .google.firestore.v1.Value maximum = 4; - * @param \Google\Cloud\Firestore\V1\Value $var - * @return $this - */ - public function setMaximum($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Sets the field to the minimum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the input value. - * If a minimum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the smaller operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and - * zero input value is always the stored value. - * The minimum of any numeric value x and NaN is NaN. - * - * Generated from protobuf field .google.firestore.v1.Value minimum = 5; - * @return \Google\Cloud\Firestore\V1\Value|null - */ - public function getMinimum() - { - return $this->readOneof(5); - } - - public function hasMinimum() - { - return $this->hasOneof(5); - } - - /** - * Sets the field to the minimum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the input value. - * If a minimum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the smaller operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and - * zero input value is always the stored value. - * The minimum of any numeric value x and NaN is NaN. - * - * Generated from protobuf field .google.firestore.v1.Value minimum = 5; - * @param \Google\Cloud\Firestore\V1\Value $var - * @return $this - */ - public function setMinimum($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Append the given elements in order if they are not already present in - * the current field value. - * If the field is not an array, or if the field does not yet exist, it is - * first set to the empty array. - * Equivalent numbers of different types (e.g. 3L and 3.0) are - * considered equal when checking if a value is missing. - * NaN is equal to NaN, and Null is equal to Null. - * If the input contains multiple equivalent values, only the first will - * be considered. - * The corresponding transform_result will be the null value. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue append_missing_elements = 6; - * @return \Google\Cloud\Firestore\V1\ArrayValue|null - */ - public function getAppendMissingElements() - { - return $this->readOneof(6); - } - - public function hasAppendMissingElements() - { - return $this->hasOneof(6); - } - - /** - * Append the given elements in order if they are not already present in - * the current field value. - * If the field is not an array, or if the field does not yet exist, it is - * first set to the empty array. - * Equivalent numbers of different types (e.g. 3L and 3.0) are - * considered equal when checking if a value is missing. - * NaN is equal to NaN, and Null is equal to Null. - * If the input contains multiple equivalent values, only the first will - * be considered. - * The corresponding transform_result will be the null value. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue append_missing_elements = 6; - * @param \Google\Cloud\Firestore\V1\ArrayValue $var - * @return $this - */ - public function setAppendMissingElements($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ArrayValue::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Remove all of the given elements from the array in the field. - * If the field is not an array, or if the field does not yet exist, it is - * set to the empty array. - * Equivalent numbers of the different types (e.g. 3L and 3.0) are - * considered equal when deciding whether an element should be removed. - * NaN is equal to NaN, and Null is equal to Null. - * This will remove all equivalent values if there are duplicates. - * The corresponding transform_result will be the null value. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue remove_all_from_array = 7; - * @return \Google\Cloud\Firestore\V1\ArrayValue|null - */ - public function getRemoveAllFromArray() - { - return $this->readOneof(7); - } - - public function hasRemoveAllFromArray() - { - return $this->hasOneof(7); - } - - /** - * Remove all of the given elements from the array in the field. - * If the field is not an array, or if the field does not yet exist, it is - * set to the empty array. - * Equivalent numbers of the different types (e.g. 3L and 3.0) are - * considered equal when deciding whether an element should be removed. - * NaN is equal to NaN, and Null is equal to Null. - * This will remove all equivalent values if there are duplicates. - * The corresponding transform_result will be the null value. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue remove_all_from_array = 7; - * @param \Google\Cloud\Firestore\V1\ArrayValue $var - * @return $this - */ - public function setRemoveAllFromArray($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ArrayValue::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * @return string - */ - public function getTransformType() - { - return $this->whichOneof("transform_type"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FieldTransform::class, \Google\Cloud\Firestore\V1\DocumentTransform_FieldTransform::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php deleted file mode 100644 index 47d3356c025d..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php +++ /dev/null @@ -1,59 +0,0 @@ -google.firestore.v1.DocumentTransform.FieldTransform.ServerValue - */ -class ServerValue -{ - /** - * Unspecified. This value must not be used. - * - * Generated from protobuf enum SERVER_VALUE_UNSPECIFIED = 0; - */ - const SERVER_VALUE_UNSPECIFIED = 0; - /** - * The time at which the server processed the request, with millisecond - * precision. If used on multiple fields (same or different documents) in - * a transaction, all the fields will get the same server timestamp. - * - * Generated from protobuf enum REQUEST_TIME = 1; - */ - const REQUEST_TIME = 1; - - private static $valueToName = [ - self::SERVER_VALUE_UNSPECIFIED => 'SERVER_VALUE_UNSPECIFIED', - self::REQUEST_TIME => 'REQUEST_TIME', - ]; - - 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(ServerValue::class, \Google\Cloud\Firestore\V1\DocumentTransform_FieldTransform_ServerValue::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutionStats.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutionStats.php deleted file mode 100644 index bed2e60fbdcf..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutionStats.php +++ /dev/null @@ -1,237 +0,0 @@ -google.firestore.v1.ExecutionStats - */ -class ExecutionStats extends \Google\Protobuf\Internal\Message -{ - /** - * Total number of results returned, including documents, projections, - * aggregation results, keys. - * - * Generated from protobuf field int64 results_returned = 1; - */ - protected $results_returned = 0; - /** - * Total time to execute the query in the backend. - * - * Generated from protobuf field .google.protobuf.Duration execution_duration = 3; - */ - protected $execution_duration = null; - /** - * Total billable read operations. - * - * Generated from protobuf field int64 read_operations = 4; - */ - protected $read_operations = 0; - /** - * Debugging statistics from the execution of the query. Note that the - * debugging stats are subject to change as Firestore evolves. It could - * include: - * { - * "indexes_entries_scanned": "1000", - * "documents_scanned": "20", - * "billing_details" : { - * "documents_billable": "20", - * "index_entries_billable": "1000", - * "min_query_cost": "0" - * } - * } - * - * Generated from protobuf field .google.protobuf.Struct debug_stats = 5; - */ - protected $debug_stats = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $results_returned - * Total number of results returned, including documents, projections, - * aggregation results, keys. - * @type \Google\Protobuf\Duration $execution_duration - * Total time to execute the query in the backend. - * @type int|string $read_operations - * Total billable read operations. - * @type \Google\Protobuf\Struct $debug_stats - * Debugging statistics from the execution of the query. Note that the - * debugging stats are subject to change as Firestore evolves. It could - * include: - * { - * "indexes_entries_scanned": "1000", - * "documents_scanned": "20", - * "billing_details" : { - * "documents_billable": "20", - * "index_entries_billable": "1000", - * "min_query_cost": "0" - * } - * } - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\QueryProfile::initOnce(); - parent::__construct($data); - } - - /** - * Total number of results returned, including documents, projections, - * aggregation results, keys. - * - * Generated from protobuf field int64 results_returned = 1; - * @return int|string - */ - public function getResultsReturned() - { - return $this->results_returned; - } - - /** - * Total number of results returned, including documents, projections, - * aggregation results, keys. - * - * Generated from protobuf field int64 results_returned = 1; - * @param int|string $var - * @return $this - */ - public function setResultsReturned($var) - { - GPBUtil::checkInt64($var); - $this->results_returned = $var; - - return $this; - } - - /** - * Total time to execute the query in the backend. - * - * Generated from protobuf field .google.protobuf.Duration execution_duration = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getExecutionDuration() - { - return $this->execution_duration; - } - - public function hasExecutionDuration() - { - return isset($this->execution_duration); - } - - public function clearExecutionDuration() - { - unset($this->execution_duration); - } - - /** - * Total time to execute the query in the backend. - * - * Generated from protobuf field .google.protobuf.Duration execution_duration = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setExecutionDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->execution_duration = $var; - - return $this; - } - - /** - * Total billable read operations. - * - * Generated from protobuf field int64 read_operations = 4; - * @return int|string - */ - public function getReadOperations() - { - return $this->read_operations; - } - - /** - * Total billable read operations. - * - * Generated from protobuf field int64 read_operations = 4; - * @param int|string $var - * @return $this - */ - public function setReadOperations($var) - { - GPBUtil::checkInt64($var); - $this->read_operations = $var; - - return $this; - } - - /** - * Debugging statistics from the execution of the query. Note that the - * debugging stats are subject to change as Firestore evolves. It could - * include: - * { - * "indexes_entries_scanned": "1000", - * "documents_scanned": "20", - * "billing_details" : { - * "documents_billable": "20", - * "index_entries_billable": "1000", - * "min_query_cost": "0" - * } - * } - * - * Generated from protobuf field .google.protobuf.Struct debug_stats = 5; - * @return \Google\Protobuf\Struct|null - */ - public function getDebugStats() - { - return $this->debug_stats; - } - - public function hasDebugStats() - { - return isset($this->debug_stats); - } - - public function clearDebugStats() - { - unset($this->debug_stats); - } - - /** - * Debugging statistics from the execution of the query. Note that the - * debugging stats are subject to change as Firestore evolves. It could - * include: - * { - * "indexes_entries_scanned": "1000", - * "documents_scanned": "20", - * "billing_details" : { - * "documents_billable": "20", - * "index_entries_billable": "1000", - * "min_query_cost": "0" - * } - * } - * - * Generated from protobuf field .google.protobuf.Struct debug_stats = 5; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setDebugStats($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->debug_stats = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExistenceFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExistenceFilter.php deleted file mode 100644 index d6817e30b2fa..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExistenceFilter.php +++ /dev/null @@ -1,209 +0,0 @@ -google.firestore.v1.ExistenceFilter - */ -class ExistenceFilter extends \Google\Protobuf\Internal\Message -{ - /** - * The target ID to which this filter applies. - * - * Generated from protobuf field int32 target_id = 1; - */ - protected $target_id = 0; - /** - * The total count of documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id]. - * If different from the count of documents in the client that match, the - * client must manually determine which documents no longer match the target. - * The client can use the `unchanged_names` bloom filter to assist with - * this determination by testing ALL the document names against the filter; - * if the document name is NOT in the filter, it means the document no - * longer matches the target. - * - * Generated from protobuf field int32 count = 2; - */ - protected $count = 0; - /** - * A bloom filter that, despite its name, contains the UTF-8 byte encodings of - * the resource names of ALL the documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * This bloom filter may be omitted at the server's discretion, such as if it - * is deemed that the client will not make use of it or if it is too - * computationally expensive to calculate or transmit. Clients must gracefully - * handle this field being absent by falling back to the logic used before - * this field existed; that is, re-add the target without a resume token to - * figure out which documents in the client's cache are out of sync. - * - * Generated from protobuf field .google.firestore.v1.BloomFilter unchanged_names = 3; - */ - protected $unchanged_names = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $target_id - * The target ID to which this filter applies. - * @type int $count - * The total count of documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id]. - * If different from the count of documents in the client that match, the - * client must manually determine which documents no longer match the target. - * The client can use the `unchanged_names` bloom filter to assist with - * this determination by testing ALL the document names against the filter; - * if the document name is NOT in the filter, it means the document no - * longer matches the target. - * @type \Google\Cloud\Firestore\V1\BloomFilter $unchanged_names - * A bloom filter that, despite its name, contains the UTF-8 byte encodings of - * the resource names of ALL the documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * This bloom filter may be omitted at the server's discretion, such as if it - * is deemed that the client will not make use of it or if it is too - * computationally expensive to calculate or transmit. Clients must gracefully - * handle this field being absent by falling back to the logic used before - * this field existed; that is, re-add the target without a resume token to - * figure out which documents in the client's cache are out of sync. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The target ID to which this filter applies. - * - * Generated from protobuf field int32 target_id = 1; - * @return int - */ - public function getTargetId() - { - return $this->target_id; - } - - /** - * The target ID to which this filter applies. - * - * Generated from protobuf field int32 target_id = 1; - * @param int $var - * @return $this - */ - public function setTargetId($var) - { - GPBUtil::checkInt32($var); - $this->target_id = $var; - - return $this; - } - - /** - * The total count of documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id]. - * If different from the count of documents in the client that match, the - * client must manually determine which documents no longer match the target. - * The client can use the `unchanged_names` bloom filter to assist with - * this determination by testing ALL the document names against the filter; - * if the document name is NOT in the filter, it means the document no - * longer matches the target. - * - * Generated from protobuf field int32 count = 2; - * @return int - */ - public function getCount() - { - return $this->count; - } - - /** - * The total count of documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id]. - * If different from the count of documents in the client that match, the - * client must manually determine which documents no longer match the target. - * The client can use the `unchanged_names` bloom filter to assist with - * this determination by testing ALL the document names against the filter; - * if the document name is NOT in the filter, it means the document no - * longer matches the target. - * - * Generated from protobuf field int32 count = 2; - * @param int $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt32($var); - $this->count = $var; - - return $this; - } - - /** - * A bloom filter that, despite its name, contains the UTF-8 byte encodings of - * the resource names of ALL the documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * This bloom filter may be omitted at the server's discretion, such as if it - * is deemed that the client will not make use of it or if it is too - * computationally expensive to calculate or transmit. Clients must gracefully - * handle this field being absent by falling back to the logic used before - * this field existed; that is, re-add the target without a resume token to - * figure out which documents in the client's cache are out of sync. - * - * Generated from protobuf field .google.firestore.v1.BloomFilter unchanged_names = 3; - * @return \Google\Cloud\Firestore\V1\BloomFilter|null - */ - public function getUnchangedNames() - { - return $this->unchanged_names; - } - - public function hasUnchangedNames() - { - return isset($this->unchanged_names); - } - - public function clearUnchangedNames() - { - unset($this->unchanged_names); - } - - /** - * A bloom filter that, despite its name, contains the UTF-8 byte encodings of - * the resource names of ALL the documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * This bloom filter may be omitted at the server's discretion, such as if it - * is deemed that the client will not make use of it or if it is too - * computationally expensive to calculate or transmit. Clients must gracefully - * handle this field being absent by falling back to the logic used before - * this field existed; that is, re-add the target without a resume token to - * figure out which documents in the client's cache are out of sync. - * - * Generated from protobuf field .google.firestore.v1.BloomFilter unchanged_names = 3; - * @param \Google\Cloud\Firestore\V1\BloomFilter $var - * @return $this - */ - public function setUnchangedNames($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\BloomFilter::class); - $this->unchanged_names = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainMetrics.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainMetrics.php deleted file mode 100644 index 393a0963761d..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainMetrics.php +++ /dev/null @@ -1,129 +0,0 @@ -google.firestore.v1.ExplainMetrics - */ -class ExplainMetrics extends \Google\Protobuf\Internal\Message -{ - /** - * Planning phase information for the query. - * - * Generated from protobuf field .google.firestore.v1.PlanSummary plan_summary = 1; - */ - protected $plan_summary = null; - /** - * Aggregated stats from the execution of the query. Only present when - * [ExplainOptions.analyze][google.firestore.v1.ExplainOptions.analyze] is set - * to true. - * - * Generated from protobuf field .google.firestore.v1.ExecutionStats execution_stats = 2; - */ - protected $execution_stats = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\PlanSummary $plan_summary - * Planning phase information for the query. - * @type \Google\Cloud\Firestore\V1\ExecutionStats $execution_stats - * Aggregated stats from the execution of the query. Only present when - * [ExplainOptions.analyze][google.firestore.v1.ExplainOptions.analyze] is set - * to true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\QueryProfile::initOnce(); - parent::__construct($data); - } - - /** - * Planning phase information for the query. - * - * Generated from protobuf field .google.firestore.v1.PlanSummary plan_summary = 1; - * @return \Google\Cloud\Firestore\V1\PlanSummary|null - */ - public function getPlanSummary() - { - return $this->plan_summary; - } - - public function hasPlanSummary() - { - return isset($this->plan_summary); - } - - public function clearPlanSummary() - { - unset($this->plan_summary); - } - - /** - * Planning phase information for the query. - * - * Generated from protobuf field .google.firestore.v1.PlanSummary plan_summary = 1; - * @param \Google\Cloud\Firestore\V1\PlanSummary $var - * @return $this - */ - public function setPlanSummary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\PlanSummary::class); - $this->plan_summary = $var; - - return $this; - } - - /** - * Aggregated stats from the execution of the query. Only present when - * [ExplainOptions.analyze][google.firestore.v1.ExplainOptions.analyze] is set - * to true. - * - * Generated from protobuf field .google.firestore.v1.ExecutionStats execution_stats = 2; - * @return \Google\Cloud\Firestore\V1\ExecutionStats|null - */ - public function getExecutionStats() - { - return $this->execution_stats; - } - - public function hasExecutionStats() - { - return isset($this->execution_stats); - } - - public function clearExecutionStats() - { - unset($this->execution_stats); - } - - /** - * Aggregated stats from the execution of the query. Only present when - * [ExplainOptions.analyze][google.firestore.v1.ExplainOptions.analyze] is set - * to true. - * - * Generated from protobuf field .google.firestore.v1.ExecutionStats execution_stats = 2; - * @param \Google\Cloud\Firestore\V1\ExecutionStats $var - * @return $this - */ - public function setExecutionStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExecutionStats::class); - $this->execution_stats = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainOptions.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainOptions.php deleted file mode 100644 index cb6e2384de90..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainOptions.php +++ /dev/null @@ -1,83 +0,0 @@ -google.firestore.v1.ExplainOptions - */ -class ExplainOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Whether to execute this query. - * When false (the default), the query will be planned, returning only - * metrics from the planning stages. - * When true, the query will be planned and executed, returning the full - * query results along with both planning and execution stage metrics. - * - * Generated from protobuf field bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $analyze = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $analyze - * Optional. Whether to execute this query. - * When false (the default), the query will be planned, returning only - * metrics from the planning stages. - * When true, the query will be planned and executed, returning the full - * query results along with both planning and execution stage metrics. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\QueryProfile::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Whether to execute this query. - * When false (the default), the query will be planned, returning only - * metrics from the planning stages. - * When true, the query will be planned and executed, returning the full - * query results along with both planning and execution stage metrics. - * - * Generated from protobuf field bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAnalyze() - { - return $this->analyze; - } - - /** - * Optional. Whether to execute this query. - * When false (the default), the query will be planned, returning only - * metrics from the planning stages. - * When true, the query will be planned and executed, returning the full - * query results along with both planning and execution stage metrics. - * - * Generated from protobuf field bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAnalyze($var) - { - GPBUtil::checkBool($var); - $this->analyze = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php deleted file mode 100644 index 7342dfd8c590..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php +++ /dev/null @@ -1,208 +0,0 @@ -google.firestore.v1.GetDocumentRequest - */ -class GetDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Document to get. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 2; - */ - protected $mask = null; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the Document to get. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type \Google\Cloud\Firestore\V1\DocumentMask $mask - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * @type string $transaction - * Reads the document in a transaction. - * @type \Google\Protobuf\Timestamp $read_time - * Reads the version of the document at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Document to get. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * 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 Document to get. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * 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; - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 2; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getMask() - { - return $this->mask; - } - - public function hasMask() - { - return isset($this->mask); - } - - public function clearMask() - { - unset($this->mask); - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 2; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->mask = $var; - - return $this; - } - - /** - * Reads the document in a transaction. - * - * Generated from protobuf field bytes transaction = 3; - * @return string - */ - public function getTransaction() - { - return $this->readOneof(3); - } - - public function hasTransaction() - { - return $this->hasOneof(3); - } - - /** - * Reads the document in a transaction. - * - * Generated from protobuf field bytes transaction = 3; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Reads the version of the document at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(5); - } - - public function hasReadTime() - { - return $this->hasOneof(5); - } - - /** - * Reads the version of the document at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php deleted file mode 100644 index 7603b7a00593..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php +++ /dev/null @@ -1,219 +0,0 @@ -google.firestore.v1.ListCollectionIdsRequest - */ -class ListCollectionIdsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent document. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * The maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token. Must be a value from - * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - protected $consistency_selector; - - /** - * @param string $parent Required. The parent document. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * @return \Google\Cloud\Firestore\V1\ListCollectionIdsRequest - * - * @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 parent document. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @type int $page_size - * The maximum number of results to return. - * @type string $page_token - * A page token. Must be a value from - * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. - * @type \Google\Protobuf\Timestamp $read_time - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent document. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent document. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token. Must be a value from - * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token. Must be a value from - * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(4); - } - - public function hasReadTime() - { - return $this->hasOneof(4); - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php deleted file mode 100644 index b31178cf5166..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php +++ /dev/null @@ -1,102 +0,0 @@ -google.firestore.v1.ListCollectionIdsResponse - */ -class ListCollectionIdsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The collection ids. - * - * Generated from protobuf field repeated string collection_ids = 1; - */ - private $collection_ids; - /** - * A page token that may be used to continue the list. - * - * 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\Protobuf\Internal\RepeatedField $collection_ids - * The collection ids. - * @type string $next_page_token - * A page token that may be used to continue the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The collection ids. - * - * Generated from protobuf field repeated string collection_ids = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * The collection ids. - * - * Generated from protobuf field repeated string collection_ids = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * A page token that may be used to continue the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A page token that may be used to continue the list. - * - * 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/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php deleted file mode 100644 index 51ea08cec401..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php +++ /dev/null @@ -1,462 +0,0 @@ -google.firestore.v1.ListDocumentsRequest - */ -class ListDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Optional. The collection ID, relative to `parent`, to list. - * For example: `chatrooms` or `messages`. - * This is optional, and when not provided, Firestore will list documents - * from all collections under the provided `parent`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $collection_id = ''; - /** - * Optional. The maximum number of documents to return in a single response. - * Firestore may return fewer than this value. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from a previous `ListDocuments` response. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters (with the exception of `page_size`) must match the values set - * in the request that generated the page token. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The optional ordering of the documents to return. - * For example: `priority desc, __name__ desc`. - * This mirrors the [`ORDER BY`][google.firestore.v1.StructuredQuery.order_by] - * used in Firestore queries but in a string representation. When absent, - * documents are ordered based on `__name__ ASC`. - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - /** - * Optional. The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mask = null; - /** - * If the list should show missing documents. - * A document is missing if it does not exist, but there are sub-documents - * nested underneath it. When true, such missing documents will be returned - * with a key but will not have fields, - * [`create_time`][google.firestore.v1.Document.create_time], or - * [`update_time`][google.firestore.v1.Document.update_time] set. - * Requests with `show_missing` may not specify `where` or `order_by`. - * - * Generated from protobuf field bool show_missing = 12; - */ - protected $show_missing = false; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @type string $collection_id - * Optional. The collection ID, relative to `parent`, to list. - * For example: `chatrooms` or `messages`. - * This is optional, and when not provided, Firestore will list documents - * from all collections under the provided `parent`. - * @type int $page_size - * Optional. The maximum number of documents to return in a single response. - * Firestore may return fewer than this value. - * @type string $page_token - * Optional. A page token, received from a previous `ListDocuments` response. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters (with the exception of `page_size`) must match the values set - * in the request that generated the page token. - * @type string $order_by - * Optional. The optional ordering of the documents to return. - * For example: `priority desc, __name__ desc`. - * This mirrors the [`ORDER BY`][google.firestore.v1.StructuredQuery.order_by] - * used in Firestore queries but in a string representation. When absent, - * documents are ordered based on `__name__ ASC`. - * @type \Google\Cloud\Firestore\V1\DocumentMask $mask - * Optional. The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field - * will not be returned in the response. - * @type string $transaction - * Perform the read as part of an already active transaction. - * @type \Google\Protobuf\Timestamp $read_time - * Perform the read at the provided time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * @type bool $show_missing - * If the list should show missing documents. - * A document is missing if it does not exist, but there are sub-documents - * nested underneath it. When true, such missing documents will be returned - * with a key but will not have fields, - * [`create_time`][google.firestore.v1.Document.create_time], or - * [`update_time`][google.firestore.v1.Document.update_time] set. - * Requests with `show_missing` may not specify `where` or `order_by`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The collection ID, relative to `parent`, to list. - * For example: `chatrooms` or `messages`. - * This is optional, and when not provided, Firestore will list documents - * from all collections under the provided `parent`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCollectionId() - { - return $this->collection_id; - } - - /** - * Optional. The collection ID, relative to `parent`, to list. - * For example: `chatrooms` or `messages`. - * This is optional, and when not provided, Firestore will list documents - * from all collections under the provided `parent`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCollectionId($var) - { - GPBUtil::checkString($var, True); - $this->collection_id = $var; - - return $this; - } - - /** - * Optional. The maximum number of documents to return in a single response. - * Firestore may return fewer than this value. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of documents to return in a single response. - * Firestore may return fewer than this value. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A page token, received from a previous `ListDocuments` response. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters (with the exception of `page_size`) must match the values set - * in the request that generated the page token. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token, received from a previous `ListDocuments` response. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters (with the exception of `page_size`) must match the values set - * in the request that generated the page token. - * - * Generated from protobuf field string page_token = 4 [(.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. The optional ordering of the documents to return. - * For example: `priority desc, __name__ desc`. - * This mirrors the [`ORDER BY`][google.firestore.v1.StructuredQuery.order_by] - * used in Firestore queries but in a string representation. When absent, - * documents are ordered based on `__name__ ASC`. - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. The optional ordering of the documents to return. - * For example: `priority desc, __name__ desc`. - * This mirrors the [`ORDER BY`][google.firestore.v1.StructuredQuery.order_by] - * used in Firestore queries but in a string representation. When absent, - * documents are ordered based on `__name__ ASC`. - * - * 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; - } - - /** - * Optional. The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getMask() - { - return $this->mask; - } - - public function hasMask() - { - return isset($this->mask); - } - - public function clearMask() - { - unset($this->mask); - } - - /** - * Optional. The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->mask = $var; - - return $this; - } - - /** - * Perform the read as part of an already active transaction. - * - * Generated from protobuf field bytes transaction = 8; - * @return string - */ - public function getTransaction() - { - return $this->readOneof(8); - } - - public function hasTransaction() - { - return $this->hasOneof(8); - } - - /** - * Perform the read as part of an already active transaction. - * - * Generated from protobuf field bytes transaction = 8; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Perform the read at the provided time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(10); - } - - public function hasReadTime() - { - return $this->hasOneof(10); - } - - /** - * Perform the read at the provided time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * If the list should show missing documents. - * A document is missing if it does not exist, but there are sub-documents - * nested underneath it. When true, such missing documents will be returned - * with a key but will not have fields, - * [`create_time`][google.firestore.v1.Document.create_time], or - * [`update_time`][google.firestore.v1.Document.update_time] set. - * Requests with `show_missing` may not specify `where` or `order_by`. - * - * Generated from protobuf field bool show_missing = 12; - * @return bool - */ - public function getShowMissing() - { - return $this->show_missing; - } - - /** - * If the list should show missing documents. - * A document is missing if it does not exist, but there are sub-documents - * nested underneath it. When true, such missing documents will be returned - * with a key but will not have fields, - * [`create_time`][google.firestore.v1.Document.create_time], or - * [`update_time`][google.firestore.v1.Document.update_time] set. - * Requests with `show_missing` may not specify `where` or `order_by`. - * - * Generated from protobuf field bool show_missing = 12; - * @param bool $var - * @return $this - */ - public function setShowMissing($var) - { - GPBUtil::checkBool($var); - $this->show_missing = $var; - - return $this; - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php deleted file mode 100644 index 3608a134151d..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.firestore.v1.ListDocumentsResponse - */ -class ListDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The Documents found. - * - * Generated from protobuf field repeated .google.firestore.v1.Document documents = 1; - */ - private $documents; - /** - * A token to retrieve the next page of documents. - * If this field is omitted, there are no subsequent pages. - * - * 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\Firestore\V1\Document>|\Google\Protobuf\Internal\RepeatedField $documents - * The Documents found. - * @type string $next_page_token - * A token to retrieve the next page of documents. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The Documents found. - * - * Generated from protobuf field repeated .google.firestore.v1.Document documents = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDocuments() - { - return $this->documents; - } - - /** - * The Documents found. - * - * Generated from protobuf field repeated .google.firestore.v1.Document documents = 1; - * @param array<\Google\Cloud\Firestore\V1\Document>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDocuments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Document::class); - $this->documents = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of documents. - * If this field is omitted, there are no subsequent pages. - * - * 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 documents. - * If this field is omitted, there are no subsequent pages. - * - * 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/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php deleted file mode 100644 index 8fb415f4ed4b..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php +++ /dev/null @@ -1,180 +0,0 @@ -google.firestore.v1.ListenRequest - */ -class ListenRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * Labels associated with this target change. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - protected $target_change; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type \Google\Cloud\Firestore\V1\Target $add_target - * A target to add to this stream. - * @type int $remove_target - * The ID of a target to remove from this stream. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels associated with this target change. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * A target to add to this stream. - * - * Generated from protobuf field .google.firestore.v1.Target add_target = 2; - * @return \Google\Cloud\Firestore\V1\Target|null - */ - public function getAddTarget() - { - return $this->readOneof(2); - } - - public function hasAddTarget() - { - return $this->hasOneof(2); - } - - /** - * A target to add to this stream. - * - * Generated from protobuf field .google.firestore.v1.Target add_target = 2; - * @param \Google\Cloud\Firestore\V1\Target $var - * @return $this - */ - public function setAddTarget($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The ID of a target to remove from this stream. - * - * Generated from protobuf field int32 remove_target = 3; - * @return int - */ - public function getRemoveTarget() - { - return $this->readOneof(3); - } - - public function hasRemoveTarget() - { - return $this->hasOneof(3); - } - - /** - * The ID of a target to remove from this stream. - * - * Generated from protobuf field int32 remove_target = 3; - * @param int $var - * @return $this - */ - public function setRemoveTarget($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Labels associated with this target change. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels associated with this target change. - * - * Generated from protobuf field map labels = 4; - * @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; - } - - /** - * @return string - */ - public function getTargetChange() - { - return $this->whichOneof("target_change"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php deleted file mode 100644 index 64234422f378..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php +++ /dev/null @@ -1,219 +0,0 @@ -google.firestore.v1.ListenResponse - */ -class ListenResponse extends \Google\Protobuf\Internal\Message -{ - protected $response_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\TargetChange $target_change - * Targets have changed. - * @type \Google\Cloud\Firestore\V1\DocumentChange $document_change - * A [Document][google.firestore.v1.Document] has changed. - * @type \Google\Cloud\Firestore\V1\DocumentDelete $document_delete - * A [Document][google.firestore.v1.Document] has been deleted. - * @type \Google\Cloud\Firestore\V1\DocumentRemove $document_remove - * A [Document][google.firestore.v1.Document] has been removed from a target - * (because it is no longer relevant to that target). - * @type \Google\Cloud\Firestore\V1\ExistenceFilter $filter - * A filter to apply to the set of documents previously returned for the - * given target. - * Returned when documents may have been removed from the given target, but - * the exact documents are unknown. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Targets have changed. - * - * Generated from protobuf field .google.firestore.v1.TargetChange target_change = 2; - * @return \Google\Cloud\Firestore\V1\TargetChange|null - */ - public function getTargetChange() - { - return $this->readOneof(2); - } - - public function hasTargetChange() - { - return $this->hasOneof(2); - } - - /** - * Targets have changed. - * - * Generated from protobuf field .google.firestore.v1.TargetChange target_change = 2; - * @param \Google\Cloud\Firestore\V1\TargetChange $var - * @return $this - */ - public function setTargetChange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TargetChange::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A [Document][google.firestore.v1.Document] has changed. - * - * Generated from protobuf field .google.firestore.v1.DocumentChange document_change = 3; - * @return \Google\Cloud\Firestore\V1\DocumentChange|null - */ - public function getDocumentChange() - { - return $this->readOneof(3); - } - - public function hasDocumentChange() - { - return $this->hasOneof(3); - } - - /** - * A [Document][google.firestore.v1.Document] has changed. - * - * Generated from protobuf field .google.firestore.v1.DocumentChange document_change = 3; - * @param \Google\Cloud\Firestore\V1\DocumentChange $var - * @return $this - */ - public function setDocumentChange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentChange::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * A [Document][google.firestore.v1.Document] has been deleted. - * - * Generated from protobuf field .google.firestore.v1.DocumentDelete document_delete = 4; - * @return \Google\Cloud\Firestore\V1\DocumentDelete|null - */ - public function getDocumentDelete() - { - return $this->readOneof(4); - } - - public function hasDocumentDelete() - { - return $this->hasOneof(4); - } - - /** - * A [Document][google.firestore.v1.Document] has been deleted. - * - * Generated from protobuf field .google.firestore.v1.DocumentDelete document_delete = 4; - * @param \Google\Cloud\Firestore\V1\DocumentDelete $var - * @return $this - */ - public function setDocumentDelete($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentDelete::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * A [Document][google.firestore.v1.Document] has been removed from a target - * (because it is no longer relevant to that target). - * - * Generated from protobuf field .google.firestore.v1.DocumentRemove document_remove = 6; - * @return \Google\Cloud\Firestore\V1\DocumentRemove|null - */ - public function getDocumentRemove() - { - return $this->readOneof(6); - } - - public function hasDocumentRemove() - { - return $this->hasOneof(6); - } - - /** - * A [Document][google.firestore.v1.Document] has been removed from a target - * (because it is no longer relevant to that target). - * - * Generated from protobuf field .google.firestore.v1.DocumentRemove document_remove = 6; - * @param \Google\Cloud\Firestore\V1\DocumentRemove $var - * @return $this - */ - public function setDocumentRemove($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentRemove::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * A filter to apply to the set of documents previously returned for the - * given target. - * Returned when documents may have been removed from the given target, but - * the exact documents are unknown. - * - * Generated from protobuf field .google.firestore.v1.ExistenceFilter filter = 5; - * @return \Google\Cloud\Firestore\V1\ExistenceFilter|null - */ - public function getFilter() - { - return $this->readOneof(5); - } - - public function hasFilter() - { - return $this->hasOneof(5); - } - - /** - * A filter to apply to the set of documents previously returned for the - * given target. - * Returned when documents may have been removed from the given target, but - * the exact documents are unknown. - * - * Generated from protobuf field .google.firestore.v1.ExistenceFilter filter = 5; - * @param \Google\Cloud\Firestore\V1\ExistenceFilter $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExistenceFilter::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getResponseType() - { - return $this->whichOneof("response_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php deleted file mode 100644 index fa811000207c..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php +++ /dev/null @@ -1,83 +0,0 @@ -google.firestore.v1.MapValue - */ -class MapValue extends \Google\Protobuf\Internal\Message -{ - /** - * The map's fields. - * The map keys represent field names. Field names matching the regular - * expression `__.*__` are reserved. Reserved field names are forbidden except - * in certain documented contexts. The map keys, represented as UTF-8, must - * not exceed 1,500 bytes and cannot be empty. - * - * Generated from protobuf field map fields = 1; - */ - private $fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $fields - * The map's fields. - * The map keys represent field names. Field names matching the regular - * expression `__.*__` are reserved. Reserved field names are forbidden except - * in certain documented contexts. The map keys, represented as UTF-8, must - * not exceed 1,500 bytes and cannot be empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * The map's fields. - * The map keys represent field names. Field names matching the regular - * expression `__.*__` are reserved. Reserved field names are forbidden except - * in certain documented contexts. The map keys, represented as UTF-8, must - * not exceed 1,500 bytes and cannot be empty. - * - * Generated from protobuf field map fields = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getFields() - { - return $this->fields; - } - - /** - * The map's fields. - * The map keys represent field names. Field names matching the regular - * expression `__.*__` are reserved. Reserved field names are forbidden except - * in certain documented contexts. The map keys, represented as UTF-8, must - * not exceed 1,500 bytes and cannot be empty. - * - * Generated from protobuf field map fields = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->fields = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php deleted file mode 100644 index 9b09a390000e..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php +++ /dev/null @@ -1,364 +0,0 @@ -google.firestore.v1.PartitionQueryRequest - */ -class PartitionQueryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents`. - * Document resource names are not supported; only database resource names - * can be specified. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * The desired maximum number of partition points. - * The partitions may be returned across multiple pages of results. - * The number must be positive. The actual number of partitions - * returned may be fewer. - * For example, this may be set to one fewer than the number of parallel - * queries to be run, or in running a data pipeline job, one fewer than the - * number of workers or compute instances available. - * - * Generated from protobuf field int64 partition_count = 3; - */ - protected $partition_count = 0; - /** - * The `next_page_token` value returned from a previous call to - * PartitionQuery that may be used to get an additional set of results. - * There are no ordering guarantees between sets of results. Thus, using - * multiple sets of results will require merging the different result sets. - * For example, two subsequent calls using a page_token may return: - * * cursor B, cursor M, cursor Q - * * cursor A, cursor U, cursor W - * To obtain a complete result set ordered with respect to the results of the - * query supplied to PartitionQuery, the results sets should be merged: - * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - /** - * The maximum number of partitions to return in this call, subject to - * `partition_count`. - * For example, if `partition_count` = 10 and `page_size` = 8, the first call - * to PartitionQuery will return up to 8 partitions and a `next_page_token` - * if more results exist. A second call to PartitionQuery will return up to - * 2 partitions, to complete the total of 10 specified in `partition_count`. - * - * Generated from protobuf field int32 page_size = 5; - */ - protected $page_size = 0; - protected $query_type; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents`. - * Document resource names are not supported; only database resource names - * can be specified. - * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query - * A structured query. - * Query must specify collection with all descendants and be ordered by name - * ascending. Other filters, order bys, limits, offsets, and start/end - * cursors are not supported. - * @type int|string $partition_count - * The desired maximum number of partition points. - * The partitions may be returned across multiple pages of results. - * The number must be positive. The actual number of partitions - * returned may be fewer. - * For example, this may be set to one fewer than the number of parallel - * queries to be run, or in running a data pipeline job, one fewer than the - * number of workers or compute instances available. - * @type string $page_token - * The `next_page_token` value returned from a previous call to - * PartitionQuery that may be used to get an additional set of results. - * There are no ordering guarantees between sets of results. Thus, using - * multiple sets of results will require merging the different result sets. - * For example, two subsequent calls using a page_token may return: - * * cursor B, cursor M, cursor Q - * * cursor A, cursor U, cursor W - * To obtain a complete result set ordered with respect to the results of the - * query supplied to PartitionQuery, the results sets should be merged: - * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W - * @type int $page_size - * The maximum number of partitions to return in this call, subject to - * `partition_count`. - * For example, if `partition_count` = 10 and `page_size` = 8, the first call - * to PartitionQuery will return up to 8 partitions and a `next_page_token` - * if more results exist. A second call to PartitionQuery will return up to - * 2 partitions, to complete the total of 10 specified in `partition_count`. - * @type \Google\Protobuf\Timestamp $read_time - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents`. - * Document resource names are not supported; only database resource names - * can be specified. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents`. - * Document resource names are not supported; only database resource names - * can be specified. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * A structured query. - * Query must specify collection with all descendants and be ordered by name - * ascending. Other filters, order bys, limits, offsets, and start/end - * cursors are not supported. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @return \Google\Cloud\Firestore\V1\StructuredQuery|null - */ - public function getStructuredQuery() - { - return $this->readOneof(2); - } - - public function hasStructuredQuery() - { - return $this->hasOneof(2); - } - - /** - * A structured query. - * Query must specify collection with all descendants and be ordered by name - * ascending. Other filters, order bys, limits, offsets, and start/end - * cursors are not supported. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery $var - * @return $this - */ - public function setStructuredQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The desired maximum number of partition points. - * The partitions may be returned across multiple pages of results. - * The number must be positive. The actual number of partitions - * returned may be fewer. - * For example, this may be set to one fewer than the number of parallel - * queries to be run, or in running a data pipeline job, one fewer than the - * number of workers or compute instances available. - * - * Generated from protobuf field int64 partition_count = 3; - * @return int|string - */ - public function getPartitionCount() - { - return $this->partition_count; - } - - /** - * The desired maximum number of partition points. - * The partitions may be returned across multiple pages of results. - * The number must be positive. The actual number of partitions - * returned may be fewer. - * For example, this may be set to one fewer than the number of parallel - * queries to be run, or in running a data pipeline job, one fewer than the - * number of workers or compute instances available. - * - * Generated from protobuf field int64 partition_count = 3; - * @param int|string $var - * @return $this - */ - public function setPartitionCount($var) - { - GPBUtil::checkInt64($var); - $this->partition_count = $var; - - return $this; - } - - /** - * The `next_page_token` value returned from a previous call to - * PartitionQuery that may be used to get an additional set of results. - * There are no ordering guarantees between sets of results. Thus, using - * multiple sets of results will require merging the different result sets. - * For example, two subsequent calls using a page_token may return: - * * cursor B, cursor M, cursor Q - * * cursor A, cursor U, cursor W - * To obtain a complete result set ordered with respect to the results of the - * query supplied to PartitionQuery, the results sets should be merged: - * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `next_page_token` value returned from a previous call to - * PartitionQuery that may be used to get an additional set of results. - * There are no ordering guarantees between sets of results. Thus, using - * multiple sets of results will require merging the different result sets. - * For example, two subsequent calls using a page_token may return: - * * cursor B, cursor M, cursor Q - * * cursor A, cursor U, cursor W - * To obtain a complete result set ordered with respect to the results of the - * query supplied to PartitionQuery, the results sets should be merged: - * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W - * - * Generated from protobuf field string page_token = 4; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The maximum number of partitions to return in this call, subject to - * `partition_count`. - * For example, if `partition_count` = 10 and `page_size` = 8, the first call - * to PartitionQuery will return up to 8 partitions and a `next_page_token` - * if more results exist. A second call to PartitionQuery will return up to - * 2 partitions, to complete the total of 10 specified in `partition_count`. - * - * Generated from protobuf field int32 page_size = 5; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of partitions to return in this call, subject to - * `partition_count`. - * For example, if `partition_count` = 10 and `page_size` = 8, the first call - * to PartitionQuery will return up to 8 partitions and a `next_page_token` - * if more results exist. A second call to PartitionQuery will return up to - * 2 partitions, to complete the total of 10 specified in `partition_count`. - * - * Generated from protobuf field int32 page_size = 5; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(6); - } - - public function hasReadTime() - { - return $this->hasOneof(6); - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getQueryType() - { - return $this->whichOneof("query_type"); - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php deleted file mode 100644 index d6281a637903..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php +++ /dev/null @@ -1,162 +0,0 @@ -google.firestore.v1.PartitionQueryResponse - */ -class PartitionQueryResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Partition results. - * Each partition is a split point that can be used by RunQuery as a starting - * or end point for the query results. The RunQuery requests must be made with - * the same query supplied to this PartitionQuery request. The partition - * cursors will be ordered according to same ordering as the results of the - * query supplied to PartitionQuery. - * For example, if a PartitionQuery request returns partition cursors A and B, - * running the following three queries will return the entire result set of - * the original query: - * * query, end_at A - * * query, start_at A, end_at B - * * query, start_at B - * An empty result may indicate that the query has too few results to be - * partitioned, or that the query is not yet supported for partitioning. - * - * Generated from protobuf field repeated .google.firestore.v1.Cursor partitions = 1; - */ - private $partitions; - /** - * A page token that may be used to request an additional set of results, up - * to the number specified by `partition_count` in the PartitionQuery request. - * If blank, there are no more 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\Firestore\V1\Cursor>|\Google\Protobuf\Internal\RepeatedField $partitions - * Partition results. - * Each partition is a split point that can be used by RunQuery as a starting - * or end point for the query results. The RunQuery requests must be made with - * the same query supplied to this PartitionQuery request. The partition - * cursors will be ordered according to same ordering as the results of the - * query supplied to PartitionQuery. - * For example, if a PartitionQuery request returns partition cursors A and B, - * running the following three queries will return the entire result set of - * the original query: - * * query, end_at A - * * query, start_at A, end_at B - * * query, start_at B - * An empty result may indicate that the query has too few results to be - * partitioned, or that the query is not yet supported for partitioning. - * @type string $next_page_token - * A page token that may be used to request an additional set of results, up - * to the number specified by `partition_count` in the PartitionQuery request. - * If blank, there are no more results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Partition results. - * Each partition is a split point that can be used by RunQuery as a starting - * or end point for the query results. The RunQuery requests must be made with - * the same query supplied to this PartitionQuery request. The partition - * cursors will be ordered according to same ordering as the results of the - * query supplied to PartitionQuery. - * For example, if a PartitionQuery request returns partition cursors A and B, - * running the following three queries will return the entire result set of - * the original query: - * * query, end_at A - * * query, start_at A, end_at B - * * query, start_at B - * An empty result may indicate that the query has too few results to be - * partitioned, or that the query is not yet supported for partitioning. - * - * Generated from protobuf field repeated .google.firestore.v1.Cursor partitions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPartitions() - { - return $this->partitions; - } - - /** - * Partition results. - * Each partition is a split point that can be used by RunQuery as a starting - * or end point for the query results. The RunQuery requests must be made with - * the same query supplied to this PartitionQuery request. The partition - * cursors will be ordered according to same ordering as the results of the - * query supplied to PartitionQuery. - * For example, if a PartitionQuery request returns partition cursors A and B, - * running the following three queries will return the entire result set of - * the original query: - * * query, end_at A - * * query, start_at A, end_at B - * * query, start_at B - * An empty result may indicate that the query has too few results to be - * partitioned, or that the query is not yet supported for partitioning. - * - * Generated from protobuf field repeated .google.firestore.v1.Cursor partitions = 1; - * @param array<\Google\Cloud\Firestore\V1\Cursor>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPartitions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Cursor::class); - $this->partitions = $arr; - - return $this; - } - - /** - * A page token that may be used to request an additional set of results, up - * to the number specified by `partition_count` in the PartitionQuery request. - * If blank, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A page token that may be used to request an additional set of results, up - * to the number specified by `partition_count` in the PartitionQuery request. - * If blank, there are no more 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/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PlanSummary.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PlanSummary.php deleted file mode 100644 index 5e86c432c547..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PlanSummary.php +++ /dev/null @@ -1,83 +0,0 @@ -google.firestore.v1.PlanSummary - */ -class PlanSummary extends \Google\Protobuf\Internal\Message -{ - /** - * The indexes selected for the query. For example: - * [ - * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, - * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} - * ] - * - * Generated from protobuf field repeated .google.protobuf.Struct indexes_used = 1; - */ - private $indexes_used; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Protobuf\Struct>|\Google\Protobuf\Internal\RepeatedField $indexes_used - * The indexes selected for the query. For example: - * [ - * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, - * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} - * ] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\QueryProfile::initOnce(); - parent::__construct($data); - } - - /** - * The indexes selected for the query. For example: - * [ - * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, - * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} - * ] - * - * Generated from protobuf field repeated .google.protobuf.Struct indexes_used = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIndexesUsed() - { - return $this->indexes_used; - } - - /** - * The indexes selected for the query. For example: - * [ - * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, - * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} - * ] - * - * Generated from protobuf field repeated .google.protobuf.Struct indexes_used = 1; - * @param array<\Google\Protobuf\Struct>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIndexesUsed($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Struct::class); - $this->indexes_used = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php deleted file mode 100644 index 7f7b92595750..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php +++ /dev/null @@ -1,114 +0,0 @@ -google.firestore.v1.Precondition - */ -class Precondition extends \Google\Protobuf\Internal\Message -{ - protected $condition_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $exists - * When set to `true`, the target document must exist. - * When set to `false`, the target document must not exist. - * @type \Google\Protobuf\Timestamp $update_time - * When set, the target document must exist and have been last updated at - * that time. Timestamp must be microsecond aligned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * When set to `true`, the target document must exist. - * When set to `false`, the target document must not exist. - * - * Generated from protobuf field bool exists = 1; - * @return bool - */ - public function getExists() - { - return $this->readOneof(1); - } - - public function hasExists() - { - return $this->hasOneof(1); - } - - /** - * When set to `true`, the target document must exist. - * When set to `false`, the target document must not exist. - * - * Generated from protobuf field bool exists = 1; - * @param bool $var - * @return $this - */ - public function setExists($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * When set, the target document must exist and have been last updated at - * that time. Timestamp must be microsecond aligned. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->readOneof(2); - } - - public function hasUpdateTime() - { - return $this->hasOneof(2); - } - - /** - * When set, the target document must exist and have been last updated at - * that time. Timestamp must be microsecond aligned. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getConditionType() - { - return $this->whichOneof("condition_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php deleted file mode 100644 index 8a1dca5d7d53..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php +++ /dev/null @@ -1,121 +0,0 @@ -google.firestore.v1.RollbackRequest - */ -class RollbackRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * Required. The transaction to roll back. - * - * Generated from protobuf field bytes transaction = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $transaction = ''; - - /** - * @param string $database Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @param string $transaction Required. The transaction to roll back. - * - * @return \Google\Cloud\Firestore\V1\RollbackRequest - * - * @experimental - */ - public static function build(string $database, string $transaction): self - { - return (new self()) - ->setDatabase($database) - ->setTransaction($transaction); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type string $transaction - * Required. The transaction to roll back. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * Required. The transaction to roll back. - * - * Generated from protobuf field bytes transaction = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * Required. The transaction to roll back. - * - * Generated from protobuf field bytes transaction = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php deleted file mode 100644 index 680ac9b7b108..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php +++ /dev/null @@ -1,304 +0,0 @@ -google.firestore.v1.RunAggregationQueryRequest - */ -class RunAggregationQueryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * - * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $explain_options = null; - protected $query_type; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery $structured_aggregation_query - * An aggregation query. - * @type string $transaction - * Run the aggregation within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction - * Starts a new transaction as part of the query, defaulting to read-only. - * The new transaction ID will be returned as the first response in the - * stream. - * @type \Google\Protobuf\Timestamp $read_time - * Executes the query at the given timestamp. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * @type \Google\Cloud\Firestore\V1\ExplainOptions $explain_options - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * An aggregation query. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery structured_aggregation_query = 2; - * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery|null - */ - public function getStructuredAggregationQuery() - { - return $this->readOneof(2); - } - - public function hasStructuredAggregationQuery() - { - return $this->hasOneof(2); - } - - /** - * An aggregation query. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery structured_aggregation_query = 2; - * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery $var - * @return $this - */ - public function setStructuredAggregationQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Run the aggregation within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * - * Generated from protobuf field bytes transaction = 4; - * @return string - */ - public function getTransaction() - { - return $this->readOneof(4); - } - - public function hasTransaction() - { - return $this->hasOneof(4); - } - - /** - * Run the aggregation within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * - * Generated from protobuf field bytes transaction = 4; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Starts a new transaction as part of the query, defaulting to read-only. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; - * @return \Google\Cloud\Firestore\V1\TransactionOptions|null - */ - public function getNewTransaction() - { - return $this->readOneof(5); - } - - public function hasNewTransaction() - { - return $this->hasOneof(5); - } - - /** - * Starts a new transaction as part of the query, defaulting to read-only. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; - * @param \Google\Cloud\Firestore\V1\TransactionOptions $var - * @return $this - */ - public function setNewTransaction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Executes the query at the given timestamp. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(6); - } - - public function hasReadTime() - { - return $this->hasOneof(6); - } - - /** - * Executes the query at the given timestamp. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * - * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Firestore\V1\ExplainOptions|null - */ - public function getExplainOptions() - { - return $this->explain_options; - } - - public function hasExplainOptions() - { - return isset($this->explain_options); - } - - public function clearExplainOptions() - { - unset($this->explain_options); - } - - /** - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * - * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\V1\ExplainOptions $var - * @return $this - */ - public function setExplainOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainOptions::class); - $this->explain_options = $var; - - return $this; - } - - /** - * @return string - */ - public function getQueryType() - { - return $this->whichOneof("query_type"); - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php deleted file mode 100644 index de42b0043172..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php +++ /dev/null @@ -1,244 +0,0 @@ -google.firestore.v1.RunAggregationQueryResponse - */ -class RunAggregationQueryResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A single aggregation result. - * Not present when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.AggregationResult result = 1; - */ - protected $result = null; - /** - * The transaction that was started as part of this request. - * Only present on the first response when the request requested to start - * a new transaction. - * - * Generated from protobuf field bytes transaction = 2; - */ - protected $transaction = ''; - /** - * The time at which the aggregate result was computed. This is always - * monotonically increasing; in this case, the previous AggregationResult in - * the result stream are guaranteed not to have changed between their - * `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `result` will be sent, and this represents the time at which the query - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - */ - protected $read_time = null; - /** - * Query explain metrics. This is only present when the - * [RunAggregationQueryRequest.explain_options][google.firestore.v1.RunAggregationQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * - * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 10; - */ - protected $explain_metrics = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\AggregationResult $result - * A single aggregation result. - * Not present when reporting partial progress. - * @type string $transaction - * The transaction that was started as part of this request. - * Only present on the first response when the request requested to start - * a new transaction. - * @type \Google\Protobuf\Timestamp $read_time - * The time at which the aggregate result was computed. This is always - * monotonically increasing; in this case, the previous AggregationResult in - * the result stream are guaranteed not to have changed between their - * `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `result` will be sent, and this represents the time at which the query - * was run. - * @type \Google\Cloud\Firestore\V1\ExplainMetrics $explain_metrics - * Query explain metrics. This is only present when the - * [RunAggregationQueryRequest.explain_options][google.firestore.v1.RunAggregationQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * A single aggregation result. - * Not present when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.AggregationResult result = 1; - * @return \Google\Cloud\Firestore\V1\AggregationResult|null - */ - public function getResult() - { - return $this->result; - } - - public function hasResult() - { - return isset($this->result); - } - - public function clearResult() - { - unset($this->result); - } - - /** - * A single aggregation result. - * Not present when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.AggregationResult result = 1; - * @param \Google\Cloud\Firestore\V1\AggregationResult $var - * @return $this - */ - public function setResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\AggregationResult::class); - $this->result = $var; - - return $this; - } - - /** - * The transaction that was started as part of this request. - * Only present on the first response when the request requested to start - * a new transaction. - * - * Generated from protobuf field bytes transaction = 2; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * The transaction that was started as part of this request. - * Only present on the first response when the request requested to start - * a new transaction. - * - * Generated from protobuf field bytes transaction = 2; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - - /** - * The time at which the aggregate result was computed. This is always - * monotonically increasing; in this case, the previous AggregationResult in - * the result stream are guaranteed not to have changed between their - * `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `result` will be sent, and this represents the time at which the query - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The time at which the aggregate result was computed. This is always - * monotonically increasing; in this case, the previous AggregationResult in - * the result stream are guaranteed not to have changed between their - * `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `result` will be sent, and this represents the time at which the query - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * Query explain metrics. This is only present when the - * [RunAggregationQueryRequest.explain_options][google.firestore.v1.RunAggregationQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * - * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 10; - * @return \Google\Cloud\Firestore\V1\ExplainMetrics|null - */ - public function getExplainMetrics() - { - return $this->explain_metrics; - } - - public function hasExplainMetrics() - { - return isset($this->explain_metrics); - } - - public function clearExplainMetrics() - { - unset($this->explain_metrics); - } - - /** - * Query explain metrics. This is only present when the - * [RunAggregationQueryRequest.explain_options][google.firestore.v1.RunAggregationQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * - * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 10; - * @param \Google\Cloud\Firestore\V1\ExplainMetrics $var - * @return $this - */ - public function setExplainMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainMetrics::class); - $this->explain_metrics = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php deleted file mode 100644 index 37c2314ca5fa..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php +++ /dev/null @@ -1,306 +0,0 @@ -google.firestore.v1.RunQueryRequest - */ -class RunQueryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * - * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $explain_options = null; - protected $query_type; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query - * A structured query. - * @type string $transaction - * Run the query within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * @type \Google\Protobuf\Timestamp $read_time - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * @type \Google\Cloud\Firestore\V1\ExplainOptions $explain_options - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * A structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @return \Google\Cloud\Firestore\V1\StructuredQuery|null - */ - public function getStructuredQuery() - { - return $this->readOneof(2); - } - - public function hasStructuredQuery() - { - return $this->hasOneof(2); - } - - /** - * A structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery $var - * @return $this - */ - public function setStructuredQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Run the query within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * - * Generated from protobuf field bytes transaction = 5; - * @return string - */ - public function getTransaction() - { - return $this->readOneof(5); - } - - public function hasTransaction() - { - return $this->hasOneof(5); - } - - /** - * Run the query within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * - * Generated from protobuf field bytes transaction = 5; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 6; - * @return \Google\Cloud\Firestore\V1\TransactionOptions|null - */ - public function getNewTransaction() - { - return $this->readOneof(6); - } - - public function hasNewTransaction() - { - return $this->hasOneof(6); - } - - /** - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 6; - * @param \Google\Cloud\Firestore\V1\TransactionOptions $var - * @return $this - */ - public function setNewTransaction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(7); - } - - public function hasReadTime() - { - return $this->hasOneof(7); - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * - * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Firestore\V1\ExplainOptions|null - */ - public function getExplainOptions() - { - return $this->explain_options; - } - - public function hasExplainOptions() - { - return isset($this->explain_options); - } - - public function clearExplainOptions() - { - unset($this->explain_options); - } - - /** - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * - * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\V1\ExplainOptions $var - * @return $this - */ - public function setExplainOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainOptions::class); - $this->explain_options = $var; - - return $this; - } - - /** - * @return string - */ - public function getQueryType() - { - return $this->whichOneof("query_type"); - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php deleted file mode 100644 index 1d32089587e3..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php +++ /dev/null @@ -1,327 +0,0 @@ -google.firestore.v1.RunQueryResponse - */ -class RunQueryResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The transaction that was started as part of this request. - * Can only be set in the first response, and only if - * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] - * was set in the request. If set, no other fields will be set in this - * response. - * - * Generated from protobuf field bytes transaction = 2; - */ - protected $transaction = ''; - /** - * A query result, not set when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - */ - protected $document = null; - /** - * The time at which the document was read. This may be monotonically - * increasing; in this case, the previous documents in the result stream are - * guaranteed not to have changed between their `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `document` will be sent, and this represents the time at which the query - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - */ - protected $read_time = null; - /** - * The number of results that have been skipped due to an offset between - * the last response and the current response. - * - * Generated from protobuf field int32 skipped_results = 4; - */ - protected $skipped_results = 0; - /** - * Query explain metrics. This is only present when the - * [RunQueryRequest.explain_options][google.firestore.v1.RunQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * - * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 11; - */ - protected $explain_metrics = null; - protected $continuation_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $transaction - * The transaction that was started as part of this request. - * Can only be set in the first response, and only if - * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] - * was set in the request. If set, no other fields will be set in this - * response. - * @type \Google\Cloud\Firestore\V1\Document $document - * A query result, not set when reporting partial progress. - * @type \Google\Protobuf\Timestamp $read_time - * The time at which the document was read. This may be monotonically - * increasing; in this case, the previous documents in the result stream are - * guaranteed not to have changed between their `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `document` will be sent, and this represents the time at which the query - * was run. - * @type int $skipped_results - * The number of results that have been skipped due to an offset between - * the last response and the current response. - * @type bool $done - * If present, Firestore has completely finished the request and no more - * documents will be returned. - * @type \Google\Cloud\Firestore\V1\ExplainMetrics $explain_metrics - * Query explain metrics. This is only present when the - * [RunQueryRequest.explain_options][google.firestore.v1.RunQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The transaction that was started as part of this request. - * Can only be set in the first response, and only if - * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] - * was set in the request. If set, no other fields will be set in this - * response. - * - * Generated from protobuf field bytes transaction = 2; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * The transaction that was started as part of this request. - * Can only be set in the first response, and only if - * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] - * was set in the request. If set, no other fields will be set in this - * response. - * - * Generated from protobuf field bytes transaction = 2; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - - /** - * A query result, not set when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * A query result, not set when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The time at which the document was read. This may be monotonically - * increasing; in this case, the previous documents in the result stream are - * guaranteed not to have changed between their `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `document` will be sent, and this represents the time at which the query - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The time at which the document was read. This may be monotonically - * increasing; in this case, the previous documents in the result stream are - * guaranteed not to have changed between their `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `document` will be sent, and this represents the time at which the query - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * The number of results that have been skipped due to an offset between - * the last response and the current response. - * - * Generated from protobuf field int32 skipped_results = 4; - * @return int - */ - public function getSkippedResults() - { - return $this->skipped_results; - } - - /** - * The number of results that have been skipped due to an offset between - * the last response and the current response. - * - * Generated from protobuf field int32 skipped_results = 4; - * @param int $var - * @return $this - */ - public function setSkippedResults($var) - { - GPBUtil::checkInt32($var); - $this->skipped_results = $var; - - return $this; - } - - /** - * If present, Firestore has completely finished the request and no more - * documents will be returned. - * - * Generated from protobuf field bool done = 6; - * @return bool - */ - public function getDone() - { - return $this->readOneof(6); - } - - public function hasDone() - { - return $this->hasOneof(6); - } - - /** - * If present, Firestore has completely finished the request and no more - * documents will be returned. - * - * Generated from protobuf field bool done = 6; - * @param bool $var - * @return $this - */ - public function setDone($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Query explain metrics. This is only present when the - * [RunQueryRequest.explain_options][google.firestore.v1.RunQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * - * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 11; - * @return \Google\Cloud\Firestore\V1\ExplainMetrics|null - */ - public function getExplainMetrics() - { - return $this->explain_metrics; - } - - public function hasExplainMetrics() - { - return isset($this->explain_metrics); - } - - public function clearExplainMetrics() - { - unset($this->explain_metrics); - } - - /** - * Query explain metrics. This is only present when the - * [RunQueryRequest.explain_options][google.firestore.v1.RunQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * - * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 11; - * @param \Google\Cloud\Firestore\V1\ExplainMetrics $var - * @return $this - */ - public function setExplainMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainMetrics::class); - $this->explain_metrics = $var; - - return $this; - } - - /** - * @return string - */ - public function getContinuationSelector() - { - return $this->whichOneof("continuation_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php deleted file mode 100644 index 513a7aeb0f84..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php +++ /dev/null @@ -1,122 +0,0 @@ -google.firestore.v1.StructuredAggregationQuery - */ -class StructuredAggregationQuery extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Series of aggregations to apply over the results of the - * `structured_query`. - * Requires: - * * A minimum of one and maximum of five aggregations per query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $aggregations; - protected $query_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query - * Nested structured query. - * @type array<\Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation>|\Google\Protobuf\Internal\RepeatedField $aggregations - * Optional. Series of aggregations to apply over the results of the - * `structured_query`. - * Requires: - * * A minimum of one and maximum of five aggregations per query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * Nested structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery|null - */ - public function getStructuredQuery() - { - return $this->readOneof(1); - } - - public function hasStructuredQuery() - { - return $this->hasOneof(1); - } - - /** - * Nested structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery $var - * @return $this - */ - public function setStructuredQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Optional. Series of aggregations to apply over the results of the - * `structured_query`. - * Requires: - * * A minimum of one and maximum of five aggregations per query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAggregations() - { - return $this->aggregations; - } - - /** - * Optional. Series of aggregations to apply over the results of the - * `structured_query`. - * Requires: - * * A minimum of one and maximum of five aggregations per query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAggregations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation::class); - $this->aggregations = $arr; - - return $this; - } - - /** - * @return string - */ - public function getQueryType() - { - return $this->whichOneof("query_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php deleted file mode 100644 index 2e21334696cb..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php +++ /dev/null @@ -1,290 +0,0 @@ -google.firestore.v1.StructuredAggregationQuery.Aggregation - */ -class Aggregation extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Optional name of the field to store the result of the - * aggregation into. - * If not provided, Firestore will pick a default name following the format - * `field_`. For example: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2), - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) - * OVER ( - * ... - * ); - * ``` - * becomes: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2) AS field_1, - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) AS field_2 - * OVER ( - * ... - * ); - * ``` - * Requires: - * * Must be unique across all aggregation aliases. - * * Conform to [document field name][google.firestore.v1.Document.fields] - * limitations. - * - * Generated from protobuf field string alias = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $alias = ''; - protected $operator; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count $count - * Count aggregator. - * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Sum $sum - * Sum aggregator. - * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Avg $avg - * Average aggregator. - * @type string $alias - * Optional. Optional name of the field to store the result of the - * aggregation into. - * If not provided, Firestore will pick a default name following the format - * `field_`. For example: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2), - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) - * OVER ( - * ... - * ); - * ``` - * becomes: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2) AS field_1, - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) AS field_2 - * OVER ( - * ... - * ); - * ``` - * Requires: - * * Must be unique across all aggregation aliases. - * * Conform to [document field name][google.firestore.v1.Document.fields] - * limitations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * Count aggregator. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1; - * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count|null - */ - public function getCount() - { - return $this->readOneof(1); - } - - public function hasCount() - { - return $this->hasOneof(1); - } - - /** - * Count aggregator. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1; - * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Sum aggregator. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2; - * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Sum|null - */ - public function getSum() - { - return $this->readOneof(2); - } - - public function hasSum() - { - return $this->hasOneof(2); - } - - /** - * Sum aggregator. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2; - * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Sum $var - * @return $this - */ - public function setSum($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Sum::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Average aggregator. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3; - * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Avg|null - */ - public function getAvg() - { - return $this->readOneof(3); - } - - public function hasAvg() - { - return $this->hasOneof(3); - } - - /** - * Average aggregator. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3; - * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Avg $var - * @return $this - */ - public function setAvg($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Avg::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Optional. Optional name of the field to store the result of the - * aggregation into. - * If not provided, Firestore will pick a default name following the format - * `field_`. For example: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2), - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) - * OVER ( - * ... - * ); - * ``` - * becomes: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2) AS field_1, - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) AS field_2 - * OVER ( - * ... - * ); - * ``` - * Requires: - * * Must be unique across all aggregation aliases. - * * Conform to [document field name][google.firestore.v1.Document.fields] - * limitations. - * - * Generated from protobuf field string alias = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAlias() - { - return $this->alias; - } - - /** - * Optional. Optional name of the field to store the result of the - * aggregation into. - * If not provided, Firestore will pick a default name following the format - * `field_`. For example: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2), - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) - * OVER ( - * ... - * ); - * ``` - * becomes: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2) AS field_1, - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) AS field_2 - * OVER ( - * ... - * ); - * ``` - * Requires: - * * Must be unique across all aggregation aliases. - * * Conform to [document field name][google.firestore.v1.Document.fields] - * limitations. - * - * Generated from protobuf field string alias = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAlias($var) - { - GPBUtil::checkString($var, True); - $this->alias = $var; - - return $this; - } - - /** - * @return string - */ - public function getOperator() - { - return $this->whichOneof("operator"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Aggregation::class, \Google\Cloud\Firestore\V1\StructuredAggregationQuery_Aggregation::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Avg.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Avg.php deleted file mode 100644 index 4af9d9ee411c..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Avg.php +++ /dev/null @@ -1,86 +0,0 @@ -google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg - */ -class Avg extends \Google\Protobuf\Internal\Message -{ - /** - * The field to aggregate on. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - protected $field = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field - * The field to aggregate on. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The field to aggregate on. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null - */ - public function getField() - { - return $this->field; - } - - public function hasField() - { - return isset($this->field); - } - - public function clearField() - { - unset($this->field); - } - - /** - * The field to aggregate on. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->field = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Avg::class, \Google\Cloud\Firestore\V1\StructuredAggregationQuery_Aggregation_Avg::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php deleted file mode 100644 index 0bfb56baf641..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php +++ /dev/null @@ -1,169 +0,0 @@ -google.firestore.v1.StructuredAggregationQuery.Aggregation.Count - */ -class Count extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Optional constraint on the maximum number of documents to - * count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency, and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * - * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $up_to = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Int64Value $up_to - * Optional. Optional constraint on the maximum number of documents to - * count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency, and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Optional constraint on the maximum number of documents to - * count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency, and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * - * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getUpTo() - { - return $this->up_to; - } - - public function hasUpTo() - { - return isset($this->up_to); - } - - public function clearUpTo() - { - unset($this->up_to); - } - - /** - * Returns the unboxed value from getUpTo() - - * Optional. Optional constraint on the maximum number of documents to - * count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency, and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * - * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getUpToUnwrapped() - { - return $this->readWrapperValue("up_to"); - } - - /** - * Optional. Optional constraint on the maximum number of documents to - * count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency, and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * - * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setUpTo($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->up_to = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. Optional constraint on the maximum number of documents to - * count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency, and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * - * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setUpToUnwrapped($var) - { - $this->writeWrapperValue("up_to", $var); - return $this;} - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Count::class, \Google\Cloud\Firestore\V1\StructuredAggregationQuery_Aggregation_Count::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Sum.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Sum.php deleted file mode 100644 index 215315c68ef8..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Sum.php +++ /dev/null @@ -1,95 +0,0 @@ -google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum - */ -class Sum extends \Google\Protobuf\Internal\Message -{ - /** - * The field to aggregate on. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - protected $field = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field - * The field to aggregate on. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The field to aggregate on. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null - */ - public function getField() - { - return $this->field; - } - - public function hasField() - { - return isset($this->field); - } - - public function clearField() - { - unset($this->field); - } - - /** - * The field to aggregate on. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->field = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Sum::class, \Google\Cloud\Firestore\V1\StructuredAggregationQuery_Aggregation_Sum::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery.php deleted file mode 100644 index fc6fd5d1504a..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery.php +++ /dev/null @@ -1,651 +0,0 @@ -google.firestore.v1.StructuredQuery - */ -class StructuredQuery extends \Google\Protobuf\Internal\Message -{ - /** - * Optional sub-set of the fields to return. - * This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the - * documents returned from a query. When not set, assumes that the caller - * wants all fields returned. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Projection select = 1; - */ - protected $select = null; - /** - * The collections to query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; - */ - private $from; - /** - * The filter to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Filter where = 3; - */ - protected $where = null; - /** - * The order to apply to the query results. - * Firestore allows callers to provide a full ordering, a partial ordering, or - * no ordering at all. In all cases, Firestore guarantees a stable ordering - * through the following rules: - * * The `order_by` is required to reference all fields used with an - * inequality filter. - * * All fields that are required to be in the `order_by` but are not already - * present are appended in lexicographical ordering of the field name. - * * If an order on `__name__` is not specified, it is appended by default. - * Fields are appended with the same sort direction as the last order - * specified, or 'ASCENDING' if no order was specified. For example: - * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` - * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` - * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` - * * `WHERE __name__ > ... AND a > 1` becomes - * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; - */ - private $order_by; - /** - * A potential prefix of a position in the result set to start the query at. - * The ordering of the result set is based on the `ORDER BY` clause of the - * original query. - * ``` - * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; - * ``` - * This query's results are ordered by `(b ASC, __name__ ASC)`. - * Cursors can reference either the full ordering or a prefix of the location, - * though it cannot reference more fields than what are in the provided - * `ORDER BY`. - * Continuing off the example above, attaching the following start cursors - * will have varying impact: - * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND - * b > 2 AND __name__ > /k/123`. - * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. - * Unlike `OFFSET` which requires scanning over the first N results to skip, - * a start cursor allows the query to begin at a logical position. This - * position is not required to match an actual result, it will scan forward - * from this position to find the next document. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor start_at = 7; - */ - protected $start_at = null; - /** - * A potential prefix of a position in the result set to end the query at. - * This is similar to `START_AT` but with it controlling the end position - * rather than the start position. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor end_at = 8; - */ - protected $end_at = null; - /** - * The number of documents to skip before returning the first result. - * This applies after the constraints specified by the `WHERE`, `START AT`, & - * `END AT` but before the `LIMIT` clause. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field int32 offset = 6; - */ - protected $offset = 0; - /** - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 5; - */ - protected $limit = null; - /** - * Optional. A potential nearest neighbors search. - * Applies after all other filters and ordering. - * Finds the closest vector embeddings to the given query vector. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest find_nearest = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $find_nearest = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\Projection $select - * Optional sub-set of the fields to return. - * This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the - * documents returned from a query. When not set, assumes that the caller - * wants all fields returned. - * @type array<\Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector>|\Google\Protobuf\Internal\RepeatedField $from - * The collections to query. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\Filter $where - * The filter to apply. - * @type array<\Google\Cloud\Firestore\V1\StructuredQuery\Order>|\Google\Protobuf\Internal\RepeatedField $order_by - * The order to apply to the query results. - * Firestore allows callers to provide a full ordering, a partial ordering, or - * no ordering at all. In all cases, Firestore guarantees a stable ordering - * through the following rules: - * * The `order_by` is required to reference all fields used with an - * inequality filter. - * * All fields that are required to be in the `order_by` but are not already - * present are appended in lexicographical ordering of the field name. - * * If an order on `__name__` is not specified, it is appended by default. - * Fields are appended with the same sort direction as the last order - * specified, or 'ASCENDING' if no order was specified. For example: - * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` - * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` - * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` - * * `WHERE __name__ > ... AND a > 1` becomes - * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` - * @type \Google\Cloud\Firestore\V1\Cursor $start_at - * A potential prefix of a position in the result set to start the query at. - * The ordering of the result set is based on the `ORDER BY` clause of the - * original query. - * ``` - * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; - * ``` - * This query's results are ordered by `(b ASC, __name__ ASC)`. - * Cursors can reference either the full ordering or a prefix of the location, - * though it cannot reference more fields than what are in the provided - * `ORDER BY`. - * Continuing off the example above, attaching the following start cursors - * will have varying impact: - * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND - * b > 2 AND __name__ > /k/123`. - * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. - * Unlike `OFFSET` which requires scanning over the first N results to skip, - * a start cursor allows the query to begin at a logical position. This - * position is not required to match an actual result, it will scan forward - * from this position to find the next document. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * @type \Google\Cloud\Firestore\V1\Cursor $end_at - * A potential prefix of a position in the result set to end the query at. - * This is similar to `START_AT` but with it controlling the end position - * rather than the start position. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * @type int $offset - * The number of documents to skip before returning the first result. - * This applies after the constraints specified by the `WHERE`, `START AT`, & - * `END AT` but before the `LIMIT` clause. - * Requires: - * * The value must be greater than or equal to zero if specified. - * @type \Google\Protobuf\Int32Value $limit - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest $find_nearest - * Optional. A potential nearest neighbors search. - * Applies after all other filters and ordering. - * Finds the closest vector embeddings to the given query vector. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * Optional sub-set of the fields to return. - * This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the - * documents returned from a query. When not set, assumes that the caller - * wants all fields returned. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Projection select = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\Projection|null - */ - public function getSelect() - { - return $this->select; - } - - public function hasSelect() - { - return isset($this->select); - } - - public function clearSelect() - { - unset($this->select); - } - - /** - * Optional sub-set of the fields to return. - * This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the - * documents returned from a query. When not set, assumes that the caller - * wants all fields returned. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Projection select = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\Projection $var - * @return $this - */ - public function setSelect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\Projection::class); - $this->select = $var; - - return $this; - } - - /** - * The collections to query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFrom() - { - return $this->from; - } - - /** - * The collections to query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; - * @param array<\Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFrom($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector::class); - $this->from = $arr; - - return $this; - } - - /** - * The filter to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Filter where = 3; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\Filter|null - */ - public function getWhere() - { - return $this->where; - } - - public function hasWhere() - { - return isset($this->where); - } - - public function clearWhere() - { - unset($this->where); - } - - /** - * The filter to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Filter where = 3; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\Filter $var - * @return $this - */ - public function setWhere($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\Filter::class); - $this->where = $var; - - return $this; - } - - /** - * The order to apply to the query results. - * Firestore allows callers to provide a full ordering, a partial ordering, or - * no ordering at all. In all cases, Firestore guarantees a stable ordering - * through the following rules: - * * The `order_by` is required to reference all fields used with an - * inequality filter. - * * All fields that are required to be in the `order_by` but are not already - * present are appended in lexicographical ordering of the field name. - * * If an order on `__name__` is not specified, it is appended by default. - * Fields are appended with the same sort direction as the last order - * specified, or 'ASCENDING' if no order was specified. For example: - * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` - * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` - * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` - * * `WHERE __name__ > ... AND a > 1` becomes - * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * The order to apply to the query results. - * Firestore allows callers to provide a full ordering, a partial ordering, or - * no ordering at all. In all cases, Firestore guarantees a stable ordering - * through the following rules: - * * The `order_by` is required to reference all fields used with an - * inequality filter. - * * All fields that are required to be in the `order_by` but are not already - * present are appended in lexicographical ordering of the field name. - * * If an order on `__name__` is not specified, it is appended by default. - * Fields are appended with the same sort direction as the last order - * specified, or 'ASCENDING' if no order was specified. For example: - * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` - * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` - * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` - * * `WHERE __name__ > ... AND a > 1` becomes - * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; - * @param array<\Google\Cloud\Firestore\V1\StructuredQuery\Order>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOrderBy($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\Order::class); - $this->order_by = $arr; - - return $this; - } - - /** - * A potential prefix of a position in the result set to start the query at. - * The ordering of the result set is based on the `ORDER BY` clause of the - * original query. - * ``` - * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; - * ``` - * This query's results are ordered by `(b ASC, __name__ ASC)`. - * Cursors can reference either the full ordering or a prefix of the location, - * though it cannot reference more fields than what are in the provided - * `ORDER BY`. - * Continuing off the example above, attaching the following start cursors - * will have varying impact: - * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND - * b > 2 AND __name__ > /k/123`. - * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. - * Unlike `OFFSET` which requires scanning over the first N results to skip, - * a start cursor allows the query to begin at a logical position. This - * position is not required to match an actual result, it will scan forward - * from this position to find the next document. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor start_at = 7; - * @return \Google\Cloud\Firestore\V1\Cursor|null - */ - public function getStartAt() - { - return $this->start_at; - } - - public function hasStartAt() - { - return isset($this->start_at); - } - - public function clearStartAt() - { - unset($this->start_at); - } - - /** - * A potential prefix of a position in the result set to start the query at. - * The ordering of the result set is based on the `ORDER BY` clause of the - * original query. - * ``` - * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; - * ``` - * This query's results are ordered by `(b ASC, __name__ ASC)`. - * Cursors can reference either the full ordering or a prefix of the location, - * though it cannot reference more fields than what are in the provided - * `ORDER BY`. - * Continuing off the example above, attaching the following start cursors - * will have varying impact: - * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND - * b > 2 AND __name__ > /k/123`. - * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. - * Unlike `OFFSET` which requires scanning over the first N results to skip, - * a start cursor allows the query to begin at a logical position. This - * position is not required to match an actual result, it will scan forward - * from this position to find the next document. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor start_at = 7; - * @param \Google\Cloud\Firestore\V1\Cursor $var - * @return $this - */ - public function setStartAt($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Cursor::class); - $this->start_at = $var; - - return $this; - } - - /** - * A potential prefix of a position in the result set to end the query at. - * This is similar to `START_AT` but with it controlling the end position - * rather than the start position. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor end_at = 8; - * @return \Google\Cloud\Firestore\V1\Cursor|null - */ - public function getEndAt() - { - return $this->end_at; - } - - public function hasEndAt() - { - return isset($this->end_at); - } - - public function clearEndAt() - { - unset($this->end_at); - } - - /** - * A potential prefix of a position in the result set to end the query at. - * This is similar to `START_AT` but with it controlling the end position - * rather than the start position. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor end_at = 8; - * @param \Google\Cloud\Firestore\V1\Cursor $var - * @return $this - */ - public function setEndAt($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Cursor::class); - $this->end_at = $var; - - return $this; - } - - /** - * The number of documents to skip before returning the first result. - * This applies after the constraints specified by the `WHERE`, `START AT`, & - * `END AT` but before the `LIMIT` clause. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field int32 offset = 6; - * @return int - */ - public function getOffset() - { - return $this->offset; - } - - /** - * The number of documents to skip before returning the first result. - * This applies after the constraints specified by the `WHERE`, `START AT`, & - * `END AT` but before the `LIMIT` clause. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field int32 offset = 6; - * @param int $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkInt32($var); - $this->offset = $var; - - return $this; - } - - /** - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 5; - * @return \Google\Protobuf\Int32Value|null - */ - public function getLimit() - { - return $this->limit; - } - - public function hasLimit() - { - return isset($this->limit); - } - - public function clearLimit() - { - unset($this->limit); - } - - /** - * Returns the unboxed value from getLimit() - - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 5; - * @return int|null - */ - public function getLimitUnwrapped() - { - return $this->readWrapperValue("limit"); - } - - /** - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 5; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setLimit($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->limit = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 5; - * @param int|null $var - * @return $this - */ - public function setLimitUnwrapped($var) - { - $this->writeWrapperValue("limit", $var); - return $this;} - - /** - * Optional. A potential nearest neighbors search. - * Applies after all other filters and ordering. - * Finds the closest vector embeddings to the given query vector. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest find_nearest = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest|null - */ - public function getFindNearest() - { - return $this->find_nearest; - } - - public function hasFindNearest() - { - return isset($this->find_nearest); - } - - public function clearFindNearest() - { - unset($this->find_nearest); - } - - /** - * Optional. A potential nearest neighbors search. - * Applies after all other filters and ordering. - * Finds the closest vector embeddings to the given query vector. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest find_nearest = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest $var - * @return $this - */ - public function setFindNearest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest::class); - $this->find_nearest = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php deleted file mode 100644 index b06253d9d6ad..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php +++ /dev/null @@ -1,116 +0,0 @@ -google.firestore.v1.StructuredQuery.CollectionSelector - */ -class CollectionSelector extends \Google\Protobuf\Internal\Message -{ - /** - * The collection ID. - * When set, selects only collections with this ID. - * - * Generated from protobuf field string collection_id = 2; - */ - protected $collection_id = ''; - /** - * When false, selects only collections that are immediate children of - * the `parent` specified in the containing `RunQueryRequest`. - * When true, selects all descendant collections. - * - * Generated from protobuf field bool all_descendants = 3; - */ - protected $all_descendants = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $collection_id - * The collection ID. - * When set, selects only collections with this ID. - * @type bool $all_descendants - * When false, selects only collections that are immediate children of - * the `parent` specified in the containing `RunQueryRequest`. - * When true, selects all descendant collections. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The collection ID. - * When set, selects only collections with this ID. - * - * Generated from protobuf field string collection_id = 2; - * @return string - */ - public function getCollectionId() - { - return $this->collection_id; - } - - /** - * The collection ID. - * When set, selects only collections with this ID. - * - * Generated from protobuf field string collection_id = 2; - * @param string $var - * @return $this - */ - public function setCollectionId($var) - { - GPBUtil::checkString($var, True); - $this->collection_id = $var; - - return $this; - } - - /** - * When false, selects only collections that are immediate children of - * the `parent` specified in the containing `RunQueryRequest`. - * When true, selects all descendant collections. - * - * Generated from protobuf field bool all_descendants = 3; - * @return bool - */ - public function getAllDescendants() - { - return $this->all_descendants; - } - - /** - * When false, selects only collections that are immediate children of - * the `parent` specified in the containing `RunQueryRequest`. - * When true, selects all descendant collections. - * - * Generated from protobuf field bool all_descendants = 3; - * @param bool $var - * @return $this - */ - public function setAllDescendants($var) - { - GPBUtil::checkBool($var); - $this->all_descendants = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CollectionSelector::class, \Google\Cloud\Firestore\V1\StructuredQuery_CollectionSelector::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php deleted file mode 100644 index f63c324d982d..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php +++ /dev/null @@ -1,112 +0,0 @@ -google.firestore.v1.StructuredQuery.CompositeFilter - */ -class CompositeFilter extends \Google\Protobuf\Internal\Message -{ - /** - * The operator for combining multiple filters. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; - */ - protected $op = 0; - /** - * The list of filters to combine. - * Requires: - * * At least one filter is present. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; - */ - private $filters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $op - * The operator for combining multiple filters. - * @type array<\Google\Cloud\Firestore\V1\StructuredQuery\Filter>|\Google\Protobuf\Internal\RepeatedField $filters - * The list of filters to combine. - * Requires: - * * At least one filter is present. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The operator for combining multiple filters. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; - * @return int - */ - public function getOp() - { - return $this->op; - } - - /** - * The operator for combining multiple filters. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; - * @param int $var - * @return $this - */ - public function setOp($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter\Operator::class); - $this->op = $var; - - return $this; - } - - /** - * The list of filters to combine. - * Requires: - * * At least one filter is present. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFilters() - { - return $this->filters; - } - - /** - * The list of filters to combine. - * Requires: - * * At least one filter is present. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; - * @param array<\Google\Cloud\Firestore\V1\StructuredQuery\Filter>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFilters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\Filter::class); - $this->filters = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CompositeFilter::class, \Google\Cloud\Firestore\V1\StructuredQuery_CompositeFilter::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php deleted file mode 100644 index b603b83dc965..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php +++ /dev/null @@ -1,68 +0,0 @@ -google.firestore.v1.StructuredQuery.CompositeFilter.Operator - */ -class Operator -{ - /** - * Unspecified. This value must not be used. - * - * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; - */ - const OPERATOR_UNSPECIFIED = 0; - /** - * Documents are required to satisfy all of the combined filters. - * - * Generated from protobuf enum AND = 1; - */ - const PBAND = 1; - /** - * Documents are required to satisfy at least one of the combined filters. - * - * Generated from protobuf enum OR = 2; - */ - const PBOR = 2; - - private static $valueToName = [ - self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', - self::PBAND => 'AND', - self::PBOR => 'OR', - ]; - - 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)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Operator::class, \Google\Cloud\Firestore\V1\StructuredQuery_CompositeFilter_Operator::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php deleted file mode 100644 index 70989c758cf2..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php +++ /dev/null @@ -1,64 +0,0 @@ -google.firestore.v1.StructuredQuery.Direction - */ -class Direction -{ - /** - * Unspecified. - * - * Generated from protobuf enum DIRECTION_UNSPECIFIED = 0; - */ - const DIRECTION_UNSPECIFIED = 0; - /** - * Ascending. - * - * Generated from protobuf enum ASCENDING = 1; - */ - const ASCENDING = 1; - /** - * Descending. - * - * Generated from protobuf enum DESCENDING = 2; - */ - const DESCENDING = 2; - - private static $valueToName = [ - self::DIRECTION_UNSPECIFIED => 'DIRECTION_UNSPECIFIED', - self::ASCENDING => 'ASCENDING', - self::DESCENDING => 'DESCENDING', - ]; - - 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(Direction::class, \Google\Cloud\Firestore\V1\StructuredQuery_Direction::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php deleted file mode 100644 index d027d09f1050..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php +++ /dev/null @@ -1,158 +0,0 @@ -google.firestore.v1.StructuredQuery.FieldFilter - */ -class FieldFilter extends \Google\Protobuf\Internal\Message -{ - /** - * The field to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - protected $field = null; - /** - * The operator to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; - */ - protected $op = 0; - /** - * The value to compare to. - * - * Generated from protobuf field .google.firestore.v1.Value value = 3; - */ - protected $value = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field - * The field to filter by. - * @type int $op - * The operator to filter by. - * @type \Google\Cloud\Firestore\V1\Value $value - * The value to compare to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The field to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null - */ - public function getField() - { - return $this->field; - } - - public function hasField() - { - return isset($this->field); - } - - public function clearField() - { - unset($this->field); - } - - /** - * The field to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->field = $var; - - return $this; - } - - /** - * The operator to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; - * @return int - */ - public function getOp() - { - return $this->op; - } - - /** - * The operator to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; - * @param int $var - * @return $this - */ - public function setOp($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter\Operator::class); - $this->op = $var; - - return $this; - } - - /** - * The value to compare to. - * - * Generated from protobuf field .google.firestore.v1.Value value = 3; - * @return \Google\Cloud\Firestore\V1\Value|null - */ - public function getValue() - { - return $this->value; - } - - public function hasValue() - { - return isset($this->value); - } - - public function clearValue() - { - unset($this->value); - } - - /** - * The value to compare to. - * - * Generated from protobuf field .google.firestore.v1.Value value = 3; - * @param \Google\Cloud\Firestore\V1\Value $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); - $this->value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FieldFilter::class, \Google\Cloud\Firestore\V1\StructuredQuery_FieldFilter::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php deleted file mode 100644 index 9721e2039d04..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php +++ /dev/null @@ -1,146 +0,0 @@ -google.firestore.v1.StructuredQuery.FieldFilter.Operator - */ -class Operator -{ - /** - * Unspecified. This value must not be used. - * - * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; - */ - const OPERATOR_UNSPECIFIED = 0; - /** - * The given `field` is less than the given `value`. - * Requires: - * * That `field` come first in `order_by`. - * - * Generated from protobuf enum LESS_THAN = 1; - */ - const LESS_THAN = 1; - /** - * The given `field` is less than or equal to the given `value`. - * Requires: - * * That `field` come first in `order_by`. - * - * Generated from protobuf enum LESS_THAN_OR_EQUAL = 2; - */ - const LESS_THAN_OR_EQUAL = 2; - /** - * The given `field` is greater than the given `value`. - * Requires: - * * That `field` come first in `order_by`. - * - * Generated from protobuf enum GREATER_THAN = 3; - */ - const GREATER_THAN = 3; - /** - * The given `field` is greater than or equal to the given `value`. - * Requires: - * * That `field` come first in `order_by`. - * - * Generated from protobuf enum GREATER_THAN_OR_EQUAL = 4; - */ - const GREATER_THAN_OR_EQUAL = 4; - /** - * The given `field` is equal to the given `value`. - * - * Generated from protobuf enum EQUAL = 5; - */ - const EQUAL = 5; - /** - * The given `field` is not equal to the given `value`. - * Requires: - * * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. - * * That `field` comes first in the `order_by`. - * - * Generated from protobuf enum NOT_EQUAL = 6; - */ - const NOT_EQUAL = 6; - /** - * The given `field` is an array that contains the given `value`. - * - * Generated from protobuf enum ARRAY_CONTAINS = 7; - */ - const ARRAY_CONTAINS = 7; - /** - * The given `field` is equal to at least one value in the given array. - * Requires: - * * That `value` is a non-empty `ArrayValue`, subject to disjunction - * limits. - * * No `NOT_IN` filters in the same query. - * - * Generated from protobuf enum IN = 8; - */ - const IN = 8; - /** - * The given `field` is an array that contains any of the values in the - * given array. - * Requires: - * * That `value` is a non-empty `ArrayValue`, subject to disjunction - * limits. - * * No other `ARRAY_CONTAINS_ANY` filters within the same disjunction. - * * No `NOT_IN` filters in the same query. - * - * Generated from protobuf enum ARRAY_CONTAINS_ANY = 9; - */ - const ARRAY_CONTAINS_ANY = 9; - /** - * The value of the `field` is not in the given array. - * Requires: - * * That `value` is a non-empty `ArrayValue` with at most 10 values. - * * No other `OR`, `IN`, `ARRAY_CONTAINS_ANY`, `NOT_IN`, `NOT_EQUAL`, - * `IS_NOT_NULL`, or `IS_NOT_NAN`. - * * That `field` comes first in the `order_by`. - * - * Generated from protobuf enum NOT_IN = 10; - */ - const NOT_IN = 10; - - private static $valueToName = [ - self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', - self::LESS_THAN => 'LESS_THAN', - self::LESS_THAN_OR_EQUAL => 'LESS_THAN_OR_EQUAL', - self::GREATER_THAN => 'GREATER_THAN', - self::GREATER_THAN_OR_EQUAL => 'GREATER_THAN_OR_EQUAL', - self::EQUAL => 'EQUAL', - self::NOT_EQUAL => 'NOT_EQUAL', - self::ARRAY_CONTAINS => 'ARRAY_CONTAINS', - self::IN => 'IN', - self::ARRAY_CONTAINS_ANY => 'ARRAY_CONTAINS_ANY', - self::NOT_IN => 'NOT_IN', - ]; - - 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(Operator::class, \Google\Cloud\Firestore\V1\StructuredQuery_FieldFilter_Operator::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php deleted file mode 100644 index be709a472fb1..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php +++ /dev/null @@ -1,86 +0,0 @@ -google.firestore.v1.StructuredQuery.FieldReference - */ -class FieldReference extends \Google\Protobuf\Internal\Message -{ - /** - * A reference to a field in a document. - * Requires: - * * MUST be a dot-delimited (`.`) string of segments, where each segment - * conforms to [document field name][google.firestore.v1.Document.fields] - * limitations. - * - * Generated from protobuf field string field_path = 2; - */ - protected $field_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field_path - * A reference to a field in a document. - * Requires: - * * MUST be a dot-delimited (`.`) string of segments, where each segment - * conforms to [document field name][google.firestore.v1.Document.fields] - * limitations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * A reference to a field in a document. - * Requires: - * * MUST be a dot-delimited (`.`) string of segments, where each segment - * conforms to [document field name][google.firestore.v1.Document.fields] - * limitations. - * - * Generated from protobuf field string field_path = 2; - * @return string - */ - public function getFieldPath() - { - return $this->field_path; - } - - /** - * A reference to a field in a document. - * Requires: - * * MUST be a dot-delimited (`.`) string of segments, where each segment - * conforms to [document field name][google.firestore.v1.Document.fields] - * limitations. - * - * Generated from protobuf field string field_path = 2; - * @param string $var - * @return $this - */ - public function setFieldPath($var) - { - GPBUtil::checkString($var, True); - $this->field_path = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FieldReference::class, \Google\Cloud\Firestore\V1\StructuredQuery_FieldReference::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php deleted file mode 100644 index dc43c16b7859..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php +++ /dev/null @@ -1,144 +0,0 @@ -google.firestore.v1.StructuredQuery.Filter - */ -class Filter extends \Google\Protobuf\Internal\Message -{ - protected $filter_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter $composite_filter - * A composite filter. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter $field_filter - * A filter on a document field. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter $unary_filter - * A filter that takes exactly one argument. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * A composite filter. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter|null - */ - public function getCompositeFilter() - { - return $this->readOneof(1); - } - - public function hasCompositeFilter() - { - return $this->hasOneof(1); - } - - /** - * A composite filter. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter $var - * @return $this - */ - public function setCompositeFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A filter on a document field. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter|null - */ - public function getFieldFilter() - { - return $this->readOneof(2); - } - - public function hasFieldFilter() - { - return $this->hasOneof(2); - } - - /** - * A filter on a document field. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter $var - * @return $this - */ - public function setFieldFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A filter that takes exactly one argument. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter|null - */ - public function getUnaryFilter() - { - return $this->readOneof(3); - } - - public function hasUnaryFilter() - { - return $this->hasOneof(3); - } - - /** - * A filter that takes exactly one argument. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter $var - * @return $this - */ - public function setUnaryFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getFilterType() - { - return $this->whichOneof("filter_type"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Filter::class, \Google\Cloud\Firestore\V1\StructuredQuery_Filter::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest.php deleted file mode 100644 index 3e32c9a7be8d..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest.php +++ /dev/null @@ -1,399 +0,0 @@ -google.firestore.v1.StructuredQuery.FindNearest - */ -class FindNearest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. An indexed vector field to search upon. Only documents which - * contain vectors whose dimensionality match the query_vector can be - * returned. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference vector_field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $vector_field = null; - /** - * Required. The query vector that we are searching on. Must be a vector of - * no more than 2048 dimensions. - * - * Generated from protobuf field .google.firestore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $query_vector = null; - /** - * Required. The distance measure to use, required. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $distance_measure = 0; - /** - * Required. The number of nearest neighbors to return. Must be a positive - * integer of no more than 1000. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $limit = null; - /** - * Optional. Optional name of the field to output the result of the vector - * distance calculation. Must conform to [document field - * name][google.firestore.v1.Document.fields] limitations. - * - * Generated from protobuf field string distance_result_field = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $distance_result_field = ''; - /** - * Optional. Option to specify a threshold for which no less similar - * documents will be returned. The behavior of the specified - * `distance_measure` will affect the meaning of the distance threshold. - * Since DOT_PRODUCT distances increase when the vectors are more similar, - * the comparison is inverted. - * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold - * For DOT_PRODUCT: WHERE distance >= distance_threshold - * - * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $distance_threshold = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $vector_field - * Required. An indexed vector field to search upon. Only documents which - * contain vectors whose dimensionality match the query_vector can be - * returned. - * @type \Google\Cloud\Firestore\V1\Value $query_vector - * Required. The query vector that we are searching on. Must be a vector of - * no more than 2048 dimensions. - * @type int $distance_measure - * Required. The distance measure to use, required. - * @type \Google\Protobuf\Int32Value $limit - * Required. The number of nearest neighbors to return. Must be a positive - * integer of no more than 1000. - * @type string $distance_result_field - * Optional. Optional name of the field to output the result of the vector - * distance calculation. Must conform to [document field - * name][google.firestore.v1.Document.fields] limitations. - * @type \Google\Protobuf\DoubleValue $distance_threshold - * Optional. Option to specify a threshold for which no less similar - * documents will be returned. The behavior of the specified - * `distance_measure` will affect the meaning of the distance threshold. - * Since DOT_PRODUCT distances increase when the vectors are more similar, - * the comparison is inverted. - * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold - * For DOT_PRODUCT: WHERE distance >= distance_threshold - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * Required. An indexed vector field to search upon. Only documents which - * contain vectors whose dimensionality match the query_vector can be - * returned. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference vector_field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null - */ - public function getVectorField() - { - return $this->vector_field; - } - - public function hasVectorField() - { - return isset($this->vector_field); - } - - public function clearVectorField() - { - unset($this->vector_field); - } - - /** - * Required. An indexed vector field to search upon. Only documents which - * contain vectors whose dimensionality match the query_vector can be - * returned. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference vector_field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var - * @return $this - */ - public function setVectorField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->vector_field = $var; - - return $this; - } - - /** - * Required. The query vector that we are searching on. Must be a vector of - * no more than 2048 dimensions. - * - * Generated from protobuf field .google.firestore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\V1\Value|null - */ - public function getQueryVector() - { - return $this->query_vector; - } - - public function hasQueryVector() - { - return isset($this->query_vector); - } - - public function clearQueryVector() - { - unset($this->query_vector); - } - - /** - * Required. The query vector that we are searching on. Must be a vector of - * no more than 2048 dimensions. - * - * Generated from protobuf field .google.firestore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\V1\Value $var - * @return $this - */ - public function setQueryVector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); - $this->query_vector = $var; - - return $this; - } - - /** - * Required. The distance measure to use, required. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getDistanceMeasure() - { - return $this->distance_measure; - } - - /** - * Required. The distance measure to use, required. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setDistanceMeasure($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest\DistanceMeasure::class); - $this->distance_measure = $var; - - return $this; - } - - /** - * Required. The number of nearest neighbors to return. Must be a positive - * integer of no more than 1000. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Int32Value|null - */ - public function getLimit() - { - return $this->limit; - } - - public function hasLimit() - { - return isset($this->limit); - } - - public function clearLimit() - { - unset($this->limit); - } - - /** - * Returns the unboxed value from getLimit() - - * Required. The number of nearest neighbors to return. Must be a positive - * integer of no more than 1000. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int|null - */ - public function getLimitUnwrapped() - { - return $this->readWrapperValue("limit"); - } - - /** - * Required. The number of nearest neighbors to return. Must be a positive - * integer of no more than 1000. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setLimit($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->limit = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * Required. The number of nearest neighbors to return. Must be a positive - * integer of no more than 1000. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int|null $var - * @return $this - */ - public function setLimitUnwrapped($var) - { - $this->writeWrapperValue("limit", $var); - return $this;} - - /** - * Optional. Optional name of the field to output the result of the vector - * distance calculation. Must conform to [document field - * name][google.firestore.v1.Document.fields] limitations. - * - * Generated from protobuf field string distance_result_field = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDistanceResultField() - { - return $this->distance_result_field; - } - - /** - * Optional. Optional name of the field to output the result of the vector - * distance calculation. Must conform to [document field - * name][google.firestore.v1.Document.fields] limitations. - * - * Generated from protobuf field string distance_result_field = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDistanceResultField($var) - { - GPBUtil::checkString($var, True); - $this->distance_result_field = $var; - - return $this; - } - - /** - * Optional. Option to specify a threshold for which no less similar - * documents will be returned. The behavior of the specified - * `distance_measure` will affect the meaning of the distance threshold. - * Since DOT_PRODUCT distances increase when the vectors are more similar, - * the comparison is inverted. - * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold - * For DOT_PRODUCT: WHERE distance >= distance_threshold - * - * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\DoubleValue|null - */ - public function getDistanceThreshold() - { - return $this->distance_threshold; - } - - public function hasDistanceThreshold() - { - return isset($this->distance_threshold); - } - - public function clearDistanceThreshold() - { - unset($this->distance_threshold); - } - - /** - * Returns the unboxed value from getDistanceThreshold() - - * Optional. Option to specify a threshold for which no less similar - * documents will be returned. The behavior of the specified - * `distance_measure` will affect the meaning of the distance threshold. - * Since DOT_PRODUCT distances increase when the vectors are more similar, - * the comparison is inverted. - * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold - * For DOT_PRODUCT: WHERE distance >= distance_threshold - * - * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return float|null - */ - public function getDistanceThresholdUnwrapped() - { - return $this->readWrapperValue("distance_threshold"); - } - - /** - * Optional. Option to specify a threshold for which no less similar - * documents will be returned. The behavior of the specified - * `distance_measure` will affect the meaning of the distance threshold. - * Since DOT_PRODUCT distances increase when the vectors are more similar, - * the comparison is inverted. - * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold - * For DOT_PRODUCT: WHERE distance >= distance_threshold - * - * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\DoubleValue $var - * @return $this - */ - public function setDistanceThreshold($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); - $this->distance_threshold = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. - - * Optional. Option to specify a threshold for which no less similar - * documents will be returned. The behavior of the specified - * `distance_measure` will affect the meaning of the distance threshold. - * Since DOT_PRODUCT distances increase when the vectors are more similar, - * the comparison is inverted. - * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold - * For DOT_PRODUCT: WHERE distance >= distance_threshold - * - * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param float|null $var - * @return $this - */ - public function setDistanceThresholdUnwrapped($var) - { - $this->writeWrapperValue("distance_threshold", $var); - return $this;} - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FindNearest::class, \Google\Cloud\Firestore\V1\StructuredQuery_FindNearest::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest/DistanceMeasure.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest/DistanceMeasure.php deleted file mode 100644 index f50ed905abcd..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest/DistanceMeasure.php +++ /dev/null @@ -1,83 +0,0 @@ -google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure - */ -class DistanceMeasure -{ - /** - * Should not be set. - * - * Generated from protobuf enum DISTANCE_MEASURE_UNSPECIFIED = 0; - */ - const DISTANCE_MEASURE_UNSPECIFIED = 0; - /** - * Measures the EUCLIDEAN distance between the vectors. See - * [Euclidean](https://en.wikipedia.org/wiki/Euclidean_distance) to learn - * more. The resulting distance decreases the more similar two vectors - * are. - * - * Generated from protobuf enum EUCLIDEAN = 1; - */ - const EUCLIDEAN = 1; - /** - * COSINE distance compares vectors based on the angle between them, which - * allows you to measure similarity that isn't based on the vectors - * magnitude. We recommend using DOT_PRODUCT with unit normalized vectors - * instead of COSINE distance, which is mathematically equivalent with - * better performance. See [Cosine - * Similarity](https://en.wikipedia.org/wiki/Cosine_similarity) to learn - * more about COSINE similarity and COSINE distance. The resulting - * COSINE distance decreases the more similar two vectors are. - * - * Generated from protobuf enum COSINE = 2; - */ - const COSINE = 2; - /** - * Similar to cosine but is affected by the magnitude of the vectors. See - * [Dot Product](https://en.wikipedia.org/wiki/Dot_product) to learn more. - * The resulting distance increases the more similar two vectors are. - * - * Generated from protobuf enum DOT_PRODUCT = 3; - */ - const DOT_PRODUCT = 3; - - private static $valueToName = [ - self::DISTANCE_MEASURE_UNSPECIFIED => 'DISTANCE_MEASURE_UNSPECIFIED', - self::EUCLIDEAN => 'EUCLIDEAN', - self::COSINE => 'COSINE', - self::DOT_PRODUCT => 'DOT_PRODUCT', - ]; - - 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(DistanceMeasure::class, \Google\Cloud\Firestore\V1\StructuredQuery_FindNearest_DistanceMeasure::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php deleted file mode 100644 index a71ebeb1b1d0..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php +++ /dev/null @@ -1,114 +0,0 @@ -google.firestore.v1.StructuredQuery.Order - */ -class Order extends \Google\Protobuf\Internal\Message -{ - /** - * The field to order by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - protected $field = null; - /** - * The direction to order by. Defaults to `ASCENDING`. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Direction direction = 2; - */ - protected $direction = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field - * The field to order by. - * @type int $direction - * The direction to order by. Defaults to `ASCENDING`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The field to order by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null - */ - public function getField() - { - return $this->field; - } - - public function hasField() - { - return isset($this->field); - } - - public function clearField() - { - unset($this->field); - } - - /** - * The field to order by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->field = $var; - - return $this; - } - - /** - * The direction to order by. Defaults to `ASCENDING`. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Direction direction = 2; - * @return int - */ - public function getDirection() - { - return $this->direction; - } - - /** - * The direction to order by. Defaults to `ASCENDING`. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Direction direction = 2; - * @param int $var - * @return $this - */ - public function setDirection($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\Direction::class); - $this->direction = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Order::class, \Google\Cloud\Firestore\V1\StructuredQuery_Order::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php deleted file mode 100644 index 36909ca38947..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php +++ /dev/null @@ -1,78 +0,0 @@ -google.firestore.v1.StructuredQuery.Projection - */ -class Projection extends \Google\Protobuf\Internal\Message -{ - /** - * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - */ - private $fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Firestore\V1\StructuredQuery\FieldReference>|\Google\Protobuf\Internal\RepeatedField $fields - * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - * @param array<\Google\Cloud\Firestore\V1\StructuredQuery\FieldReference>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->fields = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Projection::class, \Google\Cloud\Firestore\V1\StructuredQuery_Projection::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php deleted file mode 100644 index 4f90d0cfdd4b..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php +++ /dev/null @@ -1,112 +0,0 @@ -google.firestore.v1.StructuredQuery.UnaryFilter - */ -class UnaryFilter extends \Google\Protobuf\Internal\Message -{ - /** - * The unary operator to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; - */ - protected $op = 0; - protected $operand_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $op - * The unary operator to apply. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field - * The field to which to apply the operator. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The unary operator to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; - * @return int - */ - public function getOp() - { - return $this->op; - } - - /** - * The unary operator to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; - * @param int $var - * @return $this - */ - public function setOp($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter\Operator::class); - $this->op = $var; - - return $this; - } - - /** - * The field to which to apply the operator. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 2; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null - */ - public function getField() - { - return $this->readOneof(2); - } - - public function hasField() - { - return $this->hasOneof(2); - } - - /** - * The field to which to apply the operator. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getOperandType() - { - return $this->whichOneof("operand_type"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(UnaryFilter::class, \Google\Cloud\Firestore\V1\StructuredQuery_UnaryFilter::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php deleted file mode 100644 index d8a8dffc6d00..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php +++ /dev/null @@ -1,84 +0,0 @@ -google.firestore.v1.StructuredQuery.UnaryFilter.Operator - */ -class Operator -{ - /** - * Unspecified. This value must not be used. - * - * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; - */ - const OPERATOR_UNSPECIFIED = 0; - /** - * The given `field` is equal to `NaN`. - * - * Generated from protobuf enum IS_NAN = 2; - */ - const IS_NAN = 2; - /** - * The given `field` is equal to `NULL`. - * - * Generated from protobuf enum IS_NULL = 3; - */ - const IS_NULL = 3; - /** - * The given `field` is not equal to `NaN`. - * Requires: - * * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. - * * That `field` comes first in the `order_by`. - * - * Generated from protobuf enum IS_NOT_NAN = 4; - */ - const IS_NOT_NAN = 4; - /** - * The given `field` is not equal to `NULL`. - * Requires: - * * A single `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. - * * That `field` comes first in the `order_by`. - * - * Generated from protobuf enum IS_NOT_NULL = 5; - */ - const IS_NOT_NULL = 5; - - private static $valueToName = [ - self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', - self::IS_NAN => 'IS_NAN', - self::IS_NULL => 'IS_NULL', - self::IS_NOT_NAN => 'IS_NOT_NAN', - self::IS_NOT_NULL => 'IS_NOT_NULL', - ]; - - 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(Operator::class, \Google\Cloud\Firestore\V1\StructuredQuery_UnaryFilter_Operator::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target.php deleted file mode 100644 index ac09a0b046f5..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target.php +++ /dev/null @@ -1,407 +0,0 @@ -google.firestore.v1.Target - */ -class Target extends \Google\Protobuf\Internal\Message -{ - /** - * The target ID that identifies the target on the stream. Must be a positive - * number and non-zero. - * If `target_id` is 0 (or unspecified), the server will assign an ID for this - * target and return that in a `TargetChange::ADD` event. Once a target with - * `target_id=0` is added, all subsequent targets must also have - * `target_id=0`. If an `AddTarget` request with `target_id != 0` is - * sent to the server after a target with `target_id=0` is added, the server - * will immediately send a response with a `TargetChange::Remove` event. - * Note that if the client sends multiple `AddTarget` requests - * without an ID, the order of IDs returned in `TargetChage.target_ids` are - * undefined. Therefore, clients should provide a target ID instead of relying - * on the server to assign one. - * If `target_id` is non-zero, there must not be an existing active target on - * this stream with the same ID. - * - * Generated from protobuf field int32 target_id = 5; - */ - protected $target_id = 0; - /** - * If the target should be removed once it is current and consistent. - * - * Generated from protobuf field bool once = 6; - */ - protected $once = false; - /** - * The number of documents that last matched the query at the resume token or - * read time. - * This value is only relevant when a `resume_type` is provided. This value - * being present and greater than zero signals that the client wants - * `ExistenceFilter.unchanged_names` to be included in the response. - * - * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; - */ - protected $expected_count = null; - protected $target_type; - protected $resume_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Target\QueryTarget $query - * A target specified by a query. - * @type \Google\Cloud\Firestore\V1\Target\DocumentsTarget $documents - * A target specified by a set of document names. - * @type string $resume_token - * A resume token from a prior - * [TargetChange][google.firestore.v1.TargetChange] for an identical target. - * Using a resume token with a different target is unsupported and may fail. - * @type \Google\Protobuf\Timestamp $read_time - * Start listening after a specific `read_time`. - * The client must know the state of matching documents at this time. - * @type int $target_id - * The target ID that identifies the target on the stream. Must be a positive - * number and non-zero. - * If `target_id` is 0 (or unspecified), the server will assign an ID for this - * target and return that in a `TargetChange::ADD` event. Once a target with - * `target_id=0` is added, all subsequent targets must also have - * `target_id=0`. If an `AddTarget` request with `target_id != 0` is - * sent to the server after a target with `target_id=0` is added, the server - * will immediately send a response with a `TargetChange::Remove` event. - * Note that if the client sends multiple `AddTarget` requests - * without an ID, the order of IDs returned in `TargetChage.target_ids` are - * undefined. Therefore, clients should provide a target ID instead of relying - * on the server to assign one. - * If `target_id` is non-zero, there must not be an existing active target on - * this stream with the same ID. - * @type bool $once - * If the target should be removed once it is current and consistent. - * @type \Google\Protobuf\Int32Value $expected_count - * The number of documents that last matched the query at the resume token or - * read time. - * This value is only relevant when a `resume_type` is provided. This value - * being present and greater than zero signals that the client wants - * `ExistenceFilter.unchanged_names` to be included in the response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * A target specified by a query. - * - * Generated from protobuf field .google.firestore.v1.Target.QueryTarget query = 2; - * @return \Google\Cloud\Firestore\V1\Target\QueryTarget|null - */ - public function getQuery() - { - return $this->readOneof(2); - } - - public function hasQuery() - { - return $this->hasOneof(2); - } - - /** - * A target specified by a query. - * - * Generated from protobuf field .google.firestore.v1.Target.QueryTarget query = 2; - * @param \Google\Cloud\Firestore\V1\Target\QueryTarget $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target\QueryTarget::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A target specified by a set of document names. - * - * Generated from protobuf field .google.firestore.v1.Target.DocumentsTarget documents = 3; - * @return \Google\Cloud\Firestore\V1\Target\DocumentsTarget|null - */ - public function getDocuments() - { - return $this->readOneof(3); - } - - public function hasDocuments() - { - return $this->hasOneof(3); - } - - /** - * A target specified by a set of document names. - * - * Generated from protobuf field .google.firestore.v1.Target.DocumentsTarget documents = 3; - * @param \Google\Cloud\Firestore\V1\Target\DocumentsTarget $var - * @return $this - */ - public function setDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target\DocumentsTarget::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * A resume token from a prior - * [TargetChange][google.firestore.v1.TargetChange] for an identical target. - * Using a resume token with a different target is unsupported and may fail. - * - * Generated from protobuf field bytes resume_token = 4; - * @return string - */ - public function getResumeToken() - { - return $this->readOneof(4); - } - - public function hasResumeToken() - { - return $this->hasOneof(4); - } - - /** - * A resume token from a prior - * [TargetChange][google.firestore.v1.TargetChange] for an identical target. - * Using a resume token with a different target is unsupported and may fail. - * - * Generated from protobuf field bytes resume_token = 4; - * @param string $var - * @return $this - */ - public function setResumeToken($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Start listening after a specific `read_time`. - * The client must know the state of matching documents at this time. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 11; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(11); - } - - public function hasReadTime() - { - return $this->hasOneof(11); - } - - /** - * Start listening after a specific `read_time`. - * The client must know the state of matching documents at this time. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 11; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * The target ID that identifies the target on the stream. Must be a positive - * number and non-zero. - * If `target_id` is 0 (or unspecified), the server will assign an ID for this - * target and return that in a `TargetChange::ADD` event. Once a target with - * `target_id=0` is added, all subsequent targets must also have - * `target_id=0`. If an `AddTarget` request with `target_id != 0` is - * sent to the server after a target with `target_id=0` is added, the server - * will immediately send a response with a `TargetChange::Remove` event. - * Note that if the client sends multiple `AddTarget` requests - * without an ID, the order of IDs returned in `TargetChage.target_ids` are - * undefined. Therefore, clients should provide a target ID instead of relying - * on the server to assign one. - * If `target_id` is non-zero, there must not be an existing active target on - * this stream with the same ID. - * - * Generated from protobuf field int32 target_id = 5; - * @return int - */ - public function getTargetId() - { - return $this->target_id; - } - - /** - * The target ID that identifies the target on the stream. Must be a positive - * number and non-zero. - * If `target_id` is 0 (or unspecified), the server will assign an ID for this - * target and return that in a `TargetChange::ADD` event. Once a target with - * `target_id=0` is added, all subsequent targets must also have - * `target_id=0`. If an `AddTarget` request with `target_id != 0` is - * sent to the server after a target with `target_id=0` is added, the server - * will immediately send a response with a `TargetChange::Remove` event. - * Note that if the client sends multiple `AddTarget` requests - * without an ID, the order of IDs returned in `TargetChage.target_ids` are - * undefined. Therefore, clients should provide a target ID instead of relying - * on the server to assign one. - * If `target_id` is non-zero, there must not be an existing active target on - * this stream with the same ID. - * - * Generated from protobuf field int32 target_id = 5; - * @param int $var - * @return $this - */ - public function setTargetId($var) - { - GPBUtil::checkInt32($var); - $this->target_id = $var; - - return $this; - } - - /** - * If the target should be removed once it is current and consistent. - * - * Generated from protobuf field bool once = 6; - * @return bool - */ - public function getOnce() - { - return $this->once; - } - - /** - * If the target should be removed once it is current and consistent. - * - * Generated from protobuf field bool once = 6; - * @param bool $var - * @return $this - */ - public function setOnce($var) - { - GPBUtil::checkBool($var); - $this->once = $var; - - return $this; - } - - /** - * The number of documents that last matched the query at the resume token or - * read time. - * This value is only relevant when a `resume_type` is provided. This value - * being present and greater than zero signals that the client wants - * `ExistenceFilter.unchanged_names` to be included in the response. - * - * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; - * @return \Google\Protobuf\Int32Value|null - */ - public function getExpectedCount() - { - return $this->expected_count; - } - - public function hasExpectedCount() - { - return isset($this->expected_count); - } - - public function clearExpectedCount() - { - unset($this->expected_count); - } - - /** - * Returns the unboxed value from getExpectedCount() - - * The number of documents that last matched the query at the resume token or - * read time. - * This value is only relevant when a `resume_type` is provided. This value - * being present and greater than zero signals that the client wants - * `ExistenceFilter.unchanged_names` to be included in the response. - * - * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; - * @return int|null - */ - public function getExpectedCountUnwrapped() - { - return $this->readWrapperValue("expected_count"); - } - - /** - * The number of documents that last matched the query at the resume token or - * read time. - * This value is only relevant when a `resume_type` is provided. This value - * being present and greater than zero signals that the client wants - * `ExistenceFilter.unchanged_names` to be included in the response. - * - * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setExpectedCount($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->expected_count = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * The number of documents that last matched the query at the resume token or - * read time. - * This value is only relevant when a `resume_type` is provided. This value - * being present and greater than zero signals that the client wants - * `ExistenceFilter.unchanged_names` to be included in the response. - * - * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; - * @param int|null $var - * @return $this - */ - public function setExpectedCountUnwrapped($var) - { - $this->writeWrapperValue("expected_count", $var); - return $this;} - - /** - * @return string - */ - public function getTargetType() - { - return $this->whichOneof("target_type"); - } - - /** - * @return string - */ - public function getResumeType() - { - return $this->whichOneof("resume_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php deleted file mode 100644 index b96562c648cf..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php +++ /dev/null @@ -1,82 +0,0 @@ -google.firestore.v1.Target.DocumentsTarget - */ -class DocumentsTarget extends \Google\Protobuf\Internal\Message -{ - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of - * the given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - */ - private $documents; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $documents - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of - * the given `database`. Duplicate names will be elided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of - * the given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDocuments() - { - return $this->documents; - } - - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of - * the given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDocuments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->documents = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DocumentsTarget::class, \Google\Cloud\Firestore\V1\Target_DocumentsTarget::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php deleted file mode 100644 index 56c02faeb030..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php +++ /dev/null @@ -1,132 +0,0 @@ -google.firestore.v1.Target.QueryTarget - */ -class QueryTarget extends \Google\Protobuf\Internal\Message -{ - /** - * The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1; - */ - protected $parent = ''; - protected $query_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query - * A structured query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * A structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @return \Google\Cloud\Firestore\V1\StructuredQuery|null - */ - public function getStructuredQuery() - { - return $this->readOneof(2); - } - - public function hasStructuredQuery() - { - return $this->hasOneof(2); - } - - /** - * A structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery $var - * @return $this - */ - public function setStructuredQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getQueryType() - { - return $this->whichOneof("query_type"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(QueryTarget::class, \Google\Cloud\Firestore\V1\Target_QueryTarget::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php deleted file mode 100644 index 7916d0c40af0..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php +++ /dev/null @@ -1,267 +0,0 @@ -google.firestore.v1.TargetChange - */ -class TargetChange extends \Google\Protobuf\Internal\Message -{ - /** - * The type of change that occurred. - * - * Generated from protobuf field .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; - */ - protected $target_change_type = 0; - /** - * The target IDs of targets that have changed. - * If empty, the change applies to all targets. - * The order of the target IDs is not defined. - * - * Generated from protobuf field repeated int32 target_ids = 2; - */ - private $target_ids; - /** - * The error that resulted in this change, if applicable. - * - * Generated from protobuf field .google.rpc.Status cause = 3; - */ - protected $cause = null; - /** - * A token that can be used to resume the stream for the given `target_ids`, - * or all targets if `target_ids` is empty. - * Not set on every target change. - * - * Generated from protobuf field bytes resume_token = 4; - */ - protected $resume_token = ''; - /** - * The consistent `read_time` for the given `target_ids` (omitted when the - * target_ids are not at a consistent snapshot). - * The stream is guaranteed to send a `read_time` with `target_ids` empty - * whenever the entire stream reaches a new consistent snapshot. ADD, - * CURRENT, and RESET messages are guaranteed to (eventually) result in a - * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). - * For a given stream, `read_time` is guaranteed to be monotonically - * increasing. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - */ - protected $read_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $target_change_type - * The type of change that occurred. - * @type array|\Google\Protobuf\Internal\RepeatedField $target_ids - * The target IDs of targets that have changed. - * If empty, the change applies to all targets. - * The order of the target IDs is not defined. - * @type \Google\Rpc\Status $cause - * The error that resulted in this change, if applicable. - * @type string $resume_token - * A token that can be used to resume the stream for the given `target_ids`, - * or all targets if `target_ids` is empty. - * Not set on every target change. - * @type \Google\Protobuf\Timestamp $read_time - * The consistent `read_time` for the given `target_ids` (omitted when the - * target_ids are not at a consistent snapshot). - * The stream is guaranteed to send a `read_time` with `target_ids` empty - * whenever the entire stream reaches a new consistent snapshot. ADD, - * CURRENT, and RESET messages are guaranteed to (eventually) result in a - * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). - * For a given stream, `read_time` is guaranteed to be monotonically - * increasing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The type of change that occurred. - * - * Generated from protobuf field .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; - * @return int - */ - public function getTargetChangeType() - { - return $this->target_change_type; - } - - /** - * The type of change that occurred. - * - * Generated from protobuf field .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; - * @param int $var - * @return $this - */ - public function setTargetChangeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\TargetChange\TargetChangeType::class); - $this->target_change_type = $var; - - return $this; - } - - /** - * The target IDs of targets that have changed. - * If empty, the change applies to all targets. - * The order of the target IDs is not defined. - * - * Generated from protobuf field repeated int32 target_ids = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargetIds() - { - return $this->target_ids; - } - - /** - * The target IDs of targets that have changed. - * If empty, the change applies to all targets. - * The order of the target IDs is not defined. - * - * Generated from protobuf field repeated int32 target_ids = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->target_ids = $arr; - - return $this; - } - - /** - * The error that resulted in this change, if applicable. - * - * Generated from protobuf field .google.rpc.Status cause = 3; - * @return \Google\Rpc\Status|null - */ - public function getCause() - { - return $this->cause; - } - - public function hasCause() - { - return isset($this->cause); - } - - public function clearCause() - { - unset($this->cause); - } - - /** - * The error that resulted in this change, if applicable. - * - * Generated from protobuf field .google.rpc.Status cause = 3; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setCause($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->cause = $var; - - return $this; - } - - /** - * A token that can be used to resume the stream for the given `target_ids`, - * or all targets if `target_ids` is empty. - * Not set on every target change. - * - * Generated from protobuf field bytes resume_token = 4; - * @return string - */ - public function getResumeToken() - { - return $this->resume_token; - } - - /** - * A token that can be used to resume the stream for the given `target_ids`, - * or all targets if `target_ids` is empty. - * Not set on every target change. - * - * Generated from protobuf field bytes resume_token = 4; - * @param string $var - * @return $this - */ - public function setResumeToken($var) - { - GPBUtil::checkString($var, False); - $this->resume_token = $var; - - return $this; - } - - /** - * The consistent `read_time` for the given `target_ids` (omitted when the - * target_ids are not at a consistent snapshot). - * The stream is guaranteed to send a `read_time` with `target_ids` empty - * whenever the entire stream reaches a new consistent snapshot. ADD, - * CURRENT, and RESET messages are guaranteed to (eventually) result in a - * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). - * For a given stream, `read_time` is guaranteed to be monotonically - * increasing. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The consistent `read_time` for the given `target_ids` (omitted when the - * target_ids are not at a consistent snapshot). - * The stream is guaranteed to send a `read_time` with `target_ids` empty - * whenever the entire stream reaches a new consistent snapshot. ADD, - * CURRENT, and RESET messages are guaranteed to (eventually) result in a - * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). - * For a given stream, `read_time` is guaranteed to be monotonically - * increasing. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php deleted file mode 100644 index 23694a75db2e..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php +++ /dev/null @@ -1,86 +0,0 @@ -google.firestore.v1.TargetChange.TargetChangeType - */ -class TargetChangeType -{ - /** - * No change has occurred. Used only to send an updated `resume_token`. - * - * Generated from protobuf enum NO_CHANGE = 0; - */ - const NO_CHANGE = 0; - /** - * The targets have been added. - * - * Generated from protobuf enum ADD = 1; - */ - const ADD = 1; - /** - * The targets have been removed. - * - * Generated from protobuf enum REMOVE = 2; - */ - const REMOVE = 2; - /** - * The targets reflect all changes committed before the targets were added - * to the stream. - * This will be sent after or with a `read_time` that is greater than or - * equal to the time at which the targets were added. - * Listeners can wait for this change if read-after-write semantics - * are desired. - * - * Generated from protobuf enum CURRENT = 3; - */ - const CURRENT = 3; - /** - * The targets have been reset, and a new initial state for the targets - * will be returned in subsequent changes. - * After the initial state is complete, `CURRENT` will be returned even - * if the target was previously indicated to be `CURRENT`. - * - * Generated from protobuf enum RESET = 4; - */ - const RESET = 4; - - private static $valueToName = [ - self::NO_CHANGE => 'NO_CHANGE', - self::ADD => 'ADD', - self::REMOVE => 'REMOVE', - self::CURRENT => 'CURRENT', - self::RESET => 'RESET', - ]; - - 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(TargetChangeType::class, \Google\Cloud\Firestore\V1\TargetChange_TargetChangeType::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions.php deleted file mode 100644 index 07498e58f517..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions.php +++ /dev/null @@ -1,108 +0,0 @@ -google.firestore.v1.TransactionOptions - */ -class TransactionOptions extends \Google\Protobuf\Internal\Message -{ - protected $mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly $read_only - * The transaction can only be used for read operations. - * @type \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite $read_write - * The transaction can be used for both read and write operations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The transaction can only be used for read operations. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2; - * @return \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly|null - */ - public function getReadOnly() - { - return $this->readOneof(2); - } - - public function hasReadOnly() - { - return $this->hasOneof(2); - } - - /** - * The transaction can only be used for read operations. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2; - * @param \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly $var - * @return $this - */ - public function setReadOnly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The transaction can be used for both read and write operations. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3; - * @return \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite|null - */ - public function getReadWrite() - { - return $this->readOneof(3); - } - - public function hasReadWrite() - { - return $this->hasOneof(3); - } - - /** - * The transaction can be used for both read and write operations. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3; - * @param \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite $var - * @return $this - */ - public function setReadWrite($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getMode() - { - return $this->whichOneof("mode"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php deleted file mode 100644 index 7b55ad3ed4fb..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php +++ /dev/null @@ -1,90 +0,0 @@ -google.firestore.v1.TransactionOptions.ReadOnly - */ -class PBReadOnly extends \Google\Protobuf\Internal\Message -{ - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $read_time - * Reads documents at the given time. - * This must be a microsecond precision timestamp within the past one - * hour, or if Point-in-Time Recovery is enabled, can additionally be a - * whole minute timestamp within the past 7 days. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Reads documents at the given time. - * This must be a microsecond precision timestamp within the past one - * hour, or if Point-in-Time Recovery is enabled, can additionally be a - * whole minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(2); - } - - public function hasReadTime() - { - return $this->hasOneof(2); - } - - /** - * Reads documents at the given time. - * This must be a microsecond precision timestamp within the past one - * hour, or if Point-in-Time Recovery is enabled, can additionally be a - * whole minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PBReadOnly::class, \Google\Cloud\Firestore\V1\TransactionOptions_ReadOnly::class); - -// Adding a class alias for backwards compatibility with the "readonly" keyword. -class_alias(PBReadOnly::class, __NAMESPACE__ . '\ReadOnly'); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadOnly.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadOnly.php deleted file mode 100644 index cb227a9fbefb..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadOnly.php +++ /dev/null @@ -1,9 +0,0 @@ -google.firestore.v1.TransactionOptions.ReadWrite - */ -class ReadWrite extends \Google\Protobuf\Internal\Message -{ - /** - * An optional transaction to retry. - * - * Generated from protobuf field bytes retry_transaction = 1; - */ - protected $retry_transaction = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $retry_transaction - * An optional transaction to retry. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * An optional transaction to retry. - * - * Generated from protobuf field bytes retry_transaction = 1; - * @return string - */ - public function getRetryTransaction() - { - return $this->retry_transaction; - } - - /** - * An optional transaction to retry. - * - * Generated from protobuf field bytes retry_transaction = 1; - * @param string $var - * @return $this - */ - public function setRetryTransaction($var) - { - GPBUtil::checkString($var, False); - $this->retry_transaction = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ReadWrite::class, \Google\Cloud\Firestore\V1\TransactionOptions_ReadWrite::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/UpdateDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/UpdateDocumentRequest.php deleted file mode 100644 index ddc9406eaba7..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/UpdateDocumentRequest.php +++ /dev/null @@ -1,268 +0,0 @@ -google.firestore.v1.UpdateDocumentRequest - */ -class UpdateDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The updated document. - * Creates the document if it does not already exist. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The fields to update. - * None of the field paths in the mask may contain a reserved name. - * If the document exists on the server and has fields not referenced in the - * mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 2; - */ - protected $update_mask = null; - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - */ - protected $mask = null; - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - */ - protected $current_document = null; - - /** - * @param \Google\Cloud\Firestore\V1\Document $document Required. The updated document. - * Creates the document if it does not already exist. - * @param \Google\Cloud\Firestore\V1\DocumentMask $updateMask The fields to update. - * None of the field paths in the mask may contain a reserved name. - * - * If the document exists on the server and has fields not referenced in the - * mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * - * @return \Google\Cloud\Firestore\V1\UpdateDocumentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Firestore\V1\Document $document, \Google\Cloud\Firestore\V1\DocumentMask $updateMask): self - { - return (new self()) - ->setDocument($document) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Document $document - * Required. The updated document. - * Creates the document if it does not already exist. - * @type \Google\Cloud\Firestore\V1\DocumentMask $update_mask - * The fields to update. - * None of the field paths in the mask may contain a reserved name. - * If the document exists on the server and has fields not referenced in the - * mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * @type \Google\Cloud\Firestore\V1\DocumentMask $mask - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * @type \Google\Cloud\Firestore\V1\Precondition $current_document - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The updated document. - * Creates the document if it does not already exist. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. The updated document. - * Creates the document if it does not already exist. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The fields to update. - * None of the field paths in the mask may contain a reserved name. - * If the document exists on the server and has fields not referenced in the - * mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 2; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The fields to update. - * None of the field paths in the mask may contain a reserved name. - * If the document exists on the server and has fields not referenced in the - * mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 2; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getMask() - { - return $this->mask; - } - - public function hasMask() - { - return isset($this->mask); - } - - public function clearMask() - { - unset($this->mask); - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->mask = $var; - - return $this; - } - - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - * @return \Google\Cloud\Firestore\V1\Precondition|null - */ - public function getCurrentDocument() - { - return $this->current_document; - } - - public function hasCurrentDocument() - { - return isset($this->current_document); - } - - public function clearCurrentDocument() - { - unset($this->current_document); - } - - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - * @param \Google\Cloud\Firestore\V1\Precondition $var - * @return $this - */ - public function setCurrentDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Precondition::class); - $this->current_document = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php deleted file mode 100644 index fbfb290bbe78..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php +++ /dev/null @@ -1,435 +0,0 @@ -google.firestore.v1.Value - */ -class Value extends \Google\Protobuf\Internal\Message -{ - protected $value_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $null_value - * A null value. - * @type bool $boolean_value - * A boolean value. - * @type int|string $integer_value - * An integer value. - * @type float $double_value - * A double value. - * @type \Google\Protobuf\Timestamp $timestamp_value - * A timestamp value. - * Precise only to microseconds. When stored, any additional precision is - * rounded down. - * @type string $string_value - * A string value. - * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes of the UTF-8 representation are considered by - * queries. - * @type string $bytes_value - * A bytes value. - * Must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes are considered by queries. - * @type string $reference_value - * A reference to a document. For example: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type \Google\Type\LatLng $geo_point_value - * A geo point value representing a point on the surface of Earth. - * @type \Google\Cloud\Firestore\V1\ArrayValue $array_value - * An array value. - * Cannot directly contain another array value, though can contain a - * map which contains another array. - * @type \Google\Cloud\Firestore\V1\MapValue $map_value - * A map value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * A null value. - * - * Generated from protobuf field .google.protobuf.NullValue null_value = 11; - * @return int - */ - public function getNullValue() - { - return $this->readOneof(11); - } - - public function hasNullValue() - { - return $this->hasOneof(11); - } - - /** - * A null value. - * - * Generated from protobuf field .google.protobuf.NullValue null_value = 11; - * @param int $var - * @return $this - */ - public function setNullValue($var) - { - GPBUtil::checkEnum($var, \Google\Protobuf\NullValue::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * A boolean value. - * - * Generated from protobuf field bool boolean_value = 1; - * @return bool - */ - public function getBooleanValue() - { - return $this->readOneof(1); - } - - public function hasBooleanValue() - { - return $this->hasOneof(1); - } - - /** - * A boolean value. - * - * Generated from protobuf field bool boolean_value = 1; - * @param bool $var - * @return $this - */ - public function setBooleanValue($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * An integer value. - * - * Generated from protobuf field int64 integer_value = 2; - * @return int|string - */ - public function getIntegerValue() - { - return $this->readOneof(2); - } - - public function hasIntegerValue() - { - return $this->hasOneof(2); - } - - /** - * An integer value. - * - * Generated from protobuf field int64 integer_value = 2; - * @param int|string $var - * @return $this - */ - public function setIntegerValue($var) - { - GPBUtil::checkInt64($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A double value. - * - * Generated from protobuf field double double_value = 3; - * @return float - */ - public function getDoubleValue() - { - return $this->readOneof(3); - } - - public function hasDoubleValue() - { - return $this->hasOneof(3); - } - - /** - * A double value. - * - * Generated from protobuf field double double_value = 3; - * @param float $var - * @return $this - */ - public function setDoubleValue($var) - { - GPBUtil::checkDouble($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * A timestamp value. - * Precise only to microseconds. When stored, any additional precision is - * rounded down. - * - * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTimestampValue() - { - return $this->readOneof(10); - } - - public function hasTimestampValue() - { - return $this->hasOneof(10); - } - - /** - * A timestamp value. - * Precise only to microseconds. When stored, any additional precision is - * rounded down. - * - * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTimestampValue($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * A string value. - * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes of the UTF-8 representation are considered by - * queries. - * - * Generated from protobuf field string string_value = 17; - * @return string - */ - public function getStringValue() - { - return $this->readOneof(17); - } - - public function hasStringValue() - { - return $this->hasOneof(17); - } - - /** - * A string value. - * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes of the UTF-8 representation are considered by - * queries. - * - * Generated from protobuf field string string_value = 17; - * @param string $var - * @return $this - */ - public function setStringValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * A bytes value. - * Must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes are considered by queries. - * - * Generated from protobuf field bytes bytes_value = 18; - * @return string - */ - public function getBytesValue() - { - return $this->readOneof(18); - } - - public function hasBytesValue() - { - return $this->hasOneof(18); - } - - /** - * A bytes value. - * Must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes are considered by queries. - * - * Generated from protobuf field bytes bytes_value = 18; - * @param string $var - * @return $this - */ - public function setBytesValue($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(18, $var); - - return $this; - } - - /** - * A reference to a document. For example: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string reference_value = 5; - * @return string - */ - public function getReferenceValue() - { - return $this->readOneof(5); - } - - public function hasReferenceValue() - { - return $this->hasOneof(5); - } - - /** - * A reference to a document. For example: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string reference_value = 5; - * @param string $var - * @return $this - */ - public function setReferenceValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * A geo point value representing a point on the surface of Earth. - * - * Generated from protobuf field .google.type.LatLng geo_point_value = 8; - * @return \Google\Type\LatLng|null - */ - public function getGeoPointValue() - { - return $this->readOneof(8); - } - - public function hasGeoPointValue() - { - return $this->hasOneof(8); - } - - /** - * A geo point value representing a point on the surface of Earth. - * - * Generated from protobuf field .google.type.LatLng geo_point_value = 8; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setGeoPointValue($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * An array value. - * Cannot directly contain another array value, though can contain a - * map which contains another array. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue array_value = 9; - * @return \Google\Cloud\Firestore\V1\ArrayValue|null - */ - public function getArrayValue() - { - return $this->readOneof(9); - } - - public function hasArrayValue() - { - return $this->hasOneof(9); - } - - /** - * An array value. - * Cannot directly contain another array value, though can contain a - * map which contains another array. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue array_value = 9; - * @param \Google\Cloud\Firestore\V1\ArrayValue $var - * @return $this - */ - public function setArrayValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ArrayValue::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * A map value. - * - * Generated from protobuf field .google.firestore.v1.MapValue map_value = 6; - * @return \Google\Cloud\Firestore\V1\MapValue|null - */ - public function getMapValue() - { - return $this->readOneof(6); - } - - public function hasMapValue() - { - return $this->hasOneof(6); - } - - /** - * A map value. - * - * Generated from protobuf field .google.firestore.v1.MapValue map_value = 6; - * @param \Google\Cloud\Firestore\V1\MapValue $var - * @return $this - */ - public function setMapValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\MapValue::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getValueType() - { - return $this->whichOneof("value_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php deleted file mode 100644 index 67920d9f8a1a..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php +++ /dev/null @@ -1,314 +0,0 @@ -google.firestore.v1.Write - */ -class Write extends \Google\Protobuf\Internal\Message -{ - /** - * The fields to update in this write. - * This field can be set only when the operation is `update`. - * If the mask is not set for an `update` and the document exists, any - * existing data will be overwritten. - * If the mask is set and the document on the server has fields not covered by - * the mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * The field paths in this mask must not contain a reserved field name. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 3; - */ - protected $update_mask = null; - /** - * The transforms to perform after update. - * This field can be set only when the operation is `update`. If present, this - * write is equivalent to performing `update` and `transform` to the same - * document atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; - */ - private $update_transforms; - /** - * An optional precondition on the document. - * The write will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - */ - protected $current_document = null; - protected $operation; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Document $update - * A document to write. - * @type string $delete - * A document name to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type \Google\Cloud\Firestore\V1\DocumentTransform $transform - * Applies a transformation to a document. - * @type \Google\Cloud\Firestore\V1\DocumentMask $update_mask - * The fields to update in this write. - * This field can be set only when the operation is `update`. - * If the mask is not set for an `update` and the document exists, any - * existing data will be overwritten. - * If the mask is set and the document on the server has fields not covered by - * the mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * The field paths in this mask must not contain a reserved field name. - * @type array<\Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform>|\Google\Protobuf\Internal\RepeatedField $update_transforms - * The transforms to perform after update. - * This field can be set only when the operation is `update`. If present, this - * write is equivalent to performing `update` and `transform` to the same - * document atomically and in order. - * @type \Google\Cloud\Firestore\V1\Precondition $current_document - * An optional precondition on the document. - * The write will fail if this is set and not met by the target document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * A document to write. - * - * Generated from protobuf field .google.firestore.v1.Document update = 1; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getUpdate() - { - return $this->readOneof(1); - } - - public function hasUpdate() - { - return $this->hasOneof(1); - } - - /** - * A document to write. - * - * Generated from protobuf field .google.firestore.v1.Document update = 1; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setUpdate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A document name to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string delete = 2; - * @return string - */ - public function getDelete() - { - return $this->readOneof(2); - } - - public function hasDelete() - { - return $this->hasOneof(2); - } - - /** - * A document name to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string delete = 2; - * @param string $var - * @return $this - */ - public function setDelete($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Applies a transformation to a document. - * - * Generated from protobuf field .google.firestore.v1.DocumentTransform transform = 6; - * @return \Google\Cloud\Firestore\V1\DocumentTransform|null - */ - public function getTransform() - { - return $this->readOneof(6); - } - - public function hasTransform() - { - return $this->hasOneof(6); - } - - /** - * Applies a transformation to a document. - * - * Generated from protobuf field .google.firestore.v1.DocumentTransform transform = 6; - * @param \Google\Cloud\Firestore\V1\DocumentTransform $var - * @return $this - */ - public function setTransform($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentTransform::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * The fields to update in this write. - * This field can be set only when the operation is `update`. - * If the mask is not set for an `update` and the document exists, any - * existing data will be overwritten. - * If the mask is set and the document on the server has fields not covered by - * the mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * The field paths in this mask must not contain a reserved field name. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 3; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The fields to update in this write. - * This field can be set only when the operation is `update`. - * If the mask is not set for an `update` and the document exists, any - * existing data will be overwritten. - * If the mask is set and the document on the server has fields not covered by - * the mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * The field paths in this mask must not contain a reserved field name. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 3; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * The transforms to perform after update. - * This field can be set only when the operation is `update`. If present, this - * write is equivalent to performing `update` and `transform` to the same - * document atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUpdateTransforms() - { - return $this->update_transforms; - } - - /** - * The transforms to perform after update. - * This field can be set only when the operation is `update`. If present, this - * write is equivalent to performing `update` and `transform` to the same - * document atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; - * @param array<\Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUpdateTransforms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform::class); - $this->update_transforms = $arr; - - return $this; - } - - /** - * An optional precondition on the document. - * The write will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - * @return \Google\Cloud\Firestore\V1\Precondition|null - */ - public function getCurrentDocument() - { - return $this->current_document; - } - - public function hasCurrentDocument() - { - return isset($this->current_document); - } - - public function clearCurrentDocument() - { - unset($this->current_document); - } - - /** - * An optional precondition on the document. - * The write will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - * @param \Google\Cloud\Firestore\V1\Precondition $var - * @return $this - */ - public function setCurrentDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Precondition::class); - $this->current_document = $var; - - return $this; - } - - /** - * @return string - */ - public function getOperation() - { - return $this->whichOneof("operation"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php deleted file mode 100644 index 2bab538a188c..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php +++ /dev/null @@ -1,277 +0,0 @@ -google.firestore.v1.WriteRequest - */ -class WriteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * This is only required in the first message. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * The ID of the write stream to resume. - * This may only be set in the first message. When left empty, a new write - * stream will be created. - * - * Generated from protobuf field string stream_id = 2; - */ - protected $stream_id = ''; - /** - * The writes to apply. - * Always executed atomically and in order. - * This must be empty on the first request. - * This may be empty on the last request. - * This must not be empty on all other requests. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 3; - */ - private $writes; - /** - * A stream token that was previously sent by the server. - * The client should set this field to the token from the most recent - * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This - * acknowledges that the client has received responses up to this token. After - * sending this token, earlier tokens may not be used anymore. - * The server may close the stream if there are too many unacknowledged - * responses. - * Leave this field unset when creating a new stream. To resume a stream at - * a specific point, set this field and the `stream_id` field. - * Leave this field unset when creating a new stream. - * - * Generated from protobuf field bytes stream_token = 4; - */ - protected $stream_token = ''; - /** - * Labels associated with this write request. - * - * Generated from protobuf field map labels = 5; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * This is only required in the first message. - * @type string $stream_id - * The ID of the write stream to resume. - * This may only be set in the first message. When left empty, a new write - * stream will be created. - * @type array<\Google\Cloud\Firestore\V1\Write>|\Google\Protobuf\Internal\RepeatedField $writes - * The writes to apply. - * Always executed atomically and in order. - * This must be empty on the first request. - * This may be empty on the last request. - * This must not be empty on all other requests. - * @type string $stream_token - * A stream token that was previously sent by the server. - * The client should set this field to the token from the most recent - * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This - * acknowledges that the client has received responses up to this token. After - * sending this token, earlier tokens may not be used anymore. - * The server may close the stream if there are too many unacknowledged - * responses. - * Leave this field unset when creating a new stream. To resume a stream at - * a specific point, set this field and the `stream_id` field. - * Leave this field unset when creating a new stream. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels associated with this write request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * This is only required in the first message. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * This is only required in the first message. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The ID of the write stream to resume. - * This may only be set in the first message. When left empty, a new write - * stream will be created. - * - * Generated from protobuf field string stream_id = 2; - * @return string - */ - public function getStreamId() - { - return $this->stream_id; - } - - /** - * The ID of the write stream to resume. - * This may only be set in the first message. When left empty, a new write - * stream will be created. - * - * Generated from protobuf field string stream_id = 2; - * @param string $var - * @return $this - */ - public function setStreamId($var) - { - GPBUtil::checkString($var, True); - $this->stream_id = $var; - - return $this; - } - - /** - * The writes to apply. - * Always executed atomically and in order. - * This must be empty on the first request. - * This may be empty on the last request. - * This must not be empty on all other requests. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWrites() - { - return $this->writes; - } - - /** - * The writes to apply. - * Always executed atomically and in order. - * This must be empty on the first request. - * This may be empty on the last request. - * This must not be empty on all other requests. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 3; - * @param array<\Google\Cloud\Firestore\V1\Write>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWrites($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Write::class); - $this->writes = $arr; - - return $this; - } - - /** - * A stream token that was previously sent by the server. - * The client should set this field to the token from the most recent - * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This - * acknowledges that the client has received responses up to this token. After - * sending this token, earlier tokens may not be used anymore. - * The server may close the stream if there are too many unacknowledged - * responses. - * Leave this field unset when creating a new stream. To resume a stream at - * a specific point, set this field and the `stream_id` field. - * Leave this field unset when creating a new stream. - * - * Generated from protobuf field bytes stream_token = 4; - * @return string - */ - public function getStreamToken() - { - return $this->stream_token; - } - - /** - * A stream token that was previously sent by the server. - * The client should set this field to the token from the most recent - * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This - * acknowledges that the client has received responses up to this token. After - * sending this token, earlier tokens may not be used anymore. - * The server may close the stream if there are too many unacknowledged - * responses. - * Leave this field unset when creating a new stream. To resume a stream at - * a specific point, set this field and the `stream_id` field. - * Leave this field unset when creating a new stream. - * - * Generated from protobuf field bytes stream_token = 4; - * @param string $var - * @return $this - */ - public function setStreamToken($var) - { - GPBUtil::checkString($var, False); - $this->stream_token = $var; - - return $this; - } - - /** - * Labels associated with this write request. - * - * Generated from protobuf field map labels = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels associated with this write request. - * - * Generated from protobuf field map labels = 5; - * @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; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php deleted file mode 100644 index da2c8584a0fd..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php +++ /dev/null @@ -1,203 +0,0 @@ -google.firestore.v1.WriteResponse - */ -class WriteResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of the stream. - * Only set on the first message, when a new stream was created. - * - * Generated from protobuf field string stream_id = 1; - */ - protected $stream_id = ''; - /** - * A token that represents the position of this response in the stream. - * This can be used by a client to resume the stream at this point. - * This field is always set. - * - * Generated from protobuf field bytes stream_token = 2; - */ - protected $stream_token = ''; - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 3; - */ - private $write_results; - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the write. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4; - */ - protected $commit_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $stream_id - * The ID of the stream. - * Only set on the first message, when a new stream was created. - * @type string $stream_token - * A token that represents the position of this response in the stream. - * This can be used by a client to resume the stream at this point. - * This field is always set. - * @type array<\Google\Cloud\Firestore\V1\WriteResult>|\Google\Protobuf\Internal\RepeatedField $write_results - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * @type \Google\Protobuf\Timestamp $commit_time - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the write. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The ID of the stream. - * Only set on the first message, when a new stream was created. - * - * Generated from protobuf field string stream_id = 1; - * @return string - */ - public function getStreamId() - { - return $this->stream_id; - } - - /** - * The ID of the stream. - * Only set on the first message, when a new stream was created. - * - * Generated from protobuf field string stream_id = 1; - * @param string $var - * @return $this - */ - public function setStreamId($var) - { - GPBUtil::checkString($var, True); - $this->stream_id = $var; - - return $this; - } - - /** - * A token that represents the position of this response in the stream. - * This can be used by a client to resume the stream at this point. - * This field is always set. - * - * Generated from protobuf field bytes stream_token = 2; - * @return string - */ - public function getStreamToken() - { - return $this->stream_token; - } - - /** - * A token that represents the position of this response in the stream. - * This can be used by a client to resume the stream at this point. - * This field is always set. - * - * Generated from protobuf field bytes stream_token = 2; - * @param string $var - * @return $this - */ - public function setStreamToken($var) - { - GPBUtil::checkString($var, False); - $this->stream_token = $var; - - return $this; - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWriteResults() - { - return $this->write_results; - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 3; - * @param array<\Google\Cloud\Firestore\V1\WriteResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWriteResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\WriteResult::class); - $this->write_results = $arr; - - return $this; - } - - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the write. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCommitTime() - { - return $this->commit_time; - } - - public function hasCommitTime() - { - return isset($this->commit_time); - } - - public function clearCommitTime() - { - unset($this->commit_time); - } - - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the write. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCommitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->commit_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php deleted file mode 100644 index f15058eb8a92..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php +++ /dev/null @@ -1,131 +0,0 @@ -google.firestore.v1.WriteResult - */ -class WriteResult extends \Google\Protobuf\Internal\Message -{ - /** - * The last update time of the document after applying the write. Not set - * after a `delete`. - * If the write did not actually change the document, this will be the - * previous update_time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - */ - protected $update_time = null; - /** - * The results of applying each - * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], - * in the same order. - * - * Generated from protobuf field repeated .google.firestore.v1.Value transform_results = 2; - */ - private $transform_results; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $update_time - * The last update time of the document after applying the write. Not set - * after a `delete`. - * If the write did not actually change the document, this will be the - * previous update_time. - * @type array<\Google\Cloud\Firestore\V1\Value>|\Google\Protobuf\Internal\RepeatedField $transform_results - * The results of applying each - * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], - * in the same order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The last update time of the document after applying the write. Not set - * after a `delete`. - * If the write did not actually change the document, this will be the - * previous update_time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * The last update time of the document after applying the write. Not set - * after a `delete`. - * If the write did not actually change the document, this will be the - * previous update_time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * The results of applying each - * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], - * in the same order. - * - * Generated from protobuf field repeated .google.firestore.v1.Value transform_results = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransformResults() - { - return $this->transform_results; - } - - /** - * The results of applying each - * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], - * in the same order. - * - * Generated from protobuf field repeated .google.firestore.v1.Value transform_results = 2; - * @param array<\Google\Cloud\Firestore\V1\Value>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransformResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->transform_results = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php deleted file mode 100644 index 781b03696dc1..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php +++ /dev/null @@ -1,86 +0,0 @@ -setDatabase($database) - ->setDocuments($documents); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $firestoreClient->batchGetDocuments($request); - - /** @var BatchGetDocumentsResponse $element */ - foreach ($stream->readAll() 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 -{ - $database = '[DATABASE]'; - $documentsElement = '[DOCUMENTS]'; - - batch_get_documents_sample($database, $documentsElement); -} -// [END firestore_v1_generated_Firestore_BatchGetDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php deleted file mode 100644 index a43ae1584ac0..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php +++ /dev/null @@ -1,66 +0,0 @@ -batchWrite($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END firestore_v1_generated_Firestore_BatchWrite_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php deleted file mode 100644 index dc729abcdc4a..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php +++ /dev/null @@ -1,71 +0,0 @@ -setDatabase($database); - - // Call the API and handle any network failures. - try { - /** @var BeginTransactionResponse $response */ - $response = $firestoreClient->beginTransaction($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 -{ - $database = '[DATABASE]'; - - begin_transaction_sample($database); -} -// [END firestore_v1_generated_Firestore_BeginTransaction_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php deleted file mode 100644 index 08897b94984b..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php +++ /dev/null @@ -1,74 +0,0 @@ -setDatabase($database) - ->setWrites($writes); - - // Call the API and handle any network failures. - try { - /** @var CommitResponse $response */ - $response = $firestoreClient->commit($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 -{ - $database = '[DATABASE]'; - - commit_sample($database); -} -// [END firestore_v1_generated_Firestore_Commit_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php deleted file mode 100644 index 2a04cde30cef..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($parent) - ->setCollectionId($collectionId) - ->setDocumentId($documentId) - ->setDocument($document); - - // Call the API and handle any network failures. - try { - /** @var Document $response */ - $response = $firestoreClient->createDocument($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 -{ - $parent = '[PARENT]'; - $collectionId = '[COLLECTION_ID]'; - $documentId = '[DOCUMENT_ID]'; - - create_document_sample($parent, $collectionId, $documentId); -} -// [END firestore_v1_generated_Firestore_CreateDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php deleted file mode 100644 index db75cab94ac5..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php +++ /dev/null @@ -1,69 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - $firestoreClient->deleteDocument($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 -{ - $name = '[NAME]'; - - delete_document_sample($name); -} -// [END firestore_v1_generated_Firestore_DeleteDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php deleted file mode 100644 index 787990595efd..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var Document $response */ - $response = $firestoreClient->getDocument($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]'; - - get_document_sample($name); -} -// [END firestore_v1_generated_Firestore_GetDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php deleted file mode 100644 index 92f6bd51fb17..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $firestoreClient->listCollectionIds($request); - - /** @var string $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element); - } - } 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 -{ - $parent = '[PARENT]'; - - list_collection_ids_sample($parent); -} -// [END firestore_v1_generated_Firestore_ListCollectionIds_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php deleted file mode 100644 index e0dd4b7e4568..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php +++ /dev/null @@ -1,89 +0,0 @@ -setParent($parent) - ->setCollectionId($collectionId); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $firestoreClient->listDocuments($request); - - /** @var Document $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 -{ - $parent = '[PARENT]'; - $collectionId = '[COLLECTION_ID]'; - - list_documents_sample($parent, $collectionId); -} -// [END firestore_v1_generated_Firestore_ListDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php deleted file mode 100644 index fb6754339467..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php +++ /dev/null @@ -1,78 +0,0 @@ -setDatabase($database); - - // Call the API and handle any network failures. - try { - /** @var BidiStream $stream */ - $stream = $firestoreClient->listen(); - $stream->writeAll([$request,]); - - /** @var ListenResponse $element */ - foreach ($stream->closeWriteAndReadAll() 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 -{ - $database = '[DATABASE]'; - - listen_sample($database); -} -// [END firestore_v1_generated_Firestore_Listen_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php deleted file mode 100644 index 6166c53e86e7..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php +++ /dev/null @@ -1,64 +0,0 @@ -partitionQuery($request); - - /** @var Cursor $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 firestore_v1_generated_Firestore_PartitionQuery_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php deleted file mode 100644 index 45a9b5c8f2b5..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php +++ /dev/null @@ -1,72 +0,0 @@ -setDatabase($database) - ->setTransaction($transaction); - - // Call the API and handle any network failures. - try { - $firestoreClient->rollback($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 -{ - $database = '[DATABASE]'; - $transaction = '...'; - - rollback_sample($database, $transaction); -} -// [END firestore_v1_generated_Firestore_Rollback_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php deleted file mode 100644 index 7d06d1816f7d..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php +++ /dev/null @@ -1,92 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $firestoreClient->runAggregationQuery($request); - - /** @var RunAggregationQueryResponse $element */ - foreach ($stream->readAll() 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 -{ - $parent = '[PARENT]'; - - run_aggregation_query_sample($parent); -} -// [END firestore_v1_generated_Firestore_RunAggregationQuery_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php deleted file mode 100644 index c4ebe1603da7..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $firestoreClient->runQuery($request); - - /** @var RunQueryResponse $element */ - foreach ($stream->readAll() 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 -{ - $parent = '[PARENT]'; - - run_query_sample($parent); -} -// [END firestore_v1_generated_Firestore_RunQuery_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php deleted file mode 100644 index 0200a86b0464..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php +++ /dev/null @@ -1,62 +0,0 @@ -setDocument($document) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var Document $response */ - $response = $firestoreClient->updateDocument($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END firestore_v1_generated_Firestore_UpdateDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php deleted file mode 100644 index 19f9fba7d7dd..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php +++ /dev/null @@ -1,79 +0,0 @@ -setDatabase($database); - - // Call the API and handle any network failures. - try { - /** @var BidiStream $stream */ - $stream = $firestoreClient->write(); - $stream->writeAll([$request,]); - - /** @var WriteResponse $element */ - foreach ($stream->closeWriteAndReadAll() 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 -{ - $database = '[DATABASE]'; - - write_sample($database); -} -// [END firestore_v1_generated_Firestore_Write_sync] diff --git a/owl-bot-staging/Firestore/v1/src/V1/Client/FirestoreClient.php b/owl-bot-staging/Firestore/v1/src/V1/Client/FirestoreClient.php deleted file mode 100644 index 0b5d0d8d68ef..000000000000 --- a/owl-bot-staging/Firestore/v1/src/V1/Client/FirestoreClient.php +++ /dev/null @@ -1,623 +0,0 @@ - batchWriteAsync(BatchWriteRequest $request, array $optionalArgs = []) - * @method PromiseInterface beginTransactionAsync(BeginTransactionRequest $request, array $optionalArgs = []) - * @method PromiseInterface commitAsync(CommitRequest $request, array $optionalArgs = []) - * @method PromiseInterface createDocumentAsync(CreateDocumentRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDocumentAsync(DeleteDocumentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDocumentAsync(GetDocumentRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCollectionIdsAsync(ListCollectionIdsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDocumentsAsync(ListDocumentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface partitionQueryAsync(PartitionQueryRequest $request, array $optionalArgs = []) - * @method PromiseInterface rollbackAsync(RollbackRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDocumentAsync(UpdateDocumentRequest $request, array $optionalArgs = []) - */ -final class FirestoreClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.firestore.v1.Firestore'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'firestore.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'firestore.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/datastore', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/firestore_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/firestore_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/firestore_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/firestore_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $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 'firestore.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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); - } - - /** - * Gets multiple documents. - * - * Documents returned by this method are not guaranteed to be returned in the - * same order that they were requested. - * - * @example samples/V1/FirestoreClient/batch_get_documents.php - * - * @param BatchGetDocumentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return ServerStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchGetDocuments(BatchGetDocumentsRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('BatchGetDocuments', $request, $callOptions); - } - - /** - * Applies a batch of write operations. - * - * The BatchWrite method does not apply the write operations atomically - * and can apply them out of order. Method does not allow more than one write - * per document. Each write succeeds or fails independently. See the - * [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the - * success status of each write. - * - * If you require an atomically applied set of writes, use - * [Commit][google.firestore.v1.Firestore.Commit] instead. - * - * The async variant is {@see FirestoreClient::batchWriteAsync()} . - * - * @example samples/V1/FirestoreClient/batch_write.php - * - * @param BatchWriteRequest $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 BatchWriteResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchWrite(BatchWriteRequest $request, array $callOptions = []): BatchWriteResponse - { - return $this->startApiCall('BatchWrite', $request, $callOptions)->wait(); - } - - /** - * Starts a new transaction. - * - * The async variant is {@see FirestoreClient::beginTransactionAsync()} . - * - * @example samples/V1/FirestoreClient/begin_transaction.php - * - * @param BeginTransactionRequest $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 BeginTransactionResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function beginTransaction(BeginTransactionRequest $request, array $callOptions = []): BeginTransactionResponse - { - return $this->startApiCall('BeginTransaction', $request, $callOptions)->wait(); - } - - /** - * Commits a transaction, while optionally updating documents. - * - * The async variant is {@see FirestoreClient::commitAsync()} . - * - * @example samples/V1/FirestoreClient/commit.php - * - * @param CommitRequest $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 CommitResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function commit(CommitRequest $request, array $callOptions = []): CommitResponse - { - return $this->startApiCall('Commit', $request, $callOptions)->wait(); - } - - /** - * Creates a new document. - * - * The async variant is {@see FirestoreClient::createDocumentAsync()} . - * - * @example samples/V1/FirestoreClient/create_document.php - * - * @param CreateDocumentRequest $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 Document - * - * @throws ApiException Thrown if the API call fails. - */ - public function createDocument(CreateDocumentRequest $request, array $callOptions = []): Document - { - return $this->startApiCall('CreateDocument', $request, $callOptions)->wait(); - } - - /** - * Deletes a document. - * - * The async variant is {@see FirestoreClient::deleteDocumentAsync()} . - * - * @example samples/V1/FirestoreClient/delete_document.php - * - * @param DeleteDocumentRequest $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 deleteDocument(DeleteDocumentRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteDocument', $request, $callOptions)->wait(); - } - - /** - * Gets a single document. - * - * The async variant is {@see FirestoreClient::getDocumentAsync()} . - * - * @example samples/V1/FirestoreClient/get_document.php - * - * @param GetDocumentRequest $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 Document - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDocument(GetDocumentRequest $request, array $callOptions = []): Document - { - return $this->startApiCall('GetDocument', $request, $callOptions)->wait(); - } - - /** - * Lists all the collection IDs underneath a document. - * - * The async variant is {@see FirestoreClient::listCollectionIdsAsync()} . - * - * @example samples/V1/FirestoreClient/list_collection_ids.php - * - * @param ListCollectionIdsRequest $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 listCollectionIds(ListCollectionIdsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCollectionIds', $request, $callOptions); - } - - /** - * Lists documents. - * - * The async variant is {@see FirestoreClient::listDocumentsAsync()} . - * - * @example samples/V1/FirestoreClient/list_documents.php - * - * @param ListDocumentsRequest $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 listDocuments(ListDocumentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDocuments', $request, $callOptions); - } - - /** - * Listens to changes. This method is only available via gRPC or WebChannel - * (not REST). - * - * @example samples/V1/FirestoreClient/listen.php - * - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return BidiStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function listen(array $callOptions = []): BidiStream - { - return $this->startApiCall('Listen', null, $callOptions); - } - - /** - * Partitions a query by returning partition cursors that can be used to run - * the query in parallel. The returned partition cursors are split points that - * can be used by RunQuery as starting/end points for the query results. - * - * The async variant is {@see FirestoreClient::partitionQueryAsync()} . - * - * @example samples/V1/FirestoreClient/partition_query.php - * - * @param PartitionQueryRequest $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 partitionQuery(PartitionQueryRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('PartitionQuery', $request, $callOptions); - } - - /** - * Rolls back a transaction. - * - * The async variant is {@see FirestoreClient::rollbackAsync()} . - * - * @example samples/V1/FirestoreClient/rollback.php - * - * @param RollbackRequest $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 rollback(RollbackRequest $request, array $callOptions = []): void - { - $this->startApiCall('Rollback', $request, $callOptions)->wait(); - } - - /** - * Runs an aggregation query. - * - * Rather than producing [Document][google.firestore.v1.Document] results like - * [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery], this API - * allows running an aggregation to produce a series of - * [AggregationResult][google.firestore.v1.AggregationResult] server-side. - * - * High-Level Example: - * - * ``` - * -- Return the number of documents in table given a filter. - * SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); - * ``` - * - * @example samples/V1/FirestoreClient/run_aggregation_query.php - * - * @param RunAggregationQueryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return ServerStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function runAggregationQuery(RunAggregationQueryRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('RunAggregationQuery', $request, $callOptions); - } - - /** - * Runs a query. - * - * @example samples/V1/FirestoreClient/run_query.php - * - * @param RunQueryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return ServerStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function runQuery(RunQueryRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('RunQuery', $request, $callOptions); - } - - /** - * Updates or inserts a document. - * - * The async variant is {@see FirestoreClient::updateDocumentAsync()} . - * - * @example samples/V1/FirestoreClient/update_document.php - * - * @param UpdateDocumentRequest $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 Document - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateDocument(UpdateDocumentRequest $request, array $callOptions = []): Document - { - return $this->startApiCall('UpdateDocument', $request, $callOptions)->wait(); - } - - /** - * Streams batches of document updates and deletes, in order. This method is - * only available via gRPC or WebChannel (not REST). - * - * @example samples/V1/FirestoreClient/write.php - * - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return BidiStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function write(array $callOptions = []): BidiStream - { - return $this->startApiCall('Write', null, $callOptions); - } -} diff --git a/owl-bot-staging/Firestore/v1/src/V1/FirestoreClient.php b/owl-bot-staging/Firestore/v1/src/V1/FirestoreClient.php deleted file mode 100644 index da1c71ebe61d..000000000000 --- a/owl-bot-staging/Firestore/v1/src/V1/FirestoreClient.php +++ /dev/null @@ -1,34 +0,0 @@ -batchGetDocuments($database, $documents); - * foreach ($stream->readAll() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @deprecated Please use the new service client {@see \Google\Cloud\Firestore\V1\Client\FirestoreClient}. - */ -class FirestoreGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.firestore.v1.Firestore'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'firestore.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'firestore.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - 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/datastore', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/firestore_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/firestore_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/firestore_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/firestore_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $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 'firestore.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Gets multiple documents. - * - * Documents returned by this method are not guaranteed to be returned in the - * same order that they were requested. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $database = 'database'; - * $documents = []; - * // Read all responses until the stream is complete - * $stream = $firestoreClient->batchGetDocuments($database, $documents); - * foreach ($stream->readAll() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param string $database Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @param string[] $documents The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of the - * given `database`. Duplicate names will be elided. - * @param array $optionalArgs { - * Optional. - * - * @type DocumentMask $mask - * The fields to return. If not set, returns all fields. - * - * If a document has a field that is not present in this mask, that field will - * not be returned in the response. - * @type string $transaction - * Reads documents in a transaction. - * @type TransactionOptions $newTransaction - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * @type Timestamp $readTime - * Reads documents as they were at the given time. - * - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return \Google\ApiCore\ServerStream - * - * @throws ApiException if the remote call fails - */ - public function batchGetDocuments($database, $documents, array $optionalArgs = []) - { - $request = new BatchGetDocumentsRequest(); - $requestParamHeaders = []; - $request->setDatabase($database); - $request->setDocuments($documents); - $requestParamHeaders['database'] = $database; - if (isset($optionalArgs['mask'])) { - $request->setMask($optionalArgs['mask']); - } - - if (isset($optionalArgs['transaction'])) { - $request->setTransaction($optionalArgs['transaction']); - } - - if (isset($optionalArgs['newTransaction'])) { - $request->setNewTransaction($optionalArgs['newTransaction']); - } - - if (isset($optionalArgs['readTime'])) { - $request->setReadTime($optionalArgs['readTime']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('BatchGetDocuments', BatchGetDocumentsResponse::class, $optionalArgs, $request, Call::SERVER_STREAMING_CALL); - } - - /** - * Applies a batch of write operations. - * - * The BatchWrite method does not apply the write operations atomically - * and can apply them out of order. Method does not allow more than one write - * per document. Each write succeeds or fails independently. See the - * [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the - * success status of each write. - * - * If you require an atomically applied set of writes, use - * [Commit][google.firestore.v1.Firestore.Commit] instead. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $response = $firestoreClient->batchWrite(); - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type Write[] $writes - * The writes to apply. - * - * Method does not apply writes atomically and does not guarantee ordering. - * Each write succeeds or fails independently. You cannot write to the same - * document more than once per request. - * @type array $labels - * Labels associated with this batch write. - * @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 \Google\Cloud\Firestore\V1\BatchWriteResponse - * - * @throws ApiException if the remote call fails - */ - public function batchWrite(array $optionalArgs = []) - { - $request = new BatchWriteRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['database'])) { - $request->setDatabase($optionalArgs['database']); - $requestParamHeaders['database'] = $optionalArgs['database']; - } - - if (isset($optionalArgs['writes'])) { - $request->setWrites($optionalArgs['writes']); - } - - if (isset($optionalArgs['labels'])) { - $request->setLabels($optionalArgs['labels']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('BatchWrite', BatchWriteResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Starts a new transaction. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $database = 'database'; - * $response = $firestoreClient->beginTransaction($database); - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param string $database Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type TransactionOptions $options - * The options for the transaction. - * Defaults to a read-write transaction. - * @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 \Google\Cloud\Firestore\V1\BeginTransactionResponse - * - * @throws ApiException if the remote call fails - */ - public function beginTransaction($database, array $optionalArgs = []) - { - $request = new BeginTransactionRequest(); - $requestParamHeaders = []; - $request->setDatabase($database); - $requestParamHeaders['database'] = $database; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('BeginTransaction', BeginTransactionResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Commits a transaction, while optionally updating documents. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $database = 'database'; - * $writes = []; - * $response = $firestoreClient->commit($database, $writes); - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param string $database Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @param Write[] $writes The writes to apply. - * - * Always executed atomically and in order. - * @param array $optionalArgs { - * Optional. - * - * @type string $transaction - * If set, applies all writes in this transaction, and commits it. - * @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 \Google\Cloud\Firestore\V1\CommitResponse - * - * @throws ApiException if the remote call fails - */ - public function commit($database, $writes, array $optionalArgs = []) - { - $request = new CommitRequest(); - $requestParamHeaders = []; - $request->setDatabase($database); - $request->setWrites($writes); - $requestParamHeaders['database'] = $database; - if (isset($optionalArgs['transaction'])) { - $request->setTransaction($optionalArgs['transaction']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('Commit', CommitResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a new document. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $parent = 'parent'; - * $collectionId = 'collection_id'; - * $documentId = 'document_id'; - * $document = new Document(); - * $response = $firestoreClient->createDocument($parent, $collectionId, $documentId, $document); - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource. For example: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - * @param string $collectionId Required. The collection ID, relative to `parent`, to list. For example: - * `chatrooms`. - * @param string $documentId The client-assigned document ID to use for this document. - * - * Optional. If not specified, an ID will be assigned by the service. - * @param Document $document Required. The document to create. `name` must not be set. - * @param array $optionalArgs { - * Optional. - * - * @type DocumentMask $mask - * The fields to return. If not set, returns all fields. - * - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * @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 \Google\Cloud\Firestore\V1\Document - * - * @throws ApiException if the remote call fails - */ - public function createDocument($parent, $collectionId, $documentId, $document, array $optionalArgs = []) - { - $request = new CreateDocumentRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setCollectionId($collectionId); - $request->setDocumentId($documentId); - $request->setDocument($document); - $requestParamHeaders['parent'] = $parent; - $requestParamHeaders['collection_id'] = $collectionId; - if (isset($optionalArgs['mask'])) { - $request->setMask($optionalArgs['mask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateDocument', Document::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a document. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $name = 'name'; - * $firestoreClient->deleteDocument($name); - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the Document to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @param array $optionalArgs { - * Optional. - * - * @type Precondition $currentDocument - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * @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 if the remote call fails - */ - public function deleteDocument($name, array $optionalArgs = []) - { - $request = new DeleteDocumentRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['currentDocument'])) { - $request->setCurrentDocument($optionalArgs['currentDocument']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteDocument', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a single document. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $name = 'name'; - * $response = $firestoreClient->getDocument($name); - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the Document to get. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @param array $optionalArgs { - * Optional. - * - * @type DocumentMask $mask - * The fields to return. If not set, returns all fields. - * - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * @type string $transaction - * Reads the document in a transaction. - * @type Timestamp $readTime - * Reads the version of the document at the given time. - * - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * @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 \Google\Cloud\Firestore\V1\Document - * - * @throws ApiException if the remote call fails - */ - public function getDocument($name, array $optionalArgs = []) - { - $request = new GetDocumentRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['mask'])) { - $request->setMask($optionalArgs['mask']); - } - - if (isset($optionalArgs['transaction'])) { - $request->setTransaction($optionalArgs['transaction']); - } - - if (isset($optionalArgs['readTime'])) { - $request->setReadTime($optionalArgs['readTime']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDocument', Document::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists all the collection IDs underneath a document. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $parent = 'parent'; - * // Iterate over pages of elements - * $pagedResponse = $firestoreClient->listCollectionIds($parent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $firestoreClient->listCollectionIds($parent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent document. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type Timestamp $readTime - * Reads documents as they were at the given time. - * - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listCollectionIds($parent, array $optionalArgs = []) - { - $request = new ListCollectionIdsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['readTime'])) { - $request->setReadTime($optionalArgs['readTime']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListCollectionIds', $optionalArgs, ListCollectionIdsResponse::class, $request); - } - - /** - * Lists documents. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $parent = 'parent'; - * $collectionId = 'collection_id'; - * // Iterate over pages of elements - * $pagedResponse = $firestoreClient->listDocuments($parent, $collectionId); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $firestoreClient->listDocuments($parent, $collectionId); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @param string $collectionId Optional. The collection ID, relative to `parent`, to list. - * - * For example: `chatrooms` or `messages`. - * - * This is optional, and when not provided, Firestore will list documents - * from all collections under the provided `parent`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $orderBy - * Optional. The optional ordering of the documents to return. - * - * For example: `priority desc, __name__ desc`. - * - * This mirrors the [`ORDER BY`][google.firestore.v1.StructuredQuery.order_by] - * used in Firestore queries but in a string representation. When absent, - * documents are ordered based on `__name__ ASC`. - * @type DocumentMask $mask - * Optional. The fields to return. If not set, returns all fields. - * - * If a document has a field that is not present in this mask, that field - * will not be returned in the response. - * @type string $transaction - * Perform the read as part of an already active transaction. - * @type Timestamp $readTime - * Perform the read at the provided time. - * - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * @type bool $showMissing - * If the list should show missing documents. - * - * A document is missing if it does not exist, but there are sub-documents - * nested underneath it. When true, such missing documents will be returned - * with a key but will not have fields, - * [`create_time`][google.firestore.v1.Document.create_time], or - * [`update_time`][google.firestore.v1.Document.update_time] set. - * - * Requests with `show_missing` may not specify `where` or `order_by`. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listDocuments($parent, $collectionId, array $optionalArgs = []) - { - $request = new ListDocumentsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setCollectionId($collectionId); - $requestParamHeaders['parent'] = $parent; - $requestParamHeaders['collection_id'] = $collectionId; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - if (isset($optionalArgs['mask'])) { - $request->setMask($optionalArgs['mask']); - } - - if (isset($optionalArgs['transaction'])) { - $request->setTransaction($optionalArgs['transaction']); - } - - if (isset($optionalArgs['readTime'])) { - $request->setReadTime($optionalArgs['readTime']); - } - - if (isset($optionalArgs['showMissing'])) { - $request->setShowMissing($optionalArgs['showMissing']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListDocuments', $optionalArgs, ListDocumentsResponse::class, $request); - } - - /** - * Listens to changes. This method is only available via gRPC or WebChannel - * (not REST). - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $database = 'database'; - * $request = new ListenRequest(); - * $request->setDatabase($database); - * // Write all requests to the server, then read all responses until the - * // stream is complete - * $requests = [ - * $request, - * ]; - * $stream = $firestoreClient->listen(); - * $stream->writeAll($requests); - * foreach ($stream->closeWriteAndReadAll() as $element) { - * // doSomethingWith($element); - * } - * // Alternatively: - * // Write requests individually, making read() calls if - * // required. Call closeWrite() once writes are complete, and read the - * // remaining responses from the server. - * $requests = [ - * $request, - * ]; - * $stream = $firestoreClient->listen(); - * foreach ($requests as $request) { - * $stream->write($request); - * // if required, read a single response from the stream - * $element = $stream->read(); - * // doSomethingWith($element) - * } - * $stream->closeWrite(); - * $element = $stream->read(); - * while (!is_null($element)) { - * // doSomethingWith($element) - * $element = $stream->read(); - * } - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return \Google\ApiCore\BidiStream - * - * @throws ApiException if the remote call fails - */ - public function listen(array $optionalArgs = []) - { - return $this->startCall('Listen', ListenResponse::class, $optionalArgs, null, Call::BIDI_STREAMING_CALL); - } - - /** - * Partitions a query by returning partition cursors that can be used to run - * the query in parallel. The returned partition cursors are split points that - * can be used by RunQuery as starting/end points for the query results. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $firestoreClient->partitionQuery(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $firestoreClient->partitionQuery(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $parent - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents`. - * Document resource names are not supported; only database resource names - * can be specified. - * @type StructuredQuery $structuredQuery - * A structured query. - * Query must specify collection with all descendants and be ordered by name - * ascending. Other filters, order bys, limits, offsets, and start/end - * cursors are not supported. - * @type int $partitionCount - * The desired maximum number of partition points. - * The partitions may be returned across multiple pages of results. - * The number must be positive. The actual number of partitions - * returned may be fewer. - * - * For example, this may be set to one fewer than the number of parallel - * queries to be run, or in running a data pipeline job, one fewer than the - * number of workers or compute instances available. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type Timestamp $readTime - * Reads documents as they were at the given time. - * - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function partitionQuery(array $optionalArgs = []) - { - $request = new PartitionQueryRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['parent'])) { - $request->setParent($optionalArgs['parent']); - $requestParamHeaders['parent'] = $optionalArgs['parent']; - } - - if (isset($optionalArgs['structuredQuery'])) { - $request->setStructuredQuery($optionalArgs['structuredQuery']); - } - - if (isset($optionalArgs['partitionCount'])) { - $request->setPartitionCount($optionalArgs['partitionCount']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['readTime'])) { - $request->setReadTime($optionalArgs['readTime']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('PartitionQuery', $optionalArgs, PartitionQueryResponse::class, $request); - } - - /** - * Rolls back a transaction. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $database = 'database'; - * $transaction = '...'; - * $firestoreClient->rollback($database, $transaction); - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param string $database Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @param string $transaction Required. The transaction to roll back. - * @param array $optionalArgs { - * 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 if the remote call fails - */ - public function rollback($database, $transaction, array $optionalArgs = []) - { - $request = new RollbackRequest(); - $requestParamHeaders = []; - $request->setDatabase($database); - $request->setTransaction($transaction); - $requestParamHeaders['database'] = $database; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('Rollback', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Runs an aggregation query. - * - * Rather than producing [Document][google.firestore.v1.Document] results like - * [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery], this API - * allows running an aggregation to produce a series of - * [AggregationResult][google.firestore.v1.AggregationResult] server-side. - * - * High-Level Example: - * - * ``` - * -- Return the number of documents in table given a filter. - * SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); - * ``` - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $parent = 'parent'; - * // Read all responses until the stream is complete - * $stream = $firestoreClient->runAggregationQuery($parent); - * foreach ($stream->readAll() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @param array $optionalArgs { - * Optional. - * - * @type StructuredAggregationQuery $structuredAggregationQuery - * An aggregation query. - * @type string $transaction - * Run the aggregation within an already active transaction. - * - * The value here is the opaque transaction ID to execute the query in. - * @type TransactionOptions $newTransaction - * Starts a new transaction as part of the query, defaulting to read-only. - * - * The new transaction ID will be returned as the first response in the - * stream. - * @type Timestamp $readTime - * Executes the query at the given timestamp. - * - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * @type ExplainOptions $explainOptions - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return \Google\ApiCore\ServerStream - * - * @throws ApiException if the remote call fails - */ - public function runAggregationQuery($parent, array $optionalArgs = []) - { - $request = new RunAggregationQueryRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['structuredAggregationQuery'])) { - $request->setStructuredAggregationQuery($optionalArgs['structuredAggregationQuery']); - } - - if (isset($optionalArgs['transaction'])) { - $request->setTransaction($optionalArgs['transaction']); - } - - if (isset($optionalArgs['newTransaction'])) { - $request->setNewTransaction($optionalArgs['newTransaction']); - } - - if (isset($optionalArgs['readTime'])) { - $request->setReadTime($optionalArgs['readTime']); - } - - if (isset($optionalArgs['explainOptions'])) { - $request->setExplainOptions($optionalArgs['explainOptions']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RunAggregationQuery', RunAggregationQueryResponse::class, $optionalArgs, $request, Call::SERVER_STREAMING_CALL); - } - - /** - * Runs a query. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $parent = 'parent'; - * // Read all responses until the stream is complete - * $stream = $firestoreClient->runQuery($parent); - * foreach ($stream->readAll() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @param array $optionalArgs { - * Optional. - * - * @type StructuredQuery $structuredQuery - * A structured query. - * @type string $transaction - * Run the query within an already active transaction. - * - * The value here is the opaque transaction ID to execute the query in. - * @type TransactionOptions $newTransaction - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * @type Timestamp $readTime - * Reads documents as they were at the given time. - * - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * @type ExplainOptions $explainOptions - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return \Google\ApiCore\ServerStream - * - * @throws ApiException if the remote call fails - */ - public function runQuery($parent, array $optionalArgs = []) - { - $request = new RunQueryRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['structuredQuery'])) { - $request->setStructuredQuery($optionalArgs['structuredQuery']); - } - - if (isset($optionalArgs['transaction'])) { - $request->setTransaction($optionalArgs['transaction']); - } - - if (isset($optionalArgs['newTransaction'])) { - $request->setNewTransaction($optionalArgs['newTransaction']); - } - - if (isset($optionalArgs['readTime'])) { - $request->setReadTime($optionalArgs['readTime']); - } - - if (isset($optionalArgs['explainOptions'])) { - $request->setExplainOptions($optionalArgs['explainOptions']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RunQuery', RunQueryResponse::class, $optionalArgs, $request, Call::SERVER_STREAMING_CALL); - } - - /** - * Updates or inserts a document. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $document = new Document(); - * $updateMask = new DocumentMask(); - * $response = $firestoreClient->updateDocument($document, $updateMask); - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param Document $document Required. The updated document. - * Creates the document if it does not already exist. - * @param DocumentMask $updateMask The fields to update. - * None of the field paths in the mask may contain a reserved name. - * - * If the document exists on the server and has fields not referenced in the - * mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * @param array $optionalArgs { - * Optional. - * - * @type DocumentMask $mask - * The fields to return. If not set, returns all fields. - * - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * @type Precondition $currentDocument - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * @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 \Google\Cloud\Firestore\V1\Document - * - * @throws ApiException if the remote call fails - */ - public function updateDocument($document, $updateMask, array $optionalArgs = []) - { - $request = new UpdateDocumentRequest(); - $requestParamHeaders = []; - $request->setDocument($document); - $request->setUpdateMask($updateMask); - $requestParamHeaders['document.name'] = $document->getName(); - if (isset($optionalArgs['mask'])) { - $request->setMask($optionalArgs['mask']); - } - - if (isset($optionalArgs['currentDocument'])) { - $request->setCurrentDocument($optionalArgs['currentDocument']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateDocument', Document::class, $optionalArgs, $request)->wait(); - } - - /** - * Streams batches of document updates and deletes, in order. This method is - * only available via gRPC or WebChannel (not REST). - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $database = 'database'; - * $request = new WriteRequest(); - * $request->setDatabase($database); - * // Write all requests to the server, then read all responses until the - * // stream is complete - * $requests = [ - * $request, - * ]; - * $stream = $firestoreClient->write(); - * $stream->writeAll($requests); - * foreach ($stream->closeWriteAndReadAll() as $element) { - * // doSomethingWith($element); - * } - * // Alternatively: - * // Write requests individually, making read() calls if - * // required. Call closeWrite() once writes are complete, and read the - * // remaining responses from the server. - * $requests = [ - * $request, - * ]; - * $stream = $firestoreClient->write(); - * foreach ($requests as $request) { - * $stream->write($request); - * // if required, read a single response from the stream - * $element = $stream->read(); - * // doSomethingWith($element) - * } - * $stream->closeWrite(); - * $element = $stream->read(); - * while (!is_null($element)) { - * // doSomethingWith($element) - * $element = $stream->read(); - * } - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return \Google\ApiCore\BidiStream - * - * @throws ApiException if the remote call fails - */ - public function write(array $optionalArgs = []) - { - return $this->startCall('Write', WriteResponse::class, $optionalArgs, null, Call::BIDI_STREAMING_CALL); - } -} diff --git a/owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 16969eb8ec78..000000000000 --- a/owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.firestore.v1", - "libraryPackage": "Google\\Cloud\\Firestore\\V1", - "services": { - "Firestore": { - "clients": { - "grpc": { - "libraryClient": "FirestoreGapicClient", - "rpcs": { - "BatchGetDocuments": { - "methods": [ - "batchGetDocuments" - ] - }, - "BatchWrite": { - "methods": [ - "batchWrite" - ] - }, - "BeginTransaction": { - "methods": [ - "beginTransaction" - ] - }, - "Commit": { - "methods": [ - "commit" - ] - }, - "CreateDocument": { - "methods": [ - "createDocument" - ] - }, - "DeleteDocument": { - "methods": [ - "deleteDocument" - ] - }, - "GetDocument": { - "methods": [ - "getDocument" - ] - }, - "ListCollectionIds": { - "methods": [ - "listCollectionIds" - ] - }, - "ListDocuments": { - "methods": [ - "listDocuments" - ] - }, - "Listen": { - "methods": [ - "listen" - ] - }, - "PartitionQuery": { - "methods": [ - "partitionQuery" - ] - }, - "Rollback": { - "methods": [ - "rollback" - ] - }, - "RunAggregationQuery": { - "methods": [ - "runAggregationQuery" - ] - }, - "RunQuery": { - "methods": [ - "runQuery" - ] - }, - "UpdateDocument": { - "methods": [ - "updateDocument" - ] - }, - "Write": { - "methods": [ - "write" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json deleted file mode 100644 index 0fb2c36f7df8..000000000000 --- a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json +++ /dev/null @@ -1,174 +0,0 @@ -{ - "interfaces": { - "google.firestore.v1.Firestore": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "RESOURCE_EXHAUSTED", - "UNAVAILABLE" - ], - "retry_policy_2_codes": [ - "RESOURCE_EXHAUSTED", - "UNAVAILABLE", - "INTERNAL", - "DEADLINE_EXCEEDED" - ], - "retry_policy_3_codes": [ - "RESOURCE_EXHAUSTED", - "UNAVAILABLE", - "INTERNAL", - "DEADLINE_EXCEEDED" - ], - "no_retry_1_codes": [], - "retry_policy_4_codes": [ - "RESOURCE_EXHAUSTED", - "UNAVAILABLE", - "INTERNAL", - "DEADLINE_EXCEEDED" - ], - "retry_policy_5_codes": [ - "RESOURCE_EXHAUSTED", - "UNAVAILABLE", - "ABORTED" - ] - }, - "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 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 300000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 300000, - "total_timeout_millis": 300000 - }, - "retry_policy_3_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 86400000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 86400000, - "total_timeout_millis": 86400000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 86400000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 86400000, - "total_timeout_millis": 86400000 - }, - "retry_policy_4_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 - }, - "retry_policy_5_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": { - "BatchGetDocuments": { - "timeout_millis": 300000 - }, - "BatchWrite": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - }, - "BeginTransaction": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "Commit": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateDocument": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteDocument": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "GetDocument": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "ListCollectionIds": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "ListDocuments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "Listen": { - "timeout_millis": 86400000 - }, - "PartitionQuery": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "Rollback": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "RunAggregationQuery": { - "timeout_millis": 300000 - }, - "RunQuery": { - "timeout_millis": 300000 - }, - "UpdateDocument": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "Write": { - "timeout_millis": 86400000 - } - } - } - } -} diff --git a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php deleted file mode 100644 index 4fff43f18ee9..000000000000 --- a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php +++ /dev/null @@ -1,272 +0,0 @@ - [ - 'google.firestore.v1.Firestore' => [ - 'BatchGetDocuments' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\BatchGetDocumentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - 'BatchWrite' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\BatchWriteResponse', - 'headerParams' => [ - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - 'BeginTransaction' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\BeginTransactionResponse', - 'headerParams' => [ - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - 'Commit' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\CommitResponse', - 'headerParams' => [ - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - 'CreateDocument' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\Document', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - [ - 'keyName' => 'collection_id', - 'fieldAccessors' => [ - 'getCollectionId', - ], - ], - ], - ], - 'DeleteDocument' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDocument' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\Document', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListCollectionIds' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCollectionIds', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\ListCollectionIdsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDocuments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDocuments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\ListDocumentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - [ - 'keyName' => 'collection_id', - 'fieldAccessors' => [ - 'getCollectionId', - ], - ], - ], - ], - 'Listen' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'BidiStreaming', - ], - 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\ListenResponse', - 'headerParams' => [ - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - 'PartitionQuery' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPartitions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\PartitionQueryResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'Rollback' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - 'RunAggregationQuery' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\RunAggregationQueryResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RunQuery' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\RunQueryResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateDocument' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\Document', - 'headerParams' => [ - [ - 'keyName' => 'document.name', - 'fieldAccessors' => [ - 'getDocument', - 'getName', - ], - ], - ], - ], - 'Write' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'BidiStreaming', - ], - 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\WriteResponse', - 'headerParams' => [ - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php deleted file mode 100644 index 054730f1901a..000000000000 --- a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php +++ /dev/null @@ -1,292 +0,0 @@ - [ - 'google.firestore.v1.Firestore' => [ - 'BatchGetDocuments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:batchGet', - 'body' => '*', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - ], - ], - 'BatchWrite' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:batchWrite', - 'body' => '*', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - ], - ], - 'BeginTransaction' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:beginTransaction', - 'body' => '*', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - ], - ], - 'Commit' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:commit', - 'body' => '*', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - ], - ], - 'CreateDocument' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/**}/{collection_id}', - 'body' => 'document', - 'placeholders' => [ - 'collection_id' => [ - 'getters' => [ - 'getCollectionId', - ], - ], - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'document_id', - ], - ], - 'DeleteDocument' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/documents/*/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDocument' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/documents/*/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListCollectionIds' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:listCollectionIds', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:listCollectionIds', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDocuments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}/{collection_id}', - ], - ], - 'placeholders' => [ - 'collection_id' => [ - 'getters' => [ - 'getCollectionId', - ], - ], - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'PartitionQuery' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:partitionQuery', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:partitionQuery', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'Rollback' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:rollback', - 'body' => '*', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - ], - ], - 'RunAggregationQuery' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:runAggregationQuery', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:runAggregationQuery', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RunQuery' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:runQuery', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:runQuery', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateDocument' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{document.name=projects/*/databases/*/documents/*/**}', - 'body' => 'document', - 'placeholders' => [ - 'document.name' => [ - 'getters' => [ - 'getDocument', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Firestore/v1/tests/Unit/V1/Client/FirestoreClientTest.php b/owl-bot-staging/Firestore/v1/tests/Unit/V1/Client/FirestoreClientTest.php deleted file mode 100644 index e071d92d5b47..000000000000 --- a/owl-bot-staging/Firestore/v1/tests/Unit/V1/Client/FirestoreClientTest.php +++ /dev/null @@ -1,1323 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return FirestoreClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new FirestoreClient($options); - } - - /** @test */ - public function batchGetDocumentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $missing = 'missing1069449574'; - $transaction2 = '17'; - $expectedResponse = new BatchGetDocumentsResponse(); - $expectedResponse->setMissing($missing); - $expectedResponse->setTransaction($transaction2); - $transport->addResponse($expectedResponse); - $missing2 = 'missing21243859865'; - $transaction3 = '18'; - $expectedResponse2 = new BatchGetDocumentsResponse(); - $expectedResponse2->setMissing($missing2); - $expectedResponse2->setTransaction($transaction3); - $transport->addResponse($expectedResponse2); - $missing3 = 'missing31243859866'; - $transaction4 = '19'; - $expectedResponse3 = new BatchGetDocumentsResponse(); - $expectedResponse3->setMissing($missing3); - $expectedResponse3->setTransaction($transaction4); - $transport->addResponse($expectedResponse3); - // Mock request - $database = 'database1789464955'; - $documents = []; - $request = (new BatchGetDocumentsRequest()) - ->setDatabase($database) - ->setDocuments($documents); - $serverStream = $gapicClient->batchGetDocuments($request); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/BatchGetDocuments', $actualFuncCall); - $actualValue = $actualRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $actualValue = $actualRequestObject->getDocuments(); - $this->assertProtobufEquals($documents, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchGetDocumentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $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->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - // Mock request - $database = 'database1789464955'; - $documents = []; - $request = (new BatchGetDocumentsRequest()) - ->setDatabase($database) - ->setDocuments($documents); - $serverStream = $gapicClient->batchGetDocuments($request); - $results = $serverStream->readAll(); - try { - iterator_to_array($results); - // If the close stream 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 batchWriteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchWriteResponse(); - $transport->addResponse($expectedResponse); - $request = new BatchWriteRequest(); - $response = $gapicClient->batchWrite($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/BatchWrite', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchWriteExceptionTest() - { - $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 BatchWriteRequest(); - try { - $gapicClient->batchWrite($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 beginTransactionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $transaction = '-34'; - $expectedResponse = new BeginTransactionResponse(); - $expectedResponse->setTransaction($transaction); - $transport->addResponse($expectedResponse); - // Mock request - $database = 'database1789464955'; - $request = (new BeginTransactionRequest()) - ->setDatabase($database); - $response = $gapicClient->beginTransaction($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/BeginTransaction', $actualFuncCall); - $actualValue = $actualRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function beginTransactionExceptionTest() - { - $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 - $database = 'database1789464955'; - $request = (new BeginTransactionRequest()) - ->setDatabase($database); - try { - $gapicClient->beginTransaction($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 commitTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new CommitResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $database = 'database1789464955'; - $writes = []; - $request = (new CommitRequest()) - ->setDatabase($database) - ->setWrites($writes); - $response = $gapicClient->commit($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/Commit', $actualFuncCall); - $actualValue = $actualRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $actualValue = $actualRequestObject->getWrites(); - $this->assertProtobufEquals($writes, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function commitExceptionTest() - { - $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 - $database = 'database1789464955'; - $writes = []; - $request = (new CommitRequest()) - ->setDatabase($database) - ->setWrites($writes); - try { - $gapicClient->commit($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 createDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Document(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $collectionId = 'collectionId-821242276'; - $documentId = 'documentId506676927'; - $document = new Document(); - $request = (new CreateDocumentRequest()) - ->setParent($parent) - ->setCollectionId($collectionId) - ->setDocumentId($documentId) - ->setDocument($document); - $response = $gapicClient->createDocument($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/CreateDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getCollectionId(); - $this->assertProtobufEquals($collectionId, $actualValue); - $actualValue = $actualRequestObject->getDocumentId(); - $this->assertProtobufEquals($documentId, $actualValue); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDocumentExceptionTest() - { - $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 - $parent = 'parent-995424086'; - $collectionId = 'collectionId-821242276'; - $documentId = 'documentId506676927'; - $document = new Document(); - $request = (new CreateDocumentRequest()) - ->setParent($parent) - ->setCollectionId($collectionId) - ->setDocumentId($documentId) - ->setDocument($document); - try { - $gapicClient->createDocument($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 deleteDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new DeleteDocumentRequest()) - ->setName($name); - $gapicClient->deleteDocument($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/DeleteDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDocumentExceptionTest() - { - $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'; - $request = (new DeleteDocumentRequest()) - ->setName($name); - try { - $gapicClient->deleteDocument($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 getDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Document(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new GetDocumentRequest()) - ->setName($name); - $response = $gapicClient->getDocument($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/GetDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDocumentExceptionTest() - { - $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'; - $request = (new GetDocumentRequest()) - ->setName($name); - try { - $gapicClient->getDocument($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 listCollectionIdsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $collectionIdsElement = 'collectionIdsElement1368994900'; - $collectionIds = [ - $collectionIdsElement, - ]; - $expectedResponse = new ListCollectionIdsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCollectionIds($collectionIds); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new ListCollectionIdsRequest()) - ->setParent($parent); - $response = $gapicClient->listCollectionIds($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCollectionIds()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/ListCollectionIds', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCollectionIdsExceptionTest() - { - $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 - $parent = 'parent-995424086'; - $request = (new ListCollectionIdsRequest()) - ->setParent($parent); - try { - $gapicClient->listCollectionIds($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 listDocumentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $documentsElement = new Document(); - $documents = [ - $documentsElement, - ]; - $expectedResponse = new ListDocumentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDocuments($documents); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $collectionId = 'collectionId-821242276'; - $request = (new ListDocumentsRequest()) - ->setParent($parent) - ->setCollectionId($collectionId); - $response = $gapicClient->listDocuments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDocuments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/ListDocuments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getCollectionId(); - $this->assertProtobufEquals($collectionId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDocumentsExceptionTest() - { - $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 - $parent = 'parent-995424086'; - $collectionId = 'collectionId-821242276'; - $request = (new ListDocumentsRequest()) - ->setParent($parent) - ->setCollectionId($collectionId); - try { - $gapicClient->listDocuments($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 listenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListenResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new ListenResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new ListenResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $database = 'database1789464955'; - $request = new ListenRequest(); - $request->setDatabase($database); - $database2 = 'database21688906350'; - $request2 = new ListenRequest(); - $request2->setDatabase($database2); - $database3 = 'database31688906351'; - $request3 = new ListenRequest(); - $request3->setDatabase($database3); - $bidi = $gapicClient->listen(); - $this->assertInstanceOf(BidiStream::class, $bidi); - $bidi->write($request); - $responses = []; - $responses[] = $bidi->read(); - $bidi->writeAll([ - $request2, - $request3, - ]); - foreach ($bidi->closeWriteAndReadAll() as $response) { - $responses[] = $response; - } - - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $createStreamRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($createStreamRequests)); - $streamFuncCall = $createStreamRequests[0]->getFuncCall(); - $streamRequestObject = $createStreamRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/Listen', $streamFuncCall); - $this->assertNull($streamRequestObject); - $callObjects = $transport->popCallObjects(); - $this->assertSame(1, count($callObjects)); - $bidiCall = $callObjects[0]; - $writeRequests = $bidiCall->popReceivedCalls(); - $expectedRequests = []; - $expectedRequests[] = $request; - $expectedRequests[] = $request2; - $expectedRequests[] = $request3; - $this->assertEquals($expectedRequests, $writeRequests); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listenExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $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->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - $bidi = $gapicClient->listen(); - $results = $bidi->closeWriteAndReadAll(); - try { - iterator_to_array($results); - // If the close stream 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 partitionQueryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $partitionsElement = new Cursor(); - $partitions = [ - $partitionsElement, - ]; - $expectedResponse = new PartitionQueryResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPartitions($partitions); - $transport->addResponse($expectedResponse); - $request = new PartitionQueryRequest(); - $response = $gapicClient->partitionQuery($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPartitions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/PartitionQuery', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function partitionQueryExceptionTest() - { - $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 PartitionQueryRequest(); - try { - $gapicClient->partitionQuery($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 rollbackTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $database = 'database1789464955'; - $transaction = '-34'; - $request = (new RollbackRequest()) - ->setDatabase($database) - ->setTransaction($transaction); - $gapicClient->rollback($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/Rollback', $actualFuncCall); - $actualValue = $actualRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $actualValue = $actualRequestObject->getTransaction(); - $this->assertProtobufEquals($transaction, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rollbackExceptionTest() - { - $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 - $database = 'database1789464955'; - $transaction = '-34'; - $request = (new RollbackRequest()) - ->setDatabase($database) - ->setTransaction($transaction); - try { - $gapicClient->rollback($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 runAggregationQueryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $transaction2 = '17'; - $expectedResponse = new RunAggregationQueryResponse(); - $expectedResponse->setTransaction($transaction2); - $transport->addResponse($expectedResponse); - $transaction3 = '18'; - $expectedResponse2 = new RunAggregationQueryResponse(); - $expectedResponse2->setTransaction($transaction3); - $transport->addResponse($expectedResponse2); - $transaction4 = '19'; - $expectedResponse3 = new RunAggregationQueryResponse(); - $expectedResponse3->setTransaction($transaction4); - $transport->addResponse($expectedResponse3); - // Mock request - $parent = 'parent-995424086'; - $request = (new RunAggregationQueryRequest()) - ->setParent($parent); - $serverStream = $gapicClient->runAggregationQuery($request); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/RunAggregationQuery', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runAggregationQueryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $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->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - // Mock request - $parent = 'parent-995424086'; - $request = (new RunAggregationQueryRequest()) - ->setParent($parent); - $serverStream = $gapicClient->runAggregationQuery($request); - $results = $serverStream->readAll(); - try { - iterator_to_array($results); - // If the close stream 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 runQueryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $transaction2 = '17'; - $skippedResults = 880286183; - $done = true; - $expectedResponse = new RunQueryResponse(); - $expectedResponse->setTransaction($transaction2); - $expectedResponse->setSkippedResults($skippedResults); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); - $transaction3 = '18'; - $skippedResults2 = 153532454; - $done2 = false; - $expectedResponse2 = new RunQueryResponse(); - $expectedResponse2->setTransaction($transaction3); - $expectedResponse2->setSkippedResults($skippedResults2); - $expectedResponse2->setDone($done2); - $transport->addResponse($expectedResponse2); - $transaction4 = '19'; - $skippedResults3 = 153532453; - $done3 = true; - $expectedResponse3 = new RunQueryResponse(); - $expectedResponse3->setTransaction($transaction4); - $expectedResponse3->setSkippedResults($skippedResults3); - $expectedResponse3->setDone($done3); - $transport->addResponse($expectedResponse3); - // Mock request - $parent = 'parent-995424086'; - $request = (new RunQueryRequest()) - ->setParent($parent); - $serverStream = $gapicClient->runQuery($request); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/RunQuery', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runQueryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $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->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - // Mock request - $parent = 'parent-995424086'; - $request = (new RunQueryRequest()) - ->setParent($parent); - $serverStream = $gapicClient->runQuery($request); - $results = $serverStream->readAll(); - try { - iterator_to_array($results); - // If the close stream 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 updateDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Document(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $updateMask = new DocumentMask(); - $request = (new UpdateDocumentRequest()) - ->setDocument($document) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateDocument($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/UpdateDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDocumentExceptionTest() - { - $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 - $document = new Document(); - $updateMask = new DocumentMask(); - $request = (new UpdateDocumentRequest()) - ->setDocument($document) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateDocument($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 writeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $streamId = 'streamId-315624902'; - $streamToken = '122'; - $expectedResponse = new WriteResponse(); - $expectedResponse->setStreamId($streamId); - $expectedResponse->setStreamToken($streamToken); - $transport->addResponse($expectedResponse); - $streamId2 = 'streamId21627150189'; - $streamToken2 = '-83'; - $expectedResponse2 = new WriteResponse(); - $expectedResponse2->setStreamId($streamId2); - $expectedResponse2->setStreamToken($streamToken2); - $transport->addResponse($expectedResponse2); - $streamId3 = 'streamId31627150190'; - $streamToken3 = '-82'; - $expectedResponse3 = new WriteResponse(); - $expectedResponse3->setStreamId($streamId3); - $expectedResponse3->setStreamToken($streamToken3); - $transport->addResponse($expectedResponse3); - // Mock request - $database = 'database1789464955'; - $request = new WriteRequest(); - $request->setDatabase($database); - $database2 = 'database21688906350'; - $request2 = new WriteRequest(); - $request2->setDatabase($database2); - $database3 = 'database31688906351'; - $request3 = new WriteRequest(); - $request3->setDatabase($database3); - $bidi = $gapicClient->write(); - $this->assertInstanceOf(BidiStream::class, $bidi); - $bidi->write($request); - $responses = []; - $responses[] = $bidi->read(); - $bidi->writeAll([ - $request2, - $request3, - ]); - foreach ($bidi->closeWriteAndReadAll() as $response) { - $responses[] = $response; - } - - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $createStreamRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($createStreamRequests)); - $streamFuncCall = $createStreamRequests[0]->getFuncCall(); - $streamRequestObject = $createStreamRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/Write', $streamFuncCall); - $this->assertNull($streamRequestObject); - $callObjects = $transport->popCallObjects(); - $this->assertSame(1, count($callObjects)); - $bidiCall = $callObjects[0]; - $writeRequests = $bidiCall->popReceivedCalls(); - $expectedRequests = []; - $expectedRequests[] = $request; - $expectedRequests[] = $request2; - $expectedRequests[] = $request3; - $this->assertEquals($expectedRequests, $writeRequests); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function writeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $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->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - $bidi = $gapicClient->write(); - $results = $bidi->closeWriteAndReadAll(); - try { - iterator_to_array($results); - // If the close stream 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 batchWriteAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchWriteResponse(); - $transport->addResponse($expectedResponse); - $request = new BatchWriteRequest(); - $response = $gapicClient->batchWriteAsync($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.firestore.v1.Firestore/BatchWrite', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Firestore/v1/tests/Unit/V1/FirestoreClientTest.php b/owl-bot-staging/Firestore/v1/tests/Unit/V1/FirestoreClientTest.php deleted file mode 100644 index e328eb47242a..000000000000 --- a/owl-bot-staging/Firestore/v1/tests/Unit/V1/FirestoreClientTest.php +++ /dev/null @@ -1,1219 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return FirestoreClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new FirestoreClient($options); - } - - /** @test */ - public function batchGetDocumentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $missing = 'missing1069449574'; - $transaction2 = '17'; - $expectedResponse = new BatchGetDocumentsResponse(); - $expectedResponse->setMissing($missing); - $expectedResponse->setTransaction($transaction2); - $transport->addResponse($expectedResponse); - $missing2 = 'missing21243859865'; - $transaction3 = '18'; - $expectedResponse2 = new BatchGetDocumentsResponse(); - $expectedResponse2->setMissing($missing2); - $expectedResponse2->setTransaction($transaction3); - $transport->addResponse($expectedResponse2); - $missing3 = 'missing31243859866'; - $transaction4 = '19'; - $expectedResponse3 = new BatchGetDocumentsResponse(); - $expectedResponse3->setMissing($missing3); - $expectedResponse3->setTransaction($transaction4); - $transport->addResponse($expectedResponse3); - // Mock request - $database = 'database1789464955'; - $documents = []; - $serverStream = $gapicClient->batchGetDocuments($database, $documents); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/BatchGetDocuments', $actualFuncCall); - $actualValue = $actualRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $actualValue = $actualRequestObject->getDocuments(); - $this->assertProtobufEquals($documents, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchGetDocumentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $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->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - // Mock request - $database = 'database1789464955'; - $documents = []; - $serverStream = $gapicClient->batchGetDocuments($database, $documents); - $results = $serverStream->readAll(); - try { - iterator_to_array($results); - // If the close stream 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 batchWriteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchWriteResponse(); - $transport->addResponse($expectedResponse); - $response = $gapicClient->batchWrite(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/BatchWrite', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchWriteExceptionTest() - { - $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); - try { - $gapicClient->batchWrite(); - // 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 beginTransactionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $transaction = '-34'; - $expectedResponse = new BeginTransactionResponse(); - $expectedResponse->setTransaction($transaction); - $transport->addResponse($expectedResponse); - // Mock request - $database = 'database1789464955'; - $response = $gapicClient->beginTransaction($database); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/BeginTransaction', $actualFuncCall); - $actualValue = $actualRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function beginTransactionExceptionTest() - { - $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 - $database = 'database1789464955'; - try { - $gapicClient->beginTransaction($database); - // 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 commitTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new CommitResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $database = 'database1789464955'; - $writes = []; - $response = $gapicClient->commit($database, $writes); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/Commit', $actualFuncCall); - $actualValue = $actualRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $actualValue = $actualRequestObject->getWrites(); - $this->assertProtobufEquals($writes, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function commitExceptionTest() - { - $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 - $database = 'database1789464955'; - $writes = []; - try { - $gapicClient->commit($database, $writes); - // 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 createDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Document(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $collectionId = 'collectionId-821242276'; - $documentId = 'documentId506676927'; - $document = new Document(); - $response = $gapicClient->createDocument($parent, $collectionId, $documentId, $document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/CreateDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getCollectionId(); - $this->assertProtobufEquals($collectionId, $actualValue); - $actualValue = $actualRequestObject->getDocumentId(); - $this->assertProtobufEquals($documentId, $actualValue); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDocumentExceptionTest() - { - $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 - $parent = 'parent-995424086'; - $collectionId = 'collectionId-821242276'; - $documentId = 'documentId506676927'; - $document = new Document(); - try { - $gapicClient->createDocument($parent, $collectionId, $documentId, $document); - // 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 deleteDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $gapicClient->deleteDocument($name); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/DeleteDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDocumentExceptionTest() - { - $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'; - try { - $gapicClient->deleteDocument($name); - // 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 getDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Document(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->getDocument($name); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/GetDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDocumentExceptionTest() - { - $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'; - try { - $gapicClient->getDocument($name); - // 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 listCollectionIdsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $collectionIdsElement = 'collectionIdsElement1368994900'; - $collectionIds = [ - $collectionIdsElement, - ]; - $expectedResponse = new ListCollectionIdsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCollectionIds($collectionIds); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $response = $gapicClient->listCollectionIds($parent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCollectionIds()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/ListCollectionIds', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCollectionIdsExceptionTest() - { - $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 - $parent = 'parent-995424086'; - try { - $gapicClient->listCollectionIds($parent); - // 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 listDocumentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $documentsElement = new Document(); - $documents = [ - $documentsElement, - ]; - $expectedResponse = new ListDocumentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDocuments($documents); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $collectionId = 'collectionId-821242276'; - $response = $gapicClient->listDocuments($parent, $collectionId); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDocuments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/ListDocuments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getCollectionId(); - $this->assertProtobufEquals($collectionId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDocumentsExceptionTest() - { - $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 - $parent = 'parent-995424086'; - $collectionId = 'collectionId-821242276'; - try { - $gapicClient->listDocuments($parent, $collectionId); - // 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 listenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListenResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new ListenResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new ListenResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $database = 'database1789464955'; - $request = new ListenRequest(); - $request->setDatabase($database); - $database2 = 'database21688906350'; - $request2 = new ListenRequest(); - $request2->setDatabase($database2); - $database3 = 'database31688906351'; - $request3 = new ListenRequest(); - $request3->setDatabase($database3); - $bidi = $gapicClient->listen(); - $this->assertInstanceOf(BidiStream::class, $bidi); - $bidi->write($request); - $responses = []; - $responses[] = $bidi->read(); - $bidi->writeAll([ - $request2, - $request3, - ]); - foreach ($bidi->closeWriteAndReadAll() as $response) { - $responses[] = $response; - } - - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $createStreamRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($createStreamRequests)); - $streamFuncCall = $createStreamRequests[0]->getFuncCall(); - $streamRequestObject = $createStreamRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/Listen', $streamFuncCall); - $this->assertNull($streamRequestObject); - $callObjects = $transport->popCallObjects(); - $this->assertSame(1, count($callObjects)); - $bidiCall = $callObjects[0]; - $writeRequests = $bidiCall->popReceivedCalls(); - $expectedRequests = []; - $expectedRequests[] = $request; - $expectedRequests[] = $request2; - $expectedRequests[] = $request3; - $this->assertEquals($expectedRequests, $writeRequests); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listenExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $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->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - $bidi = $gapicClient->listen(); - $results = $bidi->closeWriteAndReadAll(); - try { - iterator_to_array($results); - // If the close stream 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 partitionQueryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $partitionsElement = new Cursor(); - $partitions = [ - $partitionsElement, - ]; - $expectedResponse = new PartitionQueryResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPartitions($partitions); - $transport->addResponse($expectedResponse); - $response = $gapicClient->partitionQuery(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPartitions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/PartitionQuery', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function partitionQueryExceptionTest() - { - $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); - try { - $gapicClient->partitionQuery(); - // 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 rollbackTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $database = 'database1789464955'; - $transaction = '-34'; - $gapicClient->rollback($database, $transaction); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/Rollback', $actualFuncCall); - $actualValue = $actualRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $actualValue = $actualRequestObject->getTransaction(); - $this->assertProtobufEquals($transaction, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rollbackExceptionTest() - { - $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 - $database = 'database1789464955'; - $transaction = '-34'; - try { - $gapicClient->rollback($database, $transaction); - // 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 runAggregationQueryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $transaction2 = '17'; - $expectedResponse = new RunAggregationQueryResponse(); - $expectedResponse->setTransaction($transaction2); - $transport->addResponse($expectedResponse); - $transaction3 = '18'; - $expectedResponse2 = new RunAggregationQueryResponse(); - $expectedResponse2->setTransaction($transaction3); - $transport->addResponse($expectedResponse2); - $transaction4 = '19'; - $expectedResponse3 = new RunAggregationQueryResponse(); - $expectedResponse3->setTransaction($transaction4); - $transport->addResponse($expectedResponse3); - // Mock request - $parent = 'parent-995424086'; - $serverStream = $gapicClient->runAggregationQuery($parent); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/RunAggregationQuery', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runAggregationQueryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $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->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - // Mock request - $parent = 'parent-995424086'; - $serverStream = $gapicClient->runAggregationQuery($parent); - $results = $serverStream->readAll(); - try { - iterator_to_array($results); - // If the close stream 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 runQueryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $transaction2 = '17'; - $skippedResults = 880286183; - $done = true; - $expectedResponse = new RunQueryResponse(); - $expectedResponse->setTransaction($transaction2); - $expectedResponse->setSkippedResults($skippedResults); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); - $transaction3 = '18'; - $skippedResults2 = 153532454; - $done2 = false; - $expectedResponse2 = new RunQueryResponse(); - $expectedResponse2->setTransaction($transaction3); - $expectedResponse2->setSkippedResults($skippedResults2); - $expectedResponse2->setDone($done2); - $transport->addResponse($expectedResponse2); - $transaction4 = '19'; - $skippedResults3 = 153532453; - $done3 = true; - $expectedResponse3 = new RunQueryResponse(); - $expectedResponse3->setTransaction($transaction4); - $expectedResponse3->setSkippedResults($skippedResults3); - $expectedResponse3->setDone($done3); - $transport->addResponse($expectedResponse3); - // Mock request - $parent = 'parent-995424086'; - $serverStream = $gapicClient->runQuery($parent); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/RunQuery', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runQueryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $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->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - // Mock request - $parent = 'parent-995424086'; - $serverStream = $gapicClient->runQuery($parent); - $results = $serverStream->readAll(); - try { - iterator_to_array($results); - // If the close stream 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 updateDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Document(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $updateMask = new DocumentMask(); - $response = $gapicClient->updateDocument($document, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/UpdateDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDocumentExceptionTest() - { - $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 - $document = new Document(); - $updateMask = new DocumentMask(); - try { - $gapicClient->updateDocument($document, $updateMask); - // 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 writeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $streamId = 'streamId-315624902'; - $streamToken = '122'; - $expectedResponse = new WriteResponse(); - $expectedResponse->setStreamId($streamId); - $expectedResponse->setStreamToken($streamToken); - $transport->addResponse($expectedResponse); - $streamId2 = 'streamId21627150189'; - $streamToken2 = '-83'; - $expectedResponse2 = new WriteResponse(); - $expectedResponse2->setStreamId($streamId2); - $expectedResponse2->setStreamToken($streamToken2); - $transport->addResponse($expectedResponse2); - $streamId3 = 'streamId31627150190'; - $streamToken3 = '-82'; - $expectedResponse3 = new WriteResponse(); - $expectedResponse3->setStreamId($streamId3); - $expectedResponse3->setStreamToken($streamToken3); - $transport->addResponse($expectedResponse3); - // Mock request - $database = 'database1789464955'; - $request = new WriteRequest(); - $request->setDatabase($database); - $database2 = 'database21688906350'; - $request2 = new WriteRequest(); - $request2->setDatabase($database2); - $database3 = 'database31688906351'; - $request3 = new WriteRequest(); - $request3->setDatabase($database3); - $bidi = $gapicClient->write(); - $this->assertInstanceOf(BidiStream::class, $bidi); - $bidi->write($request); - $responses = []; - $responses[] = $bidi->read(); - $bidi->writeAll([ - $request2, - $request3, - ]); - foreach ($bidi->closeWriteAndReadAll() as $response) { - $responses[] = $response; - } - - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $createStreamRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($createStreamRequests)); - $streamFuncCall = $createStreamRequests[0]->getFuncCall(); - $streamRequestObject = $createStreamRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/Write', $streamFuncCall); - $this->assertNull($streamRequestObject); - $callObjects = $transport->popCallObjects(); - $this->assertSame(1, count($callObjects)); - $bidiCall = $callObjects[0]; - $writeRequests = $bidiCall->popReceivedCalls(); - $expectedRequests = []; - $expectedRequests[] = $request; - $expectedRequests[] = $request2; - $expectedRequests[] = $request3; - $this->assertEquals($expectedRequests, $writeRequests); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function writeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $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->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - $bidi = $gapicClient->write(); - $results = $bidi->closeWriteAndReadAll(); - try { - iterator_to_array($results); - // If the close stream 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()); - } -} diff --git a/owl-bot-staging/Functions/v2/proto/src/GPBMetadata/Google/Cloud/Functions/V2/Functions.php b/owl-bot-staging/Functions/v2/proto/src/GPBMetadata/Google/Cloud/Functions/V2/Functions.php deleted file mode 100644 index 67d1301d26f5..000000000000 Binary files a/owl-bot-staging/Functions/v2/proto/src/GPBMetadata/Google/Cloud/Functions/V2/Functions.php and /dev/null differ diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/AutomaticUpdatePolicy.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/AutomaticUpdatePolicy.php deleted file mode 100644 index b30ace2a41a9..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/AutomaticUpdatePolicy.php +++ /dev/null @@ -1,34 +0,0 @@ -google.cloud.functions.v2.AutomaticUpdatePolicy - */ -class AutomaticUpdatePolicy extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/BuildConfig.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/BuildConfig.php deleted file mode 100644 index ad0033887c63..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/BuildConfig.php +++ /dev/null @@ -1,599 +0,0 @@ -google.cloud.functions.v2.BuildConfig - */ -class BuildConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The Cloud Build name of the latest successful deployment of - * the function. - * - * Generated from protobuf field string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $build = ''; - /** - * The runtime in which to run the function. Required when deploying a new - * function, optional when updating an existing function. For a complete - * list of possible choices, see the - * [`gcloud` command - * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). - * - * Generated from protobuf field string runtime = 2; - */ - protected $runtime = ''; - /** - * The name of the function (as defined in source code) that will be - * executed. Defaults to the resource name suffix, if not specified. For - * backward compatibility, if function with given name is not found, then the - * system will try to use function named "function". - * For Node.js this is name of a function exported by the module specified - * in `source_location`. - * - * Generated from protobuf field string entry_point = 3; - */ - protected $entry_point = ''; - /** - * The location of the function source code. - * - * Generated from protobuf field .google.cloud.functions.v2.Source source = 4; - */ - protected $source = null; - /** - * Output only. A permanent fixed identifier for source. - * - * Generated from protobuf field .google.cloud.functions.v2.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source_provenance = null; - /** - * Name of the Cloud Build Custom Worker Pool that should be used to build the - * function. The format of this field is - * `projects/{project}/locations/{region}/workerPools/{workerPool}` where - * {project} and {region} are the project id and region respectively where the - * worker pool is defined and {workerPool} is the short name of the worker - * pool. - * If the project id is not the same as the function, then the Cloud - * Functions Service Agent - * (service-@gcf-admin-robot.iam.gserviceaccount.com) must be - * granted the role Cloud Build Custom Workers Builder - * (roles/cloudbuild.customworkers.builder) in the project. - * - * Generated from protobuf field string worker_pool = 5 [(.google.api.resource_reference) = { - */ - protected $worker_pool = ''; - /** - * User-provided build-time environment variables for the function - * - * Generated from protobuf field map environment_variables = 6; - */ - private $environment_variables; - /** - * Docker Registry to use for this deployment. This configuration is only - * applicable to 1st Gen functions, 2nd Gen functions can only use Artifact - * Registry. - * If unspecified, it defaults to `ARTIFACT_REGISTRY`. - * If `docker_repository` field is specified, this field should either be left - * unspecified or set to `ARTIFACT_REGISTRY`. - * - * Generated from protobuf field .google.cloud.functions.v2.BuildConfig.DockerRegistry docker_registry = 10; - */ - protected $docker_registry = 0; - /** - * Repository in Artifact Registry to which the function docker image will be - * pushed after it is built by Cloud Build. If specified by user, it is - * created and managed by user with a customer managed encryption key. - * Otherwise, GCF will create and use a repository named 'gcf-artifacts' - * for every deployed region. - * It must match the pattern - * `projects/{project}/locations/{location}/repositories/{repository}`. - * Cross-project repositories are not supported. - * Cross-location repositories are not supported. - * Repository format must be 'DOCKER'. - * - * Generated from protobuf field string docker_repository = 7 [(.google.api.resource_reference) = { - */ - protected $docker_repository = ''; - /** - * Service account to be used for building the container. The format of this - * field is `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`. - * - * Generated from protobuf field string service_account = 27; - */ - protected $service_account = ''; - protected $runtime_update_policy; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Functions\V2\AutomaticUpdatePolicy $automatic_update_policy - * @type \Google\Cloud\Functions\V2\OnDeployUpdatePolicy $on_deploy_update_policy - * @type string $build - * Output only. The Cloud Build name of the latest successful deployment of - * the function. - * @type string $runtime - * The runtime in which to run the function. Required when deploying a new - * function, optional when updating an existing function. For a complete - * list of possible choices, see the - * [`gcloud` command - * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). - * @type string $entry_point - * The name of the function (as defined in source code) that will be - * executed. Defaults to the resource name suffix, if not specified. For - * backward compatibility, if function with given name is not found, then the - * system will try to use function named "function". - * For Node.js this is name of a function exported by the module specified - * in `source_location`. - * @type \Google\Cloud\Functions\V2\Source $source - * The location of the function source code. - * @type \Google\Cloud\Functions\V2\SourceProvenance $source_provenance - * Output only. A permanent fixed identifier for source. - * @type string $worker_pool - * Name of the Cloud Build Custom Worker Pool that should be used to build the - * function. The format of this field is - * `projects/{project}/locations/{region}/workerPools/{workerPool}` where - * {project} and {region} are the project id and region respectively where the - * worker pool is defined and {workerPool} is the short name of the worker - * pool. - * If the project id is not the same as the function, then the Cloud - * Functions Service Agent - * (service-@gcf-admin-robot.iam.gserviceaccount.com) must be - * granted the role Cloud Build Custom Workers Builder - * (roles/cloudbuild.customworkers.builder) in the project. - * @type array|\Google\Protobuf\Internal\MapField $environment_variables - * User-provided build-time environment variables for the function - * @type int $docker_registry - * Docker Registry to use for this deployment. This configuration is only - * applicable to 1st Gen functions, 2nd Gen functions can only use Artifact - * Registry. - * If unspecified, it defaults to `ARTIFACT_REGISTRY`. - * If `docker_repository` field is specified, this field should either be left - * unspecified or set to `ARTIFACT_REGISTRY`. - * @type string $docker_repository - * Repository in Artifact Registry to which the function docker image will be - * pushed after it is built by Cloud Build. If specified by user, it is - * created and managed by user with a customer managed encryption key. - * Otherwise, GCF will create and use a repository named 'gcf-artifacts' - * for every deployed region. - * It must match the pattern - * `projects/{project}/locations/{location}/repositories/{repository}`. - * Cross-project repositories are not supported. - * Cross-location repositories are not supported. - * Repository format must be 'DOCKER'. - * @type string $service_account - * Service account to be used for building the container. The format of this - * field is `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field .google.cloud.functions.v2.AutomaticUpdatePolicy automatic_update_policy = 40; - * @return \Google\Cloud\Functions\V2\AutomaticUpdatePolicy|null - */ - public function getAutomaticUpdatePolicy() - { - return $this->readOneof(40); - } - - public function hasAutomaticUpdatePolicy() - { - return $this->hasOneof(40); - } - - /** - * Generated from protobuf field .google.cloud.functions.v2.AutomaticUpdatePolicy automatic_update_policy = 40; - * @param \Google\Cloud\Functions\V2\AutomaticUpdatePolicy $var - * @return $this - */ - public function setAutomaticUpdatePolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\AutomaticUpdatePolicy::class); - $this->writeOneof(40, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.functions.v2.OnDeployUpdatePolicy on_deploy_update_policy = 41; - * @return \Google\Cloud\Functions\V2\OnDeployUpdatePolicy|null - */ - public function getOnDeployUpdatePolicy() - { - return $this->readOneof(41); - } - - public function hasOnDeployUpdatePolicy() - { - return $this->hasOneof(41); - } - - /** - * Generated from protobuf field .google.cloud.functions.v2.OnDeployUpdatePolicy on_deploy_update_policy = 41; - * @param \Google\Cloud\Functions\V2\OnDeployUpdatePolicy $var - * @return $this - */ - public function setOnDeployUpdatePolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\OnDeployUpdatePolicy::class); - $this->writeOneof(41, $var); - - return $this; - } - - /** - * Output only. The Cloud Build name of the latest successful deployment of - * the function. - * - * Generated from protobuf field string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getBuild() - { - return $this->build; - } - - /** - * Output only. The Cloud Build name of the latest successful deployment of - * the function. - * - * Generated from protobuf field string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBuild($var) - { - GPBUtil::checkString($var, True); - $this->build = $var; - - return $this; - } - - /** - * The runtime in which to run the function. Required when deploying a new - * function, optional when updating an existing function. For a complete - * list of possible choices, see the - * [`gcloud` command - * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). - * - * Generated from protobuf field string runtime = 2; - * @return string - */ - public function getRuntime() - { - return $this->runtime; - } - - /** - * The runtime in which to run the function. Required when deploying a new - * function, optional when updating an existing function. For a complete - * list of possible choices, see the - * [`gcloud` command - * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). - * - * Generated from protobuf field string runtime = 2; - * @param string $var - * @return $this - */ - public function setRuntime($var) - { - GPBUtil::checkString($var, True); - $this->runtime = $var; - - return $this; - } - - /** - * The name of the function (as defined in source code) that will be - * executed. Defaults to the resource name suffix, if not specified. For - * backward compatibility, if function with given name is not found, then the - * system will try to use function named "function". - * For Node.js this is name of a function exported by the module specified - * in `source_location`. - * - * Generated from protobuf field string entry_point = 3; - * @return string - */ - public function getEntryPoint() - { - return $this->entry_point; - } - - /** - * The name of the function (as defined in source code) that will be - * executed. Defaults to the resource name suffix, if not specified. For - * backward compatibility, if function with given name is not found, then the - * system will try to use function named "function". - * For Node.js this is name of a function exported by the module specified - * in `source_location`. - * - * Generated from protobuf field string entry_point = 3; - * @param string $var - * @return $this - */ - public function setEntryPoint($var) - { - GPBUtil::checkString($var, True); - $this->entry_point = $var; - - return $this; - } - - /** - * The location of the function source code. - * - * Generated from protobuf field .google.cloud.functions.v2.Source source = 4; - * @return \Google\Cloud\Functions\V2\Source|null - */ - public function getSource() - { - return $this->source; - } - - public function hasSource() - { - return isset($this->source); - } - - public function clearSource() - { - unset($this->source); - } - - /** - * The location of the function source code. - * - * Generated from protobuf field .google.cloud.functions.v2.Source source = 4; - * @param \Google\Cloud\Functions\V2\Source $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\Source::class); - $this->source = $var; - - return $this; - } - - /** - * Output only. A permanent fixed identifier for source. - * - * Generated from protobuf field .google.cloud.functions.v2.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Functions\V2\SourceProvenance|null - */ - public function getSourceProvenance() - { - return $this->source_provenance; - } - - public function hasSourceProvenance() - { - return isset($this->source_provenance); - } - - public function clearSourceProvenance() - { - unset($this->source_provenance); - } - - /** - * Output only. A permanent fixed identifier for source. - * - * Generated from protobuf field .google.cloud.functions.v2.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Functions\V2\SourceProvenance $var - * @return $this - */ - public function setSourceProvenance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\SourceProvenance::class); - $this->source_provenance = $var; - - return $this; - } - - /** - * Name of the Cloud Build Custom Worker Pool that should be used to build the - * function. The format of this field is - * `projects/{project}/locations/{region}/workerPools/{workerPool}` where - * {project} and {region} are the project id and region respectively where the - * worker pool is defined and {workerPool} is the short name of the worker - * pool. - * If the project id is not the same as the function, then the Cloud - * Functions Service Agent - * (service-@gcf-admin-robot.iam.gserviceaccount.com) must be - * granted the role Cloud Build Custom Workers Builder - * (roles/cloudbuild.customworkers.builder) in the project. - * - * Generated from protobuf field string worker_pool = 5 [(.google.api.resource_reference) = { - * @return string - */ - public function getWorkerPool() - { - return $this->worker_pool; - } - - /** - * Name of the Cloud Build Custom Worker Pool that should be used to build the - * function. The format of this field is - * `projects/{project}/locations/{region}/workerPools/{workerPool}` where - * {project} and {region} are the project id and region respectively where the - * worker pool is defined and {workerPool} is the short name of the worker - * pool. - * If the project id is not the same as the function, then the Cloud - * Functions Service Agent - * (service-@gcf-admin-robot.iam.gserviceaccount.com) must be - * granted the role Cloud Build Custom Workers Builder - * (roles/cloudbuild.customworkers.builder) in the project. - * - * Generated from protobuf field string worker_pool = 5 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setWorkerPool($var) - { - GPBUtil::checkString($var, True); - $this->worker_pool = $var; - - return $this; - } - - /** - * User-provided build-time environment variables for the function - * - * Generated from protobuf field map environment_variables = 6; - * @return \Google\Protobuf\Internal\MapField - */ - public function getEnvironmentVariables() - { - return $this->environment_variables; - } - - /** - * User-provided build-time environment variables for the function - * - * Generated from protobuf field map environment_variables = 6; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setEnvironmentVariables($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->environment_variables = $arr; - - return $this; - } - - /** - * Docker Registry to use for this deployment. This configuration is only - * applicable to 1st Gen functions, 2nd Gen functions can only use Artifact - * Registry. - * If unspecified, it defaults to `ARTIFACT_REGISTRY`. - * If `docker_repository` field is specified, this field should either be left - * unspecified or set to `ARTIFACT_REGISTRY`. - * - * Generated from protobuf field .google.cloud.functions.v2.BuildConfig.DockerRegistry docker_registry = 10; - * @return int - */ - public function getDockerRegistry() - { - return $this->docker_registry; - } - - /** - * Docker Registry to use for this deployment. This configuration is only - * applicable to 1st Gen functions, 2nd Gen functions can only use Artifact - * Registry. - * If unspecified, it defaults to `ARTIFACT_REGISTRY`. - * If `docker_repository` field is specified, this field should either be left - * unspecified or set to `ARTIFACT_REGISTRY`. - * - * Generated from protobuf field .google.cloud.functions.v2.BuildConfig.DockerRegistry docker_registry = 10; - * @param int $var - * @return $this - */ - public function setDockerRegistry($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\BuildConfig\DockerRegistry::class); - $this->docker_registry = $var; - - return $this; - } - - /** - * Repository in Artifact Registry to which the function docker image will be - * pushed after it is built by Cloud Build. If specified by user, it is - * created and managed by user with a customer managed encryption key. - * Otherwise, GCF will create and use a repository named 'gcf-artifacts' - * for every deployed region. - * It must match the pattern - * `projects/{project}/locations/{location}/repositories/{repository}`. - * Cross-project repositories are not supported. - * Cross-location repositories are not supported. - * Repository format must be 'DOCKER'. - * - * Generated from protobuf field string docker_repository = 7 [(.google.api.resource_reference) = { - * @return string - */ - public function getDockerRepository() - { - return $this->docker_repository; - } - - /** - * Repository in Artifact Registry to which the function docker image will be - * pushed after it is built by Cloud Build. If specified by user, it is - * created and managed by user with a customer managed encryption key. - * Otherwise, GCF will create and use a repository named 'gcf-artifacts' - * for every deployed region. - * It must match the pattern - * `projects/{project}/locations/{location}/repositories/{repository}`. - * Cross-project repositories are not supported. - * Cross-location repositories are not supported. - * Repository format must be 'DOCKER'. - * - * Generated from protobuf field string docker_repository = 7 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDockerRepository($var) - { - GPBUtil::checkString($var, True); - $this->docker_repository = $var; - - return $this; - } - - /** - * Service account to be used for building the container. The format of this - * field is `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`. - * - * Generated from protobuf field string service_account = 27; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Service account to be used for building the container. The format of this - * field is `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`. - * - * Generated from protobuf field string service_account = 27; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * @return string - */ - public function getRuntimeUpdatePolicy() - { - return $this->whichOneof("runtime_update_policy"); - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/BuildConfig/DockerRegistry.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/BuildConfig/DockerRegistry.php deleted file mode 100644 index dc5838f431f2..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/BuildConfig/DockerRegistry.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.functions.v2.BuildConfig.DockerRegistry - */ -class DockerRegistry -{ - /** - * Unspecified. - * - * Generated from protobuf enum DOCKER_REGISTRY_UNSPECIFIED = 0; - */ - const DOCKER_REGISTRY_UNSPECIFIED = 0; - /** - * Docker images will be stored in multi-regional Container Registry - * repositories named `gcf`. - * - * Generated from protobuf enum CONTAINER_REGISTRY = 1; - */ - const CONTAINER_REGISTRY = 1; - /** - * Docker images will be stored in regional Artifact Registry repositories. - * By default, GCF will create and use repositories named `gcf-artifacts` - * in every region in which a function is deployed. But the repository to - * use can also be specified by the user using the `docker_repository` - * field. - * - * Generated from protobuf enum ARTIFACT_REGISTRY = 2; - */ - const ARTIFACT_REGISTRY = 2; - - private static $valueToName = [ - self::DOCKER_REGISTRY_UNSPECIFIED => 'DOCKER_REGISTRY_UNSPECIFIED', - self::CONTAINER_REGISTRY => 'CONTAINER_REGISTRY', - self::ARTIFACT_REGISTRY => 'ARTIFACT_REGISTRY', - ]; - - 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(DockerRegistry::class, \Google\Cloud\Functions\V2\BuildConfig_DockerRegistry::class); - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/CreateFunctionRequest.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/CreateFunctionRequest.php deleted file mode 100644 index 903e08f50551..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/CreateFunctionRequest.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.functions.v2.CreateFunctionRequest - */ -class CreateFunctionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location in which the function should be created, - * specified in the format `projects/*/locations/*` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Function to be created. - * - * Generated from protobuf field .google.cloud.functions.v2.Function function = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $function = null; - /** - * The ID to use for the function, which will become the final component of - * the function's resource name. - * This value should be 4-63 characters, and valid characters - * are /[a-z][0-9]-/. - * - * Generated from protobuf field string function_id = 3; - */ - protected $function_id = ''; - - /** - * @param string $parent Required. The project and location in which the function should be created, - * specified in the format `projects/*/locations/*` - * Please see {@see FunctionServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Functions\V2\PBFunction $function Required. Function to be created. - * @param string $functionId The ID to use for the function, which will become the final component of - * the function's resource name. - * - * This value should be 4-63 characters, and valid characters - * are /[a-z][0-9]-/. - * - * @return \Google\Cloud\Functions\V2\CreateFunctionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Functions\V2\PBFunction $function, string $functionId): self - { - return (new self()) - ->setParent($parent) - ->setFunction($function) - ->setFunctionId($functionId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location in which the function should be created, - * specified in the format `projects/*/locations/*` - * @type \Google\Cloud\Functions\V2\PBFunction $function - * Required. Function to be created. - * @type string $function_id - * The ID to use for the function, which will become the final component of - * the function's resource name. - * This value should be 4-63 characters, and valid characters - * are /[a-z][0-9]-/. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location in which the function should be created, - * specified 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 and location in which the function should be created, - * specified 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. Function to be created. - * - * Generated from protobuf field .google.cloud.functions.v2.Function function = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Functions\V2\PBFunction|null - */ - public function getFunction() - { - return $this->function; - } - - public function hasFunction() - { - return isset($this->function); - } - - public function clearFunction() - { - unset($this->function); - } - - /** - * Required. Function to be created. - * - * Generated from protobuf field .google.cloud.functions.v2.Function function = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Functions\V2\PBFunction $var - * @return $this - */ - public function setFunction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\PBFunction::class); - $this->function = $var; - - return $this; - } - - /** - * The ID to use for the function, which will become the final component of - * the function's resource name. - * This value should be 4-63 characters, and valid characters - * are /[a-z][0-9]-/. - * - * Generated from protobuf field string function_id = 3; - * @return string - */ - public function getFunctionId() - { - return $this->function_id; - } - - /** - * The ID to use for the function, which will become the final component of - * the function's resource name. - * This value should be 4-63 characters, and valid characters - * are /[a-z][0-9]-/. - * - * Generated from protobuf field string function_id = 3; - * @param string $var - * @return $this - */ - public function setFunctionId($var) - { - GPBUtil::checkString($var, True); - $this->function_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/DeleteFunctionRequest.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/DeleteFunctionRequest.php deleted file mode 100644 index cd7afb9522a6..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/DeleteFunctionRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.functions.v2.DeleteFunctionRequest - */ -class DeleteFunctionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the function which should be deleted. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the function which should be deleted. Please see - * {@see FunctionServiceClient::functionName()} for help formatting this field. - * - * @return \Google\Cloud\Functions\V2\DeleteFunctionRequest - * - * @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 of the function which should be deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the function which should be deleted. - * - * 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 of the function which should be deleted. - * - * 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/Functions/v2/proto/src/Google/Cloud/Functions/V2/Environment.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Environment.php deleted file mode 100644 index a1fd8153a794..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Environment.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.functions.v2.Environment - */ -class Environment -{ - /** - * Unspecified - * - * Generated from protobuf enum ENVIRONMENT_UNSPECIFIED = 0; - */ - const ENVIRONMENT_UNSPECIFIED = 0; - /** - * Gen 1 - * - * Generated from protobuf enum GEN_1 = 1; - */ - const GEN_1 = 1; - /** - * Gen 2 - * - * Generated from protobuf enum GEN_2 = 2; - */ - const GEN_2 = 2; - - private static $valueToName = [ - self::ENVIRONMENT_UNSPECIFIED => 'ENVIRONMENT_UNSPECIFIED', - self::GEN_1 => 'GEN_1', - self::GEN_2 => 'GEN_2', - ]; - - 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/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventFilter.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventFilter.php deleted file mode 100644 index 15ec540f1dd6..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventFilter.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.functions.v2.EventFilter - */ -class EventFilter extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of a CloudEvents attribute. - * - * Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $attribute = ''; - /** - * Required. The value for the attribute. - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $value = ''; - /** - * Optional. The operator used for matching the events with the value of the - * filter. If not specified, only events that have an exact key-value pair - * specified in the filter are matched. The only allowed value is - * `match-path-pattern`. - * - * Generated from protobuf field string operator = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $operator = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $attribute - * Required. The name of a CloudEvents attribute. - * @type string $value - * Required. The value for the attribute. - * @type string $operator - * Optional. The operator used for matching the events with the value of the - * filter. If not specified, only events that have an exact key-value pair - * specified in the filter are matched. The only allowed value is - * `match-path-pattern`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of a CloudEvents attribute. - * - * Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAttribute() - { - return $this->attribute; - } - - /** - * Required. The name of a CloudEvents attribute. - * - * Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAttribute($var) - { - GPBUtil::checkString($var, True); - $this->attribute = $var; - - return $this; - } - - /** - * Required. The value for the attribute. - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Required. The value for the attribute. - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - - /** - * Optional. The operator used for matching the events with the value of the - * filter. If not specified, only events that have an exact key-value pair - * specified in the filter are matched. The only allowed value is - * `match-path-pattern`. - * - * Generated from protobuf field string operator = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOperator() - { - return $this->operator; - } - - /** - * Optional. The operator used for matching the events with the value of the - * filter. If not specified, only events that have an exact key-value pair - * specified in the filter are matched. The only allowed value is - * `match-path-pattern`. - * - * Generated from protobuf field string operator = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOperator($var) - { - GPBUtil::checkString($var, True); - $this->operator = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger.php deleted file mode 100644 index 62813744547d..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger.php +++ /dev/null @@ -1,432 +0,0 @@ -google.cloud.functions.v2.EventTrigger - */ -class EventTrigger extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the Eventarc trigger. The format of this - * field is `projects/{project}/locations/{region}/triggers/{trigger}`. - * - * Generated from protobuf field string trigger = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $trigger = ''; - /** - * The region that the trigger will be in. The trigger will only receive - * events originating in this region. It can be the same - * region as the function, a different region or multi-region, or the global - * region. If not provided, defaults to the same region as the function. - * - * Generated from protobuf field string trigger_region = 2; - */ - protected $trigger_region = ''; - /** - * Required. The type of event to observe. For example: - * `google.cloud.audit.log.v1.written` or - * `google.cloud.pubsub.topic.v1.messagePublished`. - * - * Generated from protobuf field string event_type = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $event_type = ''; - /** - * Criteria used to filter events. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.EventFilter event_filters = 4; - */ - private $event_filters; - /** - * Optional. The name of a Pub/Sub topic in the same project that will be used - * as the transport topic for the event delivery. Format: - * `projects/{project}/topics/{topic}`. - * This is only valid for events of type - * `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here - * will not be deleted at function deletion. - * - * Generated from protobuf field string pubsub_topic = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $pubsub_topic = ''; - /** - * Optional. The email of the trigger's service account. The service account - * must have permission to invoke Cloud Run services, the permission is - * `run.routes.invoke`. - * If empty, defaults to the Compute Engine default service account: - * `{project_number}-compute@developer.gserviceaccount.com`. - * - * Generated from protobuf field string service_account_email = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_account_email = ''; - /** - * Optional. If unset, then defaults to ignoring failures (i.e. not retrying - * them). - * - * Generated from protobuf field .google.cloud.functions.v2.EventTrigger.RetryPolicy retry_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $retry_policy = 0; - /** - * Optional. The name of the channel associated with the trigger in - * `projects/{project}/locations/{location}/channels/{channel}` format. - * You must provide a channel to receive events from Eventarc SaaS partners. - * - * Generated from protobuf field string channel = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $channel = ''; - /** - * Optional. The hostname of the service that 1st Gen function should be - * observed. - * If no string is provided, the default service implementing the API will - * be used. For example, `storage.googleapis.com` is the default for all - * event types in the `google.storage` namespace. - * The field is only applicable to 1st Gen functions. - * - * Generated from protobuf field string service = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $trigger - * Output only. The resource name of the Eventarc trigger. The format of this - * field is `projects/{project}/locations/{region}/triggers/{trigger}`. - * @type string $trigger_region - * The region that the trigger will be in. The trigger will only receive - * events originating in this region. It can be the same - * region as the function, a different region or multi-region, or the global - * region. If not provided, defaults to the same region as the function. - * @type string $event_type - * Required. The type of event to observe. For example: - * `google.cloud.audit.log.v1.written` or - * `google.cloud.pubsub.topic.v1.messagePublished`. - * @type array<\Google\Cloud\Functions\V2\EventFilter>|\Google\Protobuf\Internal\RepeatedField $event_filters - * Criteria used to filter events. - * @type string $pubsub_topic - * Optional. The name of a Pub/Sub topic in the same project that will be used - * as the transport topic for the event delivery. Format: - * `projects/{project}/topics/{topic}`. - * This is only valid for events of type - * `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here - * will not be deleted at function deletion. - * @type string $service_account_email - * Optional. The email of the trigger's service account. The service account - * must have permission to invoke Cloud Run services, the permission is - * `run.routes.invoke`. - * If empty, defaults to the Compute Engine default service account: - * `{project_number}-compute@developer.gserviceaccount.com`. - * @type int $retry_policy - * Optional. If unset, then defaults to ignoring failures (i.e. not retrying - * them). - * @type string $channel - * Optional. The name of the channel associated with the trigger in - * `projects/{project}/locations/{location}/channels/{channel}` format. - * You must provide a channel to receive events from Eventarc SaaS partners. - * @type string $service - * Optional. The hostname of the service that 1st Gen function should be - * observed. - * If no string is provided, the default service implementing the API will - * be used. For example, `storage.googleapis.com` is the default for all - * event types in the `google.storage` namespace. - * The field is only applicable to 1st Gen functions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the Eventarc trigger. The format of this - * field is `projects/{project}/locations/{region}/triggers/{trigger}`. - * - * Generated from protobuf field string trigger = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getTrigger() - { - return $this->trigger; - } - - /** - * Output only. The resource name of the Eventarc trigger. The format of this - * field is `projects/{project}/locations/{region}/triggers/{trigger}`. - * - * Generated from protobuf field string trigger = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTrigger($var) - { - GPBUtil::checkString($var, True); - $this->trigger = $var; - - return $this; - } - - /** - * The region that the trigger will be in. The trigger will only receive - * events originating in this region. It can be the same - * region as the function, a different region or multi-region, or the global - * region. If not provided, defaults to the same region as the function. - * - * Generated from protobuf field string trigger_region = 2; - * @return string - */ - public function getTriggerRegion() - { - return $this->trigger_region; - } - - /** - * The region that the trigger will be in. The trigger will only receive - * events originating in this region. It can be the same - * region as the function, a different region or multi-region, or the global - * region. If not provided, defaults to the same region as the function. - * - * Generated from protobuf field string trigger_region = 2; - * @param string $var - * @return $this - */ - public function setTriggerRegion($var) - { - GPBUtil::checkString($var, True); - $this->trigger_region = $var; - - return $this; - } - - /** - * Required. The type of event to observe. For example: - * `google.cloud.audit.log.v1.written` or - * `google.cloud.pubsub.topic.v1.messagePublished`. - * - * Generated from protobuf field string event_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEventType() - { - return $this->event_type; - } - - /** - * Required. The type of event to observe. For example: - * `google.cloud.audit.log.v1.written` or - * `google.cloud.pubsub.topic.v1.messagePublished`. - * - * Generated from protobuf field string event_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEventType($var) - { - GPBUtil::checkString($var, True); - $this->event_type = $var; - - return $this; - } - - /** - * Criteria used to filter events. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.EventFilter event_filters = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEventFilters() - { - return $this->event_filters; - } - - /** - * Criteria used to filter events. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.EventFilter event_filters = 4; - * @param array<\Google\Cloud\Functions\V2\EventFilter>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEventFilters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\EventFilter::class); - $this->event_filters = $arr; - - return $this; - } - - /** - * Optional. The name of a Pub/Sub topic in the same project that will be used - * as the transport topic for the event delivery. Format: - * `projects/{project}/topics/{topic}`. - * This is only valid for events of type - * `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here - * will not be deleted at function deletion. - * - * Generated from protobuf field string pubsub_topic = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getPubsubTopic() - { - return $this->pubsub_topic; - } - - /** - * Optional. The name of a Pub/Sub topic in the same project that will be used - * as the transport topic for the event delivery. Format: - * `projects/{project}/topics/{topic}`. - * This is only valid for events of type - * `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here - * will not be deleted at function deletion. - * - * Generated from protobuf field string pubsub_topic = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPubsubTopic($var) - { - GPBUtil::checkString($var, True); - $this->pubsub_topic = $var; - - return $this; - } - - /** - * Optional. The email of the trigger's service account. The service account - * must have permission to invoke Cloud Run services, the permission is - * `run.routes.invoke`. - * If empty, defaults to the Compute Engine default service account: - * `{project_number}-compute@developer.gserviceaccount.com`. - * - * Generated from protobuf field string service_account_email = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getServiceAccountEmail() - { - return $this->service_account_email; - } - - /** - * Optional. The email of the trigger's service account. The service account - * must have permission to invoke Cloud Run services, the permission is - * `run.routes.invoke`. - * If empty, defaults to the Compute Engine default service account: - * `{project_number}-compute@developer.gserviceaccount.com`. - * - * Generated from protobuf field string service_account_email = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setServiceAccountEmail($var) - { - GPBUtil::checkString($var, True); - $this->service_account_email = $var; - - return $this; - } - - /** - * Optional. If unset, then defaults to ignoring failures (i.e. not retrying - * them). - * - * Generated from protobuf field .google.cloud.functions.v2.EventTrigger.RetryPolicy retry_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getRetryPolicy() - { - return $this->retry_policy; - } - - /** - * Optional. If unset, then defaults to ignoring failures (i.e. not retrying - * them). - * - * Generated from protobuf field .google.cloud.functions.v2.EventTrigger.RetryPolicy retry_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setRetryPolicy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\EventTrigger\RetryPolicy::class); - $this->retry_policy = $var; - - return $this; - } - - /** - * Optional. The name of the channel associated with the trigger in - * `projects/{project}/locations/{location}/channels/{channel}` format. - * You must provide a channel to receive events from Eventarc SaaS partners. - * - * Generated from protobuf field string channel = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getChannel() - { - return $this->channel; - } - - /** - * Optional. The name of the channel associated with the trigger in - * `projects/{project}/locations/{location}/channels/{channel}` format. - * You must provide a channel to receive events from Eventarc SaaS partners. - * - * Generated from protobuf field string channel = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setChannel($var) - { - GPBUtil::checkString($var, True); - $this->channel = $var; - - return $this; - } - - /** - * Optional. The hostname of the service that 1st Gen function should be - * observed. - * If no string is provided, the default service implementing the API will - * be used. For example, `storage.googleapis.com` is the default for all - * event types in the `google.storage` namespace. - * The field is only applicable to 1st Gen functions. - * - * Generated from protobuf field string service = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * Optional. The hostname of the service that 1st Gen function should be - * observed. - * If no string is provided, the default service implementing the API will - * be used. For example, `storage.googleapis.com` is the default for all - * event types in the `google.storage` namespace. - * The field is only applicable to 1st Gen functions. - * - * Generated from protobuf field string service = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger/RetryPolicy.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger/RetryPolicy.php deleted file mode 100644 index fe9035ebeee4..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger/RetryPolicy.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.functions.v2.EventTrigger.RetryPolicy - */ -class RetryPolicy -{ - /** - * Not specified. - * - * Generated from protobuf enum RETRY_POLICY_UNSPECIFIED = 0; - */ - const RETRY_POLICY_UNSPECIFIED = 0; - /** - * Do not retry. - * - * Generated from protobuf enum RETRY_POLICY_DO_NOT_RETRY = 1; - */ - const RETRY_POLICY_DO_NOT_RETRY = 1; - /** - * Retry on any failure, retry up to 7 days with an exponential backoff - * (capped at 10 seconds). - * - * Generated from protobuf enum RETRY_POLICY_RETRY = 2; - */ - const RETRY_POLICY_RETRY = 2; - - private static $valueToName = [ - self::RETRY_POLICY_UNSPECIFIED => 'RETRY_POLICY_UNSPECIFIED', - self::RETRY_POLICY_DO_NOT_RETRY => 'RETRY_POLICY_DO_NOT_RETRY', - self::RETRY_POLICY_RETRY => 'RETRY_POLICY_RETRY', - ]; - - 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(RetryPolicy::class, \Google\Cloud\Functions\V2\EventTrigger_RetryPolicy::class); - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateDownloadUrlRequest.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateDownloadUrlRequest.php deleted file mode 100644 index 6e003ddc46aa..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateDownloadUrlRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.functions.v2.GenerateDownloadUrlRequest - */ -class GenerateDownloadUrlRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of function for which source code Google Cloud Storage - * signed URL should be generated. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of function for which source code Google Cloud Storage - * signed URL should be generated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of function for which source code Google Cloud Storage - * signed URL should be generated. - * - * 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 of function for which source code Google Cloud Storage - * signed URL should be generated. - * - * 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/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateDownloadUrlResponse.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateDownloadUrlResponse.php deleted file mode 100644 index c49cbe0ed3f5..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateDownloadUrlResponse.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.functions.v2.GenerateDownloadUrlResponse - */ -class GenerateDownloadUrlResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The generated Google Cloud Storage signed URL that should be used for - * function source code download. - * - * Generated from protobuf field string download_url = 1; - */ - protected $download_url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $download_url - * The generated Google Cloud Storage signed URL that should be used for - * function source code download. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * The generated Google Cloud Storage signed URL that should be used for - * function source code download. - * - * Generated from protobuf field string download_url = 1; - * @return string - */ - public function getDownloadUrl() - { - return $this->download_url; - } - - /** - * The generated Google Cloud Storage signed URL that should be used for - * function source code download. - * - * Generated from protobuf field string download_url = 1; - * @param string $var - * @return $this - */ - public function setDownloadUrl($var) - { - GPBUtil::checkString($var, True); - $this->download_url = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateUploadUrlRequest.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateUploadUrlRequest.php deleted file mode 100644 index e61cc8639a76..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateUploadUrlRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.functions.v2.GenerateUploadUrlRequest - */ -class GenerateUploadUrlRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location in which the Google Cloud Storage signed - * URL should be generated, specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * [Preview] Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt function source code objects in intermediate Cloud Storage - * buckets. When you generate an upload url and upload your source code, it - * gets copied to an intermediate Cloud Storage bucket. The source code is - * then copied to a versioned directory in the sources bucket in the consumer - * project during the function deployment. - * It must match the pattern - * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * The Google Cloud Functions service account - * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be - * granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter - * (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the - * Key/KeyRing/Project/Organization (least access preferred). - * - * Generated from protobuf field string kms_key_name = 2 [(.google.api.resource_reference) = { - */ - protected $kms_key_name = ''; - /** - * The function environment the generated upload url will be used for. - * The upload url for 2nd Gen functions can also be used for 1st gen - * functions, but not vice versa. If not specified, 2nd generation-style - * upload URLs are generated. - * - * Generated from protobuf field .google.cloud.functions.v2.Environment environment = 3; - */ - protected $environment = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location in which the Google Cloud Storage signed - * URL should be generated, specified in the format `projects/*/locations/*`. - * @type string $kms_key_name - * [Preview] Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt function source code objects in intermediate Cloud Storage - * buckets. When you generate an upload url and upload your source code, it - * gets copied to an intermediate Cloud Storage bucket. The source code is - * then copied to a versioned directory in the sources bucket in the consumer - * project during the function deployment. - * It must match the pattern - * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * The Google Cloud Functions service account - * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be - * granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter - * (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the - * Key/KeyRing/Project/Organization (least access preferred). - * @type int $environment - * The function environment the generated upload url will be used for. - * The upload url for 2nd Gen functions can also be used for 1st gen - * functions, but not vice versa. If not specified, 2nd generation-style - * upload URLs are generated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location in which the Google Cloud Storage signed - * URL should be generated, specified 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 and location in which the Google Cloud Storage signed - * URL should be generated, specified 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; - } - - /** - * [Preview] Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt function source code objects in intermediate Cloud Storage - * buckets. When you generate an upload url and upload your source code, it - * gets copied to an intermediate Cloud Storage bucket. The source code is - * then copied to a versioned directory in the sources bucket in the consumer - * project during the function deployment. - * It must match the pattern - * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * The Google Cloud Functions service account - * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be - * granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter - * (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the - * Key/KeyRing/Project/Organization (least access preferred). - * - * Generated from protobuf field string kms_key_name = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * [Preview] Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt function source code objects in intermediate Cloud Storage - * buckets. When you generate an upload url and upload your source code, it - * gets copied to an intermediate Cloud Storage bucket. The source code is - * then copied to a versioned directory in the sources bucket in the consumer - * project during the function deployment. - * It must match the pattern - * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * The Google Cloud Functions service account - * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be - * granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter - * (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the - * Key/KeyRing/Project/Organization (least access preferred). - * - * Generated from protobuf field string kms_key_name = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_name = $var; - - return $this; - } - - /** - * The function environment the generated upload url will be used for. - * The upload url for 2nd Gen functions can also be used for 1st gen - * functions, but not vice versa. If not specified, 2nd generation-style - * upload URLs are generated. - * - * Generated from protobuf field .google.cloud.functions.v2.Environment environment = 3; - * @return int - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * The function environment the generated upload url will be used for. - * The upload url for 2nd Gen functions can also be used for 1st gen - * functions, but not vice versa. If not specified, 2nd generation-style - * upload URLs are generated. - * - * Generated from protobuf field .google.cloud.functions.v2.Environment environment = 3; - * @param int $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\Environment::class); - $this->environment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateUploadUrlResponse.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateUploadUrlResponse.php deleted file mode 100644 index ec4ee0a82cfa..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateUploadUrlResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.functions.v2.GenerateUploadUrlResponse - */ -class GenerateUploadUrlResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The generated Google Cloud Storage signed URL that should be used for a - * function source code upload. The uploaded file should be a zip archive - * which contains a function. - * - * Generated from protobuf field string upload_url = 1; - */ - protected $upload_url = ''; - /** - * The location of the source code in the upload bucket. - * Once the archive is uploaded using the `upload_url` use this field to - * set the `function.build_config.source.storage_source` - * during CreateFunction and UpdateFunction. - * Generation defaults to 0, as Cloud Storage provides a new generation only - * upon uploading a new object or version of an object. - * - * Generated from protobuf field .google.cloud.functions.v2.StorageSource storage_source = 2; - */ - protected $storage_source = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $upload_url - * The generated Google Cloud Storage signed URL that should be used for a - * function source code upload. The uploaded file should be a zip archive - * which contains a function. - * @type \Google\Cloud\Functions\V2\StorageSource $storage_source - * The location of the source code in the upload bucket. - * Once the archive is uploaded using the `upload_url` use this field to - * set the `function.build_config.source.storage_source` - * during CreateFunction and UpdateFunction. - * Generation defaults to 0, as Cloud Storage provides a new generation only - * upon uploading a new object or version of an object. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * The generated Google Cloud Storage signed URL that should be used for a - * function source code upload. The uploaded file should be a zip archive - * which contains a function. - * - * Generated from protobuf field string upload_url = 1; - * @return string - */ - public function getUploadUrl() - { - return $this->upload_url; - } - - /** - * The generated Google Cloud Storage signed URL that should be used for a - * function source code upload. The uploaded file should be a zip archive - * which contains a function. - * - * Generated from protobuf field string upload_url = 1; - * @param string $var - * @return $this - */ - public function setUploadUrl($var) - { - GPBUtil::checkString($var, True); - $this->upload_url = $var; - - return $this; - } - - /** - * The location of the source code in the upload bucket. - * Once the archive is uploaded using the `upload_url` use this field to - * set the `function.build_config.source.storage_source` - * during CreateFunction and UpdateFunction. - * Generation defaults to 0, as Cloud Storage provides a new generation only - * upon uploading a new object or version of an object. - * - * Generated from protobuf field .google.cloud.functions.v2.StorageSource storage_source = 2; - * @return \Google\Cloud\Functions\V2\StorageSource|null - */ - public function getStorageSource() - { - return $this->storage_source; - } - - public function hasStorageSource() - { - return isset($this->storage_source); - } - - public function clearStorageSource() - { - unset($this->storage_source); - } - - /** - * The location of the source code in the upload bucket. - * Once the archive is uploaded using the `upload_url` use this field to - * set the `function.build_config.source.storage_source` - * during CreateFunction and UpdateFunction. - * Generation defaults to 0, as Cloud Storage provides a new generation only - * upon uploading a new object or version of an object. - * - * Generated from protobuf field .google.cloud.functions.v2.StorageSource storage_source = 2; - * @param \Google\Cloud\Functions\V2\StorageSource $var - * @return $this - */ - public function setStorageSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\StorageSource::class); - $this->storage_source = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GetFunctionRequest.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GetFunctionRequest.php deleted file mode 100644 index 015177d21580..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GetFunctionRequest.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.functions.v2.GetFunctionRequest - */ -class GetFunctionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the function which details should be obtained. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The version of the 1st gen function whose details should - * be obtained. The version of a 1st gen function is an integer that starts - * from 1 and gets incremented on redeployments. GCF may keep historical - * configs for old versions of 1st gen function. This field can be specified - * to fetch the historical configs. This field is valid only for GCF 1st gen - * function. - * - * Generated from protobuf field string revision = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $revision = ''; - - /** - * @param string $name Required. The name of the function which details should be obtained. Please see - * {@see FunctionServiceClient::functionName()} for help formatting this field. - * - * @return \Google\Cloud\Functions\V2\GetFunctionRequest - * - * @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 of the function which details should be obtained. - * @type string $revision - * Optional. The version of the 1st gen function whose details should - * be obtained. The version of a 1st gen function is an integer that starts - * from 1 and gets incremented on redeployments. GCF may keep historical - * configs for old versions of 1st gen function. This field can be specified - * to fetch the historical configs. This field is valid only for GCF 1st gen - * function. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the function which details should be obtained. - * - * 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 of the function which details should be obtained. - * - * 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 version of the 1st gen function whose details should - * be obtained. The version of a 1st gen function is an integer that starts - * from 1 and gets incremented on redeployments. GCF may keep historical - * configs for old versions of 1st gen function. This field can be specified - * to fetch the historical configs. This field is valid only for GCF 1st gen - * function. - * - * Generated from protobuf field string revision = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRevision() - { - return $this->revision; - } - - /** - * Optional. The version of the 1st gen function whose details should - * be obtained. The version of a 1st gen function is an integer that starts - * from 1 and gets incremented on redeployments. GCF may keep historical - * configs for old versions of 1st gen function. This field can be specified - * to fetch the historical configs. This field is valid only for GCF 1st gen - * function. - * - * Generated from protobuf field string revision = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRevision($var) - { - GPBUtil::checkString($var, True); - $this->revision = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListFunctionsRequest.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListFunctionsRequest.php deleted file mode 100644 index 993b0f979c80..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListFunctionsRequest.php +++ /dev/null @@ -1,278 +0,0 @@ -google.cloud.functions.v2.ListFunctionsRequest - */ -class ListFunctionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the function should be - * listed, specified in the format `projects/*/locations/*` If you want to - * list functions in all locations, use "-" in place of a location. When - * listing functions in all locations, if one or more location(s) are - * unreachable, the response will contain functions from all reachable - * locations along with the names of any unreachable locations. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of functions to return per call. The largest allowed - * page_size is 1,000, if the page_size is omitted or specified as greater - * than 1,000 then it will be replaced as 1,000. The size of the list - * response can be less than specified when used with filters. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last - * `ListFunctionsResponse`; indicates that - * this is a continuation of a prior `ListFunctions` call, and that the - * system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The filter for Functions that match the filter expression, - * following the syntax outlined in https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * The sorting order of the resources returned. Value should be a comma - * separated list of fields. The default sorting oder is ascending. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The project and location from which the function should be - * listed, specified in the format `projects/*/locations/*` If you want to - * list functions in all locations, use "-" in place of a location. When - * listing functions in all locations, if one or more location(s) are - * unreachable, the response will contain functions from all reachable - * locations along with the names of any unreachable locations. Please see - * {@see FunctionServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Functions\V2\ListFunctionsRequest - * - * @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 and location from which the function should be - * listed, specified in the format `projects/*/locations/*` If you want to - * list functions in all locations, use "-" in place of a location. When - * listing functions in all locations, if one or more location(s) are - * unreachable, the response will contain functions from all reachable - * locations along with the names of any unreachable locations. - * @type int $page_size - * Maximum number of functions to return per call. The largest allowed - * page_size is 1,000, if the page_size is omitted or specified as greater - * than 1,000 then it will be replaced as 1,000. The size of the list - * response can be less than specified when used with filters. - * @type string $page_token - * The value returned by the last - * `ListFunctionsResponse`; indicates that - * this is a continuation of a prior `ListFunctions` call, and that the - * system should return the next page of data. - * @type string $filter - * The filter for Functions that match the filter expression, - * following the syntax outlined in https://google.aip.dev/160. - * @type string $order_by - * The sorting order of the resources returned. Value should be a comma - * separated list of fields. The default sorting oder is ascending. - * See https://google.aip.dev/132#ordering. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the function should be - * listed, specified in the format `projects/*/locations/*` If you want to - * list functions in all locations, use "-" in place of a location. When - * listing functions in all locations, if one or more location(s) are - * unreachable, the response will contain functions from all reachable - * locations along with the names of any unreachable 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 and location from which the function should be - * listed, specified in the format `projects/*/locations/*` If you want to - * list functions in all locations, use "-" in place of a location. When - * listing functions in all locations, if one or more location(s) are - * unreachable, the response will contain functions from all reachable - * locations along with the names of any unreachable 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; - } - - /** - * Maximum number of functions to return per call. The largest allowed - * page_size is 1,000, if the page_size is omitted or specified as greater - * than 1,000 then it will be replaced as 1,000. The size of the list - * response can be less than specified when used with filters. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of functions to return per call. The largest allowed - * page_size is 1,000, if the page_size is omitted or specified as greater - * than 1,000 then it will be replaced as 1,000. The size of the list - * response can be less than specified when used with filters. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last - * `ListFunctionsResponse`; indicates that - * this is a continuation of a prior `ListFunctions` call, and that the - * system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last - * `ListFunctionsResponse`; indicates that - * this is a continuation of a prior `ListFunctions` call, and that the - * system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The filter for Functions that match the filter expression, - * following the syntax outlined in https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter for Functions that match the filter expression, - * following the syntax outlined in https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * The sorting order of the resources returned. Value should be a comma - * separated list of fields. The default sorting oder is ascending. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * The sorting order of the resources returned. Value should be a comma - * separated list of fields. The default sorting oder is ascending. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5; - * @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/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListFunctionsResponse.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListFunctionsResponse.php deleted file mode 100644 index edfa21aa7abe..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListFunctionsResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.functions.v2.ListFunctionsResponse - */ -class ListFunctionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The functions that match the request. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.Function functions = 1; - */ - private $functions; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. The response does not include any - * functions from these locations. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Functions\V2\PBFunction>|\Google\Protobuf\Internal\RepeatedField $functions - * The functions that match the request. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. The response does not include any - * functions from these locations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * The functions that match the request. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.Function functions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFunctions() - { - return $this->functions; - } - - /** - * The functions that match the request. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.Function functions = 1; - * @param array<\Google\Cloud\Functions\V2\PBFunction>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFunctions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\PBFunction::class); - $this->functions = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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; - } - - /** - * Locations that could not be reached. The response does not include any - * functions from these locations. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. The response does not include any - * functions from these locations. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesRequest.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesRequest.php deleted file mode 100644 index 7b4e50584294..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.functions.v2.ListRuntimesRequest - */ -class ListRuntimesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the runtimes should be - * listed, specified in the format `projects/*/locations/*` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The filter for Runtimes that match the filter expression, - * following the syntax outlined in https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The project and location from which the runtimes should be - * listed, specified in the format `projects/*/locations/*` - * Please see {@see FunctionServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Functions\V2\ListRuntimesRequest - * - * @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 and location from which the runtimes should be - * listed, specified in the format `projects/*/locations/*` - * @type string $filter - * The filter for Runtimes that match the filter expression, - * following the syntax outlined in https://google.aip.dev/160. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the runtimes should be - * listed, specified 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 and location from which the runtimes should be - * listed, specified 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; - } - - /** - * The filter for Runtimes that match the filter expression, - * following the syntax outlined in https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter for Runtimes that match the filter expression, - * following the syntax outlined in https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse.php deleted file mode 100644 index b833f9d472e1..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.functions.v2.ListRuntimesResponse - */ -class ListRuntimesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The runtimes that match the request. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.ListRuntimesResponse.Runtime runtimes = 1; - */ - private $runtimes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Functions\V2\ListRuntimesResponse\Runtime>|\Google\Protobuf\Internal\RepeatedField $runtimes - * The runtimes that match the request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * The runtimes that match the request. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.ListRuntimesResponse.Runtime runtimes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRuntimes() - { - return $this->runtimes; - } - - /** - * The runtimes that match the request. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.ListRuntimesResponse.Runtime runtimes = 1; - * @param array<\Google\Cloud\Functions\V2\ListRuntimesResponse\Runtime>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRuntimes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\ListRuntimesResponse\Runtime::class); - $this->runtimes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse/Runtime.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse/Runtime.php deleted file mode 100644 index 2928581dd1a4..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse/Runtime.php +++ /dev/null @@ -1,295 +0,0 @@ -google.cloud.functions.v2.ListRuntimesResponse.Runtime - */ -class Runtime extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the runtime, e.g., 'go113', 'nodejs12', etc. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The user facing name, eg 'Go 1.13', 'Node.js 12', etc. - * - * Generated from protobuf field string display_name = 5; - */ - protected $display_name = ''; - /** - * The stage of life this runtime is in, e.g., BETA, GA, etc. - * - * Generated from protobuf field .google.cloud.functions.v2.ListRuntimesResponse.RuntimeStage stage = 2; - */ - protected $stage = 0; - /** - * Warning messages, e.g., a deprecation warning. - * - * Generated from protobuf field repeated string warnings = 3; - */ - private $warnings; - /** - * The environment for the runtime. - * - * Generated from protobuf field .google.cloud.functions.v2.Environment environment = 4; - */ - protected $environment = 0; - /** - * Deprecation date for the runtime. - * - * Generated from protobuf field .google.type.Date deprecation_date = 6; - */ - protected $deprecation_date = null; - /** - * Decommission date for the runtime. - * - * Generated from protobuf field .google.type.Date decommission_date = 7; - */ - protected $decommission_date = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the runtime, e.g., 'go113', 'nodejs12', etc. - * @type string $display_name - * The user facing name, eg 'Go 1.13', 'Node.js 12', etc. - * @type int $stage - * The stage of life this runtime is in, e.g., BETA, GA, etc. - * @type array|\Google\Protobuf\Internal\RepeatedField $warnings - * Warning messages, e.g., a deprecation warning. - * @type int $environment - * The environment for the runtime. - * @type \Google\Type\Date $deprecation_date - * Deprecation date for the runtime. - * @type \Google\Type\Date $decommission_date - * Decommission date for the runtime. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * The name of the runtime, e.g., 'go113', 'nodejs12', etc. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the runtime, e.g., 'go113', 'nodejs12', etc. - * - * 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 user facing name, eg 'Go 1.13', 'Node.js 12', etc. - * - * Generated from protobuf field string display_name = 5; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The user facing name, eg 'Go 1.13', 'Node.js 12', etc. - * - * Generated from protobuf field string display_name = 5; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The stage of life this runtime is in, e.g., BETA, GA, etc. - * - * Generated from protobuf field .google.cloud.functions.v2.ListRuntimesResponse.RuntimeStage stage = 2; - * @return int - */ - public function getStage() - { - return $this->stage; - } - - /** - * The stage of life this runtime is in, e.g., BETA, GA, etc. - * - * Generated from protobuf field .google.cloud.functions.v2.ListRuntimesResponse.RuntimeStage stage = 2; - * @param int $var - * @return $this - */ - public function setStage($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\ListRuntimesResponse\RuntimeStage::class); - $this->stage = $var; - - return $this; - } - - /** - * Warning messages, e.g., a deprecation warning. - * - * Generated from protobuf field repeated string warnings = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWarnings() - { - return $this->warnings; - } - - /** - * Warning messages, e.g., a deprecation warning. - * - * Generated from protobuf field repeated string warnings = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWarnings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->warnings = $arr; - - return $this; - } - - /** - * The environment for the runtime. - * - * Generated from protobuf field .google.cloud.functions.v2.Environment environment = 4; - * @return int - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * The environment for the runtime. - * - * Generated from protobuf field .google.cloud.functions.v2.Environment environment = 4; - * @param int $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\Environment::class); - $this->environment = $var; - - return $this; - } - - /** - * Deprecation date for the runtime. - * - * Generated from protobuf field .google.type.Date deprecation_date = 6; - * @return \Google\Type\Date|null - */ - public function getDeprecationDate() - { - return $this->deprecation_date; - } - - public function hasDeprecationDate() - { - return isset($this->deprecation_date); - } - - public function clearDeprecationDate() - { - unset($this->deprecation_date); - } - - /** - * Deprecation date for the runtime. - * - * Generated from protobuf field .google.type.Date deprecation_date = 6; - * @param \Google\Type\Date $var - * @return $this - */ - public function setDeprecationDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->deprecation_date = $var; - - return $this; - } - - /** - * Decommission date for the runtime. - * - * Generated from protobuf field .google.type.Date decommission_date = 7; - * @return \Google\Type\Date|null - */ - public function getDecommissionDate() - { - return $this->decommission_date; - } - - public function hasDecommissionDate() - { - return isset($this->decommission_date); - } - - public function clearDecommissionDate() - { - unset($this->decommission_date); - } - - /** - * Decommission date for the runtime. - * - * Generated from protobuf field .google.type.Date decommission_date = 7; - * @param \Google\Type\Date $var - * @return $this - */ - public function setDecommissionDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->decommission_date = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Runtime::class, \Google\Cloud\Functions\V2\ListRuntimesResponse_Runtime::class); - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse/RuntimeStage.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse/RuntimeStage.php deleted file mode 100644 index 60d76ac6285e..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse/RuntimeStage.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.functions.v2.ListRuntimesResponse.RuntimeStage - */ -class RuntimeStage -{ - /** - * Not specified. - * - * Generated from protobuf enum RUNTIME_STAGE_UNSPECIFIED = 0; - */ - const RUNTIME_STAGE_UNSPECIFIED = 0; - /** - * The runtime is in development. - * - * Generated from protobuf enum DEVELOPMENT = 1; - */ - const DEVELOPMENT = 1; - /** - * The runtime is in the Alpha stage. - * - * Generated from protobuf enum ALPHA = 2; - */ - const ALPHA = 2; - /** - * The runtime is in the Beta stage. - * - * Generated from protobuf enum BETA = 3; - */ - const BETA = 3; - /** - * The runtime is generally available. - * - * Generated from protobuf enum GA = 4; - */ - const GA = 4; - /** - * The runtime is deprecated. - * - * Generated from protobuf enum DEPRECATED = 5; - */ - const DEPRECATED = 5; - /** - * The runtime is no longer supported. - * - * Generated from protobuf enum DECOMMISSIONED = 6; - */ - const DECOMMISSIONED = 6; - - private static $valueToName = [ - self::RUNTIME_STAGE_UNSPECIFIED => 'RUNTIME_STAGE_UNSPECIFIED', - self::DEVELOPMENT => 'DEVELOPMENT', - self::ALPHA => 'ALPHA', - self::BETA => 'BETA', - self::GA => 'GA', - self::DEPRECATED => 'DEPRECATED', - self::DECOMMISSIONED => 'DECOMMISSIONED', - ]; - - 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(RuntimeStage::class, \Google\Cloud\Functions\V2\ListRuntimesResponse_RuntimeStage::class); - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/LocationMetadata.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/LocationMetadata.php deleted file mode 100644 index f6f8e06ea974..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/LocationMetadata.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.functions.v2.LocationMetadata - */ -class LocationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The Cloud Function environments this location supports. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.Environment environments = 1; - */ - private $environments; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $environments - * The Cloud Function environments this location supports. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * The Cloud Function environments this location supports. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.Environment environments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEnvironments() - { - return $this->environments; - } - - /** - * The Cloud Function environments this location supports. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.Environment environments = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEnvironments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Functions\V2\Environment::class); - $this->environments = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/OnDeployUpdatePolicy.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/OnDeployUpdatePolicy.php deleted file mode 100644 index 471df8d867e2..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/OnDeployUpdatePolicy.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.functions.v2.OnDeployUpdatePolicy - */ -class OnDeployUpdatePolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. contains the runtime version which was used during latest - * function deployment. - * - * Generated from protobuf field string runtime_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $runtime_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $runtime_version - * Output only. contains the runtime version which was used during latest - * function deployment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Output only. contains the runtime version which was used during latest - * function deployment. - * - * Generated from protobuf field string runtime_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getRuntimeVersion() - { - return $this->runtime_version; - } - - /** - * Output only. contains the runtime version which was used during latest - * function deployment. - * - * Generated from protobuf field string runtime_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setRuntimeVersion($var) - { - GPBUtil::checkString($var, True); - $this->runtime_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/OperationMetadata.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/OperationMetadata.php deleted file mode 100644 index b6394ceb74f7..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/OperationMetadata.php +++ /dev/null @@ -1,495 +0,0 @@ -google.cloud.functions.v2.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3; - */ - protected $target = ''; - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - */ - protected $verb = ''; - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5; - */ - protected $status_detail = ''; - /** - * Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have - * [google.longrunning.Operation.error][google.longrunning.Operation.error] - * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool cancel_requested = 6; - */ - protected $cancel_requested = false; - /** - * API version used to start the operation. - * - * Generated from protobuf field string api_version = 7; - */ - protected $api_version = ''; - /** - * The original request that started the operation. - * - * Generated from protobuf field .google.protobuf.Any request_resource = 8; - */ - protected $request_resource = null; - /** - * Mechanism for reporting in-progress stages - * - * Generated from protobuf field repeated .google.cloud.functions.v2.Stage stages = 9; - */ - private $stages; - /** - * An identifier for Firebase function sources. Disclaimer: This field is only - * supported for Firebase function deployments. - * - * Generated from protobuf field string source_token = 10; - */ - protected $source_token = ''; - /** - * The build name of the function for create and update operations. - * - * Generated from protobuf field string build_name = 13; - */ - protected $build_name = ''; - /** - * The operation type. - * - * Generated from protobuf field .google.cloud.functions.v2.OperationType operation_type = 11; - */ - protected $operation_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * The time the operation finished running. - * @type string $target - * Server-defined resource path for the target of the operation. - * @type string $verb - * Name of the verb executed by the operation. - * @type string $status_detail - * Human-readable status of the operation, if any. - * @type bool $cancel_requested - * Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have - * [google.longrunning.Operation.error][google.longrunning.Operation.error] - * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * @type string $api_version - * API version used to start the operation. - * @type \Google\Protobuf\Any $request_resource - * The original request that started the operation. - * @type array<\Google\Cloud\Functions\V2\Stage>|\Google\Protobuf\Internal\RepeatedField $stages - * Mechanism for reporting in-progress stages - * @type string $source_token - * An identifier for Firebase function sources. Disclaimer: This field is only - * supported for Firebase function deployments. - * @type string $build_name - * The build name of the function for create and update operations. - * @type int $operation_type - * The operation type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @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); - } - - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5; - * @return string - */ - public function getStatusDetail() - { - return $this->status_detail; - } - - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5; - * @param string $var - * @return $this - */ - public function setStatusDetail($var) - { - GPBUtil::checkString($var, True); - $this->status_detail = $var; - - return $this; - } - - /** - * Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have - * [google.longrunning.Operation.error][google.longrunning.Operation.error] - * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool cancel_requested = 6; - * @return bool - */ - public function getCancelRequested() - { - return $this->cancel_requested; - } - - /** - * Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have - * [google.longrunning.Operation.error][google.longrunning.Operation.error] - * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool cancel_requested = 6; - * @param bool $var - * @return $this - */ - public function setCancelRequested($var) - { - GPBUtil::checkBool($var); - $this->cancel_requested = $var; - - return $this; - } - - /** - * API version used to start the operation. - * - * Generated from protobuf field string api_version = 7; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * API version used to start the operation. - * - * Generated from protobuf field string api_version = 7; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - - /** - * The original request that started the operation. - * - * Generated from protobuf field .google.protobuf.Any request_resource = 8; - * @return \Google\Protobuf\Any|null - */ - public function getRequestResource() - { - return $this->request_resource; - } - - public function hasRequestResource() - { - return isset($this->request_resource); - } - - public function clearRequestResource() - { - unset($this->request_resource); - } - - /** - * The original request that started the operation. - * - * Generated from protobuf field .google.protobuf.Any request_resource = 8; - * @param \Google\Protobuf\Any $var - * @return $this - */ - public function setRequestResource($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); - $this->request_resource = $var; - - return $this; - } - - /** - * Mechanism for reporting in-progress stages - * - * Generated from protobuf field repeated .google.cloud.functions.v2.Stage stages = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStages() - { - return $this->stages; - } - - /** - * Mechanism for reporting in-progress stages - * - * Generated from protobuf field repeated .google.cloud.functions.v2.Stage stages = 9; - * @param array<\Google\Cloud\Functions\V2\Stage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\Stage::class); - $this->stages = $arr; - - return $this; - } - - /** - * An identifier for Firebase function sources. Disclaimer: This field is only - * supported for Firebase function deployments. - * - * Generated from protobuf field string source_token = 10; - * @return string - */ - public function getSourceToken() - { - return $this->source_token; - } - - /** - * An identifier for Firebase function sources. Disclaimer: This field is only - * supported for Firebase function deployments. - * - * Generated from protobuf field string source_token = 10; - * @param string $var - * @return $this - */ - public function setSourceToken($var) - { - GPBUtil::checkString($var, True); - $this->source_token = $var; - - return $this; - } - - /** - * The build name of the function for create and update operations. - * - * Generated from protobuf field string build_name = 13; - * @return string - */ - public function getBuildName() - { - return $this->build_name; - } - - /** - * The build name of the function for create and update operations. - * - * Generated from protobuf field string build_name = 13; - * @param string $var - * @return $this - */ - public function setBuildName($var) - { - GPBUtil::checkString($var, True); - $this->build_name = $var; - - return $this; - } - - /** - * The operation type. - * - * Generated from protobuf field .google.cloud.functions.v2.OperationType operation_type = 11; - * @return int - */ - public function getOperationType() - { - return $this->operation_type; - } - - /** - * The operation type. - * - * Generated from protobuf field .google.cloud.functions.v2.OperationType operation_type = 11; - * @param int $var - * @return $this - */ - public function setOperationType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\OperationType::class); - $this->operation_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/OperationType.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/OperationType.php deleted file mode 100644 index 00296bf3ca85..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/OperationType.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.functions.v2.OperationType - */ -class OperationType -{ - /** - * Unspecified - * - * Generated from protobuf enum OPERATIONTYPE_UNSPECIFIED = 0; - */ - const OPERATIONTYPE_UNSPECIFIED = 0; - /** - * CreateFunction - * - * Generated from protobuf enum CREATE_FUNCTION = 1; - */ - const CREATE_FUNCTION = 1; - /** - * UpdateFunction - * - * Generated from protobuf enum UPDATE_FUNCTION = 2; - */ - const UPDATE_FUNCTION = 2; - /** - * DeleteFunction - * - * Generated from protobuf enum DELETE_FUNCTION = 3; - */ - const DELETE_FUNCTION = 3; - - private static $valueToName = [ - self::OPERATIONTYPE_UNSPECIFIED => 'OPERATIONTYPE_UNSPECIFIED', - self::CREATE_FUNCTION => 'CREATE_FUNCTION', - self::UPDATE_FUNCTION => 'UPDATE_FUNCTION', - self::DELETE_FUNCTION => 'DELETE_FUNCTION', - ]; - - 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/Functions/v2/proto/src/Google/Cloud/Functions/V2/PBFunction.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/PBFunction.php deleted file mode 100644 index f910190061c4..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/PBFunction.php +++ /dev/null @@ -1,592 +0,0 @@ -google.cloud.functions.v2.Function - */ -class PBFunction extends \Google\Protobuf\Internal\Message -{ - /** - * A user-defined name of the function. Function names must be unique - * globally and match pattern `projects/*/locations/*/functions/*` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * User-provided description of a function. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Describes the Build step of the function that builds a container from the - * given source. - * - * Generated from protobuf field .google.cloud.functions.v2.BuildConfig build_config = 3; - */ - protected $build_config = null; - /** - * Describes the Service being deployed. Currently deploys services to Cloud - * Run (fully managed). - * - * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig service_config = 4; - */ - protected $service_config = null; - /** - * An Eventarc trigger managed by Google Cloud Functions that fires events in - * response to a condition in another service. - * - * Generated from protobuf field .google.cloud.functions.v2.EventTrigger event_trigger = 5; - */ - protected $event_trigger = null; - /** - * Output only. State of the function. - * - * Generated from protobuf field .google.cloud.functions.v2.Function.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The last update timestamp of a Cloud Function. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Labels associated with this Cloud Function. - * - * Generated from protobuf field map labels = 8; - */ - private $labels; - /** - * Output only. State Messages for this Cloud Function. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.StateMessage state_messages = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $state_messages; - /** - * Describe whether the function is 1st Gen or 2nd Gen. - * - * Generated from protobuf field .google.cloud.functions.v2.Environment environment = 10; - */ - protected $environment = 0; - /** - * Output only. The deployed url for the function. - * - * Generated from protobuf field string url = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $url = ''; - /** - * [Preview] Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt function resources. - * It must match the pattern - * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * - * Generated from protobuf field string kms_key_name = 25 [(.google.api.resource_reference) = { - */ - protected $kms_key_name = ''; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzs = false; - /** - * Output only. The create timestamp of a Cloud Function. This is only - * applicable to 2nd Gen functions. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * A user-defined name of the function. Function names must be unique - * globally and match pattern `projects/*/locations/*/functions/*` - * @type string $description - * User-provided description of a function. - * @type \Google\Cloud\Functions\V2\BuildConfig $build_config - * Describes the Build step of the function that builds a container from the - * given source. - * @type \Google\Cloud\Functions\V2\ServiceConfig $service_config - * Describes the Service being deployed. Currently deploys services to Cloud - * Run (fully managed). - * @type \Google\Cloud\Functions\V2\EventTrigger $event_trigger - * An Eventarc trigger managed by Google Cloud Functions that fires events in - * response to a condition in another service. - * @type int $state - * Output only. State of the function. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update timestamp of a Cloud Function. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels associated with this Cloud Function. - * @type array<\Google\Cloud\Functions\V2\StateMessage>|\Google\Protobuf\Internal\RepeatedField $state_messages - * Output only. State Messages for this Cloud Function. - * @type int $environment - * Describe whether the function is 1st Gen or 2nd Gen. - * @type string $url - * Output only. The deployed url for the function. - * @type string $kms_key_name - * [Preview] Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt function resources. - * It must match the pattern - * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * @type bool $satisfies_pzs - * Output only. Reserved for future use. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The create timestamp of a Cloud Function. This is only - * applicable to 2nd Gen functions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * A user-defined name of the function. Function names must be unique - * globally and match pattern `projects/*/locations/*/functions/*` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * A user-defined name of the function. Function names must be unique - * globally and match pattern `projects/*/locations/*/functions/*` - * - * 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; - } - - /** - * User-provided description of a function. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User-provided description of a function. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Describes the Build step of the function that builds a container from the - * given source. - * - * Generated from protobuf field .google.cloud.functions.v2.BuildConfig build_config = 3; - * @return \Google\Cloud\Functions\V2\BuildConfig|null - */ - public function getBuildConfig() - { - return $this->build_config; - } - - public function hasBuildConfig() - { - return isset($this->build_config); - } - - public function clearBuildConfig() - { - unset($this->build_config); - } - - /** - * Describes the Build step of the function that builds a container from the - * given source. - * - * Generated from protobuf field .google.cloud.functions.v2.BuildConfig build_config = 3; - * @param \Google\Cloud\Functions\V2\BuildConfig $var - * @return $this - */ - public function setBuildConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\BuildConfig::class); - $this->build_config = $var; - - return $this; - } - - /** - * Describes the Service being deployed. Currently deploys services to Cloud - * Run (fully managed). - * - * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig service_config = 4; - * @return \Google\Cloud\Functions\V2\ServiceConfig|null - */ - public function getServiceConfig() - { - return $this->service_config; - } - - public function hasServiceConfig() - { - return isset($this->service_config); - } - - public function clearServiceConfig() - { - unset($this->service_config); - } - - /** - * Describes the Service being deployed. Currently deploys services to Cloud - * Run (fully managed). - * - * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig service_config = 4; - * @param \Google\Cloud\Functions\V2\ServiceConfig $var - * @return $this - */ - public function setServiceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\ServiceConfig::class); - $this->service_config = $var; - - return $this; - } - - /** - * An Eventarc trigger managed by Google Cloud Functions that fires events in - * response to a condition in another service. - * - * Generated from protobuf field .google.cloud.functions.v2.EventTrigger event_trigger = 5; - * @return \Google\Cloud\Functions\V2\EventTrigger|null - */ - public function getEventTrigger() - { - return $this->event_trigger; - } - - public function hasEventTrigger() - { - return isset($this->event_trigger); - } - - public function clearEventTrigger() - { - unset($this->event_trigger); - } - - /** - * An Eventarc trigger managed by Google Cloud Functions that fires events in - * response to a condition in another service. - * - * Generated from protobuf field .google.cloud.functions.v2.EventTrigger event_trigger = 5; - * @param \Google\Cloud\Functions\V2\EventTrigger $var - * @return $this - */ - public function setEventTrigger($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\EventTrigger::class); - $this->event_trigger = $var; - - return $this; - } - - /** - * Output only. State of the function. - * - * Generated from protobuf field .google.cloud.functions.v2.Function.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the function. - * - * Generated from protobuf field .google.cloud.functions.v2.Function.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\PBFunction\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The last update timestamp of a Cloud Function. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last update timestamp of a Cloud Function. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Labels associated with this Cloud Function. - * - * Generated from protobuf field map labels = 8; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels associated with this Cloud Function. - * - * Generated from protobuf field map labels = 8; - * @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; - } - - /** - * Output only. State Messages for this Cloud Function. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.StateMessage state_messages = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStateMessages() - { - return $this->state_messages; - } - - /** - * Output only. State Messages for this Cloud Function. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.StateMessage state_messages = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Functions\V2\StateMessage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStateMessages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\StateMessage::class); - $this->state_messages = $arr; - - return $this; - } - - /** - * Describe whether the function is 1st Gen or 2nd Gen. - * - * Generated from protobuf field .google.cloud.functions.v2.Environment environment = 10; - * @return int - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * Describe whether the function is 1st Gen or 2nd Gen. - * - * Generated from protobuf field .google.cloud.functions.v2.Environment environment = 10; - * @param int $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\Environment::class); - $this->environment = $var; - - return $this; - } - - /** - * Output only. The deployed url for the function. - * - * Generated from protobuf field string url = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * Output only. The deployed url for the function. - * - * Generated from protobuf field string url = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - - /** - * [Preview] Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt function resources. - * It must match the pattern - * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * - * Generated from protobuf field string kms_key_name = 25 [(.google.api.resource_reference) = { - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * [Preview] Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt function resources. - * It must match the pattern - * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * - * Generated from protobuf field string kms_key_name = 25 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_name = $var; - - return $this; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzs() - { - return $this->satisfies_pzs; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzs = $var; - - return $this; - } - - /** - * Output only. The create timestamp of a Cloud Function. This is only - * applicable to 2nd Gen functions. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 28 [(.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 create timestamp of a Cloud Function. This is only - * applicable to 2nd Gen functions. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 28 [(.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/Functions/v2/proto/src/Google/Cloud/Functions/V2/PBFunction/State.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/PBFunction/State.php deleted file mode 100644 index f6e8c8a0e5cd..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/PBFunction/State.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.functions.v2.Function.State - */ -class State -{ - /** - * Not specified. Invalid state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Function has been successfully deployed and is serving. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * Function deployment failed and the function is not serving. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - /** - * Function is being created or updated. - * - * Generated from protobuf enum DEPLOYING = 3; - */ - const DEPLOYING = 3; - /** - * Function is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - /** - * Function deployment failed and the function serving state is undefined. - * The function should be updated or deleted to move it out of this state. - * - * Generated from protobuf enum UNKNOWN = 5; - */ - const UNKNOWN = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::FAILED => 'FAILED', - self::DEPLOYING => 'DEPLOYING', - self::DELETING => 'DELETING', - self::UNKNOWN => 'UNKNOWN', - ]; - - 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\Functions\V2\Function_State::class); - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/RepoSource.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/RepoSource.php deleted file mode 100644 index 5326f62530e6..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/RepoSource.php +++ /dev/null @@ -1,309 +0,0 @@ -google.cloud.functions.v2.RepoSource - */ -class RepoSource extends \Google\Protobuf\Internal\Message -{ - /** - * ID of the project that owns the Cloud Source Repository. If omitted, the - * project ID requesting the build is assumed. - * - * Generated from protobuf field string project_id = 1; - */ - protected $project_id = ''; - /** - * Name of the Cloud Source Repository. - * - * Generated from protobuf field string repo_name = 2; - */ - protected $repo_name = ''; - /** - * Directory, relative to the source root, in which to run the build. - * This must be a relative path. If a step's `dir` is specified and is an - * absolute path, this value is ignored for that step's execution. - * eg. helloworld (no leading slash allowed) - * - * Generated from protobuf field string dir = 6; - */ - protected $dir = ''; - /** - * Only trigger a build if the revision regex does NOT match the revision - * regex. - * - * Generated from protobuf field bool invert_regex = 7; - */ - protected $invert_regex = false; - protected $revision; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $branch_name - * Regex matching branches to build. - * The syntax of the regular expressions accepted is the syntax accepted by - * RE2 and described at https://github.com/google/re2/wiki/Syntax - * @type string $tag_name - * Regex matching tags to build. - * The syntax of the regular expressions accepted is the syntax accepted by - * RE2 and described at https://github.com/google/re2/wiki/Syntax - * @type string $commit_sha - * Explicit commit SHA to build. - * @type string $project_id - * ID of the project that owns the Cloud Source Repository. If omitted, the - * project ID requesting the build is assumed. - * @type string $repo_name - * Name of the Cloud Source Repository. - * @type string $dir - * Directory, relative to the source root, in which to run the build. - * This must be a relative path. If a step's `dir` is specified and is an - * absolute path, this value is ignored for that step's execution. - * eg. helloworld (no leading slash allowed) - * @type bool $invert_regex - * Only trigger a build if the revision regex does NOT match the revision - * regex. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Regex matching branches to build. - * The syntax of the regular expressions accepted is the syntax accepted by - * RE2 and described at https://github.com/google/re2/wiki/Syntax - * - * Generated from protobuf field string branch_name = 3; - * @return string - */ - public function getBranchName() - { - return $this->readOneof(3); - } - - public function hasBranchName() - { - return $this->hasOneof(3); - } - - /** - * Regex matching branches to build. - * The syntax of the regular expressions accepted is the syntax accepted by - * RE2 and described at https://github.com/google/re2/wiki/Syntax - * - * Generated from protobuf field string branch_name = 3; - * @param string $var - * @return $this - */ - public function setBranchName($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Regex matching tags to build. - * The syntax of the regular expressions accepted is the syntax accepted by - * RE2 and described at https://github.com/google/re2/wiki/Syntax - * - * Generated from protobuf field string tag_name = 4; - * @return string - */ - public function getTagName() - { - return $this->readOneof(4); - } - - public function hasTagName() - { - return $this->hasOneof(4); - } - - /** - * Regex matching tags to build. - * The syntax of the regular expressions accepted is the syntax accepted by - * RE2 and described at https://github.com/google/re2/wiki/Syntax - * - * Generated from protobuf field string tag_name = 4; - * @param string $var - * @return $this - */ - public function setTagName($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Explicit commit SHA to build. - * - * Generated from protobuf field string commit_sha = 5; - * @return string - */ - public function getCommitSha() - { - return $this->readOneof(5); - } - - public function hasCommitSha() - { - return $this->hasOneof(5); - } - - /** - * Explicit commit SHA to build. - * - * Generated from protobuf field string commit_sha = 5; - * @param string $var - * @return $this - */ - public function setCommitSha($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * ID of the project that owns the Cloud Source Repository. If omitted, the - * project ID requesting the build is assumed. - * - * Generated from protobuf field string project_id = 1; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * ID of the project that owns the Cloud Source Repository. If omitted, the - * project ID requesting the build is assumed. - * - * Generated from protobuf field string project_id = 1; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Name of the Cloud Source Repository. - * - * Generated from protobuf field string repo_name = 2; - * @return string - */ - public function getRepoName() - { - return $this->repo_name; - } - - /** - * Name of the Cloud Source Repository. - * - * Generated from protobuf field string repo_name = 2; - * @param string $var - * @return $this - */ - public function setRepoName($var) - { - GPBUtil::checkString($var, True); - $this->repo_name = $var; - - return $this; - } - - /** - * Directory, relative to the source root, in which to run the build. - * This must be a relative path. If a step's `dir` is specified and is an - * absolute path, this value is ignored for that step's execution. - * eg. helloworld (no leading slash allowed) - * - * Generated from protobuf field string dir = 6; - * @return string - */ - public function getDir() - { - return $this->dir; - } - - /** - * Directory, relative to the source root, in which to run the build. - * This must be a relative path. If a step's `dir` is specified and is an - * absolute path, this value is ignored for that step's execution. - * eg. helloworld (no leading slash allowed) - * - * Generated from protobuf field string dir = 6; - * @param string $var - * @return $this - */ - public function setDir($var) - { - GPBUtil::checkString($var, True); - $this->dir = $var; - - return $this; - } - - /** - * Only trigger a build if the revision regex does NOT match the revision - * regex. - * - * Generated from protobuf field bool invert_regex = 7; - * @return bool - */ - public function getInvertRegex() - { - return $this->invert_regex; - } - - /** - * Only trigger a build if the revision regex does NOT match the revision - * regex. - * - * Generated from protobuf field bool invert_regex = 7; - * @param bool $var - * @return $this - */ - public function setInvertRegex($var) - { - GPBUtil::checkBool($var); - $this->invert_regex = $var; - - return $this; - } - - /** - * @return string - */ - public function getRevision() - { - return $this->whichOneof("revision"); - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretEnvVar.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretEnvVar.php deleted file mode 100644 index d14b7f6d187b..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretEnvVar.php +++ /dev/null @@ -1,191 +0,0 @@ -google.cloud.functions.v2.SecretEnvVar - */ -class SecretEnvVar extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the environment variable. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * Project identifier (preferably project number but can also be the - * project ID) of the project that contains the secret. If not set, it is - * assumed that the secret is in the same project as the function. - * - * Generated from protobuf field string project_id = 2; - */ - protected $project_id = ''; - /** - * Name of the secret in secret manager (not the full resource name). - * - * Generated from protobuf field string secret = 3; - */ - protected $secret = ''; - /** - * Version of the secret (version number or the string 'latest'). It is - * recommended to use a numeric version for secret environment variables as - * any updates to the secret value is not reflected until new instances - * start. - * - * Generated from protobuf field string version = 4; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * Name of the environment variable. - * @type string $project_id - * Project identifier (preferably project number but can also be the - * project ID) of the project that contains the secret. If not set, it is - * assumed that the secret is in the same project as the function. - * @type string $secret - * Name of the secret in secret manager (not the full resource name). - * @type string $version - * Version of the secret (version number or the string 'latest'). It is - * recommended to use a numeric version for secret environment variables as - * any updates to the secret value is not reflected until new instances - * start. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Name of the environment variable. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * Name of the environment variable. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * Project identifier (preferably project number but can also be the - * project ID) of the project that contains the secret. If not set, it is - * assumed that the secret is in the same project as the function. - * - * Generated from protobuf field string project_id = 2; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Project identifier (preferably project number but can also be the - * project ID) of the project that contains the secret. If not set, it is - * assumed that the secret is in the same project as the function. - * - * Generated from protobuf field string project_id = 2; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Name of the secret in secret manager (not the full resource name). - * - * Generated from protobuf field string secret = 3; - * @return string - */ - public function getSecret() - { - return $this->secret; - } - - /** - * Name of the secret in secret manager (not the full resource name). - * - * Generated from protobuf field string secret = 3; - * @param string $var - * @return $this - */ - public function setSecret($var) - { - GPBUtil::checkString($var, True); - $this->secret = $var; - - return $this; - } - - /** - * Version of the secret (version number or the string 'latest'). It is - * recommended to use a numeric version for secret environment variables as - * any updates to the secret value is not reflected until new instances - * start. - * - * Generated from protobuf field string version = 4; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Version of the secret (version number or the string 'latest'). It is - * recommended to use a numeric version for secret environment variables as - * any updates to the secret value is not reflected until new instances - * start. - * - * Generated from protobuf field string version = 4; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume.php deleted file mode 100644 index 505db9251bf8..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.functions.v2.SecretVolume - */ -class SecretVolume extends \Google\Protobuf\Internal\Message -{ - /** - * The path within the container to mount the secret volume. For example, - * setting the mount_path as `/etc/secrets` would mount the secret value files - * under the `/etc/secrets` directory. This directory will also be completely - * shadowed and unavailable to mount any other secrets. - * Recommended mount path: /etc/secrets - * - * Generated from protobuf field string mount_path = 1; - */ - protected $mount_path = ''; - /** - * Project identifier (preferably project number but can also be the project - * ID) of the project that contains the secret. If not set, it is - * assumed that the secret is in the same project as the function. - * - * Generated from protobuf field string project_id = 2; - */ - protected $project_id = ''; - /** - * Name of the secret in secret manager (not the full resource name). - * - * Generated from protobuf field string secret = 3; - */ - protected $secret = ''; - /** - * List of secret versions to mount for this secret. If empty, the `latest` - * version of the secret will be made available in a file named after the - * secret under the mount point. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4; - */ - private $versions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $mount_path - * The path within the container to mount the secret volume. For example, - * setting the mount_path as `/etc/secrets` would mount the secret value files - * under the `/etc/secrets` directory. This directory will also be completely - * shadowed and unavailable to mount any other secrets. - * Recommended mount path: /etc/secrets - * @type string $project_id - * Project identifier (preferably project number but can also be the project - * ID) of the project that contains the secret. If not set, it is - * assumed that the secret is in the same project as the function. - * @type string $secret - * Name of the secret in secret manager (not the full resource name). - * @type array<\Google\Cloud\Functions\V2\SecretVolume\SecretVersion>|\Google\Protobuf\Internal\RepeatedField $versions - * List of secret versions to mount for this secret. If empty, the `latest` - * version of the secret will be made available in a file named after the - * secret under the mount point. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * The path within the container to mount the secret volume. For example, - * setting the mount_path as `/etc/secrets` would mount the secret value files - * under the `/etc/secrets` directory. This directory will also be completely - * shadowed and unavailable to mount any other secrets. - * Recommended mount path: /etc/secrets - * - * Generated from protobuf field string mount_path = 1; - * @return string - */ - public function getMountPath() - { - return $this->mount_path; - } - - /** - * The path within the container to mount the secret volume. For example, - * setting the mount_path as `/etc/secrets` would mount the secret value files - * under the `/etc/secrets` directory. This directory will also be completely - * shadowed and unavailable to mount any other secrets. - * Recommended mount path: /etc/secrets - * - * Generated from protobuf field string mount_path = 1; - * @param string $var - * @return $this - */ - public function setMountPath($var) - { - GPBUtil::checkString($var, True); - $this->mount_path = $var; - - return $this; - } - - /** - * Project identifier (preferably project number but can also be the project - * ID) of the project that contains the secret. If not set, it is - * assumed that the secret is in the same project as the function. - * - * Generated from protobuf field string project_id = 2; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Project identifier (preferably project number but can also be the project - * ID) of the project that contains the secret. If not set, it is - * assumed that the secret is in the same project as the function. - * - * Generated from protobuf field string project_id = 2; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Name of the secret in secret manager (not the full resource name). - * - * Generated from protobuf field string secret = 3; - * @return string - */ - public function getSecret() - { - return $this->secret; - } - - /** - * Name of the secret in secret manager (not the full resource name). - * - * Generated from protobuf field string secret = 3; - * @param string $var - * @return $this - */ - public function setSecret($var) - { - GPBUtil::checkString($var, True); - $this->secret = $var; - - return $this; - } - - /** - * List of secret versions to mount for this secret. If empty, the `latest` - * version of the secret will be made available in a file named after the - * secret under the mount point. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVersions() - { - return $this->versions; - } - - /** - * List of secret versions to mount for this secret. If empty, the `latest` - * version of the secret will be made available in a file named after the - * secret under the mount point. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4; - * @param array<\Google\Cloud\Functions\V2\SecretVolume\SecretVersion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\SecretVolume\SecretVersion::class); - $this->versions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume/SecretVersion.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume/SecretVersion.php deleted file mode 100644 index fe99c1e3ddd3..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume/SecretVersion.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.functions.v2.SecretVolume.SecretVersion - */ -class SecretVersion extends \Google\Protobuf\Internal\Message -{ - /** - * Version of the secret (version number or the string 'latest'). It is - * preferable to use `latest` version with secret volumes as secret value - * changes are reflected immediately. - * - * Generated from protobuf field string version = 1; - */ - protected $version = ''; - /** - * Relative path of the file under the mount path where the secret value for - * this version will be fetched and made available. For example, setting the - * mount_path as '/etc/secrets' and path as `secret_foo` would mount the - * secret value file at `/etc/secrets/secret_foo`. - * - * Generated from protobuf field string path = 2; - */ - protected $path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * Version of the secret (version number or the string 'latest'). It is - * preferable to use `latest` version with secret volumes as secret value - * changes are reflected immediately. - * @type string $path - * Relative path of the file under the mount path where the secret value for - * this version will be fetched and made available. For example, setting the - * mount_path as '/etc/secrets' and path as `secret_foo` would mount the - * secret value file at `/etc/secrets/secret_foo`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Version of the secret (version number or the string 'latest'). It is - * preferable to use `latest` version with secret volumes as secret value - * changes are reflected immediately. - * - * Generated from protobuf field string version = 1; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Version of the secret (version number or the string 'latest'). It is - * preferable to use `latest` version with secret volumes as secret value - * changes are reflected immediately. - * - * Generated from protobuf field string version = 1; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Relative path of the file under the mount path where the secret value for - * this version will be fetched and made available. For example, setting the - * mount_path as '/etc/secrets' and path as `secret_foo` would mount the - * secret value file at `/etc/secrets/secret_foo`. - * - * Generated from protobuf field string path = 2; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Relative path of the file under the mount path where the secret value for - * this version will be fetched and made available. For example, setting the - * mount_path as '/etc/secrets' and path as `secret_foo` would mount the - * secret value file at `/etc/secrets/secret_foo`. - * - * Generated from protobuf field string path = 2; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SecretVersion::class, \Google\Cloud\Functions\V2\SecretVolume_SecretVersion::class); - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig.php deleted file mode 100644 index d0d031b1c59c..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig.php +++ /dev/null @@ -1,848 +0,0 @@ -google.cloud.functions.v2.ServiceConfig - */ -class ServiceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Name of the service associated with a Function. - * The format of this field is - * `projects/{project}/locations/{region}/services/{service}` - * - * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $service = ''; - /** - * The function execution timeout. Execution is considered failed and - * can be terminated if the function is not completed at the end of the - * timeout period. Defaults to 60 seconds. - * - * Generated from protobuf field int32 timeout_seconds = 2; - */ - protected $timeout_seconds = 0; - /** - * The amount of memory available for a function. - * Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is - * supplied the value is interpreted as bytes. - * See - * https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go - * a full description. - * - * Generated from protobuf field string available_memory = 13; - */ - protected $available_memory = ''; - /** - * The number of CPUs used in a single container instance. - * Default value is calculated from available memory. - * Supports the same values as Cloud Run, see - * https://cloud.google.com/run/docs/reference/rest/v1/Container#resourcerequirements - * Example: "1" indicates 1 vCPU - * - * Generated from protobuf field string available_cpu = 22; - */ - protected $available_cpu = ''; - /** - * Environment variables that shall be available during function execution. - * - * Generated from protobuf field map environment_variables = 4; - */ - private $environment_variables; - /** - * The limit on the maximum number of function instances that may coexist at a - * given time. - * In some cases, such as rapid traffic surges, Cloud Functions may, for a - * short period of time, create more instances than the specified max - * instances limit. If your function cannot tolerate this temporary behavior, - * you may want to factor in a safety margin and set a lower max instances - * value than your function can tolerate. - * See the [Max - * Instances](https://cloud.google.com/functions/docs/max-instances) Guide for - * more details. - * - * Generated from protobuf field int32 max_instance_count = 5; - */ - protected $max_instance_count = 0; - /** - * The limit on the minimum number of function instances that may coexist at a - * given time. - * Function instances are kept in idle state for a short period after they - * finished executing the request to reduce cold start time for subsequent - * requests. Setting a minimum instance count will ensure that the given - * number of instances are kept running in idle state always. This can help - * with cold start times when jump in incoming request count occurs after the - * idle instance would have been stopped in the default case. - * - * Generated from protobuf field int32 min_instance_count = 12; - */ - protected $min_instance_count = 0; - /** - * The Serverless VPC Access connector that this cloud function can connect - * to. The format of this field is `projects/*/locations/*/connectors/*`. - * - * Generated from protobuf field string vpc_connector = 6 [(.google.api.resource_reference) = { - */ - protected $vpc_connector = ''; - /** - * The egress settings for the connector, controlling what traffic is diverted - * through it. - * - * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings vpc_connector_egress_settings = 7; - */ - protected $vpc_connector_egress_settings = 0; - /** - * The ingress settings for the function, controlling what traffic can reach - * it. - * - * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig.IngressSettings ingress_settings = 8; - */ - protected $ingress_settings = 0; - /** - * Output only. URI of the Service deployed. - * - * Generated from protobuf field string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uri = ''; - /** - * The email of the service's service account. If empty, defaults to - * `{project_number}-compute@developer.gserviceaccount.com`. - * - * Generated from protobuf field string service_account_email = 10; - */ - protected $service_account_email = ''; - /** - * Whether 100% of traffic is routed to the latest revision. - * On CreateFunction and UpdateFunction, when set to true, the revision being - * deployed will serve 100% of traffic, ignoring any traffic split settings, - * if any. On GetFunction, true will be returned if the latest revision is - * serving 100% of traffic. - * - * Generated from protobuf field bool all_traffic_on_latest_revision = 16; - */ - protected $all_traffic_on_latest_revision = false; - /** - * Secret environment variables configuration. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17; - */ - private $secret_environment_variables; - /** - * Secret volumes configuration. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19; - */ - private $secret_volumes; - /** - * Output only. The name of service revision. - * - * Generated from protobuf field string revision = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $revision = ''; - /** - * Sets the maximum number of concurrent requests that each instance - * can receive. Defaults to 1. - * - * Generated from protobuf field int32 max_instance_request_concurrency = 20; - */ - protected $max_instance_request_concurrency = 0; - /** - * Security level configure whether the function only accepts https. - * This configuration is only applicable to 1st Gen functions with Http - * trigger. By default https is optional for 1st Gen functions; 2nd Gen - * functions are https ONLY. - * - * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig.SecurityLevel security_level = 21; - */ - protected $security_level = 0; - /** - * Optional. The binary authorization policy to be checked when deploying the - * Cloud Run service. - * - * Generated from protobuf field string binary_authorization_policy = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $binary_authorization_policy = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service - * Output only. Name of the service associated with a Function. - * The format of this field is - * `projects/{project}/locations/{region}/services/{service}` - * @type int $timeout_seconds - * The function execution timeout. Execution is considered failed and - * can be terminated if the function is not completed at the end of the - * timeout period. Defaults to 60 seconds. - * @type string $available_memory - * The amount of memory available for a function. - * Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is - * supplied the value is interpreted as bytes. - * See - * https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go - * a full description. - * @type string $available_cpu - * The number of CPUs used in a single container instance. - * Default value is calculated from available memory. - * Supports the same values as Cloud Run, see - * https://cloud.google.com/run/docs/reference/rest/v1/Container#resourcerequirements - * Example: "1" indicates 1 vCPU - * @type array|\Google\Protobuf\Internal\MapField $environment_variables - * Environment variables that shall be available during function execution. - * @type int $max_instance_count - * The limit on the maximum number of function instances that may coexist at a - * given time. - * In some cases, such as rapid traffic surges, Cloud Functions may, for a - * short period of time, create more instances than the specified max - * instances limit. If your function cannot tolerate this temporary behavior, - * you may want to factor in a safety margin and set a lower max instances - * value than your function can tolerate. - * See the [Max - * Instances](https://cloud.google.com/functions/docs/max-instances) Guide for - * more details. - * @type int $min_instance_count - * The limit on the minimum number of function instances that may coexist at a - * given time. - * Function instances are kept in idle state for a short period after they - * finished executing the request to reduce cold start time for subsequent - * requests. Setting a minimum instance count will ensure that the given - * number of instances are kept running in idle state always. This can help - * with cold start times when jump in incoming request count occurs after the - * idle instance would have been stopped in the default case. - * @type string $vpc_connector - * The Serverless VPC Access connector that this cloud function can connect - * to. The format of this field is `projects/*/locations/*/connectors/*`. - * @type int $vpc_connector_egress_settings - * The egress settings for the connector, controlling what traffic is diverted - * through it. - * @type int $ingress_settings - * The ingress settings for the function, controlling what traffic can reach - * it. - * @type string $uri - * Output only. URI of the Service deployed. - * @type string $service_account_email - * The email of the service's service account. If empty, defaults to - * `{project_number}-compute@developer.gserviceaccount.com`. - * @type bool $all_traffic_on_latest_revision - * Whether 100% of traffic is routed to the latest revision. - * On CreateFunction and UpdateFunction, when set to true, the revision being - * deployed will serve 100% of traffic, ignoring any traffic split settings, - * if any. On GetFunction, true will be returned if the latest revision is - * serving 100% of traffic. - * @type array<\Google\Cloud\Functions\V2\SecretEnvVar>|\Google\Protobuf\Internal\RepeatedField $secret_environment_variables - * Secret environment variables configuration. - * @type array<\Google\Cloud\Functions\V2\SecretVolume>|\Google\Protobuf\Internal\RepeatedField $secret_volumes - * Secret volumes configuration. - * @type string $revision - * Output only. The name of service revision. - * @type int $max_instance_request_concurrency - * Sets the maximum number of concurrent requests that each instance - * can receive. Defaults to 1. - * @type int $security_level - * Security level configure whether the function only accepts https. - * This configuration is only applicable to 1st Gen functions with Http - * trigger. By default https is optional for 1st Gen functions; 2nd Gen - * functions are https ONLY. - * @type string $binary_authorization_policy - * Optional. The binary authorization policy to be checked when deploying the - * Cloud Run service. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Name of the service associated with a Function. - * The format of this field is - * `projects/{project}/locations/{region}/services/{service}` - * - * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * Output only. Name of the service associated with a Function. - * The format of this field is - * `projects/{project}/locations/{region}/services/{service}` - * - * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - - /** - * The function execution timeout. Execution is considered failed and - * can be terminated if the function is not completed at the end of the - * timeout period. Defaults to 60 seconds. - * - * Generated from protobuf field int32 timeout_seconds = 2; - * @return int - */ - public function getTimeoutSeconds() - { - return $this->timeout_seconds; - } - - /** - * The function execution timeout. Execution is considered failed and - * can be terminated if the function is not completed at the end of the - * timeout period. Defaults to 60 seconds. - * - * Generated from protobuf field int32 timeout_seconds = 2; - * @param int $var - * @return $this - */ - public function setTimeoutSeconds($var) - { - GPBUtil::checkInt32($var); - $this->timeout_seconds = $var; - - return $this; - } - - /** - * The amount of memory available for a function. - * Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is - * supplied the value is interpreted as bytes. - * See - * https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go - * a full description. - * - * Generated from protobuf field string available_memory = 13; - * @return string - */ - public function getAvailableMemory() - { - return $this->available_memory; - } - - /** - * The amount of memory available for a function. - * Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is - * supplied the value is interpreted as bytes. - * See - * https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go - * a full description. - * - * Generated from protobuf field string available_memory = 13; - * @param string $var - * @return $this - */ - public function setAvailableMemory($var) - { - GPBUtil::checkString($var, True); - $this->available_memory = $var; - - return $this; - } - - /** - * The number of CPUs used in a single container instance. - * Default value is calculated from available memory. - * Supports the same values as Cloud Run, see - * https://cloud.google.com/run/docs/reference/rest/v1/Container#resourcerequirements - * Example: "1" indicates 1 vCPU - * - * Generated from protobuf field string available_cpu = 22; - * @return string - */ - public function getAvailableCpu() - { - return $this->available_cpu; - } - - /** - * The number of CPUs used in a single container instance. - * Default value is calculated from available memory. - * Supports the same values as Cloud Run, see - * https://cloud.google.com/run/docs/reference/rest/v1/Container#resourcerequirements - * Example: "1" indicates 1 vCPU - * - * Generated from protobuf field string available_cpu = 22; - * @param string $var - * @return $this - */ - public function setAvailableCpu($var) - { - GPBUtil::checkString($var, True); - $this->available_cpu = $var; - - return $this; - } - - /** - * Environment variables that shall be available during function execution. - * - * Generated from protobuf field map environment_variables = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getEnvironmentVariables() - { - return $this->environment_variables; - } - - /** - * Environment variables that shall be available during function execution. - * - * Generated from protobuf field map environment_variables = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setEnvironmentVariables($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->environment_variables = $arr; - - return $this; - } - - /** - * The limit on the maximum number of function instances that may coexist at a - * given time. - * In some cases, such as rapid traffic surges, Cloud Functions may, for a - * short period of time, create more instances than the specified max - * instances limit. If your function cannot tolerate this temporary behavior, - * you may want to factor in a safety margin and set a lower max instances - * value than your function can tolerate. - * See the [Max - * Instances](https://cloud.google.com/functions/docs/max-instances) Guide for - * more details. - * - * Generated from protobuf field int32 max_instance_count = 5; - * @return int - */ - public function getMaxInstanceCount() - { - return $this->max_instance_count; - } - - /** - * The limit on the maximum number of function instances that may coexist at a - * given time. - * In some cases, such as rapid traffic surges, Cloud Functions may, for a - * short period of time, create more instances than the specified max - * instances limit. If your function cannot tolerate this temporary behavior, - * you may want to factor in a safety margin and set a lower max instances - * value than your function can tolerate. - * See the [Max - * Instances](https://cloud.google.com/functions/docs/max-instances) Guide for - * more details. - * - * Generated from protobuf field int32 max_instance_count = 5; - * @param int $var - * @return $this - */ - public function setMaxInstanceCount($var) - { - GPBUtil::checkInt32($var); - $this->max_instance_count = $var; - - return $this; - } - - /** - * The limit on the minimum number of function instances that may coexist at a - * given time. - * Function instances are kept in idle state for a short period after they - * finished executing the request to reduce cold start time for subsequent - * requests. Setting a minimum instance count will ensure that the given - * number of instances are kept running in idle state always. This can help - * with cold start times when jump in incoming request count occurs after the - * idle instance would have been stopped in the default case. - * - * Generated from protobuf field int32 min_instance_count = 12; - * @return int - */ - public function getMinInstanceCount() - { - return $this->min_instance_count; - } - - /** - * The limit on the minimum number of function instances that may coexist at a - * given time. - * Function instances are kept in idle state for a short period after they - * finished executing the request to reduce cold start time for subsequent - * requests. Setting a minimum instance count will ensure that the given - * number of instances are kept running in idle state always. This can help - * with cold start times when jump in incoming request count occurs after the - * idle instance would have been stopped in the default case. - * - * Generated from protobuf field int32 min_instance_count = 12; - * @param int $var - * @return $this - */ - public function setMinInstanceCount($var) - { - GPBUtil::checkInt32($var); - $this->min_instance_count = $var; - - return $this; - } - - /** - * The Serverless VPC Access connector that this cloud function can connect - * to. The format of this field is `projects/*/locations/*/connectors/*`. - * - * Generated from protobuf field string vpc_connector = 6 [(.google.api.resource_reference) = { - * @return string - */ - public function getVpcConnector() - { - return $this->vpc_connector; - } - - /** - * The Serverless VPC Access connector that this cloud function can connect - * to. The format of this field is `projects/*/locations/*/connectors/*`. - * - * Generated from protobuf field string vpc_connector = 6 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVpcConnector($var) - { - GPBUtil::checkString($var, True); - $this->vpc_connector = $var; - - return $this; - } - - /** - * The egress settings for the connector, controlling what traffic is diverted - * through it. - * - * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings vpc_connector_egress_settings = 7; - * @return int - */ - public function getVpcConnectorEgressSettings() - { - return $this->vpc_connector_egress_settings; - } - - /** - * The egress settings for the connector, controlling what traffic is diverted - * through it. - * - * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings vpc_connector_egress_settings = 7; - * @param int $var - * @return $this - */ - public function setVpcConnectorEgressSettings($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\ServiceConfig\VpcConnectorEgressSettings::class); - $this->vpc_connector_egress_settings = $var; - - return $this; - } - - /** - * The ingress settings for the function, controlling what traffic can reach - * it. - * - * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig.IngressSettings ingress_settings = 8; - * @return int - */ - public function getIngressSettings() - { - return $this->ingress_settings; - } - - /** - * The ingress settings for the function, controlling what traffic can reach - * it. - * - * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig.IngressSettings ingress_settings = 8; - * @param int $var - * @return $this - */ - public function setIngressSettings($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\ServiceConfig\IngressSettings::class); - $this->ingress_settings = $var; - - return $this; - } - - /** - * Output only. URI of the Service deployed. - * - * Generated from protobuf field string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Output only. URI of the Service deployed. - * - * Generated from protobuf field string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * The email of the service's service account. If empty, defaults to - * `{project_number}-compute@developer.gserviceaccount.com`. - * - * Generated from protobuf field string service_account_email = 10; - * @return string - */ - public function getServiceAccountEmail() - { - return $this->service_account_email; - } - - /** - * The email of the service's service account. If empty, defaults to - * `{project_number}-compute@developer.gserviceaccount.com`. - * - * Generated from protobuf field string service_account_email = 10; - * @param string $var - * @return $this - */ - public function setServiceAccountEmail($var) - { - GPBUtil::checkString($var, True); - $this->service_account_email = $var; - - return $this; - } - - /** - * Whether 100% of traffic is routed to the latest revision. - * On CreateFunction and UpdateFunction, when set to true, the revision being - * deployed will serve 100% of traffic, ignoring any traffic split settings, - * if any. On GetFunction, true will be returned if the latest revision is - * serving 100% of traffic. - * - * Generated from protobuf field bool all_traffic_on_latest_revision = 16; - * @return bool - */ - public function getAllTrafficOnLatestRevision() - { - return $this->all_traffic_on_latest_revision; - } - - /** - * Whether 100% of traffic is routed to the latest revision. - * On CreateFunction and UpdateFunction, when set to true, the revision being - * deployed will serve 100% of traffic, ignoring any traffic split settings, - * if any. On GetFunction, true will be returned if the latest revision is - * serving 100% of traffic. - * - * Generated from protobuf field bool all_traffic_on_latest_revision = 16; - * @param bool $var - * @return $this - */ - public function setAllTrafficOnLatestRevision($var) - { - GPBUtil::checkBool($var); - $this->all_traffic_on_latest_revision = $var; - - return $this; - } - - /** - * Secret environment variables configuration. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSecretEnvironmentVariables() - { - return $this->secret_environment_variables; - } - - /** - * Secret environment variables configuration. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17; - * @param array<\Google\Cloud\Functions\V2\SecretEnvVar>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSecretEnvironmentVariables($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\SecretEnvVar::class); - $this->secret_environment_variables = $arr; - - return $this; - } - - /** - * Secret volumes configuration. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSecretVolumes() - { - return $this->secret_volumes; - } - - /** - * Secret volumes configuration. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19; - * @param array<\Google\Cloud\Functions\V2\SecretVolume>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSecretVolumes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\SecretVolume::class); - $this->secret_volumes = $arr; - - return $this; - } - - /** - * Output only. The name of service revision. - * - * Generated from protobuf field string revision = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getRevision() - { - return $this->revision; - } - - /** - * Output only. The name of service revision. - * - * Generated from protobuf field string revision = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setRevision($var) - { - GPBUtil::checkString($var, True); - $this->revision = $var; - - return $this; - } - - /** - * Sets the maximum number of concurrent requests that each instance - * can receive. Defaults to 1. - * - * Generated from protobuf field int32 max_instance_request_concurrency = 20; - * @return int - */ - public function getMaxInstanceRequestConcurrency() - { - return $this->max_instance_request_concurrency; - } - - /** - * Sets the maximum number of concurrent requests that each instance - * can receive. Defaults to 1. - * - * Generated from protobuf field int32 max_instance_request_concurrency = 20; - * @param int $var - * @return $this - */ - public function setMaxInstanceRequestConcurrency($var) - { - GPBUtil::checkInt32($var); - $this->max_instance_request_concurrency = $var; - - return $this; - } - - /** - * Security level configure whether the function only accepts https. - * This configuration is only applicable to 1st Gen functions with Http - * trigger. By default https is optional for 1st Gen functions; 2nd Gen - * functions are https ONLY. - * - * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig.SecurityLevel security_level = 21; - * @return int - */ - public function getSecurityLevel() - { - return $this->security_level; - } - - /** - * Security level configure whether the function only accepts https. - * This configuration is only applicable to 1st Gen functions with Http - * trigger. By default https is optional for 1st Gen functions; 2nd Gen - * functions are https ONLY. - * - * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig.SecurityLevel security_level = 21; - * @param int $var - * @return $this - */ - public function setSecurityLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\ServiceConfig\SecurityLevel::class); - $this->security_level = $var; - - return $this; - } - - /** - * Optional. The binary authorization policy to be checked when deploying the - * Cloud Run service. - * - * Generated from protobuf field string binary_authorization_policy = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getBinaryAuthorizationPolicy() - { - return $this->binary_authorization_policy; - } - - /** - * Optional. The binary authorization policy to be checked when deploying the - * Cloud Run service. - * - * Generated from protobuf field string binary_authorization_policy = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setBinaryAuthorizationPolicy($var) - { - GPBUtil::checkString($var, True); - $this->binary_authorization_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/IngressSettings.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/IngressSettings.php deleted file mode 100644 index 0dfd22d07834..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/IngressSettings.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.functions.v2.ServiceConfig.IngressSettings - */ -class IngressSettings -{ - /** - * Unspecified. - * - * Generated from protobuf enum INGRESS_SETTINGS_UNSPECIFIED = 0; - */ - const INGRESS_SETTINGS_UNSPECIFIED = 0; - /** - * Allow HTTP traffic from public and private sources. - * - * Generated from protobuf enum ALLOW_ALL = 1; - */ - const ALLOW_ALL = 1; - /** - * Allow HTTP traffic from only private VPC sources. - * - * Generated from protobuf enum ALLOW_INTERNAL_ONLY = 2; - */ - const ALLOW_INTERNAL_ONLY = 2; - /** - * Allow HTTP traffic from private VPC sources and through GCLB. - * - * Generated from protobuf enum ALLOW_INTERNAL_AND_GCLB = 3; - */ - const ALLOW_INTERNAL_AND_GCLB = 3; - - private static $valueToName = [ - self::INGRESS_SETTINGS_UNSPECIFIED => 'INGRESS_SETTINGS_UNSPECIFIED', - self::ALLOW_ALL => 'ALLOW_ALL', - self::ALLOW_INTERNAL_ONLY => 'ALLOW_INTERNAL_ONLY', - self::ALLOW_INTERNAL_AND_GCLB => 'ALLOW_INTERNAL_AND_GCLB', - ]; - - 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(IngressSettings::class, \Google\Cloud\Functions\V2\ServiceConfig_IngressSettings::class); - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/SecurityLevel.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/SecurityLevel.php deleted file mode 100644 index 5fb4b8b79894..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/SecurityLevel.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.functions.v2.ServiceConfig.SecurityLevel - */ -class SecurityLevel -{ - /** - * Unspecified. - * - * Generated from protobuf enum SECURITY_LEVEL_UNSPECIFIED = 0; - */ - const SECURITY_LEVEL_UNSPECIFIED = 0; - /** - * Requests for a URL that match this handler that do not use HTTPS are - * automatically redirected to the HTTPS URL with the same path. Query - * parameters are reserved for the redirect. - * - * Generated from protobuf enum SECURE_ALWAYS = 1; - */ - const SECURE_ALWAYS = 1; - /** - * Both HTTP and HTTPS requests with URLs that match the handler succeed - * without redirects. The application can examine the request to determine - * which protocol was used and respond accordingly. - * - * Generated from protobuf enum SECURE_OPTIONAL = 2; - */ - const SECURE_OPTIONAL = 2; - - private static $valueToName = [ - self::SECURITY_LEVEL_UNSPECIFIED => 'SECURITY_LEVEL_UNSPECIFIED', - self::SECURE_ALWAYS => 'SECURE_ALWAYS', - self::SECURE_OPTIONAL => 'SECURE_OPTIONAL', - ]; - - 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(SecurityLevel::class, \Google\Cloud\Functions\V2\ServiceConfig_SecurityLevel::class); - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/VpcConnectorEgressSettings.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/VpcConnectorEgressSettings.php deleted file mode 100644 index 77a3f98e3ae3..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/VpcConnectorEgressSettings.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings - */ -class VpcConnectorEgressSettings -{ - /** - * Unspecified. - * - * Generated from protobuf enum VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED = 0; - */ - const VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED = 0; - /** - * Use the VPC Access Connector only for private IP space from RFC1918. - * - * Generated from protobuf enum PRIVATE_RANGES_ONLY = 1; - */ - const PRIVATE_RANGES_ONLY = 1; - /** - * Force the use of VPC Access Connector for all egress traffic from the - * function. - * - * Generated from protobuf enum ALL_TRAFFIC = 2; - */ - const ALL_TRAFFIC = 2; - - private static $valueToName = [ - self::VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED => 'VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED', - self::PRIVATE_RANGES_ONLY => 'PRIVATE_RANGES_ONLY', - self::ALL_TRAFFIC => 'ALL_TRAFFIC', - ]; - - 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(VpcConnectorEgressSettings::class, \Google\Cloud\Functions\V2\ServiceConfig_VpcConnectorEgressSettings::class); - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Source.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Source.php deleted file mode 100644 index b16cd2dea16e..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Source.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.functions.v2.Source - */ -class Source extends \Google\Protobuf\Internal\Message -{ - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Functions\V2\StorageSource $storage_source - * If provided, get the source from this location in Google Cloud Storage. - * @type \Google\Cloud\Functions\V2\RepoSource $repo_source - * If provided, get the source from this location in a Cloud Source - * Repository. - * @type string $git_uri - * If provided, get the source from GitHub repository. This option is valid - * only for GCF 1st Gen function. - * Example: https://github.com///blob// - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * If provided, get the source from this location in Google Cloud Storage. - * - * Generated from protobuf field .google.cloud.functions.v2.StorageSource storage_source = 1; - * @return \Google\Cloud\Functions\V2\StorageSource|null - */ - public function getStorageSource() - { - return $this->readOneof(1); - } - - public function hasStorageSource() - { - return $this->hasOneof(1); - } - - /** - * If provided, get the source from this location in Google Cloud Storage. - * - * Generated from protobuf field .google.cloud.functions.v2.StorageSource storage_source = 1; - * @param \Google\Cloud\Functions\V2\StorageSource $var - * @return $this - */ - public function setStorageSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\StorageSource::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * If provided, get the source from this location in a Cloud Source - * Repository. - * - * Generated from protobuf field .google.cloud.functions.v2.RepoSource repo_source = 2; - * @return \Google\Cloud\Functions\V2\RepoSource|null - */ - public function getRepoSource() - { - return $this->readOneof(2); - } - - public function hasRepoSource() - { - return $this->hasOneof(2); - } - - /** - * If provided, get the source from this location in a Cloud Source - * Repository. - * - * Generated from protobuf field .google.cloud.functions.v2.RepoSource repo_source = 2; - * @param \Google\Cloud\Functions\V2\RepoSource $var - * @return $this - */ - public function setRepoSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\RepoSource::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * If provided, get the source from GitHub repository. This option is valid - * only for GCF 1st Gen function. - * Example: https://github.com///blob// - * - * Generated from protobuf field string git_uri = 3; - * @return string - */ - public function getGitUri() - { - return $this->readOneof(3); - } - - public function hasGitUri() - { - return $this->hasOneof(3); - } - - /** - * If provided, get the source from GitHub repository. This option is valid - * only for GCF 1st Gen function. - * Example: https://github.com///blob// - * - * Generated from protobuf field string git_uri = 3; - * @param string $var - * @return $this - */ - public function setGitUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SourceProvenance.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SourceProvenance.php deleted file mode 100644 index 0b1954543663..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SourceProvenance.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.functions.v2.SourceProvenance - */ -class SourceProvenance extends \Google\Protobuf\Internal\Message -{ - /** - * A copy of the build's `source.storage_source`, if exists, with any - * generations resolved. - * - * Generated from protobuf field .google.cloud.functions.v2.StorageSource resolved_storage_source = 1; - */ - protected $resolved_storage_source = null; - /** - * A copy of the build's `source.repo_source`, if exists, with any - * revisions resolved. - * - * Generated from protobuf field .google.cloud.functions.v2.RepoSource resolved_repo_source = 2; - */ - protected $resolved_repo_source = null; - /** - * A copy of the build's `source.git_uri`, if exists, with any commits - * resolved. - * - * Generated from protobuf field string git_uri = 3; - */ - protected $git_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Functions\V2\StorageSource $resolved_storage_source - * A copy of the build's `source.storage_source`, if exists, with any - * generations resolved. - * @type \Google\Cloud\Functions\V2\RepoSource $resolved_repo_source - * A copy of the build's `source.repo_source`, if exists, with any - * revisions resolved. - * @type string $git_uri - * A copy of the build's `source.git_uri`, if exists, with any commits - * resolved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * A copy of the build's `source.storage_source`, if exists, with any - * generations resolved. - * - * Generated from protobuf field .google.cloud.functions.v2.StorageSource resolved_storage_source = 1; - * @return \Google\Cloud\Functions\V2\StorageSource|null - */ - public function getResolvedStorageSource() - { - return $this->resolved_storage_source; - } - - public function hasResolvedStorageSource() - { - return isset($this->resolved_storage_source); - } - - public function clearResolvedStorageSource() - { - unset($this->resolved_storage_source); - } - - /** - * A copy of the build's `source.storage_source`, if exists, with any - * generations resolved. - * - * Generated from protobuf field .google.cloud.functions.v2.StorageSource resolved_storage_source = 1; - * @param \Google\Cloud\Functions\V2\StorageSource $var - * @return $this - */ - public function setResolvedStorageSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\StorageSource::class); - $this->resolved_storage_source = $var; - - return $this; - } - - /** - * A copy of the build's `source.repo_source`, if exists, with any - * revisions resolved. - * - * Generated from protobuf field .google.cloud.functions.v2.RepoSource resolved_repo_source = 2; - * @return \Google\Cloud\Functions\V2\RepoSource|null - */ - public function getResolvedRepoSource() - { - return $this->resolved_repo_source; - } - - public function hasResolvedRepoSource() - { - return isset($this->resolved_repo_source); - } - - public function clearResolvedRepoSource() - { - unset($this->resolved_repo_source); - } - - /** - * A copy of the build's `source.repo_source`, if exists, with any - * revisions resolved. - * - * Generated from protobuf field .google.cloud.functions.v2.RepoSource resolved_repo_source = 2; - * @param \Google\Cloud\Functions\V2\RepoSource $var - * @return $this - */ - public function setResolvedRepoSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\RepoSource::class); - $this->resolved_repo_source = $var; - - return $this; - } - - /** - * A copy of the build's `source.git_uri`, if exists, with any commits - * resolved. - * - * Generated from protobuf field string git_uri = 3; - * @return string - */ - public function getGitUri() - { - return $this->git_uri; - } - - /** - * A copy of the build's `source.git_uri`, if exists, with any commits - * resolved. - * - * Generated from protobuf field string git_uri = 3; - * @param string $var - * @return $this - */ - public function setGitUri($var) - { - GPBUtil::checkString($var, True); - $this->git_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage.php deleted file mode 100644 index e965c5a3023b..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.functions.v2.Stage - */ -class Stage extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the Stage. This will be unique for each Stage. - * - * Generated from protobuf field .google.cloud.functions.v2.Stage.Name name = 1; - */ - protected $name = 0; - /** - * Message describing the Stage - * - * Generated from protobuf field string message = 2; - */ - protected $message = ''; - /** - * Current state of the Stage - * - * Generated from protobuf field .google.cloud.functions.v2.Stage.State state = 3; - */ - protected $state = 0; - /** - * Resource of the Stage - * - * Generated from protobuf field string resource = 4; - */ - protected $resource = ''; - /** - * Link to the current Stage resource - * - * Generated from protobuf field string resource_uri = 5; - */ - protected $resource_uri = ''; - /** - * State messages from the current Stage. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.StateMessage state_messages = 6; - */ - private $state_messages; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $name - * Name of the Stage. This will be unique for each Stage. - * @type string $message - * Message describing the Stage - * @type int $state - * Current state of the Stage - * @type string $resource - * Resource of the Stage - * @type string $resource_uri - * Link to the current Stage resource - * @type array<\Google\Cloud\Functions\V2\StateMessage>|\Google\Protobuf\Internal\RepeatedField $state_messages - * State messages from the current Stage. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Name of the Stage. This will be unique for each Stage. - * - * Generated from protobuf field .google.cloud.functions.v2.Stage.Name name = 1; - * @return int - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the Stage. This will be unique for each Stage. - * - * Generated from protobuf field .google.cloud.functions.v2.Stage.Name name = 1; - * @param int $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\Stage\Name::class); - $this->name = $var; - - return $this; - } - - /** - * Message describing the Stage - * - * Generated from protobuf field string message = 2; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Message describing the Stage - * - * Generated from protobuf field string message = 2; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * Current state of the Stage - * - * Generated from protobuf field .google.cloud.functions.v2.Stage.State state = 3; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Current state of the Stage - * - * Generated from protobuf field .google.cloud.functions.v2.Stage.State state = 3; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\Stage\State::class); - $this->state = $var; - - return $this; - } - - /** - * Resource of the Stage - * - * Generated from protobuf field string resource = 4; - * @return string - */ - public function getResource() - { - return $this->resource; - } - - /** - * Resource of the Stage - * - * Generated from protobuf field string resource = 4; - * @param string $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkString($var, True); - $this->resource = $var; - - return $this; - } - - /** - * Link to the current Stage resource - * - * Generated from protobuf field string resource_uri = 5; - * @return string - */ - public function getResourceUri() - { - return $this->resource_uri; - } - - /** - * Link to the current Stage resource - * - * Generated from protobuf field string resource_uri = 5; - * @param string $var - * @return $this - */ - public function setResourceUri($var) - { - GPBUtil::checkString($var, True); - $this->resource_uri = $var; - - return $this; - } - - /** - * State messages from the current Stage. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.StateMessage state_messages = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStateMessages() - { - return $this->state_messages; - } - - /** - * State messages from the current Stage. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.StateMessage state_messages = 6; - * @param array<\Google\Cloud\Functions\V2\StateMessage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStateMessages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\StateMessage::class); - $this->state_messages = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage/Name.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage/Name.php deleted file mode 100644 index 6dbaa6f06046..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage/Name.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.functions.v2.Stage.Name - */ -class Name -{ - /** - * Not specified. Invalid name. - * - * Generated from protobuf enum NAME_UNSPECIFIED = 0; - */ - const NAME_UNSPECIFIED = 0; - /** - * Artifact Regsitry Stage - * - * Generated from protobuf enum ARTIFACT_REGISTRY = 1; - */ - const ARTIFACT_REGISTRY = 1; - /** - * Build Stage - * - * Generated from protobuf enum BUILD = 2; - */ - const BUILD = 2; - /** - * Service Stage - * - * Generated from protobuf enum SERVICE = 3; - */ - const SERVICE = 3; - /** - * Trigger Stage - * - * Generated from protobuf enum TRIGGER = 4; - */ - const TRIGGER = 4; - /** - * Service Rollback Stage - * - * Generated from protobuf enum SERVICE_ROLLBACK = 5; - */ - const SERVICE_ROLLBACK = 5; - /** - * Trigger Rollback Stage - * - * Generated from protobuf enum TRIGGER_ROLLBACK = 6; - */ - const TRIGGER_ROLLBACK = 6; - - private static $valueToName = [ - self::NAME_UNSPECIFIED => 'NAME_UNSPECIFIED', - self::ARTIFACT_REGISTRY => 'ARTIFACT_REGISTRY', - self::BUILD => 'BUILD', - self::SERVICE => 'SERVICE', - self::TRIGGER => 'TRIGGER', - self::SERVICE_ROLLBACK => 'SERVICE_ROLLBACK', - self::TRIGGER_ROLLBACK => 'TRIGGER_ROLLBACK', - ]; - - 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(Name::class, \Google\Cloud\Functions\V2\Stage_Name::class); - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage/State.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage/State.php deleted file mode 100644 index 5a0be65fc0dc..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.functions.v2.Stage.State - */ -class State -{ - /** - * Not specified. Invalid state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Stage has not started. - * - * Generated from protobuf enum NOT_STARTED = 1; - */ - const NOT_STARTED = 1; - /** - * Stage is in progress. - * - * Generated from protobuf enum IN_PROGRESS = 2; - */ - const IN_PROGRESS = 2; - /** - * Stage has completed. - * - * Generated from protobuf enum COMPLETE = 3; - */ - const COMPLETE = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::NOT_STARTED => 'NOT_STARTED', - self::IN_PROGRESS => 'IN_PROGRESS', - self::COMPLETE => 'COMPLETE', - ]; - - 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\Functions\V2\Stage_State::class); - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage.php deleted file mode 100644 index 9e318e5af10f..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.functions.v2.StateMessage - */ -class StateMessage extends \Google\Protobuf\Internal\Message -{ - /** - * Severity of the state message. - * - * Generated from protobuf field .google.cloud.functions.v2.StateMessage.Severity severity = 1; - */ - protected $severity = 0; - /** - * One-word CamelCase type of the state message. - * - * Generated from protobuf field string type = 2; - */ - protected $type = ''; - /** - * The message. - * - * Generated from protobuf field string message = 3; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $severity - * Severity of the state message. - * @type string $type - * One-word CamelCase type of the state message. - * @type string $message - * The message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Severity of the state message. - * - * Generated from protobuf field .google.cloud.functions.v2.StateMessage.Severity severity = 1; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * Severity of the state message. - * - * Generated from protobuf field .google.cloud.functions.v2.StateMessage.Severity severity = 1; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\StateMessage\Severity::class); - $this->severity = $var; - - return $this; - } - - /** - * One-word CamelCase type of the state message. - * - * Generated from protobuf field string type = 2; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * One-word CamelCase type of the state message. - * - * Generated from protobuf field string type = 2; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * The message. - * - * Generated from protobuf field string message = 3; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * The message. - * - * Generated from protobuf field string message = 3; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage/Severity.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage/Severity.php deleted file mode 100644 index d201473a95e0..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage/Severity.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.functions.v2.StateMessage.Severity - */ -class Severity -{ - /** - * Not specified. Invalid severity. - * - * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; - */ - const SEVERITY_UNSPECIFIED = 0; - /** - * ERROR-level severity. - * - * Generated from protobuf enum ERROR = 1; - */ - const ERROR = 1; - /** - * WARNING-level severity. - * - * Generated from protobuf enum WARNING = 2; - */ - const WARNING = 2; - /** - * INFO-level severity. - * - * Generated from protobuf enum INFO = 3; - */ - const INFO = 3; - - private static $valueToName = [ - self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', - self::ERROR => 'ERROR', - self::WARNING => 'WARNING', - self::INFO => 'INFO', - ]; - - 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(Severity::class, \Google\Cloud\Functions\V2\StateMessage_Severity::class); - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StorageSource.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StorageSource.php deleted file mode 100644 index ddeebbd71e96..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StorageSource.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.functions.v2.StorageSource - */ -class StorageSource extends \Google\Protobuf\Internal\Message -{ - /** - * Google Cloud Storage bucket containing the source (see - * [Bucket Name - * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - * - * Generated from protobuf field string bucket = 1; - */ - protected $bucket = ''; - /** - * Google Cloud Storage object containing the source. - * This object must be a gzipped archive file (`.tar.gz`) containing source to - * build. - * - * Generated from protobuf field string object = 2; - */ - protected $object = ''; - /** - * Google Cloud Storage generation for the object. If the generation is - * omitted, the latest generation will be used. - * - * Generated from protobuf field int64 generation = 3; - */ - protected $generation = 0; - /** - * When the specified storage bucket is a 1st gen function uploard url bucket, - * this field should be set as the generated upload url for 1st gen - * deployment. - * - * Generated from protobuf field string source_upload_url = 4; - */ - protected $source_upload_url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $bucket - * Google Cloud Storage bucket containing the source (see - * [Bucket Name - * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - * @type string $object - * Google Cloud Storage object containing the source. - * This object must be a gzipped archive file (`.tar.gz`) containing source to - * build. - * @type int|string $generation - * Google Cloud Storage generation for the object. If the generation is - * omitted, the latest generation will be used. - * @type string $source_upload_url - * When the specified storage bucket is a 1st gen function uploard url bucket, - * this field should be set as the generated upload url for 1st gen - * deployment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Google Cloud Storage bucket containing the source (see - * [Bucket Name - * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - * - * Generated from protobuf field string bucket = 1; - * @return string - */ - public function getBucket() - { - return $this->bucket; - } - - /** - * Google Cloud Storage bucket containing the source (see - * [Bucket Name - * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - * - * Generated from protobuf field string bucket = 1; - * @param string $var - * @return $this - */ - public function setBucket($var) - { - GPBUtil::checkString($var, True); - $this->bucket = $var; - - return $this; - } - - /** - * Google Cloud Storage object containing the source. - * This object must be a gzipped archive file (`.tar.gz`) containing source to - * build. - * - * Generated from protobuf field string object = 2; - * @return string - */ - public function getObject() - { - return $this->object; - } - - /** - * Google Cloud Storage object containing the source. - * This object must be a gzipped archive file (`.tar.gz`) containing source to - * build. - * - * Generated from protobuf field string object = 2; - * @param string $var - * @return $this - */ - public function setObject($var) - { - GPBUtil::checkString($var, True); - $this->object = $var; - - return $this; - } - - /** - * Google Cloud Storage generation for the object. If the generation is - * omitted, the latest generation will be used. - * - * Generated from protobuf field int64 generation = 3; - * @return int|string - */ - public function getGeneration() - { - return $this->generation; - } - - /** - * Google Cloud Storage generation for the object. If the generation is - * omitted, the latest generation will be used. - * - * Generated from protobuf field int64 generation = 3; - * @param int|string $var - * @return $this - */ - public function setGeneration($var) - { - GPBUtil::checkInt64($var); - $this->generation = $var; - - return $this; - } - - /** - * When the specified storage bucket is a 1st gen function uploard url bucket, - * this field should be set as the generated upload url for 1st gen - * deployment. - * - * Generated from protobuf field string source_upload_url = 4; - * @return string - */ - public function getSourceUploadUrl() - { - return $this->source_upload_url; - } - - /** - * When the specified storage bucket is a 1st gen function uploard url bucket, - * this field should be set as the generated upload url for 1st gen - * deployment. - * - * Generated from protobuf field string source_upload_url = 4; - * @param string $var - * @return $this - */ - public function setSourceUploadUrl($var) - { - GPBUtil::checkString($var, True); - $this->source_upload_url = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/UpdateFunctionRequest.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/UpdateFunctionRequest.php deleted file mode 100644 index 3834e2723d6e..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/UpdateFunctionRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.functions.v2.UpdateFunctionRequest - */ -class UpdateFunctionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. New version of the function. - * - * Generated from protobuf field .google.cloud.functions.v2.Function function = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $function = null; - /** - * The list of fields to be updated. - * If no field mask is provided, all fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Functions\V2\PBFunction $function Required. New version of the function. - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. - * If no field mask is provided, all fields will be updated. - * - * @return \Google\Cloud\Functions\V2\UpdateFunctionRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Functions\V2\PBFunction $function, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setFunction($function) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Functions\V2\PBFunction $function - * Required. New version of the function. - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. - * If no field mask is provided, all fields will be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. New version of the function. - * - * Generated from protobuf field .google.cloud.functions.v2.Function function = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Functions\V2\PBFunction|null - */ - public function getFunction() - { - return $this->function; - } - - public function hasFunction() - { - return isset($this->function); - } - - public function clearFunction() - { - unset($this->function); - } - - /** - * Required. New version of the function. - * - * Generated from protobuf field .google.cloud.functions.v2.Function function = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Functions\V2\PBFunction $var - * @return $this - */ - public function setFunction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\PBFunction::class); - $this->function = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * If no field mask is provided, all fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @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); - } - - /** - * The list of fields to be updated. - * If no field mask is provided, all fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @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/Functions/v2/samples/V2/FunctionServiceClient/create_function.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/create_function.php deleted file mode 100644 index 9973077ba5d3..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/create_function.php +++ /dev/null @@ -1,88 +0,0 @@ -setParent($formattedParent) - ->setFunction($function); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $functionServiceClient->createFunction($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PBFunction $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 = FunctionServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - create_function_sample($formattedParent); -} -// [END cloudfunctions_v2_generated_FunctionService_CreateFunction_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/delete_function.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/delete_function.php deleted file mode 100644 index d4b706eed552..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/delete_function.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $functionServiceClient->deleteFunction($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 = FunctionServiceClient::functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - - delete_function_sample($formattedName); -} -// [END cloudfunctions_v2_generated_FunctionService_DeleteFunction_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/generate_download_url.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/generate_download_url.php deleted file mode 100644 index 8c67ca295d6e..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/generate_download_url.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var GenerateDownloadUrlResponse $response */ - $response = $functionServiceClient->generateDownloadUrl($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 = FunctionServiceClient::functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - - generate_download_url_sample($formattedName); -} -// [END cloudfunctions_v2_generated_FunctionService_GenerateDownloadUrl_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/generate_upload_url.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/generate_upload_url.php deleted file mode 100644 index 450230528989..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/generate_upload_url.php +++ /dev/null @@ -1,94 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var GenerateUploadUrlResponse $response */ - $response = $functionServiceClient->generateUploadUrl($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 = FunctionServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - generate_upload_url_sample($formattedParent); -} -// [END cloudfunctions_v2_generated_FunctionService_GenerateUploadUrl_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/get_function.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/get_function.php deleted file mode 100644 index eee78f27db80..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/get_function.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PBFunction $response */ - $response = $functionServiceClient->getFunction($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 = FunctionServiceClient::functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - - get_function_sample($formattedName); -} -// [END cloudfunctions_v2_generated_FunctionService_GetFunction_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/get_iam_policy.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/get_iam_policy.php deleted file mode 100644 index 6a84bd75b393..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/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 = $functionServiceClient->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 cloudfunctions_v2_generated_FunctionService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_functions.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_functions.php deleted file mode 100644 index 2211ba2247b3..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_functions.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $functionServiceClient->listFunctions($request); - - /** @var PBFunction $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 = FunctionServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_functions_sample($formattedParent); -} -// [END cloudfunctions_v2_generated_FunctionService_ListFunctions_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_locations.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_locations.php deleted file mode 100644 index 287d79cf8c32..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_locations.php +++ /dev/null @@ -1,62 +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 cloudfunctions_v2_generated_FunctionService_ListLocations_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_runtimes.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_runtimes.php deleted file mode 100644 index aca8dd8c813e..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_runtimes.php +++ /dev/null @@ -1,72 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var ListRuntimesResponse $response */ - $response = $functionServiceClient->listRuntimes($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 = FunctionServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_runtimes_sample($formattedParent); -} -// [END cloudfunctions_v2_generated_FunctionService_ListRuntimes_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/set_iam_policy.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/set_iam_policy.php deleted file mode 100644 index 97295556fbfc..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/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 = $functionServiceClient->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 cloudfunctions_v2_generated_FunctionService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/test_iam_permissions.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/test_iam_permissions.php deleted file mode 100644 index 93d2ca86cb79..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/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 = $functionServiceClient->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 cloudfunctions_v2_generated_FunctionService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/update_function.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/update_function.php deleted file mode 100644 index 600989041e80..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/update_function.php +++ /dev/null @@ -1,71 +0,0 @@ -setFunction($function); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $functionServiceClient->updateFunction($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PBFunction $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()); - } -} -// [END cloudfunctions_v2_generated_FunctionService_UpdateFunction_sync] diff --git a/owl-bot-staging/Functions/v2/src/V2/Client/FunctionServiceClient.php b/owl-bot-staging/Functions/v2/src/V2/Client/FunctionServiceClient.php deleted file mode 100644 index f7304e8e5a6d..000000000000 --- a/owl-bot-staging/Functions/v2/src/V2/Client/FunctionServiceClient.php +++ /dev/null @@ -1,855 +0,0 @@ - createFunctionAsync(CreateFunctionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteFunctionAsync(DeleteFunctionRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateDownloadUrlAsync(GenerateDownloadUrlRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateUploadUrlAsync(GenerateUploadUrlRequest $request, array $optionalArgs = []) - * @method PromiseInterface getFunctionAsync(GetFunctionRequest $request, array $optionalArgs = []) - * @method PromiseInterface listFunctionsAsync(ListFunctionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listRuntimesAsync(ListRuntimesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateFunctionAsync(UpdateFunctionRequest $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 FunctionServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.functions.v2.FunctionService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudfunctions.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudfunctions.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', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/function_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/function_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/function_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/function_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 = isset($this->descriptors[$methodName]['longRunning']) ? $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 build - * resource. - * - * @param string $project - * @param string $location - * @param string $build - * - * @return string The formatted build resource. - */ - public static function buildName(string $project, string $location, string $build): string - { - return self::getPathTemplate('build')->render([ - 'project' => $project, - 'location' => $location, - 'build' => $build, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a channel - * resource. - * - * @param string $project - * @param string $location - * @param string $channel - * - * @return string The formatted channel resource. - */ - public static function channelName(string $project, string $location, string $channel): string - { - return self::getPathTemplate('channel')->render([ - 'project' => $project, - 'location' => $location, - 'channel' => $channel, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a connector - * resource. - * - * @param string $project - * @param string $location - * @param string $connector - * - * @return string The formatted connector resource. - */ - public static function connectorName(string $project, string $location, string $connector): string - { - return self::getPathTemplate('connector')->render([ - 'project' => $project, - 'location' => $location, - 'connector' => $connector, - ]); - } - - /** - * 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 function - * resource. - * - * @param string $project - * @param string $location - * @param string $function - * - * @return string The formatted function resource. - */ - public static function functionName(string $project, string $location, string $function): string - { - return self::getPathTemplate('function')->render([ - 'project' => $project, - 'location' => $location, - 'function' => $function, - ]); - } - - /** - * 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 repository - * resource. - * - * @param string $project - * @param string $location - * @param string $repository - * - * @return string The formatted repository resource. - */ - public static function repositoryName(string $project, string $location, string $repository): string - { - return self::getPathTemplate('repository')->render([ - 'project' => $project, - 'location' => $location, - 'repository' => $repository, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a service - * resource. - * - * @param string $project - * @param string $location - * @param string $service - * - * @return string The formatted service resource. - */ - public static function serviceName(string $project, string $location, string $service): string - { - return self::getPathTemplate('service')->render([ - 'project' => $project, - 'location' => $location, - 'service' => $service, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a topic - * resource. - * - * @param string $project - * @param string $topic - * - * @return string The formatted topic resource. - */ - public static function topicName(string $project, string $topic): string - { - return self::getPathTemplate('topic')->render([ - 'project' => $project, - 'topic' => $topic, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a trigger - * resource. - * - * @param string $project - * @param string $location - * @param string $trigger - * - * @return string The formatted trigger resource. - */ - public static function triggerName(string $project, string $location, string $trigger): string - { - return self::getPathTemplate('trigger')->render([ - 'project' => $project, - 'location' => $location, - 'trigger' => $trigger, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a worker_pool - * resource. - * - * @param string $project - * @param string $location - * @param string $workerPool - * - * @return string The formatted worker_pool resource. - */ - public static function workerPoolName(string $project, string $location, string $workerPool): string - { - return self::getPathTemplate('workerPool')->render([ - 'project' => $project, - 'location' => $location, - 'worker_pool' => $workerPool, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - build: projects/{project}/locations/{location}/builds/{build} - * - channel: projects/{project}/locations/{location}/channels/{channel} - * - connector: projects/{project}/locations/{location}/connectors/{connector} - * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} - * - function: projects/{project}/locations/{location}/functions/{function} - * - location: projects/{project}/locations/{location} - * - repository: projects/{project}/locations/{location}/repositories/{repository} - * - service: projects/{project}/locations/{location}/services/{service} - * - topic: projects/{project}/topics/{topic} - * - trigger: projects/{project}/locations/{location}/triggers/{trigger} - * - workerPool: projects/{project}/locations/{location}/workerPools/{worker_pool} - * - * 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 $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 'cloudfunctions.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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 function. If a function with the given name already exists in - * the specified project, the long running operation will return - * `ALREADY_EXISTS` error. - * - * The async variant is {@see FunctionServiceClient::createFunctionAsync()} . - * - * @example samples/V2/FunctionServiceClient/create_function.php - * - * @param CreateFunctionRequest $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 createFunction(CreateFunctionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateFunction', $request, $callOptions)->wait(); - } - - /** - * Deletes a function with the given name from the specified project. If the - * given function is used by some trigger, the trigger will be updated to - * remove this function. - * - * The async variant is {@see FunctionServiceClient::deleteFunctionAsync()} . - * - * @example samples/V2/FunctionServiceClient/delete_function.php - * - * @param DeleteFunctionRequest $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 deleteFunction(DeleteFunctionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteFunction', $request, $callOptions)->wait(); - } - - /** - * Returns a signed URL for downloading deployed function source code. - * The URL is only valid for a limited period and should be used within - * 30 minutes of generation. - * For more information about the signed URL usage see: - * https://cloud.google.com/storage/docs/access-control/signed-urls - * - * The async variant is {@see FunctionServiceClient::generateDownloadUrlAsync()} . - * - * @example samples/V2/FunctionServiceClient/generate_download_url.php - * - * @param GenerateDownloadUrlRequest $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 GenerateDownloadUrlResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateDownloadUrl(GenerateDownloadUrlRequest $request, array $callOptions = []): GenerateDownloadUrlResponse - { - return $this->startApiCall('GenerateDownloadUrl', $request, $callOptions)->wait(); - } - - /** - * Returns a signed URL for uploading a function source code. - * For more information about the signed URL usage see: - * https://cloud.google.com/storage/docs/access-control/signed-urls. - * Once the function source code upload is complete, the used signed - * URL should be provided in CreateFunction or UpdateFunction request - * as a reference to the function source code. - * - * When uploading source code to the generated signed URL, please follow - * these restrictions: - * - * * Source file type should be a zip file. - * * No credentials should be attached - the signed URLs provide access to the - * target bucket using internal service identity; if credentials were - * attached, the identity from the credentials would be used, but that - * identity does not have permissions to upload files to the URL. - * - * When making a HTTP PUT request, specify this header: - * - * * `content-type: application/zip` - * - * Do not specify this header: - * - * * `Authorization: Bearer YOUR_TOKEN` - * - * The async variant is {@see FunctionServiceClient::generateUploadUrlAsync()} . - * - * @example samples/V2/FunctionServiceClient/generate_upload_url.php - * - * @param GenerateUploadUrlRequest $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 GenerateUploadUrlResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateUploadUrl(GenerateUploadUrlRequest $request, array $callOptions = []): GenerateUploadUrlResponse - { - return $this->startApiCall('GenerateUploadUrl', $request, $callOptions)->wait(); - } - - /** - * Returns a function with the given name from the requested project. - * - * The async variant is {@see FunctionServiceClient::getFunctionAsync()} . - * - * @example samples/V2/FunctionServiceClient/get_function.php - * - * @param GetFunctionRequest $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 PBFunction - * - * @throws ApiException Thrown if the API call fails. - */ - public function getFunction(GetFunctionRequest $request, array $callOptions = []): PBFunction - { - return $this->startApiCall('GetFunction', $request, $callOptions)->wait(); - } - - /** - * Returns a list of functions that belong to the requested project. - * - * The async variant is {@see FunctionServiceClient::listFunctionsAsync()} . - * - * @example samples/V2/FunctionServiceClient/list_functions.php - * - * @param ListFunctionsRequest $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 listFunctions(ListFunctionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListFunctions', $request, $callOptions); - } - - /** - * Returns a list of runtimes that are supported for the requested project. - * - * The async variant is {@see FunctionServiceClient::listRuntimesAsync()} . - * - * @example samples/V2/FunctionServiceClient/list_runtimes.php - * - * @param ListRuntimesRequest $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 ListRuntimesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listRuntimes(ListRuntimesRequest $request, array $callOptions = []): ListRuntimesResponse - { - return $this->startApiCall('ListRuntimes', $request, $callOptions)->wait(); - } - - /** - * Updates existing function. - * - * The async variant is {@see FunctionServiceClient::updateFunctionAsync()} . - * - * @example samples/V2/FunctionServiceClient/update_function.php - * - * @param UpdateFunctionRequest $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 updateFunction(UpdateFunctionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateFunction', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see FunctionServiceClient::listLocationsAsync()} . - * - * @example samples/V2/FunctionServiceClient/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 FunctionServiceClient::getIamPolicyAsync()} . - * - * @example samples/V2/FunctionServiceClient/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 FunctionServiceClient::setIamPolicyAsync()} . - * - * @example samples/V2/FunctionServiceClient/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 FunctionServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V2/FunctionServiceClient/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/Functions/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Functions/v2/src/V2/gapic_metadata.json deleted file mode 100644 index 9e109ca2916e..000000000000 --- a/owl-bot-staging/Functions/v2/src/V2/gapic_metadata.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.functions.v2", - "libraryPackage": "Google\\Cloud\\Functions\\V2", - "services": { - "FunctionService": { - "clients": { - "grpc": { - "libraryClient": "FunctionServiceGapicClient", - "rpcs": { - "CreateFunction": { - "methods": [ - "createFunction" - ] - }, - "DeleteFunction": { - "methods": [ - "deleteFunction" - ] - }, - "GenerateDownloadUrl": { - "methods": [ - "generateDownloadUrl" - ] - }, - "GenerateUploadUrl": { - "methods": [ - "generateUploadUrl" - ] - }, - "GetFunction": { - "methods": [ - "getFunction" - ] - }, - "ListFunctions": { - "methods": [ - "listFunctions" - ] - }, - "ListRuntimes": { - "methods": [ - "listRuntimes" - ] - }, - "UpdateFunction": { - "methods": [ - "updateFunction" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Functions/v2/src/V2/resources/function_service_client_config.json b/owl-bot-staging/Functions/v2/src/V2/resources/function_service_client_config.json deleted file mode 100644 index bfc64e4b21e5..000000000000 --- a/owl-bot-staging/Functions/v2/src/V2/resources/function_service_client_config.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "interfaces": { - "google.cloud.functions.v2.FunctionService": { - "retry_codes": { - "no_retry_codes": [] - }, - "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 - } - }, - "methods": { - "CreateFunction": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteFunction": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GenerateDownloadUrl": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GenerateUploadUrl": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetFunction": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListFunctions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListRuntimes": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateFunction": { - "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/Functions/v2/src/V2/resources/function_service_descriptor_config.php b/owl-bot-staging/Functions/v2/src/V2/resources/function_service_descriptor_config.php deleted file mode 100644 index b0f8d88bbb90..000000000000 --- a/owl-bot-staging/Functions/v2/src/V2/resources/function_service_descriptor_config.php +++ /dev/null @@ -1,227 +0,0 @@ - [ - 'google.cloud.functions.v2.FunctionService' => [ - 'CreateFunction' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Functions\V2\PBFunction', - 'metadataReturnType' => '\Google\Cloud\Functions\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteFunction' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Functions\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateFunction' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Functions\V2\PBFunction', - 'metadataReturnType' => '\Google\Cloud\Functions\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'function.name', - 'fieldAccessors' => [ - 'getFunction', - 'getName', - ], - ], - ], - ], - 'GenerateDownloadUrl' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Functions\V2\GenerateDownloadUrlResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GenerateUploadUrl' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Functions\V2\GenerateUploadUrlResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetFunction' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Functions\V2\PBFunction', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListFunctions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getFunctions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Functions\V2\ListFunctionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListRuntimes' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Functions\V2\ListRuntimesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - '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' => [ - 'build' => 'projects/{project}/locations/{location}/builds/{build}', - 'channel' => 'projects/{project}/locations/{location}/channels/{channel}', - 'connector' => 'projects/{project}/locations/{location}/connectors/{connector}', - 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', - 'function' => 'projects/{project}/locations/{location}/functions/{function}', - 'location' => 'projects/{project}/locations/{location}', - 'repository' => 'projects/{project}/locations/{location}/repositories/{repository}', - 'service' => 'projects/{project}/locations/{location}/services/{service}', - 'topic' => 'projects/{project}/topics/{topic}', - 'trigger' => 'projects/{project}/locations/{location}/triggers/{trigger}', - 'workerPool' => 'projects/{project}/locations/{location}/workerPools/{worker_pool}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Functions/v2/src/V2/resources/function_service_rest_client_config.php b/owl-bot-staging/Functions/v2/src/V2/resources/function_service_rest_client_config.php deleted file mode 100644 index 44d8f539758e..000000000000 --- a/owl-bot-staging/Functions/v2/src/V2/resources/function_service_rest_client_config.php +++ /dev/null @@ -1,196 +0,0 @@ - [ - 'google.cloud.functions.v2.FunctionService' => [ - 'CreateFunction' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/functions', - 'body' => 'function', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteFunction' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/functions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateDownloadUrl' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/functions/*}:generateDownloadUrl', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateUploadUrl' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/functions:generateUploadUrl', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetFunction' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/functions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListFunctions' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/functions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListRuntimes' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/runtimes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateFunction' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{function.name=projects/*/locations/*/functions/*}', - 'body' => 'function', - 'placeholders' => [ - 'function.name' => [ - 'getters' => [ - 'getFunction', - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{resource=projects/*/locations/*/functions/*}:getIamPolicy', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/locations/*/functions/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/locations/*/functions/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Functions/v2/tests/Unit/V2/Client/FunctionServiceClientTest.php b/owl-bot-staging/Functions/v2/tests/Unit/V2/Client/FunctionServiceClientTest.php deleted file mode 100644 index ae70447d7c53..000000000000 --- a/owl-bot-staging/Functions/v2/tests/Unit/V2/Client/FunctionServiceClientTest.php +++ /dev/null @@ -1,1157 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return FunctionServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new FunctionServiceClient($options); - } - - /** @test */ - public function createFunctionTest() - { - $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/createFunctionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $url = 'url116079'; - $kmsKeyName = 'kmsKeyName2094986649'; - $satisfiesPzs = false; - $expectedResponse = new PBFunction(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUrl($url); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createFunctionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $function = new PBFunction(); - $request = (new CreateFunctionRequest()) - ->setParent($formattedParent) - ->setFunction($function); - $response = $gapicClient->createFunction($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.functions.v2.FunctionService/CreateFunction', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getFunction(); - $this->assertProtobufEquals($function, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createFunctionTest'); - $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 createFunctionExceptionTest() - { - $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/createFunctionTest'); - $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]'); - $function = new PBFunction(); - $request = (new CreateFunctionRequest()) - ->setParent($formattedParent) - ->setFunction($function); - $response = $gapicClient->createFunction($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createFunctionTest'); - 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 deleteFunctionTest() - { - $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/deleteFunctionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteFunctionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - $request = (new DeleteFunctionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteFunction($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.functions.v2.FunctionService/DeleteFunction', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteFunctionTest'); - $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 deleteFunctionExceptionTest() - { - $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/deleteFunctionTest'); - $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->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - $request = (new DeleteFunctionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteFunction($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteFunctionTest'); - 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 generateDownloadUrlTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $downloadUrl = 'downloadUrl1109408056'; - $expectedResponse = new GenerateDownloadUrlResponse(); - $expectedResponse->setDownloadUrl($downloadUrl); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - $request = (new GenerateDownloadUrlRequest()) - ->setName($formattedName); - $response = $gapicClient->generateDownloadUrl($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.functions.v2.FunctionService/GenerateDownloadUrl', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateDownloadUrlExceptionTest() - { - $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->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - $request = (new GenerateDownloadUrlRequest()) - ->setName($formattedName); - try { - $gapicClient->generateDownloadUrl($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 generateUploadUrlTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $uploadUrl = 'uploadUrl-242738639'; - $expectedResponse = new GenerateUploadUrlResponse(); - $expectedResponse->setUploadUrl($uploadUrl); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new GenerateUploadUrlRequest()) - ->setParent($formattedParent); - $response = $gapicClient->generateUploadUrl($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.functions.v2.FunctionService/GenerateUploadUrl', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateUploadUrlExceptionTest() - { - $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 GenerateUploadUrlRequest()) - ->setParent($formattedParent); - try { - $gapicClient->generateUploadUrl($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 getFunctionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $url = 'url116079'; - $kmsKeyName = 'kmsKeyName2094986649'; - $satisfiesPzs = false; - $expectedResponse = new PBFunction(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setUrl($url); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - $request = (new GetFunctionRequest()) - ->setName($formattedName); - $response = $gapicClient->getFunction($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.functions.v2.FunctionService/GetFunction', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFunctionExceptionTest() - { - $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->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - $request = (new GetFunctionRequest()) - ->setName($formattedName); - try { - $gapicClient->getFunction($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 listFunctionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $functionsElement = new PBFunction(); - $functions = [ - $functionsElement, - ]; - $expectedResponse = new ListFunctionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFunctions($functions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListFunctionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listFunctions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFunctions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.functions.v2.FunctionService/ListFunctions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFunctionsExceptionTest() - { - $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 ListFunctionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listFunctions($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 listRuntimesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListRuntimesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListRuntimesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listRuntimes($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.functions.v2.FunctionService/ListRuntimes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRuntimesExceptionTest() - { - $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 ListRuntimesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listRuntimes($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 updateFunctionTest() - { - $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/updateFunctionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $url = 'url116079'; - $kmsKeyName = 'kmsKeyName2094986649'; - $satisfiesPzs = false; - $expectedResponse = new PBFunction(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUrl($url); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateFunctionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $function = new PBFunction(); - $request = (new UpdateFunctionRequest()) - ->setFunction($function); - $response = $gapicClient->updateFunction($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.functions.v2.FunctionService/UpdateFunction', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getFunction(); - $this->assertProtobufEquals($function, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFunctionTest'); - $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 updateFunctionExceptionTest() - { - $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/updateFunctionTest'); - $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 - $function = new PBFunction(); - $request = (new UpdateFunctionRequest()) - ->setFunction($function); - $response = $gapicClient->updateFunction($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFunctionTest'); - 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 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 createFunctionAsyncTest() - { - $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/createFunctionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $url = 'url116079'; - $kmsKeyName = 'kmsKeyName2094986649'; - $satisfiesPzs = false; - $expectedResponse = new PBFunction(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUrl($url); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createFunctionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $function = new PBFunction(); - $request = (new CreateFunctionRequest()) - ->setParent($formattedParent) - ->setFunction($function); - $response = $gapicClient->createFunctionAsync($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.functions.v2.FunctionService/CreateFunction', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getFunction(); - $this->assertProtobufEquals($function, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createFunctionTest'); - $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/GSuiteAddOns/v1/proto/src/GPBMetadata/Google/Cloud/Gsuiteaddons/V1/Gsuiteaddons.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/GPBMetadata/Google/Cloud/Gsuiteaddons/V1/Gsuiteaddons.php deleted file mode 100644 index 3d90bfa2c635..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/GPBMetadata/Google/Cloud/Gsuiteaddons/V1/Gsuiteaddons.php +++ /dev/null @@ -1,116 +0,0 @@ -internalAddGeneratedFile( - ' -š% -/google/cloud/gsuiteaddons/v1/gsuiteaddons.protogoogle.cloud.gsuiteaddons.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto>google/apps/script/type/calendar/calendar_addon_manifest.proto6google/apps/script/type/docs/docs_addon_manifest.proto8google/apps/script/type/drive/drive_addon_manifest.proto8google/apps/script/type/gmail/gmail_addon_manifest.proto-google/apps/script/type/script_manifest.proto:google/apps/script/type/sheets/sheets_addon_manifest.proto:google/apps/script/type/slides/slides_addon_manifest.protogoogle/protobuf/empty.protogoogle/protobuf/wrappers.proto"Z -GetAuthorizationRequest? -name ( B1àAúA+ -)gsuiteaddons.googleapis.com/Authorization"§ - Authorization -name (  -service_account_email (  -oauth_client_id ( :PêAM -)gsuiteaddons.googleapis.com/Authorization projects/{project}/authorization"½ -CreateDeploymentRequestC -parent ( B3àAúA- -+cloudresourcemanager.googleapis.com/Project - deployment_id ( BàAA - -deployment ( 2(.google.cloud.gsuiteaddons.v1.DeploymentBàA"] -ReplaceDeploymentRequestA - -deployment ( 2(.google.cloud.gsuiteaddons.v1.DeploymentBàA"T -GetDeploymentRequest< -name ( B.àAúA( -&gsuiteaddons.googleapis.com/Deployment"„ -ListDeploymentsRequestC -parent ( B3àAúA- -+cloudresourcemanager.googleapis.com/Project - page_size ( - -page_token ( "q -ListDeploymentsResponse= - deployments ( 2(.google.cloud.gsuiteaddons.v1.Deployment -next_page_token ( "e -DeleteDeploymentRequest< -name ( B.àAúA( -&gsuiteaddons.googleapis.com/Deployment -etag ( "X -InstallDeploymentRequest< -name ( B.àAúA( -&gsuiteaddons.googleapis.com/Deployment"Z -UninstallDeploymentRequest< -name ( B.àAúA( -&gsuiteaddons.googleapis.com/Deployment"Z -GetInstallStatusRequest? -name ( B1àAúA+ -)gsuiteaddons.googleapis.com/InstallStatus"· - InstallStatus -name ( - - installed ( 2.google.protobuf.BoolValue:iêAf -)gsuiteaddons.googleapis.com/InstallStatus9projects/{project}/deployments/{deployment}/installStatus"Ï - -Deployment -name (  - oauth_scopes ( 5 -add_ons ( 2$.google.cloud.gsuiteaddons.v1.AddOns -etag ( :XêAU -&gsuiteaddons.googleapis.com/Deployment+projects/{project}/deployments/{deployment}"š -AddOns< -common ( 2,.google.apps.script.type.CommonAddOnManifest@ -gmail ( 21.google.apps.script.type.gmail.GmailAddOnManifest@ -drive ( 21.google.apps.script.type.drive.DriveAddOnManifestI -calendar ( 27.google.apps.script.type.calendar.CalendarAddOnManifest= -docs ( 2/.google.apps.script.type.docs.DocsAddOnManifestC -sheets ( 23.google.apps.script.type.sheets.SheetsAddOnManifestC -slides - ( 23.google.apps.script.type.slides.SlidesAddOnManifest: - http_options ( 2$.google.apps.script.type.HttpOptions2¤ - GSuiteAddOnsª -GetAuthorization5.google.cloud.gsuiteaddons.v1.GetAuthorizationRequest+.google.cloud.gsuiteaddons.v1.Authorization"2ÚAname‚Óä“%#/v1/{name=projects/*/authorization}Î -CreateDeployment5.google.cloud.gsuiteaddons.v1.CreateDeploymentRequest(.google.cloud.gsuiteaddons.v1.Deployment"YÚAparent,deployment,deployment_id‚Óä“1"#/v1/{parent=projects/*}/deployments: -deploymentÆ -ReplaceDeployment6.google.cloud.gsuiteaddons.v1.ReplaceDeploymentRequest(.google.cloud.gsuiteaddons.v1.Deployment"OÚA -deployment‚Óä“<./v1/{deployment.name=projects/*/deployments/*}: -deployment¡ - GetDeployment2.google.cloud.gsuiteaddons.v1.GetDeploymentRequest(.google.cloud.gsuiteaddons.v1.Deployment"2ÚAname‚Óä“%#/v1/{name=projects/*/deployments/*}´ -ListDeployments4.google.cloud.gsuiteaddons.v1.ListDeploymentsRequest5.google.cloud.gsuiteaddons.v1.ListDeploymentsResponse"4ÚAparent‚Óä“%#/v1/{parent=projects/*}/deployments• -DeleteDeployment5.google.cloud.gsuiteaddons.v1.DeleteDeploymentRequest.google.protobuf.Empty"2ÚAname‚Óä“%*#/v1/{name=projects/*/deployments/*}¢ -InstallDeployment6.google.cloud.gsuiteaddons.v1.InstallDeploymentRequest.google.protobuf.Empty"=ÚAname‚Óä“0"+/v1/{name=projects/*/deployments/*}:install:*¨ -UninstallDeployment8.google.cloud.gsuiteaddons.v1.UninstallDeploymentRequest.google.protobuf.Empty"?ÚAname‚Óä“2"-/v1/{name=projects/*/deployments/*}:uninstall:*¸ -GetInstallStatus5.google.cloud.gsuiteaddons.v1.GetInstallStatusRequest+.google.cloud.gsuiteaddons.v1.InstallStatus"@ÚAname‚Óä“31/v1/{name=projects/*/deployments/*/installStatus}OÊAgsuiteaddons.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÝ - com.google.cloud.gsuiteaddons.v1BGSuiteAddOnsProtoPZDcloud.google.com/go/gsuiteaddons/apiv1/gsuiteaddonspb;gsuiteaddonspbªGoogle.Cloud.GSuiteAddOns.V1ÊGoogle\\Cloud\\GSuiteAddOns\\V1êGoogle::Cloud::GSuiteAddOns::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/AddOns.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/AddOns.php deleted file mode 100644 index e03bb68d1fd1..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/AddOns.php +++ /dev/null @@ -1,385 +0,0 @@ -google.cloud.gsuiteaddons.v1.AddOns - */ -class AddOns extends \Google\Protobuf\Internal\Message -{ - /** - * Configuration that is common across all Google Workspace Add-ons. - * - * Generated from protobuf field .google.apps.script.type.CommonAddOnManifest common = 1; - */ - protected $common = null; - /** - * Gmail add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.gmail.GmailAddOnManifest gmail = 2; - */ - protected $gmail = null; - /** - * Drive add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.drive.DriveAddOnManifest drive = 5; - */ - protected $drive = null; - /** - * Calendar add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.calendar.CalendarAddOnManifest calendar = 6; - */ - protected $calendar = null; - /** - * Docs add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.docs.DocsAddOnManifest docs = 7; - */ - protected $docs = null; - /** - * Sheets add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.sheets.SheetsAddOnManifest sheets = 8; - */ - protected $sheets = null; - /** - * Slides add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.slides.SlidesAddOnManifest slides = 10; - */ - protected $slides = null; - /** - * Options for sending requests to add-on HTTP endpoints - * - * Generated from protobuf field .google.apps.script.type.HttpOptions http_options = 15; - */ - protected $http_options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Script\Type\CommonAddOnManifest $common - * Configuration that is common across all Google Workspace Add-ons. - * @type \Google\Apps\Script\Type\Gmail\GmailAddOnManifest $gmail - * Gmail add-on configuration. - * @type \Google\Apps\Script\Type\Drive\DriveAddOnManifest $drive - * Drive add-on configuration. - * @type \Google\Apps\Script\Type\Calendar\CalendarAddOnManifest $calendar - * Calendar add-on configuration. - * @type \Google\Apps\Script\Type\Docs\DocsAddOnManifest $docs - * Docs add-on configuration. - * @type \Google\Apps\Script\Type\Sheets\SheetsAddOnManifest $sheets - * Sheets add-on configuration. - * @type \Google\Apps\Script\Type\Slides\SlidesAddOnManifest $slides - * Slides add-on configuration. - * @type \Google\Apps\Script\Type\HttpOptions $http_options - * Options for sending requests to add-on HTTP endpoints - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * Configuration that is common across all Google Workspace Add-ons. - * - * Generated from protobuf field .google.apps.script.type.CommonAddOnManifest common = 1; - * @return \Google\Apps\Script\Type\CommonAddOnManifest|null - */ - public function getCommon() - { - return $this->common; - } - - public function hasCommon() - { - return isset($this->common); - } - - public function clearCommon() - { - unset($this->common); - } - - /** - * Configuration that is common across all Google Workspace Add-ons. - * - * Generated from protobuf field .google.apps.script.type.CommonAddOnManifest common = 1; - * @param \Google\Apps\Script\Type\CommonAddOnManifest $var - * @return $this - */ - public function setCommon($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Script\Type\CommonAddOnManifest::class); - $this->common = $var; - - return $this; - } - - /** - * Gmail add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.gmail.GmailAddOnManifest gmail = 2; - * @return \Google\Apps\Script\Type\Gmail\GmailAddOnManifest|null - */ - public function getGmail() - { - return $this->gmail; - } - - public function hasGmail() - { - return isset($this->gmail); - } - - public function clearGmail() - { - unset($this->gmail); - } - - /** - * Gmail add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.gmail.GmailAddOnManifest gmail = 2; - * @param \Google\Apps\Script\Type\Gmail\GmailAddOnManifest $var - * @return $this - */ - public function setGmail($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Script\Type\Gmail\GmailAddOnManifest::class); - $this->gmail = $var; - - return $this; - } - - /** - * Drive add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.drive.DriveAddOnManifest drive = 5; - * @return \Google\Apps\Script\Type\Drive\DriveAddOnManifest|null - */ - public function getDrive() - { - return $this->drive; - } - - public function hasDrive() - { - return isset($this->drive); - } - - public function clearDrive() - { - unset($this->drive); - } - - /** - * Drive add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.drive.DriveAddOnManifest drive = 5; - * @param \Google\Apps\Script\Type\Drive\DriveAddOnManifest $var - * @return $this - */ - public function setDrive($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Script\Type\Drive\DriveAddOnManifest::class); - $this->drive = $var; - - return $this; - } - - /** - * Calendar add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.calendar.CalendarAddOnManifest calendar = 6; - * @return \Google\Apps\Script\Type\Calendar\CalendarAddOnManifest|null - */ - public function getCalendar() - { - return $this->calendar; - } - - public function hasCalendar() - { - return isset($this->calendar); - } - - public function clearCalendar() - { - unset($this->calendar); - } - - /** - * Calendar add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.calendar.CalendarAddOnManifest calendar = 6; - * @param \Google\Apps\Script\Type\Calendar\CalendarAddOnManifest $var - * @return $this - */ - public function setCalendar($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Script\Type\Calendar\CalendarAddOnManifest::class); - $this->calendar = $var; - - return $this; - } - - /** - * Docs add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.docs.DocsAddOnManifest docs = 7; - * @return \Google\Apps\Script\Type\Docs\DocsAddOnManifest|null - */ - public function getDocs() - { - return $this->docs; - } - - public function hasDocs() - { - return isset($this->docs); - } - - public function clearDocs() - { - unset($this->docs); - } - - /** - * Docs add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.docs.DocsAddOnManifest docs = 7; - * @param \Google\Apps\Script\Type\Docs\DocsAddOnManifest $var - * @return $this - */ - public function setDocs($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Script\Type\Docs\DocsAddOnManifest::class); - $this->docs = $var; - - return $this; - } - - /** - * Sheets add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.sheets.SheetsAddOnManifest sheets = 8; - * @return \Google\Apps\Script\Type\Sheets\SheetsAddOnManifest|null - */ - public function getSheets() - { - return $this->sheets; - } - - public function hasSheets() - { - return isset($this->sheets); - } - - public function clearSheets() - { - unset($this->sheets); - } - - /** - * Sheets add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.sheets.SheetsAddOnManifest sheets = 8; - * @param \Google\Apps\Script\Type\Sheets\SheetsAddOnManifest $var - * @return $this - */ - public function setSheets($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Script\Type\Sheets\SheetsAddOnManifest::class); - $this->sheets = $var; - - return $this; - } - - /** - * Slides add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.slides.SlidesAddOnManifest slides = 10; - * @return \Google\Apps\Script\Type\Slides\SlidesAddOnManifest|null - */ - public function getSlides() - { - return $this->slides; - } - - public function hasSlides() - { - return isset($this->slides); - } - - public function clearSlides() - { - unset($this->slides); - } - - /** - * Slides add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.slides.SlidesAddOnManifest slides = 10; - * @param \Google\Apps\Script\Type\Slides\SlidesAddOnManifest $var - * @return $this - */ - public function setSlides($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Script\Type\Slides\SlidesAddOnManifest::class); - $this->slides = $var; - - return $this; - } - - /** - * Options for sending requests to add-on HTTP endpoints - * - * Generated from protobuf field .google.apps.script.type.HttpOptions http_options = 15; - * @return \Google\Apps\Script\Type\HttpOptions|null - */ - public function getHttpOptions() - { - return $this->http_options; - } - - public function hasHttpOptions() - { - return isset($this->http_options); - } - - public function clearHttpOptions() - { - unset($this->http_options); - } - - /** - * Options for sending requests to add-on HTTP endpoints - * - * Generated from protobuf field .google.apps.script.type.HttpOptions http_options = 15; - * @param \Google\Apps\Script\Type\HttpOptions $var - * @return $this - */ - public function setHttpOptions($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Script\Type\HttpOptions::class); - $this->http_options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/Authorization.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/Authorization.php deleted file mode 100644 index 904cb85121ea..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/Authorization.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.gsuiteaddons.v1.Authorization - */ -class Authorization extends \Google\Protobuf\Internal\Message -{ - /** - * The canonical full name of this resource. - * Example: `projects/123/authorization` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The email address of the service account used to authenticate requests to - * add-on callback endpoints. - * - * Generated from protobuf field string service_account_email = 2; - */ - protected $service_account_email = ''; - /** - * The OAuth client ID used to obtain OAuth access tokens for a user on the - * add-on's behalf. - * - * Generated from protobuf field string oauth_client_id = 3; - */ - protected $oauth_client_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The canonical full name of this resource. - * Example: `projects/123/authorization` - * @type string $service_account_email - * The email address of the service account used to authenticate requests to - * add-on callback endpoints. - * @type string $oauth_client_id - * The OAuth client ID used to obtain OAuth access tokens for a user on the - * add-on's behalf. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * The canonical full name of this resource. - * Example: `projects/123/authorization` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The canonical full name of this resource. - * Example: `projects/123/authorization` - * - * 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 email address of the service account used to authenticate requests to - * add-on callback endpoints. - * - * Generated from protobuf field string service_account_email = 2; - * @return string - */ - public function getServiceAccountEmail() - { - return $this->service_account_email; - } - - /** - * The email address of the service account used to authenticate requests to - * add-on callback endpoints. - * - * Generated from protobuf field string service_account_email = 2; - * @param string $var - * @return $this - */ - public function setServiceAccountEmail($var) - { - GPBUtil::checkString($var, True); - $this->service_account_email = $var; - - return $this; - } - - /** - * The OAuth client ID used to obtain OAuth access tokens for a user on the - * add-on's behalf. - * - * Generated from protobuf field string oauth_client_id = 3; - * @return string - */ - public function getOauthClientId() - { - return $this->oauth_client_id; - } - - /** - * The OAuth client ID used to obtain OAuth access tokens for a user on the - * add-on's behalf. - * - * Generated from protobuf field string oauth_client_id = 3; - * @param string $var - * @return $this - */ - public function setOauthClientId($var) - { - GPBUtil::checkString($var, True); - $this->oauth_client_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/CreateDeploymentRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/CreateDeploymentRequest.php deleted file mode 100644 index 58cf6cc05a17..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/CreateDeploymentRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.gsuiteaddons.v1.CreateDeploymentRequest - */ -class CreateDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the project in which to create the deployment. - * Example: `projects/my_project`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The id to use for this deployment. The full name of the created - * resource will be `projects//deployments/`. - * - * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $deployment_id = ''; - /** - * Required. The deployment to create (deployment.name cannot be set). - * - * Generated from protobuf field .google.cloud.gsuiteaddons.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $deployment = null; - - /** - * @param string $parent Required. Name of the project in which to create the deployment. - * - * Example: `projects/my_project`. Please see - * {@see GSuiteAddOnsClient::projectName()} for help formatting this field. - * @param \Google\Cloud\GSuiteAddOns\V1\Deployment $deployment Required. The deployment to create (deployment.name cannot be set). - * @param string $deploymentId Required. The id to use for this deployment. The full name of the created - * resource will be `projects//deployments/`. - * - * @return \Google\Cloud\GSuiteAddOns\V1\CreateDeploymentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GSuiteAddOns\V1\Deployment $deployment, string $deploymentId): self - { - return (new self()) - ->setParent($parent) - ->setDeployment($deployment) - ->setDeploymentId($deploymentId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the project in which to create the deployment. - * Example: `projects/my_project`. - * @type string $deployment_id - * Required. The id to use for this deployment. The full name of the created - * resource will be `projects//deployments/`. - * @type \Google\Cloud\GSuiteAddOns\V1\Deployment $deployment - * Required. The deployment to create (deployment.name cannot be set). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the project in which to create the deployment. - * Example: `projects/my_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 project in which to create the deployment. - * Example: `projects/my_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; - } - - /** - * Required. The id to use for this deployment. The full name of the created - * resource will be `projects//deployments/`. - * - * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDeploymentId() - { - return $this->deployment_id; - } - - /** - * Required. The id to use for this deployment. The full name of the created - * resource will be `projects//deployments/`. - * - * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDeploymentId($var) - { - GPBUtil::checkString($var, True); - $this->deployment_id = $var; - - return $this; - } - - /** - * Required. The deployment to create (deployment.name cannot be set). - * - * Generated from protobuf field .google.cloud.gsuiteaddons.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GSuiteAddOns\V1\Deployment|null - */ - public function getDeployment() - { - return $this->deployment; - } - - public function hasDeployment() - { - return isset($this->deployment); - } - - public function clearDeployment() - { - unset($this->deployment); - } - - /** - * Required. The deployment to create (deployment.name cannot be set). - * - * Generated from protobuf field .google.cloud.gsuiteaddons.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GSuiteAddOns\V1\Deployment $var - * @return $this - */ - public function setDeployment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GSuiteAddOns\V1\Deployment::class); - $this->deployment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/DeleteDeploymentRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/DeleteDeploymentRequest.php deleted file mode 100644 index fd86c02f4bad..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/DeleteDeploymentRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.gsuiteaddons.v1.DeleteDeploymentRequest - */ -class DeleteDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the deployment to delete. - * Example: `projects/my_project/deployments/my_deployment`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The etag of the deployment to delete. - * If this is provided, it must match the server's etag. - * - * Generated from protobuf field string etag = 2; - */ - protected $etag = ''; - - /** - * @param string $name Required. The full resource name of the deployment to delete. - * - * Example: `projects/my_project/deployments/my_deployment`. Please see - * {@see GSuiteAddOnsClient::deploymentName()} for help formatting this field. - * - * @return \Google\Cloud\GSuiteAddOns\V1\DeleteDeploymentRequest - * - * @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 full resource name of the deployment to delete. - * Example: `projects/my_project/deployments/my_deployment`. - * @type string $etag - * The etag of the deployment to delete. - * If this is provided, it must match the server's etag. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the deployment to delete. - * Example: `projects/my_project/deployments/my_deployment`. - * - * 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 full resource name of the deployment to delete. - * Example: `projects/my_project/deployments/my_deployment`. - * - * 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; - } - - /** - * The etag of the deployment to delete. - * If this is provided, it must match the server's etag. - * - * Generated from protobuf field string etag = 2; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * The etag of the deployment to delete. - * If this is provided, it must match the server's etag. - * - * Generated from protobuf field string etag = 2; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/Deployment.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/Deployment.php deleted file mode 100644 index 4eb8c8fefa1d..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/Deployment.php +++ /dev/null @@ -1,195 +0,0 @@ -google.cloud.gsuiteaddons.v1.Deployment - */ -class Deployment extends \Google\Protobuf\Internal\Message -{ - /** - * The deployment resource name. - * Example: projects/123/deployments/my_deployment. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The list of Google OAuth scopes for which to request consent from the end - * user before executing an add-on endpoint. - * - * Generated from protobuf field repeated string oauth_scopes = 2; - */ - private $oauth_scopes; - /** - * The Google Workspace Add-on configuration. - * - * Generated from protobuf field .google.cloud.gsuiteaddons.v1.AddOns add_ons = 3; - */ - protected $add_ons = null; - /** - * This value is computed by the server based on the version of the - * deployment in storage, and may be sent on update and delete requests to - * ensure the client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 5; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The deployment resource name. - * Example: projects/123/deployments/my_deployment. - * @type array|\Google\Protobuf\Internal\RepeatedField $oauth_scopes - * The list of Google OAuth scopes for which to request consent from the end - * user before executing an add-on endpoint. - * @type \Google\Cloud\GSuiteAddOns\V1\AddOns $add_ons - * The Google Workspace Add-on configuration. - * @type string $etag - * This value is computed by the server based on the version of the - * deployment in storage, and may be sent on update and delete requests to - * ensure the client has an up-to-date value before proceeding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * The deployment resource name. - * Example: projects/123/deployments/my_deployment. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The deployment resource name. - * Example: projects/123/deployments/my_deployment. - * - * 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 list of Google OAuth scopes for which to request consent from the end - * user before executing an add-on endpoint. - * - * Generated from protobuf field repeated string oauth_scopes = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOauthScopes() - { - return $this->oauth_scopes; - } - - /** - * The list of Google OAuth scopes for which to request consent from the end - * user before executing an add-on endpoint. - * - * Generated from protobuf field repeated string oauth_scopes = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOauthScopes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->oauth_scopes = $arr; - - return $this; - } - - /** - * The Google Workspace Add-on configuration. - * - * Generated from protobuf field .google.cloud.gsuiteaddons.v1.AddOns add_ons = 3; - * @return \Google\Cloud\GSuiteAddOns\V1\AddOns|null - */ - public function getAddOns() - { - return $this->add_ons; - } - - public function hasAddOns() - { - return isset($this->add_ons); - } - - public function clearAddOns() - { - unset($this->add_ons); - } - - /** - * The Google Workspace Add-on configuration. - * - * Generated from protobuf field .google.cloud.gsuiteaddons.v1.AddOns add_ons = 3; - * @param \Google\Cloud\GSuiteAddOns\V1\AddOns $var - * @return $this - */ - public function setAddOns($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GSuiteAddOns\V1\AddOns::class); - $this->add_ons = $var; - - return $this; - } - - /** - * This value is computed by the server based on the version of the - * deployment in storage, and may be sent on update and delete requests to - * ensure the client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 5; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * This value is computed by the server based on the version of the - * deployment in storage, and may be sent on update and delete requests to - * ensure the client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 5; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetAuthorizationRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetAuthorizationRequest.php deleted file mode 100644 index 431a860fb261..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetAuthorizationRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.gsuiteaddons.v1.GetAuthorizationRequest - */ -class GetAuthorizationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the project for which to get the Google Workspace Add-ons - * authorization information. - * Example: `projects/my_project/authorization`. - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the project for which to get the Google Workspace Add-ons - * authorization information. - * - * Example: `projects/my_project/authorization`. Please see - * {@see GSuiteAddOnsClient::authorizationName()} for help formatting this field. - * - * @return \Google\Cloud\GSuiteAddOns\V1\GetAuthorizationRequest - * - * @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 project for which to get the Google Workspace Add-ons - * authorization information. - * Example: `projects/my_project/authorization`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the project for which to get the Google Workspace Add-ons - * authorization information. - * Example: `projects/my_project/authorization`. - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the project for which to get the Google Workspace Add-ons - * authorization information. - * Example: `projects/my_project/authorization`. - * - * Generated from protobuf field string name = 2 [(.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/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetDeploymentRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetDeploymentRequest.php deleted file mode 100644 index 6de539926055..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetDeploymentRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.gsuiteaddons.v1.GetDeploymentRequest - */ -class GetDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the deployment to get. - * Example: `projects/my_project/deployments/my_deployment`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full resource name of the deployment to get. - * - * Example: `projects/my_project/deployments/my_deployment`. Please see - * {@see GSuiteAddOnsClient::deploymentName()} for help formatting this field. - * - * @return \Google\Cloud\GSuiteAddOns\V1\GetDeploymentRequest - * - * @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 full resource name of the deployment to get. - * Example: `projects/my_project/deployments/my_deployment`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the deployment to get. - * Example: `projects/my_project/deployments/my_deployment`. - * - * 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 full resource name of the deployment to get. - * Example: `projects/my_project/deployments/my_deployment`. - * - * 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/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetInstallStatusRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetInstallStatusRequest.php deleted file mode 100644 index e326d58f39be..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetInstallStatusRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.gsuiteaddons.v1.GetInstallStatusRequest - */ -class GetInstallStatusRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the deployment. - * Example: `projects/my_project/deployments/my_deployment/installStatus`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full resource name of the deployment. - * - * Example: `projects/my_project/deployments/my_deployment/installStatus`. Please see - * {@see GSuiteAddOnsClient::installStatusName()} for help formatting this field. - * - * @return \Google\Cloud\GSuiteAddOns\V1\GetInstallStatusRequest - * - * @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 full resource name of the deployment. - * Example: `projects/my_project/deployments/my_deployment/installStatus`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the deployment. - * Example: `projects/my_project/deployments/my_deployment/installStatus`. - * - * 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 full resource name of the deployment. - * Example: `projects/my_project/deployments/my_deployment/installStatus`. - * - * 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/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/InstallDeploymentRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/InstallDeploymentRequest.php deleted file mode 100644 index c0cddef7f5b5..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/InstallDeploymentRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.gsuiteaddons.v1.InstallDeploymentRequest - */ -class InstallDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the deployment to install. - * Example: `projects/my_project/deployments/my_deployment`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full resource name of the deployment to install. - * - * Example: `projects/my_project/deployments/my_deployment`. Please see - * {@see GSuiteAddOnsClient::deploymentName()} for help formatting this field. - * - * @return \Google\Cloud\GSuiteAddOns\V1\InstallDeploymentRequest - * - * @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 full resource name of the deployment to install. - * Example: `projects/my_project/deployments/my_deployment`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the deployment to install. - * Example: `projects/my_project/deployments/my_deployment`. - * - * 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 full resource name of the deployment to install. - * Example: `projects/my_project/deployments/my_deployment`. - * - * 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/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/InstallStatus.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/InstallStatus.php deleted file mode 100644 index d3636bd3028c..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/InstallStatus.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.gsuiteaddons.v1.InstallStatus - */ -class InstallStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The canonical full resource name of the deployment install status. - * Example: `projects/123/deployments/my_deployment/installStatus`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * True if the deployment is installed for the user - * - * Generated from protobuf field .google.protobuf.BoolValue installed = 2; - */ - protected $installed = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The canonical full resource name of the deployment install status. - * Example: `projects/123/deployments/my_deployment/installStatus`. - * @type \Google\Protobuf\BoolValue $installed - * True if the deployment is installed for the user - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * The canonical full resource name of the deployment install status. - * Example: `projects/123/deployments/my_deployment/installStatus`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The canonical full resource name of the deployment install status. - * Example: `projects/123/deployments/my_deployment/installStatus`. - * - * 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; - } - - /** - * True if the deployment is installed for the user - * - * Generated from protobuf field .google.protobuf.BoolValue installed = 2; - * @return \Google\Protobuf\BoolValue|null - */ - public function getInstalled() - { - return $this->installed; - } - - public function hasInstalled() - { - return isset($this->installed); - } - - public function clearInstalled() - { - unset($this->installed); - } - - /** - * Returns the unboxed value from getInstalled() - - * True if the deployment is installed for the user - * - * Generated from protobuf field .google.protobuf.BoolValue installed = 2; - * @return bool|null - */ - public function getInstalledUnwrapped() - { - return $this->readWrapperValue("installed"); - } - - /** - * True if the deployment is installed for the user - * - * Generated from protobuf field .google.protobuf.BoolValue installed = 2; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setInstalled($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->installed = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * True if the deployment is installed for the user - * - * Generated from protobuf field .google.protobuf.BoolValue installed = 2; - * @param bool|null $var - * @return $this - */ - public function setInstalledUnwrapped($var) - { - $this->writeWrapperValue("installed", $var); - return $this;} - -} - diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ListDeploymentsRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ListDeploymentsRequest.php deleted file mode 100644 index 0d3789df7934..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ListDeploymentsRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.gsuiteaddons.v1.ListDeploymentsRequest - */ -class ListDeploymentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the project in which to create the deployment. - * Example: `projects/my_project`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of deployments to return. The service may return fewer - * than this value. - * If unspecified, at most 1000 deployments will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListDeployments` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListDeployments` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Name of the project in which to create the deployment. - * - * Example: `projects/my_project`. Please see - * {@see GSuiteAddOnsClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\GSuiteAddOns\V1\ListDeploymentsRequest - * - * @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 project in which to create the deployment. - * Example: `projects/my_project`. - * @type int $page_size - * The maximum number of deployments to return. The service may return fewer - * than this value. - * If unspecified, at most 1000 deployments will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * A page token, received from a previous `ListDeployments` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListDeployments` must - * match the call that provided the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the project in which to create the deployment. - * Example: `projects/my_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 project in which to create the deployment. - * Example: `projects/my_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; - } - - /** - * The maximum number of deployments to return. The service may return fewer - * than this value. - * If unspecified, at most 1000 deployments will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of deployments to return. The service may return fewer - * than this value. - * If unspecified, at most 1000 deployments will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListDeployments` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListDeployments` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListDeployments` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListDeployments` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @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/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ListDeploymentsResponse.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ListDeploymentsResponse.php deleted file mode 100644 index 4a2b06a63091..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ListDeploymentsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.gsuiteaddons.v1.ListDeploymentsResponse - */ -class ListDeploymentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of deployments for the given project. - * - * Generated from protobuf field repeated .google.cloud.gsuiteaddons.v1.Deployment deployments = 1; - */ - private $deployments; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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\GSuiteAddOns\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $deployments - * The list of deployments for the given project. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * The list of deployments for the given project. - * - * Generated from protobuf field repeated .google.cloud.gsuiteaddons.v1.Deployment deployments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeployments() - { - return $this->deployments; - } - - /** - * The list of deployments for the given project. - * - * Generated from protobuf field repeated .google.cloud.gsuiteaddons.v1.Deployment deployments = 1; - * @param array<\Google\Cloud\GSuiteAddOns\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeployments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GSuiteAddOns\V1\Deployment::class); - $this->deployments = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ReplaceDeploymentRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ReplaceDeploymentRequest.php deleted file mode 100644 index 3a79b65b564f..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ReplaceDeploymentRequest.php +++ /dev/null @@ -1,90 +0,0 @@ -google.cloud.gsuiteaddons.v1.ReplaceDeploymentRequest - */ -class ReplaceDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The deployment to create or replace. - * - * Generated from protobuf field .google.cloud.gsuiteaddons.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $deployment = null; - - /** - * @param \Google\Cloud\GSuiteAddOns\V1\Deployment $deployment Required. The deployment to create or replace. - * - * @return \Google\Cloud\GSuiteAddOns\V1\ReplaceDeploymentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\GSuiteAddOns\V1\Deployment $deployment): self - { - return (new self()) - ->setDeployment($deployment); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GSuiteAddOns\V1\Deployment $deployment - * Required. The deployment to create or replace. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * Required. The deployment to create or replace. - * - * Generated from protobuf field .google.cloud.gsuiteaddons.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GSuiteAddOns\V1\Deployment|null - */ - public function getDeployment() - { - return $this->deployment; - } - - public function hasDeployment() - { - return isset($this->deployment); - } - - public function clearDeployment() - { - unset($this->deployment); - } - - /** - * Required. The deployment to create or replace. - * - * Generated from protobuf field .google.cloud.gsuiteaddons.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GSuiteAddOns\V1\Deployment $var - * @return $this - */ - public function setDeployment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GSuiteAddOns\V1\Deployment::class); - $this->deployment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/UninstallDeploymentRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/UninstallDeploymentRequest.php deleted file mode 100644 index 92f1cbe2a500..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/UninstallDeploymentRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.gsuiteaddons.v1.UninstallDeploymentRequest - */ -class UninstallDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the deployment to install. - * Example: `projects/my_project/deployments/my_deployment`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full resource name of the deployment to install. - * - * Example: `projects/my_project/deployments/my_deployment`. Please see - * {@see GSuiteAddOnsClient::deploymentName()} for help formatting this field. - * - * @return \Google\Cloud\GSuiteAddOns\V1\UninstallDeploymentRequest - * - * @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 full resource name of the deployment to install. - * Example: `projects/my_project/deployments/my_deployment`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the deployment to install. - * Example: `projects/my_project/deployments/my_deployment`. - * - * 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 full resource name of the deployment to install. - * Example: `projects/my_project/deployments/my_deployment`. - * - * 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/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/create_deployment.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/create_deployment.php deleted file mode 100644 index baf041f1bb7c..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/create_deployment.php +++ /dev/null @@ -1,79 +0,0 @@ -/deployments/`. - */ -function create_deployment_sample(string $formattedParent, string $deploymentId): void -{ - // Create a client. - $gSuiteAddOnsClient = new GSuiteAddOnsClient(); - - // Prepare the request message. - $deployment = new Deployment(); - $request = (new CreateDeploymentRequest()) - ->setParent($formattedParent) - ->setDeploymentId($deploymentId) - ->setDeployment($deployment); - - // Call the API and handle any network failures. - try { - /** @var Deployment $response */ - $response = $gSuiteAddOnsClient->createDeployment($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 = GSuiteAddOnsClient::projectName('[PROJECT]'); - $deploymentId = '[DEPLOYMENT_ID]'; - - create_deployment_sample($formattedParent, $deploymentId); -} -// [END gsuiteaddons_v1_generated_GSuiteAddOns_CreateDeployment_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/delete_deployment.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/delete_deployment.php deleted file mode 100644 index 824f86a5787b..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/delete_deployment.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $gSuiteAddOnsClient->deleteDeployment($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 = GSuiteAddOnsClient::deploymentName('[PROJECT]', '[DEPLOYMENT]'); - - delete_deployment_sample($formattedName); -} -// [END gsuiteaddons_v1_generated_GSuiteAddOns_DeleteDeployment_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_authorization.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_authorization.php deleted file mode 100644 index 4bca0f1443b9..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_authorization.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Authorization $response */ - $response = $gSuiteAddOnsClient->getAuthorization($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 = GSuiteAddOnsClient::authorizationName('[PROJECT]'); - - get_authorization_sample($formattedName); -} -// [END gsuiteaddons_v1_generated_GSuiteAddOns_GetAuthorization_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_deployment.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_deployment.php deleted file mode 100644 index 6aa1041d3d79..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_deployment.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Deployment $response */ - $response = $gSuiteAddOnsClient->getDeployment($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 = GSuiteAddOnsClient::deploymentName('[PROJECT]', '[DEPLOYMENT]'); - - get_deployment_sample($formattedName); -} -// [END gsuiteaddons_v1_generated_GSuiteAddOns_GetDeployment_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_install_status.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_install_status.php deleted file mode 100644 index 7b998f8a5f90..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_install_status.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var InstallStatus $response */ - $response = $gSuiteAddOnsClient->getInstallStatus($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 = GSuiteAddOnsClient::installStatusName('[PROJECT]', '[DEPLOYMENT]'); - - get_install_status_sample($formattedName); -} -// [END gsuiteaddons_v1_generated_GSuiteAddOns_GetInstallStatus_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/install_deployment.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/install_deployment.php deleted file mode 100644 index f1775aa4c012..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/install_deployment.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $gSuiteAddOnsClient->installDeployment($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 = GSuiteAddOnsClient::deploymentName('[PROJECT]', '[DEPLOYMENT]'); - - install_deployment_sample($formattedName); -} -// [END gsuiteaddons_v1_generated_GSuiteAddOns_InstallDeployment_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/list_deployments.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/list_deployments.php deleted file mode 100644 index 1da0a6794a02..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/list_deployments.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $gSuiteAddOnsClient->listDeployments($request); - - /** @var Deployment $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 = GSuiteAddOnsClient::projectName('[PROJECT]'); - - list_deployments_sample($formattedParent); -} -// [END gsuiteaddons_v1_generated_GSuiteAddOns_ListDeployments_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/replace_deployment.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/replace_deployment.php deleted file mode 100644 index 66a9a0810218..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/replace_deployment.php +++ /dev/null @@ -1,59 +0,0 @@ -setDeployment($deployment); - - // Call the API and handle any network failures. - try { - /** @var Deployment $response */ - $response = $gSuiteAddOnsClient->replaceDeployment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END gsuiteaddons_v1_generated_GSuiteAddOns_ReplaceDeployment_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/uninstall_deployment.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/uninstall_deployment.php deleted file mode 100644 index 6e64b75d1a86..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/uninstall_deployment.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $gSuiteAddOnsClient->uninstallDeployment($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 = GSuiteAddOnsClient::deploymentName('[PROJECT]', '[DEPLOYMENT]'); - - uninstall_deployment_sample($formattedName); -} -// [END gsuiteaddons_v1_generated_GSuiteAddOns_UninstallDeployment_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/src/V1/Client/GSuiteAddOnsClient.php b/owl-bot-staging/GSuiteAddOns/v1/src/V1/Client/GSuiteAddOnsClient.php deleted file mode 100644 index 4d41c69864e0..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/src/V1/Client/GSuiteAddOnsClient.php +++ /dev/null @@ -1,543 +0,0 @@ - createDeploymentAsync(CreateDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDeploymentAsync(DeleteDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAuthorizationAsync(GetAuthorizationRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDeploymentAsync(GetDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getInstallStatusAsync(GetInstallStatusRequest $request, array $optionalArgs = []) - * @method PromiseInterface installDeploymentAsync(InstallDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDeploymentsAsync(ListDeploymentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface replaceDeploymentAsync(ReplaceDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface uninstallDeploymentAsync(UninstallDeploymentRequest $request, array $optionalArgs = []) - */ -final class GSuiteAddOnsClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.gsuiteaddons.v1.GSuiteAddOns'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'gsuiteaddons.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'gsuiteaddons.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', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/g_suite_add_ons_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/g_suite_add_ons_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/g_suite_add_ons_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/g_suite_add_ons_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * authorization resource. - * - * @param string $project - * - * @return string The formatted authorization resource. - */ - public static function authorizationName(string $project): string - { - return self::getPathTemplate('authorization')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a deployment - * resource. - * - * @param string $project - * @param string $deployment - * - * @return string The formatted deployment resource. - */ - public static function deploymentName(string $project, string $deployment): string - { - return self::getPathTemplate('deployment')->render([ - 'project' => $project, - 'deployment' => $deployment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * install_status resource. - * - * @param string $project - * @param string $deployment - * - * @return string The formatted install_status resource. - */ - public static function installStatusName(string $project, string $deployment): string - { - return self::getPathTemplate('installStatus')->render([ - 'project' => $project, - 'deployment' => $deployment, - ]); - } - - /** - * 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, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - authorization: projects/{project}/authorization - * - deployment: projects/{project}/deployments/{deployment} - * - installStatus: projects/{project}/deployments/{deployment}/installStatus - * - project: projects/{project} - * - * 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 $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 'gsuiteaddons.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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 deployment with the specified name and configuration. - * - * The async variant is {@see GSuiteAddOnsClient::createDeploymentAsync()} . - * - * @example samples/V1/GSuiteAddOnsClient/create_deployment.php - * - * @param CreateDeploymentRequest $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 Deployment - * - * @throws ApiException Thrown if the API call fails. - */ - public function createDeployment(CreateDeploymentRequest $request, array $callOptions = []): Deployment - { - return $this->startApiCall('CreateDeployment', $request, $callOptions)->wait(); - } - - /** - * Deletes the deployment with the given name. - * - * The async variant is {@see GSuiteAddOnsClient::deleteDeploymentAsync()} . - * - * @example samples/V1/GSuiteAddOnsClient/delete_deployment.php - * - * @param DeleteDeploymentRequest $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 deleteDeployment(DeleteDeploymentRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteDeployment', $request, $callOptions)->wait(); - } - - /** - * Gets the authorization information for deployments in a given project. - * - * The async variant is {@see GSuiteAddOnsClient::getAuthorizationAsync()} . - * - * @example samples/V1/GSuiteAddOnsClient/get_authorization.php - * - * @param GetAuthorizationRequest $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 Authorization - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAuthorization(GetAuthorizationRequest $request, array $callOptions = []): Authorization - { - return $this->startApiCall('GetAuthorization', $request, $callOptions)->wait(); - } - - /** - * Gets the deployment with the specified name. - * - * The async variant is {@see GSuiteAddOnsClient::getDeploymentAsync()} . - * - * @example samples/V1/GSuiteAddOnsClient/get_deployment.php - * - * @param GetDeploymentRequest $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 Deployment - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDeployment(GetDeploymentRequest $request, array $callOptions = []): Deployment - { - return $this->startApiCall('GetDeployment', $request, $callOptions)->wait(); - } - - /** - * Fetches the install status of a developer mode deployment. - * - * The async variant is {@see GSuiteAddOnsClient::getInstallStatusAsync()} . - * - * @example samples/V1/GSuiteAddOnsClient/get_install_status.php - * - * @param GetInstallStatusRequest $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 InstallStatus - * - * @throws ApiException Thrown if the API call fails. - */ - public function getInstallStatus(GetInstallStatusRequest $request, array $callOptions = []): InstallStatus - { - return $this->startApiCall('GetInstallStatus', $request, $callOptions)->wait(); - } - - /** - * Installs a deployment in developer mode. - * See: - * https://developers.google.com/gsuite/add-ons/how-tos/testing-gsuite-addons. - * - * The async variant is {@see GSuiteAddOnsClient::installDeploymentAsync()} . - * - * @example samples/V1/GSuiteAddOnsClient/install_deployment.php - * - * @param InstallDeploymentRequest $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 installDeployment(InstallDeploymentRequest $request, array $callOptions = []): void - { - $this->startApiCall('InstallDeployment', $request, $callOptions)->wait(); - } - - /** - * Lists all deployments in a particular project. - * - * The async variant is {@see GSuiteAddOnsClient::listDeploymentsAsync()} . - * - * @example samples/V1/GSuiteAddOnsClient/list_deployments.php - * - * @param ListDeploymentsRequest $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 listDeployments(ListDeploymentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDeployments', $request, $callOptions); - } - - /** - * Creates or replaces a deployment with the specified name. - * - * The async variant is {@see GSuiteAddOnsClient::replaceDeploymentAsync()} . - * - * @example samples/V1/GSuiteAddOnsClient/replace_deployment.php - * - * @param ReplaceDeploymentRequest $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 Deployment - * - * @throws ApiException Thrown if the API call fails. - */ - public function replaceDeployment(ReplaceDeploymentRequest $request, array $callOptions = []): Deployment - { - return $this->startApiCall('ReplaceDeployment', $request, $callOptions)->wait(); - } - - /** - * Uninstalls a developer mode deployment. - * See: - * https://developers.google.com/gsuite/add-ons/how-tos/testing-gsuite-addons. - * - * The async variant is {@see GSuiteAddOnsClient::uninstallDeploymentAsync()} . - * - * @example samples/V1/GSuiteAddOnsClient/uninstall_deployment.php - * - * @param UninstallDeploymentRequest $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 uninstallDeployment(UninstallDeploymentRequest $request, array $callOptions = []): void - { - $this->startApiCall('UninstallDeployment', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/GSuiteAddOns/v1/src/V1/gapic_metadata.json b/owl-bot-staging/GSuiteAddOns/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 7e5b8ce080e6..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.gsuiteaddons.v1", - "libraryPackage": "Google\\Cloud\\GSuiteAddOns\\V1", - "services": { - "GSuiteAddOns": { - "clients": { - "grpc": { - "libraryClient": "GSuiteAddOnsGapicClient", - "rpcs": { - "CreateDeployment": { - "methods": [ - "createDeployment" - ] - }, - "DeleteDeployment": { - "methods": [ - "deleteDeployment" - ] - }, - "GetAuthorization": { - "methods": [ - "getAuthorization" - ] - }, - "GetDeployment": { - "methods": [ - "getDeployment" - ] - }, - "GetInstallStatus": { - "methods": [ - "getInstallStatus" - ] - }, - "InstallDeployment": { - "methods": [ - "installDeployment" - ] - }, - "ListDeployments": { - "methods": [ - "listDeployments" - ] - }, - "ReplaceDeployment": { - "methods": [ - "replaceDeployment" - ] - }, - "UninstallDeployment": { - "methods": [ - "uninstallDeployment" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_client_config.json b/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_client_config.json deleted file mode 100644 index 72ccdb04dcea..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_client_config.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "interfaces": { - "google.cloud.gsuiteaddons.v1.GSuiteAddOns": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "UNKNOWN" - ], - "no_retry_1_codes": [], - "no_retry_2_codes": [] - }, - "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": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 10000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 10000, - "total_timeout_millis": 10000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 10000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 10000, - "total_timeout_millis": 10000 - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 120000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 120000, - "total_timeout_millis": 120000 - } - }, - "methods": { - "CreateDeployment": { - "timeout_millis": 10000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteDeployment": { - "timeout_millis": 10000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetAuthorization": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "GetDeployment": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetInstallStatus": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "InstallDeployment": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListDeployments": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ReplaceDeployment": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UninstallDeployment": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_descriptor_config.php b/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_descriptor_config.php deleted file mode 100644 index f85736b5ac05..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_descriptor_config.php +++ /dev/null @@ -1,151 +0,0 @@ - [ - 'google.cloud.gsuiteaddons.v1.GSuiteAddOns' => [ - 'CreateDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GSuiteAddOns\V1\Deployment', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAuthorization' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GSuiteAddOns\V1\Authorization', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GSuiteAddOns\V1\Deployment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetInstallStatus' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GSuiteAddOns\V1\InstallStatus', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'InstallDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListDeployments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDeployments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GSuiteAddOns\V1\ListDeploymentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ReplaceDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GSuiteAddOns\V1\Deployment', - 'headerParams' => [ - [ - 'keyName' => 'deployment.name', - 'fieldAccessors' => [ - 'getDeployment', - 'getName', - ], - ], - ], - ], - 'UninstallDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'authorization' => 'projects/{project}/authorization', - 'deployment' => 'projects/{project}/deployments/{deployment}', - 'installStatus' => 'projects/{project}/deployments/{deployment}/installStatus', - 'project' => 'projects/{project}', - ], - ], - ], -]; diff --git a/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_rest_client_config.php b/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_rest_client_config.php deleted file mode 100644 index 17fbcad14628..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_rest_client_config.php +++ /dev/null @@ -1,136 +0,0 @@ - [ - 'google.cloud.gsuiteaddons.v1.GSuiteAddOns' => [ - 'CreateDeployment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/deployments', - 'body' => 'deployment', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'deployment_id', - ], - ], - 'DeleteDeployment' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/deployments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAuthorization' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/authorization}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDeployment' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/deployments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetInstallStatus' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/deployments/*/installStatus}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'InstallDeployment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/deployments/*}:install', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListDeployments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/deployments', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ReplaceDeployment' => [ - 'method' => 'put', - 'uriTemplate' => '/v1/{deployment.name=projects/*/deployments/*}', - 'body' => 'deployment', - 'placeholders' => [ - 'deployment.name' => [ - 'getters' => [ - 'getDeployment', - 'getName', - ], - ], - ], - ], - 'UninstallDeployment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/deployments/*}:uninstall', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/GSuiteAddOns/v1/tests/Unit/V1/Client/GSuiteAddOnsClientTest.php b/owl-bot-staging/GSuiteAddOns/v1/tests/Unit/V1/Client/GSuiteAddOnsClientTest.php deleted file mode 100644 index 6bbd77211fa9..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/tests/Unit/V1/Client/GSuiteAddOnsClientTest.php +++ /dev/null @@ -1,710 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return GSuiteAddOnsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new GSuiteAddOnsClient($options); - } - - /** @test */ - public function createDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $etag = 'etag3123477'; - $expectedResponse = new Deployment(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $deploymentId = 'deploymentId51250389'; - $deployment = new Deployment(); - $request = (new CreateDeploymentRequest()) - ->setParent($formattedParent) - ->setDeploymentId($deploymentId) - ->setDeployment($deployment); - $response = $gapicClient->createDeployment($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.gsuiteaddons.v1.GSuiteAddOns/CreateDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDeploymentId(); - $this->assertProtobufEquals($deploymentId, $actualValue); - $actualValue = $actualRequestObject->getDeployment(); - $this->assertProtobufEquals($deployment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDeploymentExceptionTest() - { - $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]'); - $deploymentId = 'deploymentId51250389'; - $deployment = new Deployment(); - $request = (new CreateDeploymentRequest()) - ->setParent($formattedParent) - ->setDeploymentId($deploymentId) - ->setDeployment($deployment); - try { - $gapicClient->createDeployment($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 deleteDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); - $request = (new DeleteDeploymentRequest()) - ->setName($formattedName); - $gapicClient->deleteDeployment($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/DeleteDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDeploymentExceptionTest() - { - $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->deploymentName('[PROJECT]', '[DEPLOYMENT]'); - $request = (new DeleteDeploymentRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteDeployment($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 getAuthorizationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $serviceAccountEmail = 'serviceAccountEmail-1300473088'; - $oauthClientId = 'oauthClientId-1137123737'; - $expectedResponse = new Authorization(); - $expectedResponse->setName($name2); - $expectedResponse->setServiceAccountEmail($serviceAccountEmail); - $expectedResponse->setOauthClientId($oauthClientId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->authorizationName('[PROJECT]'); - $request = (new GetAuthorizationRequest()) - ->setName($formattedName); - $response = $gapicClient->getAuthorization($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.gsuiteaddons.v1.GSuiteAddOns/GetAuthorization', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAuthorizationExceptionTest() - { - $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->authorizationName('[PROJECT]'); - $request = (new GetAuthorizationRequest()) - ->setName($formattedName); - try { - $gapicClient->getAuthorization($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 getDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $etag = 'etag3123477'; - $expectedResponse = new Deployment(); - $expectedResponse->setName($name2); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); - $request = (new GetDeploymentRequest()) - ->setName($formattedName); - $response = $gapicClient->getDeployment($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.gsuiteaddons.v1.GSuiteAddOns/GetDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDeploymentExceptionTest() - { - $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->deploymentName('[PROJECT]', '[DEPLOYMENT]'); - $request = (new GetDeploymentRequest()) - ->setName($formattedName); - try { - $gapicClient->getDeployment($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 getInstallStatusTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new InstallStatus(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->installStatusName('[PROJECT]', '[DEPLOYMENT]'); - $request = (new GetInstallStatusRequest()) - ->setName($formattedName); - $response = $gapicClient->getInstallStatus($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.gsuiteaddons.v1.GSuiteAddOns/GetInstallStatus', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInstallStatusExceptionTest() - { - $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->installStatusName('[PROJECT]', '[DEPLOYMENT]'); - $request = (new GetInstallStatusRequest()) - ->setName($formattedName); - try { - $gapicClient->getInstallStatus($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 installDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); - $request = (new InstallDeploymentRequest()) - ->setName($formattedName); - $gapicClient->installDeployment($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/InstallDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function installDeploymentExceptionTest() - { - $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->deploymentName('[PROJECT]', '[DEPLOYMENT]'); - $request = (new InstallDeploymentRequest()) - ->setName($formattedName); - try { - $gapicClient->installDeployment($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 listDeploymentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $deploymentsElement = new Deployment(); - $deployments = [ - $deploymentsElement, - ]; - $expectedResponse = new ListDeploymentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDeployments($deployments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListDeploymentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDeployments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDeployments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/ListDeployments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDeploymentsExceptionTest() - { - $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 ListDeploymentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDeployments($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 replaceDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $etag = 'etag3123477'; - $expectedResponse = new Deployment(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $deployment = new Deployment(); - $request = (new ReplaceDeploymentRequest()) - ->setDeployment($deployment); - $response = $gapicClient->replaceDeployment($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.gsuiteaddons.v1.GSuiteAddOns/ReplaceDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getDeployment(); - $this->assertProtobufEquals($deployment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function replaceDeploymentExceptionTest() - { - $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 - $deployment = new Deployment(); - $request = (new ReplaceDeploymentRequest()) - ->setDeployment($deployment); - try { - $gapicClient->replaceDeployment($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 uninstallDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); - $request = (new UninstallDeploymentRequest()) - ->setName($formattedName); - $gapicClient->uninstallDeployment($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/UninstallDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function uninstallDeploymentExceptionTest() - { - $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->deploymentName('[PROJECT]', '[DEPLOYMENT]'); - $request = (new UninstallDeploymentRequest()) - ->setName($formattedName); - try { - $gapicClient->uninstallDeployment($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 createDeploymentAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $etag = 'etag3123477'; - $expectedResponse = new Deployment(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $deploymentId = 'deploymentId51250389'; - $deployment = new Deployment(); - $request = (new CreateDeploymentRequest()) - ->setParent($formattedParent) - ->setDeploymentId($deploymentId) - ->setDeployment($deployment); - $response = $gapicClient->createDeploymentAsync($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.gsuiteaddons.v1.GSuiteAddOns/CreateDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDeploymentId(); - $this->assertProtobufEquals($deploymentId, $actualValue); - $actualValue = $actualRequestObject->getDeployment(); - $this->assertProtobufEquals($deployment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Backup.php b/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Backup.php deleted file mode 100644 index 269a69653719..000000000000 Binary files a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Backup.php and /dev/null differ diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/BackupPlan.php b/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/BackupPlan.php deleted file mode 100644 index 60c79d48dfc3..000000000000 Binary files a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/BackupPlan.php and /dev/null differ diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Common.php b/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Common.php deleted file mode 100644 index 033eea30b1d5..000000000000 Binary files a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Common.php and /dev/null differ diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Gkebackup.php b/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Gkebackup.php deleted file mode 100644 index 88dc7db961f7..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Gkebackup.php +++ /dev/null @@ -1,236 +0,0 @@ -internalAddGeneratedFile( - ' -ÕT -)google/cloud/gkebackup/v1/gkebackup.protogoogle.cloud.gkebackup.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto&google/cloud/gkebackup/v1/backup.proto+google/cloud/gkebackup/v1/backup_plan.proto\'google/cloud/gkebackup/v1/restore.proto,google/cloud/gkebackup/v1/restore_plan.proto&google/cloud/gkebackup/v1/volume.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"€ -OperationMetadata4 - create_time ( 2.google.protobuf.TimestampBàA1 -end_time ( 2.google.protobuf.TimestampBàA -target ( BàA -verb ( BàA -status_message ( BàA# -requested_cancellation (BàA - api_version ( BàA"² -CreateBackupPlanRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location? - backup_plan ( 2%.google.cloud.gkebackup.v1.BackupPlanBàA -backup_plan_id ( BàA"° -ListBackupPlansRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"„ -ListBackupPlansResponse; - backup_plans ( 2%.google.cloud.gkebackup.v1.BackupPlan -next_page_token (  - unreachable ( "Q -GetBackupPlanRequest9 -name ( B+àAúA% -#gkebackup.googleapis.com/BackupPlan" -UpdateBackupPlanRequest? - backup_plan ( 2%.google.cloud.gkebackup.v1.BackupPlanBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA"g -DeleteBackupPlanRequest9 -name ( B+àAúA% -#gkebackup.googleapis.com/BackupPlan -etag ( BàA"¢ -CreateBackupRequest; -parent ( B+àAúA% -#gkebackup.googleapis.com/BackupPlan6 -backup ( 2!.google.cloud.gkebackup.v1.BackupBàA - backup_id ( BàA"® -ListBackupsRequest; -parent ( B+àAúA% -#gkebackup.googleapis.com/BackupPlan - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"b -ListBackupsResponse2 -backups ( 2!.google.cloud.gkebackup.v1.Backup -next_page_token ( "I -GetBackupRequest5 -name ( B\'àAúA! -gkebackup.googleapis.com/Backup"ƒ -UpdateBackupRequest6 -backup ( 2!.google.cloud.gkebackup.v1.BackupBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA"s -DeleteBackupRequest5 -name ( B\'àAúA! -gkebackup.googleapis.com/Backup -etag ( BàA -force (BàA"° -ListVolumeBackupsRequest7 -parent ( B\'àAúA! -gkebackup.googleapis.com/Backup - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"u -ListVolumeBackupsResponse? -volume_backups ( 2\'.google.cloud.gkebackup.v1.VolumeBackup -next_page_token ( "U -GetVolumeBackupRequest; -name ( B-àAúA\' -%gkebackup.googleapis.com/VolumeBackup"¶ -CreateRestorePlanRequest9 -parent ( B)àAúA# -!locations.googleapis.com/LocationA - restore_plan ( 2&.google.cloud.gkebackup.v1.RestorePlanBàA -restore_plan_id ( BàA"± -ListRestorePlansRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"‡ -ListRestorePlansResponse= - restore_plans ( 2&.google.cloud.gkebackup.v1.RestorePlan -next_page_token (  - unreachable ( "S -GetRestorePlanRequest: -name ( B,àAúA& -$gkebackup.googleapis.com/RestorePlan"“ -UpdateRestorePlanRequestA - restore_plan ( 2&.google.cloud.gkebackup.v1.RestorePlanBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA"} -DeleteRestorePlanRequest: -name ( B,àAúA& -$gkebackup.googleapis.com/RestorePlan -etag ( BàA -force (BàA"§ -CreateRestoreRequest< -parent ( B,àAúA& -$gkebackup.googleapis.com/RestorePlan8 -restore ( 2".google.cloud.gkebackup.v1.RestoreBàA - -restore_id ( BàA"° -ListRestoresRequest< -parent ( B,àAúA& -$gkebackup.googleapis.com/RestorePlan - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"z -ListRestoresResponse4 -restores ( 2".google.cloud.gkebackup.v1.Restore -next_page_token (  - unreachable ( "K -GetRestoreRequest6 -name ( B(àAúA" - gkebackup.googleapis.com/Restore"† -UpdateRestoreRequest8 -restore ( 2".google.cloud.gkebackup.v1.RestoreBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA"u -DeleteRestoreRequest6 -name ( B(àAúA" - gkebackup.googleapis.com/Restore -etag ( BàA -force (BàA"² -ListVolumeRestoresRequest8 -parent ( B(àAúA" - gkebackup.googleapis.com/Restore - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"x -ListVolumeRestoresResponseA -volume_restores ( 2(.google.cloud.gkebackup.v1.VolumeRestore -next_page_token ( "W -GetVolumeRestoreRequest< -name ( B.àAúA( -&gkebackup.googleapis.com/VolumeRestore"[ - GetBackupIndexDownloadUrlRequest7 -backup ( B\'àAúA! -gkebackup.googleapis.com/Backup"< -!GetBackupIndexDownloadUrlResponse - -signed_url ( BàA2Æ* - BackupForGKEò -CreateBackupPlan2.google.cloud.gkebackup.v1.CreateBackupPlanRequest.google.longrunning.Operation"ŠÊA - -BackupPlanOperationMetadataÚA!parent,backup_plan,backup_plan_id‚Óä“>"//v1/{parent=projects/*/locations/*}/backupPlans: backup_planº -ListBackupPlans1.google.cloud.gkebackup.v1.ListBackupPlansRequest2.google.cloud.gkebackup.v1.ListBackupPlansResponse"@ÚAparent‚Óä“1//v1/{parent=projects/*/locations/*}/backupPlans§ - GetBackupPlan/.google.cloud.gkebackup.v1.GetBackupPlanRequest%.google.cloud.gkebackup.v1.BackupPlan">ÚAname‚Óä“1//v1/{name=projects/*/locations/*/backupPlans/*}ô -UpdateBackupPlan2.google.cloud.gkebackup.v1.UpdateBackupPlanRequest.google.longrunning.Operation"ŒÊA - -BackupPlanOperationMetadataÚAbackup_plan,update_mask‚Óä“J2;/v1/{backup_plan.name=projects/*/locations/*/backupPlans/*}: backup_planÒ -DeleteBackupPlan2.google.cloud.gkebackup.v1.DeleteBackupPlanRequest.google.longrunning.Operation"kÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“1*//v1/{name=projects/*/locations/*/backupPlans/*}á - CreateBackup..google.cloud.gkebackup.v1.CreateBackupRequest.google.longrunning.Operation"ÊA -BackupOperationMetadataÚAparent,backup,backup_id‚Óä“C"9/v1/{parent=projects/*/locations/*/backupPlans/*}/backups:backup¸ - ListBackups-.google.cloud.gkebackup.v1.ListBackupsRequest..google.cloud.gkebackup.v1.ListBackupsResponse"JÚAparent‚Óä“;9/v1/{parent=projects/*/locations/*/backupPlans/*}/backups¥ - GetBackup+.google.cloud.gkebackup.v1.GetBackupRequest!.google.cloud.gkebackup.v1.Backup"HÚAname‚Óä“;9/v1/{name=projects/*/locations/*/backupPlans/*/backups/*}ã - UpdateBackup..google.cloud.gkebackup.v1.UpdateBackupRequest.google.longrunning.Operation"ƒÊA -BackupOperationMetadataÚAbackup,update_mask‚Óä“J2@/v1/{backup.name=projects/*/locations/*/backupPlans/*/backups/*}:backupÔ - DeleteBackup..google.cloud.gkebackup.v1.DeleteBackupRequest.google.longrunning.Operation"uÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“;*9/v1/{name=projects/*/locations/*/backupPlans/*/backups/*}Ú -ListVolumeBackups3.google.cloud.gkebackup.v1.ListVolumeBackupsRequest4.google.cloud.gkebackup.v1.ListVolumeBackupsResponse"ZÚAparent‚Óä“KI/v1/{parent=projects/*/locations/*/backupPlans/*/backups/*}/volumeBackupsÇ -GetVolumeBackup1.google.cloud.gkebackup.v1.GetVolumeBackupRequest\'.google.cloud.gkebackup.v1.VolumeBackup"XÚAname‚Óä“KI/v1/{name=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}ù -CreateRestorePlan3.google.cloud.gkebackup.v1.CreateRestorePlanRequest.google.longrunning.Operation"ÊA - RestorePlanOperationMetadataÚA#parent,restore_plan,restore_plan_id‚Óä“@"0/v1/{parent=projects/*/locations/*}/restorePlans: restore_plan¾ -ListRestorePlans2.google.cloud.gkebackup.v1.ListRestorePlansRequest3.google.cloud.gkebackup.v1.ListRestorePlansResponse"AÚAparent‚Óä“20/v1/{parent=projects/*/locations/*}/restorePlans« -GetRestorePlan0.google.cloud.gkebackup.v1.GetRestorePlanRequest&.google.cloud.gkebackup.v1.RestorePlan"?ÚAname‚Óä“20/v1/{name=projects/*/locations/*/restorePlans/*}û -UpdateRestorePlan3.google.cloud.gkebackup.v1.UpdateRestorePlanRequest.google.longrunning.Operation"‘ÊA - RestorePlanOperationMetadataÚArestore_plan,update_mask‚Óä“M2=/v1/{restore_plan.name=projects/*/locations/*/restorePlans/*}: restore_planÕ -DeleteRestorePlan3.google.cloud.gkebackup.v1.DeleteRestorePlanRequest.google.longrunning.Operation"lÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“2*0/v1/{name=projects/*/locations/*/restorePlans/*}é - CreateRestore/.google.cloud.gkebackup.v1.CreateRestoreRequest.google.longrunning.Operation"‡ÊA -RestoreOperationMetadataÚAparent,restore,restore_id‚Óä“F";/v1/{parent=projects/*/locations/*/restorePlans/*}/restores:restore½ - ListRestores..google.cloud.gkebackup.v1.ListRestoresRequest/.google.cloud.gkebackup.v1.ListRestoresResponse"LÚAparent‚Óä“=;/v1/{parent=projects/*/locations/*/restorePlans/*}/restoresª - -GetRestore,.google.cloud.gkebackup.v1.GetRestoreRequest".google.cloud.gkebackup.v1.Restore"JÚAname‚Óä“=;/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}ë - UpdateRestore/.google.cloud.gkebackup.v1.UpdateRestoreRequest.google.longrunning.Operation"‰ÊA -RestoreOperationMetadataÚArestore,update_mask‚Óä“N2C/v1/{restore.name=projects/*/locations/*/restorePlans/*/restores/*}:restoreØ - DeleteRestore/.google.cloud.gkebackup.v1.DeleteRestoreRequest.google.longrunning.Operation"wÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“=*;/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}à -ListVolumeRestores4.google.cloud.gkebackup.v1.ListVolumeRestoresRequest5.google.cloud.gkebackup.v1.ListVolumeRestoresResponse"]ÚAparent‚Óä“NL/v1/{parent=projects/*/locations/*/restorePlans/*/restores/*}/volumeRestoresÍ -GetVolumeRestore2.google.cloud.gkebackup.v1.GetVolumeRestoreRequest(.google.cloud.gkebackup.v1.VolumeRestore"[ÚAname‚Óä“NL/v1/{name=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}þ -GetBackupIndexDownloadUrl;.google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlRequest<.google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlResponse"fÚAbackup‚Óä“WU/v1/{backup=projects/*/locations/*/backupPlans/*/backups/*}:getBackupIndexDownloadUrlLÊAgkebackup.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB¡ -com.google.cloud.gkebackup.v1BGKEBackupProtoPZ;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppbªGoogle.Cloud.GkeBackup.V1ÊGoogle\\Cloud\\GkeBackup\\V1êGoogle::Cloud::GkeBackup::V1êA^ - container.googleapis.com/Cluster:projects/{project}/locations/{location}/clusters/{cluster}êAx -!cloudkms.googleapis.com/CryptoKeySprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Restore.php b/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Restore.php deleted file mode 100644 index 4db46a950b0d..000000000000 Binary files a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Restore.php and /dev/null differ diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/RestorePlan.php b/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/RestorePlan.php deleted file mode 100644 index 6b207b777950..000000000000 Binary files a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/RestorePlan.php and /dev/null differ diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Volume.php b/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Volume.php deleted file mode 100644 index d1f6ce1a5d21..000000000000 Binary files a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Volume.php and /dev/null differ diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup.php deleted file mode 100644 index ded60b0f4465..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup.php +++ /dev/null @@ -1,1270 +0,0 @@ -google.cloud.gkebackup.v1.Backup - */ -class Backup extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The fully qualified name of the Backup. - * `projects/*/locations/*/backupPlans/*/backups/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Server generated global unique identifier of - * [UUID4](https://en.wikipedia.org/wiki/Universally_unique_identifier) - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The timestamp when this Backup resource 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 timestamp when this Backup resource was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. This flag indicates whether this Backup resource was created - * manually by a user or via a schedule in the BackupPlan. A value of True - * means that the Backup was created manually. - * - * Generated from protobuf field bool manual = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $manual = false; - /** - * Optional. A set of custom labels supplied by user. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Minimum age for this Backup (in days). If this field is set to a - * non-zero value, the Backup will be "locked" against deletion (either manual - * or automatic deletion) for the number of days provided (measured from the - * creation time of the Backup). MUST be an integer value between 0-90 - * (inclusive). - * Defaults to parent BackupPlan's - * [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days] - * setting and may only be increased - * (either at creation time or in a subsequent update). - * - * Generated from protobuf field int32 delete_lock_days = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $delete_lock_days = 0; - /** - * Output only. The time at which an existing delete lock will expire for this - * backup (calculated from create_time + - * [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days]). - * - * Generated from protobuf field .google.protobuf.Timestamp delete_lock_expire_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_lock_expire_time = null; - /** - * Optional. The age (in days) after which this Backup will be automatically - * deleted. Must be an integer value >= 0: - * - If 0, no automatic deletion will occur for this Backup. - * - If not 0, this must be >= - * [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days] and - * <= 365. - * Once a Backup is created, this value may only be increased. - * Defaults to the parent BackupPlan's - * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] - * value. - * - * Generated from protobuf field int32 retain_days = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $retain_days = 0; - /** - * Output only. The time at which this Backup will be automatically deleted - * (calculated from create_time + - * [retain_days][google.cloud.gkebackup.v1.Backup.retain_days]). - * - * Generated from protobuf field .google.protobuf.Timestamp retain_expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $retain_expire_time = null; - /** - * Output only. The customer managed encryption key that was used to encrypt - * the Backup's artifacts. Inherited from the parent BackupPlan's - * [encryption_key][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.encryption_key] - * value. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $encryption_key = null; - /** - * Output only. Whether or not the Backup contains volume data. Controlled by - * the parent BackupPlan's - * [include_volume_data][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_volume_data] - * value. - * - * Generated from protobuf field bool contains_volume_data = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $contains_volume_data = false; - /** - * Output only. Whether or not the Backup contains Kubernetes Secrets. - * Controlled by the parent BackupPlan's - * [include_secrets][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_secrets] - * value. - * - * Generated from protobuf field bool contains_secrets = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $contains_secrets = false; - /** - * Output only. Information about the GKE cluster from which this Backup was - * created. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup.ClusterMetadata cluster_metadata = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster_metadata = null; - /** - * Output only. Current state of the Backup - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup.State state = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Human-readable description of why the backup is in the current - * `state`. - * - * Generated from protobuf field string state_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_reason = ''; - /** - * Output only. Completion time of the Backup - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $complete_time = null; - /** - * Output only. The total number of Kubernetes resources included in the - * Backup. - * - * Generated from protobuf field int32 resource_count = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $resource_count = 0; - /** - * Output only. The total number of volume backups contained in the Backup. - * - * Generated from protobuf field int32 volume_count = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $volume_count = 0; - /** - * Output only. The total size of the Backup in bytes = config backup size + - * sum(volume backup sizes) - * - * Generated from protobuf field int64 size_bytes = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $size_bytes = 0; - /** - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a backup from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform backup updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetBackup`, - * and systems are expected to put that etag in the request to - * `UpdateBackup` or `DeleteBackup` to ensure that their change will be - * applied to the same version of the resource. - * - * Generated from protobuf field string etag = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $etag = ''; - /** - * Optional. User specified descriptive string for this Backup. - * - * Generated from protobuf field string description = 25 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. The total number of Kubernetes Pods contained in the Backup. - * - * Generated from protobuf field int32 pod_count = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $pod_count = 0; - /** - * Output only. The size of the config backup in bytes. - * - * Generated from protobuf field int64 config_backup_size_bytes = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $config_backup_size_bytes = 0; - /** - * Output only. If false, Backup will fail when Backup for GKE detects - * Kubernetes configuration that is non-standard or - * requires additional setup to restore. - * Inherited from the parent BackupPlan's - * [permissive_mode][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.permissive_mode] - * value. - * - * Generated from protobuf field bool permissive_mode = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $permissive_mode = false; - protected $backup_scope; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The fully qualified name of the Backup. - * `projects/*/locations/*/backupPlans/*/backups/*` - * @type string $uid - * Output only. Server generated global unique identifier of - * [UUID4](https://en.wikipedia.org/wiki/Universally_unique_identifier) - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when this Backup resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when this Backup resource was last updated. - * @type bool $manual - * Output only. This flag indicates whether this Backup resource was created - * manually by a user or via a schedule in the BackupPlan. A value of True - * means that the Backup was created manually. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. A set of custom labels supplied by user. - * @type int $delete_lock_days - * Optional. Minimum age for this Backup (in days). If this field is set to a - * non-zero value, the Backup will be "locked" against deletion (either manual - * or automatic deletion) for the number of days provided (measured from the - * creation time of the Backup). MUST be an integer value between 0-90 - * (inclusive). - * Defaults to parent BackupPlan's - * [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days] - * setting and may only be increased - * (either at creation time or in a subsequent update). - * @type \Google\Protobuf\Timestamp $delete_lock_expire_time - * Output only. The time at which an existing delete lock will expire for this - * backup (calculated from create_time + - * [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days]). - * @type int $retain_days - * Optional. The age (in days) after which this Backup will be automatically - * deleted. Must be an integer value >= 0: - * - If 0, no automatic deletion will occur for this Backup. - * - If not 0, this must be >= - * [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days] and - * <= 365. - * Once a Backup is created, this value may only be increased. - * Defaults to the parent BackupPlan's - * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] - * value. - * @type \Google\Protobuf\Timestamp $retain_expire_time - * Output only. The time at which this Backup will be automatically deleted - * (calculated from create_time + - * [retain_days][google.cloud.gkebackup.v1.Backup.retain_days]). - * @type \Google\Cloud\GkeBackup\V1\EncryptionKey $encryption_key - * Output only. The customer managed encryption key that was used to encrypt - * the Backup's artifacts. Inherited from the parent BackupPlan's - * [encryption_key][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.encryption_key] - * value. - * @type bool $all_namespaces - * Output only. If True, all namespaces were included in the Backup. - * @type \Google\Cloud\GkeBackup\V1\Namespaces $selected_namespaces - * Output only. If set, the list of namespaces that were included in the - * Backup. - * @type \Google\Cloud\GkeBackup\V1\NamespacedNames $selected_applications - * Output only. If set, the list of ProtectedApplications whose resources - * were included in the Backup. - * @type bool $contains_volume_data - * Output only. Whether or not the Backup contains volume data. Controlled by - * the parent BackupPlan's - * [include_volume_data][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_volume_data] - * value. - * @type bool $contains_secrets - * Output only. Whether or not the Backup contains Kubernetes Secrets. - * Controlled by the parent BackupPlan's - * [include_secrets][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_secrets] - * value. - * @type \Google\Cloud\GkeBackup\V1\Backup\ClusterMetadata $cluster_metadata - * Output only. Information about the GKE cluster from which this Backup was - * created. - * @type int $state - * Output only. Current state of the Backup - * @type string $state_reason - * Output only. Human-readable description of why the backup is in the current - * `state`. - * @type \Google\Protobuf\Timestamp $complete_time - * Output only. Completion time of the Backup - * @type int $resource_count - * Output only. The total number of Kubernetes resources included in the - * Backup. - * @type int $volume_count - * Output only. The total number of volume backups contained in the Backup. - * @type int|string $size_bytes - * Output only. The total size of the Backup in bytes = config backup size + - * sum(volume backup sizes) - * @type string $etag - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a backup from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform backup updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetBackup`, - * and systems are expected to put that etag in the request to - * `UpdateBackup` or `DeleteBackup` to ensure that their change will be - * applied to the same version of the resource. - * @type string $description - * Optional. User specified descriptive string for this Backup. - * @type int $pod_count - * Output only. The total number of Kubernetes Pods contained in the Backup. - * @type int|string $config_backup_size_bytes - * Output only. The size of the config backup in bytes. - * @type bool $permissive_mode - * Output only. If false, Backup will fail when Backup for GKE detects - * Kubernetes configuration that is non-standard or - * requires additional setup to restore. - * Inherited from the parent BackupPlan's - * [permissive_mode][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.permissive_mode] - * value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Backup::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The fully qualified name of the Backup. - * `projects/*/locations/*/backupPlans/*/backups/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The fully qualified name of the Backup. - * `projects/*/locations/*/backupPlans/*/backups/*` - * - * 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. Server generated global unique identifier of - * [UUID4](https://en.wikipedia.org/wiki/Universally_unique_identifier) - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Server generated global unique identifier of - * [UUID4](https://en.wikipedia.org/wiki/Universally_unique_identifier) - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The timestamp when this Backup resource 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 timestamp when this Backup resource 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 timestamp when this Backup resource was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when this Backup resource was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. This flag indicates whether this Backup resource was created - * manually by a user or via a schedule in the BackupPlan. A value of True - * means that the Backup was created manually. - * - * Generated from protobuf field bool manual = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getManual() - { - return $this->manual; - } - - /** - * Output only. This flag indicates whether this Backup resource was created - * manually by a user or via a schedule in the BackupPlan. A value of True - * means that the Backup was created manually. - * - * Generated from protobuf field bool manual = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setManual($var) - { - GPBUtil::checkBool($var); - $this->manual = $var; - - return $this; - } - - /** - * Optional. A set of custom labels supplied by user. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. A set of custom labels supplied by user. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @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; - } - - /** - * Optional. Minimum age for this Backup (in days). If this field is set to a - * non-zero value, the Backup will be "locked" against deletion (either manual - * or automatic deletion) for the number of days provided (measured from the - * creation time of the Backup). MUST be an integer value between 0-90 - * (inclusive). - * Defaults to parent BackupPlan's - * [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days] - * setting and may only be increased - * (either at creation time or in a subsequent update). - * - * Generated from protobuf field int32 delete_lock_days = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDeleteLockDays() - { - return $this->delete_lock_days; - } - - /** - * Optional. Minimum age for this Backup (in days). If this field is set to a - * non-zero value, the Backup will be "locked" against deletion (either manual - * or automatic deletion) for the number of days provided (measured from the - * creation time of the Backup). MUST be an integer value between 0-90 - * (inclusive). - * Defaults to parent BackupPlan's - * [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days] - * setting and may only be increased - * (either at creation time or in a subsequent update). - * - * Generated from protobuf field int32 delete_lock_days = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDeleteLockDays($var) - { - GPBUtil::checkInt32($var); - $this->delete_lock_days = $var; - - return $this; - } - - /** - * Output only. The time at which an existing delete lock will expire for this - * backup (calculated from create_time + - * [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days]). - * - * Generated from protobuf field .google.protobuf.Timestamp delete_lock_expire_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteLockExpireTime() - { - return $this->delete_lock_expire_time; - } - - public function hasDeleteLockExpireTime() - { - return isset($this->delete_lock_expire_time); - } - - public function clearDeleteLockExpireTime() - { - unset($this->delete_lock_expire_time); - } - - /** - * Output only. The time at which an existing delete lock will expire for this - * backup (calculated from create_time + - * [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days]). - * - * Generated from protobuf field .google.protobuf.Timestamp delete_lock_expire_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteLockExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_lock_expire_time = $var; - - return $this; - } - - /** - * Optional. The age (in days) after which this Backup will be automatically - * deleted. Must be an integer value >= 0: - * - If 0, no automatic deletion will occur for this Backup. - * - If not 0, this must be >= - * [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days] and - * <= 365. - * Once a Backup is created, this value may only be increased. - * Defaults to the parent BackupPlan's - * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] - * value. - * - * Generated from protobuf field int32 retain_days = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getRetainDays() - { - return $this->retain_days; - } - - /** - * Optional. The age (in days) after which this Backup will be automatically - * deleted. Must be an integer value >= 0: - * - If 0, no automatic deletion will occur for this Backup. - * - If not 0, this must be >= - * [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days] and - * <= 365. - * Once a Backup is created, this value may only be increased. - * Defaults to the parent BackupPlan's - * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] - * value. - * - * Generated from protobuf field int32 retain_days = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setRetainDays($var) - { - GPBUtil::checkInt32($var); - $this->retain_days = $var; - - return $this; - } - - /** - * Output only. The time at which this Backup will be automatically deleted - * (calculated from create_time + - * [retain_days][google.cloud.gkebackup.v1.Backup.retain_days]). - * - * Generated from protobuf field .google.protobuf.Timestamp retain_expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRetainExpireTime() - { - return $this->retain_expire_time; - } - - public function hasRetainExpireTime() - { - return isset($this->retain_expire_time); - } - - public function clearRetainExpireTime() - { - unset($this->retain_expire_time); - } - - /** - * Output only. The time at which this Backup will be automatically deleted - * (calculated from create_time + - * [retain_days][google.cloud.gkebackup.v1.Backup.retain_days]). - * - * Generated from protobuf field .google.protobuf.Timestamp retain_expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRetainExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->retain_expire_time = $var; - - return $this; - } - - /** - * Output only. The customer managed encryption key that was used to encrypt - * the Backup's artifacts. Inherited from the parent BackupPlan's - * [encryption_key][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.encryption_key] - * value. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeBackup\V1\EncryptionKey|null - */ - public function getEncryptionKey() - { - return $this->encryption_key; - } - - public function hasEncryptionKey() - { - return isset($this->encryption_key); - } - - public function clearEncryptionKey() - { - unset($this->encryption_key); - } - - /** - * Output only. The customer managed encryption key that was used to encrypt - * the Backup's artifacts. Inherited from the parent BackupPlan's - * [encryption_key][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.encryption_key] - * value. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeBackup\V1\EncryptionKey $var - * @return $this - */ - public function setEncryptionKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\EncryptionKey::class); - $this->encryption_key = $var; - - return $this; - } - - /** - * Output only. If True, all namespaces were included in the Backup. - * - * Generated from protobuf field bool all_namespaces = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getAllNamespaces() - { - return $this->readOneof(12); - } - - public function hasAllNamespaces() - { - return $this->hasOneof(12); - } - - /** - * Output only. If True, all namespaces were included in the Backup. - * - * Generated from protobuf field bool all_namespaces = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setAllNamespaces($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Output only. If set, the list of namespaces that were included in the - * Backup. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeBackup\V1\Namespaces|null - */ - public function getSelectedNamespaces() - { - return $this->readOneof(13); - } - - public function hasSelectedNamespaces() - { - return $this->hasOneof(13); - } - - /** - * Output only. If set, the list of namespaces that were included in the - * Backup. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeBackup\V1\Namespaces $var - * @return $this - */ - public function setSelectedNamespaces($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Namespaces::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * Output only. If set, the list of ProtectedApplications whose resources - * were included in the Backup. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeBackup\V1\NamespacedNames|null - */ - public function getSelectedApplications() - { - return $this->readOneof(14); - } - - public function hasSelectedApplications() - { - return $this->hasOneof(14); - } - - /** - * Output only. If set, the list of ProtectedApplications whose resources - * were included in the Backup. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeBackup\V1\NamespacedNames $var - * @return $this - */ - public function setSelectedApplications($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\NamespacedNames::class); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * Output only. Whether or not the Backup contains volume data. Controlled by - * the parent BackupPlan's - * [include_volume_data][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_volume_data] - * value. - * - * Generated from protobuf field bool contains_volume_data = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getContainsVolumeData() - { - return $this->contains_volume_data; - } - - /** - * Output only. Whether or not the Backup contains volume data. Controlled by - * the parent BackupPlan's - * [include_volume_data][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_volume_data] - * value. - * - * Generated from protobuf field bool contains_volume_data = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setContainsVolumeData($var) - { - GPBUtil::checkBool($var); - $this->contains_volume_data = $var; - - return $this; - } - - /** - * Output only. Whether or not the Backup contains Kubernetes Secrets. - * Controlled by the parent BackupPlan's - * [include_secrets][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_secrets] - * value. - * - * Generated from protobuf field bool contains_secrets = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getContainsSecrets() - { - return $this->contains_secrets; - } - - /** - * Output only. Whether or not the Backup contains Kubernetes Secrets. - * Controlled by the parent BackupPlan's - * [include_secrets][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_secrets] - * value. - * - * Generated from protobuf field bool contains_secrets = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setContainsSecrets($var) - { - GPBUtil::checkBool($var); - $this->contains_secrets = $var; - - return $this; - } - - /** - * Output only. Information about the GKE cluster from which this Backup was - * created. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup.ClusterMetadata cluster_metadata = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeBackup\V1\Backup\ClusterMetadata|null - */ - public function getClusterMetadata() - { - return $this->cluster_metadata; - } - - public function hasClusterMetadata() - { - return isset($this->cluster_metadata); - } - - public function clearClusterMetadata() - { - unset($this->cluster_metadata); - } - - /** - * Output only. Information about the GKE cluster from which this Backup was - * created. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup.ClusterMetadata cluster_metadata = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeBackup\V1\Backup\ClusterMetadata $var - * @return $this - */ - public function setClusterMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Backup\ClusterMetadata::class); - $this->cluster_metadata = $var; - - return $this; - } - - /** - * Output only. Current state of the Backup - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup.State state = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the Backup - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup.State state = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\Backup\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Human-readable description of why the backup is in the current - * `state`. - * - * Generated from protobuf field string state_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateReason() - { - return $this->state_reason; - } - - /** - * Output only. Human-readable description of why the backup is in the current - * `state`. - * - * Generated from protobuf field string state_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateReason($var) - { - GPBUtil::checkString($var, True); - $this->state_reason = $var; - - return $this; - } - - /** - * Output only. Completion time of the Backup - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCompleteTime() - { - return $this->complete_time; - } - - public function hasCompleteTime() - { - return isset($this->complete_time); - } - - public function clearCompleteTime() - { - unset($this->complete_time); - } - - /** - * Output only. Completion time of the Backup - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCompleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->complete_time = $var; - - return $this; - } - - /** - * Output only. The total number of Kubernetes resources included in the - * Backup. - * - * Generated from protobuf field int32 resource_count = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getResourceCount() - { - return $this->resource_count; - } - - /** - * Output only. The total number of Kubernetes resources included in the - * Backup. - * - * Generated from protobuf field int32 resource_count = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setResourceCount($var) - { - GPBUtil::checkInt32($var); - $this->resource_count = $var; - - return $this; - } - - /** - * Output only. The total number of volume backups contained in the Backup. - * - * Generated from protobuf field int32 volume_count = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getVolumeCount() - { - return $this->volume_count; - } - - /** - * Output only. The total number of volume backups contained in the Backup. - * - * Generated from protobuf field int32 volume_count = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setVolumeCount($var) - { - GPBUtil::checkInt32($var); - $this->volume_count = $var; - - return $this; - } - - /** - * Output only. The total size of the Backup in bytes = config backup size + - * sum(volume backup sizes) - * - * Generated from protobuf field int64 size_bytes = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getSizeBytes() - { - return $this->size_bytes; - } - - /** - * Output only. The total size of the Backup in bytes = config backup size + - * sum(volume backup sizes) - * - * Generated from protobuf field int64 size_bytes = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->size_bytes = $var; - - return $this; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a backup from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform backup updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetBackup`, - * and systems are expected to put that etag in the request to - * `UpdateBackup` or `DeleteBackup` to ensure that their change will be - * applied to the same version of the resource. - * - * Generated from protobuf field string etag = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a backup from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform backup updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetBackup`, - * and systems are expected to put that etag in the request to - * `UpdateBackup` or `DeleteBackup` to ensure that their change will be - * applied to the same version of the resource. - * - * Generated from protobuf field string etag = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. User specified descriptive string for this Backup. - * - * Generated from protobuf field string description = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. User specified descriptive string for this Backup. - * - * Generated from protobuf field string description = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The total number of Kubernetes Pods contained in the Backup. - * - * Generated from protobuf field int32 pod_count = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getPodCount() - { - return $this->pod_count; - } - - /** - * Output only. The total number of Kubernetes Pods contained in the Backup. - * - * Generated from protobuf field int32 pod_count = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setPodCount($var) - { - GPBUtil::checkInt32($var); - $this->pod_count = $var; - - return $this; - } - - /** - * Output only. The size of the config backup in bytes. - * - * Generated from protobuf field int64 config_backup_size_bytes = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getConfigBackupSizeBytes() - { - return $this->config_backup_size_bytes; - } - - /** - * Output only. The size of the config backup in bytes. - * - * Generated from protobuf field int64 config_backup_size_bytes = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setConfigBackupSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->config_backup_size_bytes = $var; - - return $this; - } - - /** - * Output only. If false, Backup will fail when Backup for GKE detects - * Kubernetes configuration that is non-standard or - * requires additional setup to restore. - * Inherited from the parent BackupPlan's - * [permissive_mode][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.permissive_mode] - * value. - * - * Generated from protobuf field bool permissive_mode = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getPermissiveMode() - { - return $this->permissive_mode; - } - - /** - * Output only. If false, Backup will fail when Backup for GKE detects - * Kubernetes configuration that is non-standard or - * requires additional setup to restore. - * Inherited from the parent BackupPlan's - * [permissive_mode][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.permissive_mode] - * value. - * - * Generated from protobuf field bool permissive_mode = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setPermissiveMode($var) - { - GPBUtil::checkBool($var); - $this->permissive_mode = $var; - - return $this; - } - - /** - * @return string - */ - public function getBackupScope() - { - return $this->whichOneof("backup_scope"); - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup/ClusterMetadata.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup/ClusterMetadata.php deleted file mode 100644 index 677ae8b2612b..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup/ClusterMetadata.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.gkebackup.v1.Backup.ClusterMetadata - */ -class ClusterMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The source cluster from which this Backup was created. - * Valid formats: - * - `projects/*/locations/*/clusters/*` - * - `projects/*/zones/*/clusters/*` - * This is inherited from the parent BackupPlan's - * [cluster][google.cloud.gkebackup.v1.BackupPlan.cluster] field. - * - * Generated from protobuf field string cluster = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster = ''; - /** - * Output only. The Kubernetes server version of the source cluster. - * - * Generated from protobuf field string k8s_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $k8s_version = ''; - /** - * Output only. A list of the Backup for GKE CRD versions found in the - * cluster. - * - * Generated from protobuf field map backup_crd_versions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $backup_crd_versions; - protected $platform_version; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cluster - * Output only. The source cluster from which this Backup was created. - * Valid formats: - * - `projects/*/locations/*/clusters/*` - * - `projects/*/zones/*/clusters/*` - * This is inherited from the parent BackupPlan's - * [cluster][google.cloud.gkebackup.v1.BackupPlan.cluster] field. - * @type string $k8s_version - * Output only. The Kubernetes server version of the source cluster. - * @type array|\Google\Protobuf\Internal\MapField $backup_crd_versions - * Output only. A list of the Backup for GKE CRD versions found in the - * cluster. - * @type string $gke_version - * Output only. GKE version - * @type string $anthos_version - * Output only. Anthos version - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Backup::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The source cluster from which this Backup was created. - * Valid formats: - * - `projects/*/locations/*/clusters/*` - * - `projects/*/zones/*/clusters/*` - * This is inherited from the parent BackupPlan's - * [cluster][google.cloud.gkebackup.v1.BackupPlan.cluster] field. - * - * Generated from protobuf field string cluster = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * Output only. The source cluster from which this Backup was created. - * Valid formats: - * - `projects/*/locations/*/clusters/*` - * - `projects/*/zones/*/clusters/*` - * This is inherited from the parent BackupPlan's - * [cluster][google.cloud.gkebackup.v1.BackupPlan.cluster] field. - * - * Generated from protobuf field string cluster = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkString($var, True); - $this->cluster = $var; - - return $this; - } - - /** - * Output only. The Kubernetes server version of the source cluster. - * - * Generated from protobuf field string k8s_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getK8SVersion() - { - return $this->k8s_version; - } - - /** - * Output only. The Kubernetes server version of the source cluster. - * - * Generated from protobuf field string k8s_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setK8SVersion($var) - { - GPBUtil::checkString($var, True); - $this->k8s_version = $var; - - return $this; - } - - /** - * Output only. A list of the Backup for GKE CRD versions found in the - * cluster. - * - * Generated from protobuf field map backup_crd_versions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getBackupCrdVersions() - { - return $this->backup_crd_versions; - } - - /** - * Output only. A list of the Backup for GKE CRD versions found in the - * cluster. - * - * Generated from protobuf field map backup_crd_versions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setBackupCrdVersions($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->backup_crd_versions = $arr; - - return $this; - } - - /** - * Output only. GKE version - * - * Generated from protobuf field string gke_version = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getGkeVersion() - { - return $this->readOneof(4); - } - - public function hasGkeVersion() - { - return $this->hasOneof(4); - } - - /** - * Output only. GKE version - * - * Generated from protobuf field string gke_version = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setGkeVersion($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Output only. Anthos version - * - * Generated from protobuf field string anthos_version = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAnthosVersion() - { - return $this->readOneof(5); - } - - public function hasAnthosVersion() - { - return $this->hasOneof(5); - } - - /** - * Output only. Anthos version - * - * Generated from protobuf field string anthos_version = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAnthosVersion($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getPlatformVersion() - { - return $this->whichOneof("platform_version"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ClusterMetadata::class, \Google\Cloud\GkeBackup\V1\Backup_ClusterMetadata::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup/State.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup/State.php deleted file mode 100644 index d3f3a57ba825..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup/State.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.gkebackup.v1.Backup.State - */ -class State -{ - /** - * The Backup resource is in the process of being created. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The Backup resource has been created and the associated BackupJob - * Kubernetes resource has been injected into the source cluster. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The gkebackup agent in the cluster has begun executing the backup - * operation. - * - * Generated from protobuf enum IN_PROGRESS = 2; - */ - const IN_PROGRESS = 2; - /** - * The backup operation has completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 3; - */ - const SUCCEEDED = 3; - /** - * The backup operation has failed. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - /** - * This Backup resource (and its associated artifacts) is in the process - * of being deleted. - * - * Generated from protobuf enum DELETING = 5; - */ - const DELETING = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::IN_PROGRESS => 'IN_PROGRESS', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::DELETING => 'DELETING', - ]; - - 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\GkeBackup\V1\Backup_State::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan.php deleted file mode 100644 index d393c29eb016..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan.php +++ /dev/null @@ -1,773 +0,0 @@ -google.cloud.gkebackup.v1.BackupPlan - */ -class BackupPlan extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The full name of the BackupPlan resource. - * Format: `projects/*/locations/*/backupPlans/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The timestamp when this BackupPlan resource 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 timestamp when this BackupPlan resource was last - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. User specified descriptive string for this BackupPlan. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Required. Immutable. The source cluster from which Backups will be created - * via this BackupPlan. Valid formats: - * - `projects/*/locations/*/clusters/*` - * - `projects/*/zones/*/clusters/*` - * - * Generated from protobuf field string cluster = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $cluster = ''; - /** - * Optional. RetentionPolicy governs lifecycle of Backups created under this - * plan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy retention_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $retention_policy = null; - /** - * Optional. A set of custom labels supplied by user. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Defines a schedule for automatic Backup creation via this - * BackupPlan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.Schedule backup_schedule = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $backup_schedule = null; - /** - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a backup plan from overwriting each - * other. It is strongly suggested that systems make use of the 'etag' in the - * read-modify-write cycle to perform BackupPlan updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetBackupPlan`, - * and systems are expected to put that etag in the request to - * `UpdateBackupPlan` or `DeleteBackupPlan` to ensure that their change - * will be applied to the same version of the resource. - * - * Generated from protobuf field string etag = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $etag = ''; - /** - * Optional. This flag indicates whether this BackupPlan has been deactivated. - * Setting this field to True locks the BackupPlan such that no further - * updates will be allowed (except deletes), including the deactivated field - * itself. It also prevents any new Backups from being created via this - * BackupPlan (including scheduled Backups). - * Default: False - * - * Generated from protobuf field bool deactivated = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $deactivated = false; - /** - * Optional. Defines the configuration of Backups created via this BackupPlan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.BackupConfig backup_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $backup_config = null; - /** - * Output only. The number of Kubernetes Pods backed up in the - * last successful Backup created via this BackupPlan. - * - * Generated from protobuf field int32 protected_pod_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $protected_pod_count = 0; - /** - * Output only. State of the BackupPlan. This State field reflects the - * various stages a BackupPlan can be in - * during the Create operation. It will be set to "DEACTIVATED" - * if the BackupPlan is deactivated on an Update - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.State state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Human-readable description of why BackupPlan is in the current - * `state` - * - * Generated from protobuf field string state_reason = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_reason = ''; - /** - * Output only. A number that represents the current risk level of this - * BackupPlan from RPO perspective with 1 being no risk and 5 being highest - * risk. - * - * Generated from protobuf field int32 rpo_risk_level = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $rpo_risk_level = 0; - /** - * Output only. Human-readable description of why the BackupPlan is in the - * current rpo_risk_level and action items if any. - * - * Generated from protobuf field string rpo_risk_reason = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $rpo_risk_reason = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The full name of the BackupPlan resource. - * Format: `projects/*/locations/*/backupPlans/*` - * @type string $uid - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when this BackupPlan resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when this BackupPlan resource was last - * updated. - * @type string $description - * Optional. User specified descriptive string for this BackupPlan. - * @type string $cluster - * Required. Immutable. The source cluster from which Backups will be created - * via this BackupPlan. Valid formats: - * - `projects/*/locations/*/clusters/*` - * - `projects/*/zones/*/clusters/*` - * @type \Google\Cloud\GkeBackup\V1\BackupPlan\RetentionPolicy $retention_policy - * Optional. RetentionPolicy governs lifecycle of Backups created under this - * plan. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. A set of custom labels supplied by user. - * @type \Google\Cloud\GkeBackup\V1\BackupPlan\Schedule $backup_schedule - * Optional. Defines a schedule for automatic Backup creation via this - * BackupPlan. - * @type string $etag - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a backup plan from overwriting each - * other. It is strongly suggested that systems make use of the 'etag' in the - * read-modify-write cycle to perform BackupPlan updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetBackupPlan`, - * and systems are expected to put that etag in the request to - * `UpdateBackupPlan` or `DeleteBackupPlan` to ensure that their change - * will be applied to the same version of the resource. - * @type bool $deactivated - * Optional. This flag indicates whether this BackupPlan has been deactivated. - * Setting this field to True locks the BackupPlan such that no further - * updates will be allowed (except deletes), including the deactivated field - * itself. It also prevents any new Backups from being created via this - * BackupPlan (including scheduled Backups). - * Default: False - * @type \Google\Cloud\GkeBackup\V1\BackupPlan\BackupConfig $backup_config - * Optional. Defines the configuration of Backups created via this BackupPlan. - * @type int $protected_pod_count - * Output only. The number of Kubernetes Pods backed up in the - * last successful Backup created via this BackupPlan. - * @type int $state - * Output only. State of the BackupPlan. This State field reflects the - * various stages a BackupPlan can be in - * during the Create operation. It will be set to "DEACTIVATED" - * if the BackupPlan is deactivated on an Update - * @type string $state_reason - * Output only. Human-readable description of why BackupPlan is in the current - * `state` - * @type int $rpo_risk_level - * Output only. A number that represents the current risk level of this - * BackupPlan from RPO perspective with 1 being no risk and 5 being highest - * risk. - * @type string $rpo_risk_reason - * Output only. Human-readable description of why the BackupPlan is in the - * current rpo_risk_level and action items if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\BackupPlan::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The full name of the BackupPlan resource. - * Format: `projects/*/locations/*/backupPlans/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The full name of the BackupPlan resource. - * Format: `projects/*/locations/*/backupPlans/*` - * - * 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. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The timestamp when this BackupPlan resource 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 timestamp when this BackupPlan resource 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 timestamp when this BackupPlan resource was last - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when this BackupPlan resource was last - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. User specified descriptive string for this BackupPlan. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. User specified descriptive string for this BackupPlan. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. Immutable. The source cluster from which Backups will be created - * via this BackupPlan. Valid formats: - * - `projects/*/locations/*/clusters/*` - * - `projects/*/zones/*/clusters/*` - * - * Generated from protobuf field string cluster = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * Required. Immutable. The source cluster from which Backups will be created - * via this BackupPlan. Valid formats: - * - `projects/*/locations/*/clusters/*` - * - `projects/*/zones/*/clusters/*` - * - * Generated from protobuf field string cluster = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkString($var, True); - $this->cluster = $var; - - return $this; - } - - /** - * Optional. RetentionPolicy governs lifecycle of Backups created under this - * plan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy retention_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeBackup\V1\BackupPlan\RetentionPolicy|null - */ - public function getRetentionPolicy() - { - return $this->retention_policy; - } - - public function hasRetentionPolicy() - { - return isset($this->retention_policy); - } - - public function clearRetentionPolicy() - { - unset($this->retention_policy); - } - - /** - * Optional. RetentionPolicy governs lifecycle of Backups created under this - * plan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy retention_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeBackup\V1\BackupPlan\RetentionPolicy $var - * @return $this - */ - public function setRetentionPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\BackupPlan\RetentionPolicy::class); - $this->retention_policy = $var; - - return $this; - } - - /** - * Optional. A set of custom labels supplied by user. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. A set of custom labels supplied by user. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @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; - } - - /** - * Optional. Defines a schedule for automatic Backup creation via this - * BackupPlan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.Schedule backup_schedule = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeBackup\V1\BackupPlan\Schedule|null - */ - public function getBackupSchedule() - { - return $this->backup_schedule; - } - - public function hasBackupSchedule() - { - return isset($this->backup_schedule); - } - - public function clearBackupSchedule() - { - unset($this->backup_schedule); - } - - /** - * Optional. Defines a schedule for automatic Backup creation via this - * BackupPlan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.Schedule backup_schedule = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeBackup\V1\BackupPlan\Schedule $var - * @return $this - */ - public function setBackupSchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\BackupPlan\Schedule::class); - $this->backup_schedule = $var; - - return $this; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a backup plan from overwriting each - * other. It is strongly suggested that systems make use of the 'etag' in the - * read-modify-write cycle to perform BackupPlan updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetBackupPlan`, - * and systems are expected to put that etag in the request to - * `UpdateBackupPlan` or `DeleteBackupPlan` to ensure that their change - * will be applied to the same version of the resource. - * - * Generated from protobuf field string etag = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a backup plan from overwriting each - * other. It is strongly suggested that systems make use of the 'etag' in the - * read-modify-write cycle to perform BackupPlan updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetBackupPlan`, - * and systems are expected to put that etag in the request to - * `UpdateBackupPlan` or `DeleteBackupPlan` to ensure that their change - * will be applied to the same version of the resource. - * - * Generated from protobuf field string etag = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. This flag indicates whether this BackupPlan has been deactivated. - * Setting this field to True locks the BackupPlan such that no further - * updates will be allowed (except deletes), including the deactivated field - * itself. It also prevents any new Backups from being created via this - * BackupPlan (including scheduled Backups). - * Default: False - * - * Generated from protobuf field bool deactivated = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDeactivated() - { - return $this->deactivated; - } - - /** - * Optional. This flag indicates whether this BackupPlan has been deactivated. - * Setting this field to True locks the BackupPlan such that no further - * updates will be allowed (except deletes), including the deactivated field - * itself. It also prevents any new Backups from being created via this - * BackupPlan (including scheduled Backups). - * Default: False - * - * Generated from protobuf field bool deactivated = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDeactivated($var) - { - GPBUtil::checkBool($var); - $this->deactivated = $var; - - return $this; - } - - /** - * Optional. Defines the configuration of Backups created via this BackupPlan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.BackupConfig backup_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeBackup\V1\BackupPlan\BackupConfig|null - */ - public function getBackupConfig() - { - return $this->backup_config; - } - - public function hasBackupConfig() - { - return isset($this->backup_config); - } - - public function clearBackupConfig() - { - unset($this->backup_config); - } - - /** - * Optional. Defines the configuration of Backups created via this BackupPlan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.BackupConfig backup_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeBackup\V1\BackupPlan\BackupConfig $var - * @return $this - */ - public function setBackupConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\BackupPlan\BackupConfig::class); - $this->backup_config = $var; - - return $this; - } - - /** - * Output only. The number of Kubernetes Pods backed up in the - * last successful Backup created via this BackupPlan. - * - * Generated from protobuf field int32 protected_pod_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getProtectedPodCount() - { - return $this->protected_pod_count; - } - - /** - * Output only. The number of Kubernetes Pods backed up in the - * last successful Backup created via this BackupPlan. - * - * Generated from protobuf field int32 protected_pod_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setProtectedPodCount($var) - { - GPBUtil::checkInt32($var); - $this->protected_pod_count = $var; - - return $this; - } - - /** - * Output only. State of the BackupPlan. This State field reflects the - * various stages a BackupPlan can be in - * during the Create operation. It will be set to "DEACTIVATED" - * if the BackupPlan is deactivated on an Update - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.State state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the BackupPlan. This State field reflects the - * various stages a BackupPlan can be in - * during the Create operation. It will be set to "DEACTIVATED" - * if the BackupPlan is deactivated on an Update - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.State state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\BackupPlan\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Human-readable description of why BackupPlan is in the current - * `state` - * - * Generated from protobuf field string state_reason = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateReason() - { - return $this->state_reason; - } - - /** - * Output only. Human-readable description of why BackupPlan is in the current - * `state` - * - * Generated from protobuf field string state_reason = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateReason($var) - { - GPBUtil::checkString($var, True); - $this->state_reason = $var; - - return $this; - } - - /** - * Output only. A number that represents the current risk level of this - * BackupPlan from RPO perspective with 1 being no risk and 5 being highest - * risk. - * - * Generated from protobuf field int32 rpo_risk_level = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getRpoRiskLevel() - { - return $this->rpo_risk_level; - } - - /** - * Output only. A number that represents the current risk level of this - * BackupPlan from RPO perspective with 1 being no risk and 5 being highest - * risk. - * - * Generated from protobuf field int32 rpo_risk_level = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setRpoRiskLevel($var) - { - GPBUtil::checkInt32($var); - $this->rpo_risk_level = $var; - - return $this; - } - - /** - * Output only. Human-readable description of why the BackupPlan is in the - * current rpo_risk_level and action items if any. - * - * Generated from protobuf field string rpo_risk_reason = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getRpoRiskReason() - { - return $this->rpo_risk_reason; - } - - /** - * Output only. Human-readable description of why the BackupPlan is in the - * current rpo_risk_level and action items if any. - * - * Generated from protobuf field string rpo_risk_reason = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setRpoRiskReason($var) - { - GPBUtil::checkString($var, True); - $this->rpo_risk_reason = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/BackupConfig.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/BackupConfig.php deleted file mode 100644 index 225bf80ba436..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/BackupConfig.php +++ /dev/null @@ -1,334 +0,0 @@ -google.cloud.gkebackup.v1.BackupPlan.BackupConfig - */ -class BackupConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. This flag specifies whether volume data should be backed up - * when PVCs are included in the scope of a Backup. - * Default: False - * - * Generated from protobuf field bool include_volume_data = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $include_volume_data = false; - /** - * Optional. This flag specifies whether Kubernetes Secret resources should - * be included when they fall into the scope of Backups. - * Default: False - * - * Generated from protobuf field bool include_secrets = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $include_secrets = false; - /** - * Optional. This defines a customer managed encryption key that will be - * used to encrypt the "config" portion (the Kubernetes resources) of - * Backups created via this plan. - * Default (empty): Config backup artifacts will not be encrypted. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encryption_key = null; - /** - * Optional. If false, Backups will fail when Backup for GKE detects - * Kubernetes configuration that is non-standard or - * requires additional setup to restore. - * Default: False - * - * Generated from protobuf field bool permissive_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $permissive_mode = false; - protected $backup_scope; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $all_namespaces - * If True, include all namespaced resources - * @type \Google\Cloud\GkeBackup\V1\Namespaces $selected_namespaces - * If set, include just the resources in the listed namespaces. - * @type \Google\Cloud\GkeBackup\V1\NamespacedNames $selected_applications - * If set, include just the resources referenced by the listed - * ProtectedApplications. - * @type bool $include_volume_data - * Optional. This flag specifies whether volume data should be backed up - * when PVCs are included in the scope of a Backup. - * Default: False - * @type bool $include_secrets - * Optional. This flag specifies whether Kubernetes Secret resources should - * be included when they fall into the scope of Backups. - * Default: False - * @type \Google\Cloud\GkeBackup\V1\EncryptionKey $encryption_key - * Optional. This defines a customer managed encryption key that will be - * used to encrypt the "config" portion (the Kubernetes resources) of - * Backups created via this plan. - * Default (empty): Config backup artifacts will not be encrypted. - * @type bool $permissive_mode - * Optional. If false, Backups will fail when Backup for GKE detects - * Kubernetes configuration that is non-standard or - * requires additional setup to restore. - * Default: False - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\BackupPlan::initOnce(); - parent::__construct($data); - } - - /** - * If True, include all namespaced resources - * - * Generated from protobuf field bool all_namespaces = 1; - * @return bool - */ - public function getAllNamespaces() - { - return $this->readOneof(1); - } - - public function hasAllNamespaces() - { - return $this->hasOneof(1); - } - - /** - * If True, include all namespaced resources - * - * Generated from protobuf field bool all_namespaces = 1; - * @param bool $var - * @return $this - */ - public function setAllNamespaces($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * If set, include just the resources in the listed namespaces. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 2; - * @return \Google\Cloud\GkeBackup\V1\Namespaces|null - */ - public function getSelectedNamespaces() - { - return $this->readOneof(2); - } - - public function hasSelectedNamespaces() - { - return $this->hasOneof(2); - } - - /** - * If set, include just the resources in the listed namespaces. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 2; - * @param \Google\Cloud\GkeBackup\V1\Namespaces $var - * @return $this - */ - public function setSelectedNamespaces($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Namespaces::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * If set, include just the resources referenced by the listed - * ProtectedApplications. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 3; - * @return \Google\Cloud\GkeBackup\V1\NamespacedNames|null - */ - public function getSelectedApplications() - { - return $this->readOneof(3); - } - - public function hasSelectedApplications() - { - return $this->hasOneof(3); - } - - /** - * If set, include just the resources referenced by the listed - * ProtectedApplications. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 3; - * @param \Google\Cloud\GkeBackup\V1\NamespacedNames $var - * @return $this - */ - public function setSelectedApplications($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\NamespacedNames::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Optional. This flag specifies whether volume data should be backed up - * when PVCs are included in the scope of a Backup. - * Default: False - * - * Generated from protobuf field bool include_volume_data = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIncludeVolumeData() - { - return $this->include_volume_data; - } - - /** - * Optional. This flag specifies whether volume data should be backed up - * when PVCs are included in the scope of a Backup. - * Default: False - * - * Generated from protobuf field bool include_volume_data = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIncludeVolumeData($var) - { - GPBUtil::checkBool($var); - $this->include_volume_data = $var; - - return $this; - } - - /** - * Optional. This flag specifies whether Kubernetes Secret resources should - * be included when they fall into the scope of Backups. - * Default: False - * - * Generated from protobuf field bool include_secrets = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIncludeSecrets() - { - return $this->include_secrets; - } - - /** - * Optional. This flag specifies whether Kubernetes Secret resources should - * be included when they fall into the scope of Backups. - * Default: False - * - * Generated from protobuf field bool include_secrets = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIncludeSecrets($var) - { - GPBUtil::checkBool($var); - $this->include_secrets = $var; - - return $this; - } - - /** - * Optional. This defines a customer managed encryption key that will be - * used to encrypt the "config" portion (the Kubernetes resources) of - * Backups created via this plan. - * Default (empty): Config backup artifacts will not be encrypted. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeBackup\V1\EncryptionKey|null - */ - public function getEncryptionKey() - { - return $this->encryption_key; - } - - public function hasEncryptionKey() - { - return isset($this->encryption_key); - } - - public function clearEncryptionKey() - { - unset($this->encryption_key); - } - - /** - * Optional. This defines a customer managed encryption key that will be - * used to encrypt the "config" portion (the Kubernetes resources) of - * Backups created via this plan. - * Default (empty): Config backup artifacts will not be encrypted. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeBackup\V1\EncryptionKey $var - * @return $this - */ - public function setEncryptionKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\EncryptionKey::class); - $this->encryption_key = $var; - - return $this; - } - - /** - * Optional. If false, Backups will fail when Backup for GKE detects - * Kubernetes configuration that is non-standard or - * requires additional setup to restore. - * Default: False - * - * Generated from protobuf field bool permissive_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getPermissiveMode() - { - return $this->permissive_mode; - } - - /** - * Optional. If false, Backups will fail when Backup for GKE detects - * Kubernetes configuration that is non-standard or - * requires additional setup to restore. - * Default: False - * - * Generated from protobuf field bool permissive_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setPermissiveMode($var) - { - GPBUtil::checkBool($var); - $this->permissive_mode = $var; - - return $this; - } - - /** - * @return string - */ - public function getBackupScope() - { - return $this->whichOneof("backup_scope"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BackupConfig::class, \Google\Cloud\GkeBackup\V1\BackupPlan_BackupConfig::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/RetentionPolicy.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/RetentionPolicy.php deleted file mode 100644 index 72bfebccc34e..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/RetentionPolicy.php +++ /dev/null @@ -1,246 +0,0 @@ -google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy - */ -class RetentionPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Minimum age for Backups created via this BackupPlan (in days). - * This field MUST be an integer value between 0-90 (inclusive). - * A Backup created under this BackupPlan will NOT be deletable until it - * reaches Backup's (create_time + backup_delete_lock_days). - * Updating this field of a BackupPlan does NOT affect existing Backups - * under it. Backups created AFTER a successful update will inherit - * the new value. - * Default: 0 (no delete blocking) - * - * Generated from protobuf field int32 backup_delete_lock_days = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $backup_delete_lock_days = 0; - /** - * Optional. The default maximum age of a Backup created via this - * BackupPlan. This field MUST be an integer value >= 0 and <= 365. If - * specified, a Backup created under this BackupPlan will be automatically - * deleted after its age reaches (create_time + backup_retain_days). If not - * specified, Backups created under this BackupPlan will NOT be subject to - * automatic deletion. Updating this field does NOT affect existing Backups - * under it. Backups created AFTER a successful update will automatically - * pick up the new value. NOTE: backup_retain_days must be >= - * [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days]. - * If - * [cron_schedule][google.cloud.gkebackup.v1.BackupPlan.Schedule.cron_schedule] - * is defined, then this must be - * <= 360 * the creation interval. If - * [rpo_config][google.cloud.gkebackup.v1.BackupPlan.Schedule.rpo_config] is - * defined, then this must be - * <= 360 * [target_rpo_minutes][Schedule.rpo_config.target_rpo_minutes] / - * (1440minutes/day). - * Default: 0 (no automatic deletion) - * - * Generated from protobuf field int32 backup_retain_days = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $backup_retain_days = 0; - /** - * Optional. This flag denotes whether the retention policy of this - * BackupPlan is locked. If set to True, no further update is allowed on - * this policy, including the `locked` field itself. - * Default: False - * - * Generated from protobuf field bool locked = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $locked = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $backup_delete_lock_days - * Optional. Minimum age for Backups created via this BackupPlan (in days). - * This field MUST be an integer value between 0-90 (inclusive). - * A Backup created under this BackupPlan will NOT be deletable until it - * reaches Backup's (create_time + backup_delete_lock_days). - * Updating this field of a BackupPlan does NOT affect existing Backups - * under it. Backups created AFTER a successful update will inherit - * the new value. - * Default: 0 (no delete blocking) - * @type int $backup_retain_days - * Optional. The default maximum age of a Backup created via this - * BackupPlan. This field MUST be an integer value >= 0 and <= 365. If - * specified, a Backup created under this BackupPlan will be automatically - * deleted after its age reaches (create_time + backup_retain_days). If not - * specified, Backups created under this BackupPlan will NOT be subject to - * automatic deletion. Updating this field does NOT affect existing Backups - * under it. Backups created AFTER a successful update will automatically - * pick up the new value. NOTE: backup_retain_days must be >= - * [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days]. - * If - * [cron_schedule][google.cloud.gkebackup.v1.BackupPlan.Schedule.cron_schedule] - * is defined, then this must be - * <= 360 * the creation interval. If - * [rpo_config][google.cloud.gkebackup.v1.BackupPlan.Schedule.rpo_config] is - * defined, then this must be - * <= 360 * [target_rpo_minutes][Schedule.rpo_config.target_rpo_minutes] / - * (1440minutes/day). - * Default: 0 (no automatic deletion) - * @type bool $locked - * Optional. This flag denotes whether the retention policy of this - * BackupPlan is locked. If set to True, no further update is allowed on - * this policy, including the `locked` field itself. - * Default: False - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\BackupPlan::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Minimum age for Backups created via this BackupPlan (in days). - * This field MUST be an integer value between 0-90 (inclusive). - * A Backup created under this BackupPlan will NOT be deletable until it - * reaches Backup's (create_time + backup_delete_lock_days). - * Updating this field of a BackupPlan does NOT affect existing Backups - * under it. Backups created AFTER a successful update will inherit - * the new value. - * Default: 0 (no delete blocking) - * - * Generated from protobuf field int32 backup_delete_lock_days = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getBackupDeleteLockDays() - { - return $this->backup_delete_lock_days; - } - - /** - * Optional. Minimum age for Backups created via this BackupPlan (in days). - * This field MUST be an integer value between 0-90 (inclusive). - * A Backup created under this BackupPlan will NOT be deletable until it - * reaches Backup's (create_time + backup_delete_lock_days). - * Updating this field of a BackupPlan does NOT affect existing Backups - * under it. Backups created AFTER a successful update will inherit - * the new value. - * Default: 0 (no delete blocking) - * - * Generated from protobuf field int32 backup_delete_lock_days = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setBackupDeleteLockDays($var) - { - GPBUtil::checkInt32($var); - $this->backup_delete_lock_days = $var; - - return $this; - } - - /** - * Optional. The default maximum age of a Backup created via this - * BackupPlan. This field MUST be an integer value >= 0 and <= 365. If - * specified, a Backup created under this BackupPlan will be automatically - * deleted after its age reaches (create_time + backup_retain_days). If not - * specified, Backups created under this BackupPlan will NOT be subject to - * automatic deletion. Updating this field does NOT affect existing Backups - * under it. Backups created AFTER a successful update will automatically - * pick up the new value. NOTE: backup_retain_days must be >= - * [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days]. - * If - * [cron_schedule][google.cloud.gkebackup.v1.BackupPlan.Schedule.cron_schedule] - * is defined, then this must be - * <= 360 * the creation interval. If - * [rpo_config][google.cloud.gkebackup.v1.BackupPlan.Schedule.rpo_config] is - * defined, then this must be - * <= 360 * [target_rpo_minutes][Schedule.rpo_config.target_rpo_minutes] / - * (1440minutes/day). - * Default: 0 (no automatic deletion) - * - * Generated from protobuf field int32 backup_retain_days = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getBackupRetainDays() - { - return $this->backup_retain_days; - } - - /** - * Optional. The default maximum age of a Backup created via this - * BackupPlan. This field MUST be an integer value >= 0 and <= 365. If - * specified, a Backup created under this BackupPlan will be automatically - * deleted after its age reaches (create_time + backup_retain_days). If not - * specified, Backups created under this BackupPlan will NOT be subject to - * automatic deletion. Updating this field does NOT affect existing Backups - * under it. Backups created AFTER a successful update will automatically - * pick up the new value. NOTE: backup_retain_days must be >= - * [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days]. - * If - * [cron_schedule][google.cloud.gkebackup.v1.BackupPlan.Schedule.cron_schedule] - * is defined, then this must be - * <= 360 * the creation interval. If - * [rpo_config][google.cloud.gkebackup.v1.BackupPlan.Schedule.rpo_config] is - * defined, then this must be - * <= 360 * [target_rpo_minutes][Schedule.rpo_config.target_rpo_minutes] / - * (1440minutes/day). - * Default: 0 (no automatic deletion) - * - * Generated from protobuf field int32 backup_retain_days = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setBackupRetainDays($var) - { - GPBUtil::checkInt32($var); - $this->backup_retain_days = $var; - - return $this; - } - - /** - * Optional. This flag denotes whether the retention policy of this - * BackupPlan is locked. If set to True, no further update is allowed on - * this policy, including the `locked` field itself. - * Default: False - * - * Generated from protobuf field bool locked = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getLocked() - { - return $this->locked; - } - - /** - * Optional. This flag denotes whether the retention policy of this - * BackupPlan is locked. If set to True, no further update is allowed on - * this policy, including the `locked` field itself. - * Default: False - * - * Generated from protobuf field bool locked = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setLocked($var) - { - GPBUtil::checkBool($var); - $this->locked = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RetentionPolicy::class, \Google\Cloud\GkeBackup\V1\BackupPlan_RetentionPolicy::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/Schedule.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/Schedule.php deleted file mode 100644 index 27ab971f885f..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/Schedule.php +++ /dev/null @@ -1,265 +0,0 @@ -google.cloud.gkebackup.v1.BackupPlan.Schedule - */ -class Schedule extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A standard [cron](https://wikipedia.com/wiki/cron) string that - * defines a repeating schedule for creating Backups via this BackupPlan. - * This is mutually exclusive with the - * [rpo_config][google.cloud.gkebackup.v1.BackupPlan.Schedule.rpo_config] - * field since at most one schedule can be defined for a BackupPlan. If this - * is defined, then - * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] - * must also be defined. - * Default (empty): no automatic backup creation will occur. - * - * Generated from protobuf field string cron_schedule = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cron_schedule = ''; - /** - * Optional. This flag denotes whether automatic Backup creation is paused - * for this BackupPlan. - * Default: False - * - * Generated from protobuf field bool paused = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $paused = false; - /** - * Optional. Defines the RPO schedule configuration for this BackupPlan. - * This is mutually exclusive with the - * [cron_schedule][google.cloud.gkebackup.v1.BackupPlan.Schedule.cron_schedule] - * field since at most one schedule can be defined for a BackupPLan. If this - * is defined, then - * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] - * must also be defined. - * Default (empty): no automatic backup creation will occur. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RpoConfig rpo_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $rpo_config = null; - /** - * Output only. Start time of next scheduled backup under this BackupPlan by - * either cron_schedule or rpo config. - * - * Generated from protobuf field .google.protobuf.Timestamp next_scheduled_backup_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_scheduled_backup_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cron_schedule - * Optional. A standard [cron](https://wikipedia.com/wiki/cron) string that - * defines a repeating schedule for creating Backups via this BackupPlan. - * This is mutually exclusive with the - * [rpo_config][google.cloud.gkebackup.v1.BackupPlan.Schedule.rpo_config] - * field since at most one schedule can be defined for a BackupPlan. If this - * is defined, then - * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] - * must also be defined. - * Default (empty): no automatic backup creation will occur. - * @type bool $paused - * Optional. This flag denotes whether automatic Backup creation is paused - * for this BackupPlan. - * Default: False - * @type \Google\Cloud\GkeBackup\V1\RpoConfig $rpo_config - * Optional. Defines the RPO schedule configuration for this BackupPlan. - * This is mutually exclusive with the - * [cron_schedule][google.cloud.gkebackup.v1.BackupPlan.Schedule.cron_schedule] - * field since at most one schedule can be defined for a BackupPLan. If this - * is defined, then - * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] - * must also be defined. - * Default (empty): no automatic backup creation will occur. - * @type \Google\Protobuf\Timestamp $next_scheduled_backup_time - * Output only. Start time of next scheduled backup under this BackupPlan by - * either cron_schedule or rpo config. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\BackupPlan::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A standard [cron](https://wikipedia.com/wiki/cron) string that - * defines a repeating schedule for creating Backups via this BackupPlan. - * This is mutually exclusive with the - * [rpo_config][google.cloud.gkebackup.v1.BackupPlan.Schedule.rpo_config] - * field since at most one schedule can be defined for a BackupPlan. If this - * is defined, then - * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] - * must also be defined. - * Default (empty): no automatic backup creation will occur. - * - * Generated from protobuf field string cron_schedule = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCronSchedule() - { - return $this->cron_schedule; - } - - /** - * Optional. A standard [cron](https://wikipedia.com/wiki/cron) string that - * defines a repeating schedule for creating Backups via this BackupPlan. - * This is mutually exclusive with the - * [rpo_config][google.cloud.gkebackup.v1.BackupPlan.Schedule.rpo_config] - * field since at most one schedule can be defined for a BackupPlan. If this - * is defined, then - * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] - * must also be defined. - * Default (empty): no automatic backup creation will occur. - * - * Generated from protobuf field string cron_schedule = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCronSchedule($var) - { - GPBUtil::checkString($var, True); - $this->cron_schedule = $var; - - return $this; - } - - /** - * Optional. This flag denotes whether automatic Backup creation is paused - * for this BackupPlan. - * Default: False - * - * Generated from protobuf field bool paused = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getPaused() - { - return $this->paused; - } - - /** - * Optional. This flag denotes whether automatic Backup creation is paused - * for this BackupPlan. - * Default: False - * - * Generated from protobuf field bool paused = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setPaused($var) - { - GPBUtil::checkBool($var); - $this->paused = $var; - - return $this; - } - - /** - * Optional. Defines the RPO schedule configuration for this BackupPlan. - * This is mutually exclusive with the - * [cron_schedule][google.cloud.gkebackup.v1.BackupPlan.Schedule.cron_schedule] - * field since at most one schedule can be defined for a BackupPLan. If this - * is defined, then - * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] - * must also be defined. - * Default (empty): no automatic backup creation will occur. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RpoConfig rpo_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeBackup\V1\RpoConfig|null - */ - public function getRpoConfig() - { - return $this->rpo_config; - } - - public function hasRpoConfig() - { - return isset($this->rpo_config); - } - - public function clearRpoConfig() - { - unset($this->rpo_config); - } - - /** - * Optional. Defines the RPO schedule configuration for this BackupPlan. - * This is mutually exclusive with the - * [cron_schedule][google.cloud.gkebackup.v1.BackupPlan.Schedule.cron_schedule] - * field since at most one schedule can be defined for a BackupPLan. If this - * is defined, then - * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] - * must also be defined. - * Default (empty): no automatic backup creation will occur. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RpoConfig rpo_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeBackup\V1\RpoConfig $var - * @return $this - */ - public function setRpoConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RpoConfig::class); - $this->rpo_config = $var; - - return $this; - } - - /** - * Output only. Start time of next scheduled backup under this BackupPlan by - * either cron_schedule or rpo config. - * - * Generated from protobuf field .google.protobuf.Timestamp next_scheduled_backup_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getNextScheduledBackupTime() - { - return $this->next_scheduled_backup_time; - } - - public function hasNextScheduledBackupTime() - { - return isset($this->next_scheduled_backup_time); - } - - public function clearNextScheduledBackupTime() - { - unset($this->next_scheduled_backup_time); - } - - /** - * Output only. Start time of next scheduled backup under this BackupPlan by - * either cron_schedule or rpo config. - * - * Generated from protobuf field .google.protobuf.Timestamp next_scheduled_backup_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setNextScheduledBackupTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->next_scheduled_backup_time = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Schedule::class, \Google\Cloud\GkeBackup\V1\BackupPlan_Schedule::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/State.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/State.php deleted file mode 100644 index 6798836e13e5..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/State.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.gkebackup.v1.BackupPlan.State - */ -class State -{ - /** - * Default first value for Enums. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Waiting for cluster state to be RUNNING. - * - * Generated from protobuf enum CLUSTER_PENDING = 1; - */ - const CLUSTER_PENDING = 1; - /** - * The BackupPlan is in the process of being created. - * - * Generated from protobuf enum PROVISIONING = 2; - */ - const PROVISIONING = 2; - /** - * The BackupPlan has successfully been created and is ready for Backups. - * - * Generated from protobuf enum READY = 3; - */ - const READY = 3; - /** - * BackupPlan creation has failed. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - /** - * The BackupPlan has been deactivated. - * - * Generated from protobuf enum DEACTIVATED = 5; - */ - const DEACTIVATED = 5; - /** - * The BackupPlan is in the process of being deleted. - * - * Generated from protobuf enum DELETING = 6; - */ - const DELETING = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CLUSTER_PENDING => 'CLUSTER_PENDING', - self::PROVISIONING => 'PROVISIONING', - self::READY => 'READY', - self::FAILED => 'FAILED', - self::DEACTIVATED => 'DEACTIVATED', - self::DELETING => 'DELETING', - ]; - - 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\GkeBackup\V1\BackupPlan_State::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateBackupPlanRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateBackupPlanRequest.php deleted file mode 100644 index f73b64d0fb0a..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateBackupPlanRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.gkebackup.v1.CreateBackupPlanRequest - */ -class CreateBackupPlanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location within which to create the BackupPlan. - * Format: `projects/*/locations/*` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The BackupPlan resource object to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan backup_plan = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_plan = null; - /** - * Required. The client-provided short name for the BackupPlan resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of BackupPlans in this location - * - * Generated from protobuf field string backup_plan_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_plan_id = ''; - - /** - * @param string $parent Required. The location within which to create the BackupPlan. - * Format: `projects/*/locations/*` - * Please see {@see BackupForGKEClient::locationName()} for help formatting this field. - * @param \Google\Cloud\GkeBackup\V1\BackupPlan $backupPlan Required. The BackupPlan resource object to create. - * @param string $backupPlanId Required. The client-provided short name for the BackupPlan resource. - * This name must: - * - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of BackupPlans in this location - * - * @return \Google\Cloud\GkeBackup\V1\CreateBackupPlanRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeBackup\V1\BackupPlan $backupPlan, string $backupPlanId): self - { - return (new self()) - ->setParent($parent) - ->setBackupPlan($backupPlan) - ->setBackupPlanId($backupPlanId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location within which to create the BackupPlan. - * Format: `projects/*/locations/*` - * @type \Google\Cloud\GkeBackup\V1\BackupPlan $backup_plan - * Required. The BackupPlan resource object to create. - * @type string $backup_plan_id - * Required. The client-provided short name for the BackupPlan resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of BackupPlans in this location - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location within which to create the BackupPlan. - * 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 location within which to create the BackupPlan. - * 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. The BackupPlan resource object to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan backup_plan = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeBackup\V1\BackupPlan|null - */ - public function getBackupPlan() - { - return $this->backup_plan; - } - - public function hasBackupPlan() - { - return isset($this->backup_plan); - } - - public function clearBackupPlan() - { - unset($this->backup_plan); - } - - /** - * Required. The BackupPlan resource object to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan backup_plan = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeBackup\V1\BackupPlan $var - * @return $this - */ - public function setBackupPlan($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\BackupPlan::class); - $this->backup_plan = $var; - - return $this; - } - - /** - * Required. The client-provided short name for the BackupPlan resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of BackupPlans in this location - * - * Generated from protobuf field string backup_plan_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBackupPlanId() - { - return $this->backup_plan_id; - } - - /** - * Required. The client-provided short name for the BackupPlan resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of BackupPlans in this location - * - * Generated from protobuf field string backup_plan_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBackupPlanId($var) - { - GPBUtil::checkString($var, True); - $this->backup_plan_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateBackupRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateBackupRequest.php deleted file mode 100644 index d0bb4a85440f..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateBackupRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.gkebackup.v1.CreateBackupRequest - */ -class CreateBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The BackupPlan within which to create the Backup. - * Format: `projects/*/locations/*/backupPlans/*` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The Backup resource to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $backup = null; - /** - * Optional. The client-provided short name for the Backup resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of Backups in this BackupPlan - * - * Generated from protobuf field string backup_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $backup_id = ''; - - /** - * @param string $parent Required. The BackupPlan within which to create the Backup. - * Format: `projects/*/locations/*/backupPlans/*` - * Please see {@see BackupForGKEClient::backupPlanName()} for help formatting this field. - * @param \Google\Cloud\GkeBackup\V1\Backup $backup Optional. The Backup resource to create. - * @param string $backupId Optional. The client-provided short name for the Backup resource. - * This name must: - * - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of Backups in this BackupPlan - * - * @return \Google\Cloud\GkeBackup\V1\CreateBackupRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeBackup\V1\Backup $backup, string $backupId): self - { - return (new self()) - ->setParent($parent) - ->setBackup($backup) - ->setBackupId($backupId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The BackupPlan within which to create the Backup. - * Format: `projects/*/locations/*/backupPlans/*` - * @type \Google\Cloud\GkeBackup\V1\Backup $backup - * Optional. The Backup resource to create. - * @type string $backup_id - * Optional. The client-provided short name for the Backup resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of Backups in this BackupPlan - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The BackupPlan within which to create the Backup. - * Format: `projects/*/locations/*/backupPlans/*` - * - * 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 BackupPlan within which to create the Backup. - * Format: `projects/*/locations/*/backupPlans/*` - * - * 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 Backup resource to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeBackup\V1\Backup|null - */ - public function getBackup() - { - return $this->backup; - } - - public function hasBackup() - { - return isset($this->backup); - } - - public function clearBackup() - { - unset($this->backup); - } - - /** - * Optional. The Backup resource to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeBackup\V1\Backup $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Backup::class); - $this->backup = $var; - - return $this; - } - - /** - * Optional. The client-provided short name for the Backup resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of Backups in this BackupPlan - * - * Generated from protobuf field string backup_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getBackupId() - { - return $this->backup_id; - } - - /** - * Optional. The client-provided short name for the Backup resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of Backups in this BackupPlan - * - * Generated from protobuf field string backup_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setBackupId($var) - { - GPBUtil::checkString($var, True); - $this->backup_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateRestorePlanRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateRestorePlanRequest.php deleted file mode 100644 index 8622b9383629..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateRestorePlanRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.gkebackup.v1.CreateRestorePlanRequest - */ -class CreateRestorePlanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location within which to create the RestorePlan. - * Format: `projects/*/locations/*` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The RestorePlan resource object to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestorePlan restore_plan = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $restore_plan = null; - /** - * Required. The client-provided short name for the RestorePlan resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of RestorePlans in this location - * - * Generated from protobuf field string restore_plan_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $restore_plan_id = ''; - - /** - * @param string $parent Required. The location within which to create the RestorePlan. - * Format: `projects/*/locations/*` - * Please see {@see BackupForGKEClient::locationName()} for help formatting this field. - * @param \Google\Cloud\GkeBackup\V1\RestorePlan $restorePlan Required. The RestorePlan resource object to create. - * @param string $restorePlanId Required. The client-provided short name for the RestorePlan resource. - * This name must: - * - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of RestorePlans in this location - * - * @return \Google\Cloud\GkeBackup\V1\CreateRestorePlanRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeBackup\V1\RestorePlan $restorePlan, string $restorePlanId): self - { - return (new self()) - ->setParent($parent) - ->setRestorePlan($restorePlan) - ->setRestorePlanId($restorePlanId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location within which to create the RestorePlan. - * Format: `projects/*/locations/*` - * @type \Google\Cloud\GkeBackup\V1\RestorePlan $restore_plan - * Required. The RestorePlan resource object to create. - * @type string $restore_plan_id - * Required. The client-provided short name for the RestorePlan resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of RestorePlans in this location - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location within which to create the RestorePlan. - * 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 location within which to create the RestorePlan. - * 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. The RestorePlan resource object to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestorePlan restore_plan = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeBackup\V1\RestorePlan|null - */ - public function getRestorePlan() - { - return $this->restore_plan; - } - - public function hasRestorePlan() - { - return isset($this->restore_plan); - } - - public function clearRestorePlan() - { - unset($this->restore_plan); - } - - /** - * Required. The RestorePlan resource object to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestorePlan restore_plan = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeBackup\V1\RestorePlan $var - * @return $this - */ - public function setRestorePlan($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestorePlan::class); - $this->restore_plan = $var; - - return $this; - } - - /** - * Required. The client-provided short name for the RestorePlan resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of RestorePlans in this location - * - * Generated from protobuf field string restore_plan_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRestorePlanId() - { - return $this->restore_plan_id; - } - - /** - * Required. The client-provided short name for the RestorePlan resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of RestorePlans in this location - * - * Generated from protobuf field string restore_plan_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRestorePlanId($var) - { - GPBUtil::checkString($var, True); - $this->restore_plan_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateRestoreRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateRestoreRequest.php deleted file mode 100644 index 296f4506ffd7..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateRestoreRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.gkebackup.v1.CreateRestoreRequest - */ -class CreateRestoreRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The RestorePlan within which to create the Restore. - * Format: `projects/*/locations/*/restorePlans/*` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The restore resource to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Restore restore = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $restore = null; - /** - * Required. The client-provided short name for the Restore resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of Restores in this RestorePlan. - * - * Generated from protobuf field string restore_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $restore_id = ''; - - /** - * @param string $parent Required. The RestorePlan within which to create the Restore. - * Format: `projects/*/locations/*/restorePlans/*` - * Please see {@see BackupForGKEClient::restorePlanName()} for help formatting this field. - * @param \Google\Cloud\GkeBackup\V1\Restore $restore Required. The restore resource to create. - * @param string $restoreId Required. The client-provided short name for the Restore resource. - * This name must: - * - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of Restores in this RestorePlan. - * - * @return \Google\Cloud\GkeBackup\V1\CreateRestoreRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeBackup\V1\Restore $restore, string $restoreId): self - { - return (new self()) - ->setParent($parent) - ->setRestore($restore) - ->setRestoreId($restoreId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The RestorePlan within which to create the Restore. - * Format: `projects/*/locations/*/restorePlans/*` - * @type \Google\Cloud\GkeBackup\V1\Restore $restore - * Required. The restore resource to create. - * @type string $restore_id - * Required. The client-provided short name for the Restore resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of Restores in this RestorePlan. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The RestorePlan within which to create the Restore. - * Format: `projects/*/locations/*/restorePlans/*` - * - * 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 RestorePlan within which to create the Restore. - * Format: `projects/*/locations/*/restorePlans/*` - * - * 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. The restore resource to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Restore restore = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeBackup\V1\Restore|null - */ - public function getRestore() - { - return $this->restore; - } - - public function hasRestore() - { - return isset($this->restore); - } - - public function clearRestore() - { - unset($this->restore); - } - - /** - * Required. The restore resource to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Restore restore = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeBackup\V1\Restore $var - * @return $this - */ - public function setRestore($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Restore::class); - $this->restore = $var; - - return $this; - } - - /** - * Required. The client-provided short name for the Restore resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of Restores in this RestorePlan. - * - * Generated from protobuf field string restore_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRestoreId() - { - return $this->restore_id; - } - - /** - * Required. The client-provided short name for the Restore resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of Restores in this RestorePlan. - * - * Generated from protobuf field string restore_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRestoreId($var) - { - GPBUtil::checkString($var, True); - $this->restore_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteBackupPlanRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteBackupPlanRequest.php deleted file mode 100644 index a57c8c6b240e..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteBackupPlanRequest.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.gkebackup.v1.DeleteBackupPlanRequest - */ -class DeleteBackupPlanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Fully qualified BackupPlan name. - * Format: `projects/*/locations/*/backupPlans/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. If provided, this value must match the current value of the - * target BackupPlan's [etag][google.cloud.gkebackup.v1.BackupPlan.etag] field - * or the request is rejected. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * @param string $name Required. Fully qualified BackupPlan name. - * Format: `projects/*/locations/*/backupPlans/*` - * Please see {@see BackupForGKEClient::backupPlanName()} for help formatting this field. - * - * @return \Google\Cloud\GkeBackup\V1\DeleteBackupPlanRequest - * - * @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. Fully qualified BackupPlan name. - * Format: `projects/*/locations/*/backupPlans/*` - * @type string $etag - * Optional. If provided, this value must match the current value of the - * target BackupPlan's [etag][google.cloud.gkebackup.v1.BackupPlan.etag] field - * or the request is rejected. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Fully qualified BackupPlan name. - * Format: `projects/*/locations/*/backupPlans/*` - * - * 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. Fully qualified BackupPlan name. - * Format: `projects/*/locations/*/backupPlans/*` - * - * 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. If provided, this value must match the current value of the - * target BackupPlan's [etag][google.cloud.gkebackup.v1.BackupPlan.etag] field - * or the request is rejected. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. If provided, this value must match the current value of the - * target BackupPlan's [etag][google.cloud.gkebackup.v1.BackupPlan.etag] field - * or the request is rejected. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteBackupRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteBackupRequest.php deleted file mode 100644 index c6f5067dd84b..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteBackupRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.gkebackup.v1.DeleteBackupRequest - */ -class DeleteBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the Backup resource. - * Format: `projects/*/locations/*/backupPlans/*/backups/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. If provided, this value must match the current value of the - * target Backup's [etag][google.cloud.gkebackup.v1.Backup.etag] field or the - * request is rejected. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - /** - * Optional. If set to true, any VolumeBackups below this Backup will also be - * deleted. Otherwise, the request will only succeed if the Backup has no - * VolumeBackups. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - - /** - * @param string $name Required. Name of the Backup resource. - * Format: `projects/*/locations/*/backupPlans/*/backups/*` - * Please see {@see BackupForGKEClient::backupName()} for help formatting this field. - * - * @return \Google\Cloud\GkeBackup\V1\DeleteBackupRequest - * - * @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 Backup resource. - * Format: `projects/*/locations/*/backupPlans/*/backups/*` - * @type string $etag - * Optional. If provided, this value must match the current value of the - * target Backup's [etag][google.cloud.gkebackup.v1.Backup.etag] field or the - * request is rejected. - * @type bool $force - * Optional. If set to true, any VolumeBackups below this Backup will also be - * deleted. Otherwise, the request will only succeed if the Backup has no - * VolumeBackups. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the Backup resource. - * Format: `projects/*/locations/*/backupPlans/*/backups/*` - * - * 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 Backup resource. - * Format: `projects/*/locations/*/backupPlans/*/backups/*` - * - * 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. If provided, this value must match the current value of the - * target Backup's [etag][google.cloud.gkebackup.v1.Backup.etag] field or the - * request is rejected. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. If provided, this value must match the current value of the - * target Backup's [etag][google.cloud.gkebackup.v1.Backup.etag] field or the - * request is rejected. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. If set to true, any VolumeBackups below this Backup will also be - * deleted. Otherwise, the request will only succeed if the Backup has no - * VolumeBackups. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. If set to true, any VolumeBackups below this Backup will also be - * deleted. Otherwise, the request will only succeed if the Backup has no - * VolumeBackups. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteRestorePlanRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteRestorePlanRequest.php deleted file mode 100644 index ffe3f8e7bdcf..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteRestorePlanRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.gkebackup.v1.DeleteRestorePlanRequest - */ -class DeleteRestorePlanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Fully qualified RestorePlan name. - * Format: `projects/*/locations/*/restorePlans/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. If provided, this value must match the current value of the - * target RestorePlan's [etag][google.cloud.gkebackup.v1.RestorePlan.etag] - * field or the request is rejected. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - /** - * Optional. If set to true, any Restores below this RestorePlan will also be - * deleted. Otherwise, the request will only succeed if the RestorePlan has no - * Restores. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - - /** - * @param string $name Required. Fully qualified RestorePlan name. - * Format: `projects/*/locations/*/restorePlans/*` - * Please see {@see BackupForGKEClient::restorePlanName()} for help formatting this field. - * - * @return \Google\Cloud\GkeBackup\V1\DeleteRestorePlanRequest - * - * @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. Fully qualified RestorePlan name. - * Format: `projects/*/locations/*/restorePlans/*` - * @type string $etag - * Optional. If provided, this value must match the current value of the - * target RestorePlan's [etag][google.cloud.gkebackup.v1.RestorePlan.etag] - * field or the request is rejected. - * @type bool $force - * Optional. If set to true, any Restores below this RestorePlan will also be - * deleted. Otherwise, the request will only succeed if the RestorePlan has no - * Restores. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Fully qualified RestorePlan name. - * Format: `projects/*/locations/*/restorePlans/*` - * - * 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. Fully qualified RestorePlan name. - * Format: `projects/*/locations/*/restorePlans/*` - * - * 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. If provided, this value must match the current value of the - * target RestorePlan's [etag][google.cloud.gkebackup.v1.RestorePlan.etag] - * field or the request is rejected. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. If provided, this value must match the current value of the - * target RestorePlan's [etag][google.cloud.gkebackup.v1.RestorePlan.etag] - * field or the request is rejected. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. If set to true, any Restores below this RestorePlan will also be - * deleted. Otherwise, the request will only succeed if the RestorePlan has no - * Restores. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. If set to true, any Restores below this RestorePlan will also be - * deleted. Otherwise, the request will only succeed if the RestorePlan has no - * Restores. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteRestoreRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteRestoreRequest.php deleted file mode 100644 index e9f68b67a851..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteRestoreRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.gkebackup.v1.DeleteRestoreRequest - */ -class DeleteRestoreRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Full name of the Restore - * Format: `projects/*/locations/*/restorePlans/*/restores/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. If provided, this value must match the current value of the - * target Restore's [etag][google.cloud.gkebackup.v1.Restore.etag] field or - * the request is rejected. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - /** - * Optional. If set to true, any VolumeRestores below this restore will also - * be deleted. Otherwise, the request will only succeed if the restore has no - * VolumeRestores. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - - /** - * @param string $name Required. Full name of the Restore - * Format: `projects/*/locations/*/restorePlans/*/restores/*` - * Please see {@see BackupForGKEClient::restoreName()} for help formatting this field. - * - * @return \Google\Cloud\GkeBackup\V1\DeleteRestoreRequest - * - * @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. Full name of the Restore - * Format: `projects/*/locations/*/restorePlans/*/restores/*` - * @type string $etag - * Optional. If provided, this value must match the current value of the - * target Restore's [etag][google.cloud.gkebackup.v1.Restore.etag] field or - * the request is rejected. - * @type bool $force - * Optional. If set to true, any VolumeRestores below this restore will also - * be deleted. Otherwise, the request will only succeed if the restore has no - * VolumeRestores. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Full name of the Restore - * Format: `projects/*/locations/*/restorePlans/*/restores/*` - * - * 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. Full name of the Restore - * Format: `projects/*/locations/*/restorePlans/*/restores/*` - * - * 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. If provided, this value must match the current value of the - * target Restore's [etag][google.cloud.gkebackup.v1.Restore.etag] field or - * the request is rejected. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. If provided, this value must match the current value of the - * target Restore's [etag][google.cloud.gkebackup.v1.Restore.etag] field or - * the request is rejected. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. If set to true, any VolumeRestores below this restore will also - * be deleted. Otherwise, the request will only succeed if the restore has no - * VolumeRestores. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. If set to true, any VolumeRestores below this restore will also - * be deleted. Otherwise, the request will only succeed if the restore has no - * VolumeRestores. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/EncryptionKey.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/EncryptionKey.php deleted file mode 100644 index 7bf0dfeb4c10..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/EncryptionKey.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.gkebackup.v1.EncryptionKey - */ -class EncryptionKey extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Google Cloud KMS encryption key. Format: - * `projects/*/locations/*/keyRings/*/cryptoKeys/*` - * - * Generated from protobuf field string gcp_kms_encryption_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $gcp_kms_encryption_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcp_kms_encryption_key - * Optional. Google Cloud KMS encryption key. Format: - * `projects/*/locations/*/keyRings/*/cryptoKeys/*` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Google Cloud KMS encryption key. Format: - * `projects/*/locations/*/keyRings/*/cryptoKeys/*` - * - * Generated from protobuf field string gcp_kms_encryption_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getGcpKmsEncryptionKey() - { - return $this->gcp_kms_encryption_key; - } - - /** - * Optional. Google Cloud KMS encryption key. Format: - * `projects/*/locations/*/keyRings/*/cryptoKeys/*` - * - * Generated from protobuf field string gcp_kms_encryption_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setGcpKmsEncryptionKey($var) - { - GPBUtil::checkString($var, True); - $this->gcp_kms_encryption_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ExclusionWindow.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ExclusionWindow.php deleted file mode 100644 index e7289a99ccd6..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ExclusionWindow.php +++ /dev/null @@ -1,276 +0,0 @@ -google.cloud.gkebackup.v1.ExclusionWindow - */ -class ExclusionWindow extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Specifies the start time of the window using time of the day in - * UTC. - * - * Generated from protobuf field .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $start_time = null; - /** - * Required. Specifies duration of the window. - * Duration must be >= 5 minutes and < (target RPO - 20 minutes). - * Additional restrictions based on the recurrence type to allow some time for - * backup to happen: - * - single_occurrence_date: no restriction, but UI may warn about this when - * duration >= target RPO - * - daily window: duration < 24 hours - * - weekly window: - * - days of week includes all seven days of a week: duration < 24 hours - * - all other weekly window: duration < 168 hours (i.e., 24 * 7 hours) - * - * Generated from protobuf field .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $duration = null; - protected $recurrence; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\TimeOfDay $start_time - * Required. Specifies the start time of the window using time of the day in - * UTC. - * @type \Google\Protobuf\Duration $duration - * Required. Specifies duration of the window. - * Duration must be >= 5 minutes and < (target RPO - 20 minutes). - * Additional restrictions based on the recurrence type to allow some time for - * backup to happen: - * - single_occurrence_date: no restriction, but UI may warn about this when - * duration >= target RPO - * - daily window: duration < 24 hours - * - weekly window: - * - days of week includes all seven days of a week: duration < 24 hours - * - all other weekly window: duration < 168 hours (i.e., 24 * 7 hours) - * @type \Google\Type\Date $single_occurrence_date - * No recurrence. The exclusion window occurs only once and on this - * date in UTC. - * @type bool $daily - * The exclusion window occurs every day if set to "True". - * Specifying this field to "False" is an error. - * @type \Google\Cloud\GkeBackup\V1\ExclusionWindow\DayOfWeekList $days_of_week - * The exclusion window occurs on these days of each week in UTC. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\BackupPlan::initOnce(); - parent::__construct($data); - } - - /** - * Required. Specifies the start time of the window using time of the day in - * UTC. - * - * Generated from protobuf field .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Type\TimeOfDay|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Required. Specifies the start time of the window using time of the day in - * UTC. - * - * Generated from protobuf field .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Type\TimeOfDay $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); - $this->start_time = $var; - - return $this; - } - - /** - * Required. Specifies duration of the window. - * Duration must be >= 5 minutes and < (target RPO - 20 minutes). - * Additional restrictions based on the recurrence type to allow some time for - * backup to happen: - * - single_occurrence_date: no restriction, but UI may warn about this when - * duration >= target RPO - * - daily window: duration < 24 hours - * - weekly window: - * - days of week includes all seven days of a week: duration < 24 hours - * - all other weekly window: duration < 168 hours (i.e., 24 * 7 hours) - * - * Generated from protobuf field .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Required. Specifies duration of the window. - * Duration must be >= 5 minutes and < (target RPO - 20 minutes). - * Additional restrictions based on the recurrence type to allow some time for - * backup to happen: - * - single_occurrence_date: no restriction, but UI may warn about this when - * duration >= target RPO - * - daily window: duration < 24 hours - * - weekly window: - * - days of week includes all seven days of a week: duration < 24 hours - * - all other weekly window: duration < 168 hours (i.e., 24 * 7 hours) - * - * Generated from protobuf field .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - - /** - * No recurrence. The exclusion window occurs only once and on this - * date in UTC. - * - * Generated from protobuf field .google.type.Date single_occurrence_date = 3; - * @return \Google\Type\Date|null - */ - public function getSingleOccurrenceDate() - { - return $this->readOneof(3); - } - - public function hasSingleOccurrenceDate() - { - return $this->hasOneof(3); - } - - /** - * No recurrence. The exclusion window occurs only once and on this - * date in UTC. - * - * Generated from protobuf field .google.type.Date single_occurrence_date = 3; - * @param \Google\Type\Date $var - * @return $this - */ - public function setSingleOccurrenceDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The exclusion window occurs every day if set to "True". - * Specifying this field to "False" is an error. - * - * Generated from protobuf field bool daily = 4; - * @return bool - */ - public function getDaily() - { - return $this->readOneof(4); - } - - public function hasDaily() - { - return $this->hasOneof(4); - } - - /** - * The exclusion window occurs every day if set to "True". - * Specifying this field to "False" is an error. - * - * Generated from protobuf field bool daily = 4; - * @param bool $var - * @return $this - */ - public function setDaily($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * The exclusion window occurs on these days of each week in UTC. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList days_of_week = 5; - * @return \Google\Cloud\GkeBackup\V1\ExclusionWindow\DayOfWeekList|null - */ - public function getDaysOfWeek() - { - return $this->readOneof(5); - } - - public function hasDaysOfWeek() - { - return $this->hasOneof(5); - } - - /** - * The exclusion window occurs on these days of each week in UTC. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList days_of_week = 5; - * @param \Google\Cloud\GkeBackup\V1\ExclusionWindow\DayOfWeekList $var - * @return $this - */ - public function setDaysOfWeek($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\ExclusionWindow\DayOfWeekList::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getRecurrence() - { - return $this->whichOneof("recurrence"); - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ExclusionWindow/DayOfWeekList.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ExclusionWindow/DayOfWeekList.php deleted file mode 100644 index 5d9ff3ed99f4..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ExclusionWindow/DayOfWeekList.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList - */ -class DayOfWeekList extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A list of days of week. - * - * Generated from protobuf field repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $days_of_week; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $days_of_week - * Optional. A list of days of week. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\BackupPlan::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A list of days of week. - * - * Generated from protobuf field repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDaysOfWeek() - { - return $this->days_of_week; - } - - /** - * Optional. A list of days of week. - * - * Generated from protobuf field repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDaysOfWeek($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Type\DayOfWeek::class); - $this->days_of_week = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DayOfWeekList::class, \Google\Cloud\GkeBackup\V1\ExclusionWindow_DayOfWeekList::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupIndexDownloadUrlRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupIndexDownloadUrlRequest.php deleted file mode 100644 index 27cffcaf5909..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupIndexDownloadUrlRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlRequest - */ -class GetBackupIndexDownloadUrlRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Full name of Backup resource. - * Format: - * projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup} - * - * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $backup = ''; - - /** - * @param string $backup Required. Full name of Backup resource. - * Format: - * projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup} - * Please see {@see BackupForGKEClient::backupName()} for help formatting this field. - * - * @return \Google\Cloud\GkeBackup\V1\GetBackupIndexDownloadUrlRequest - * - * @experimental - */ - public static function build(string $backup): self - { - return (new self()) - ->setBackup($backup); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $backup - * Required. Full name of Backup resource. - * Format: - * projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Full name of Backup resource. - * Format: - * projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup} - * - * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getBackup() - { - return $this->backup; - } - - /** - * Required. Full name of Backup resource. - * Format: - * projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup} - * - * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkString($var, True); - $this->backup = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupIndexDownloadUrlResponse.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupIndexDownloadUrlResponse.php deleted file mode 100644 index 830d8ac27e2b..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupIndexDownloadUrlResponse.php +++ /dev/null @@ -1,60 +0,0 @@ -google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlResponse - */ -class GetBackupIndexDownloadUrlResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string signed_url = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $signed_url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $signed_url - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string signed_url = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSignedUrl() - { - return $this->signed_url; - } - - /** - * Generated from protobuf field string signed_url = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSignedUrl($var) - { - GPBUtil::checkString($var, True); - $this->signed_url = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupPlanRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupPlanRequest.php deleted file mode 100644 index 03ae67bf4f8d..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupPlanRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.gkebackup.v1.GetBackupPlanRequest - */ -class GetBackupPlanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Fully qualified BackupPlan name. - * Format: `projects/*/locations/*/backupPlans/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Fully qualified BackupPlan name. - * Format: `projects/*/locations/*/backupPlans/*` - * Please see {@see BackupForGKEClient::backupPlanName()} for help formatting this field. - * - * @return \Google\Cloud\GkeBackup\V1\GetBackupPlanRequest - * - * @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. Fully qualified BackupPlan name. - * Format: `projects/*/locations/*/backupPlans/*` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Fully qualified BackupPlan name. - * Format: `projects/*/locations/*/backupPlans/*` - * - * 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. Fully qualified BackupPlan name. - * Format: `projects/*/locations/*/backupPlans/*` - * - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupRequest.php deleted file mode 100644 index 54e5c0220dc0..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.gkebackup.v1.GetBackupRequest - */ -class GetBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Full name of the Backup resource. - * Format: `projects/*/locations/*/backupPlans/*/backups/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Full name of the Backup resource. - * Format: `projects/*/locations/*/backupPlans/*/backups/*` - * Please see {@see BackupForGKEClient::backupName()} for help formatting this field. - * - * @return \Google\Cloud\GkeBackup\V1\GetBackupRequest - * - * @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. Full name of the Backup resource. - * Format: `projects/*/locations/*/backupPlans/*/backups/*` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Full name of the Backup resource. - * Format: `projects/*/locations/*/backupPlans/*/backups/*` - * - * 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. Full name of the Backup resource. - * Format: `projects/*/locations/*/backupPlans/*/backups/*` - * - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetRestorePlanRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetRestorePlanRequest.php deleted file mode 100644 index 697db291690f..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetRestorePlanRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.gkebackup.v1.GetRestorePlanRequest - */ -class GetRestorePlanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Fully qualified RestorePlan name. - * Format: `projects/*/locations/*/restorePlans/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Fully qualified RestorePlan name. - * Format: `projects/*/locations/*/restorePlans/*` - * Please see {@see BackupForGKEClient::restorePlanName()} for help formatting this field. - * - * @return \Google\Cloud\GkeBackup\V1\GetRestorePlanRequest - * - * @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. Fully qualified RestorePlan name. - * Format: `projects/*/locations/*/restorePlans/*` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Fully qualified RestorePlan name. - * Format: `projects/*/locations/*/restorePlans/*` - * - * 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. Fully qualified RestorePlan name. - * Format: `projects/*/locations/*/restorePlans/*` - * - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetRestoreRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetRestoreRequest.php deleted file mode 100644 index 601b9cf32159..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetRestoreRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.gkebackup.v1.GetRestoreRequest - */ -class GetRestoreRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the restore resource. - * Format: `projects/*/locations/*/restorePlans/*/restores/*` - * - * 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 restore resource. - * Format: `projects/*/locations/*/restorePlans/*/restores/*` - * Please see {@see BackupForGKEClient::restoreName()} for help formatting this field. - * - * @return \Google\Cloud\GkeBackup\V1\GetRestoreRequest - * - * @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 restore resource. - * Format: `projects/*/locations/*/restorePlans/*/restores/*` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the restore resource. - * Format: `projects/*/locations/*/restorePlans/*/restores/*` - * - * 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 restore resource. - * Format: `projects/*/locations/*/restorePlans/*/restores/*` - * - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetVolumeBackupRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetVolumeBackupRequest.php deleted file mode 100644 index 02814a43a479..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetVolumeBackupRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.gkebackup.v1.GetVolumeBackupRequest - */ -class GetVolumeBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Full name of the VolumeBackup resource. - * Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Full name of the VolumeBackup resource. - * Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*` - * Please see {@see BackupForGKEClient::volumeBackupName()} for help formatting this field. - * - * @return \Google\Cloud\GkeBackup\V1\GetVolumeBackupRequest - * - * @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. Full name of the VolumeBackup resource. - * Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Full name of the VolumeBackup resource. - * Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*` - * - * 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. Full name of the VolumeBackup resource. - * Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*` - * - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetVolumeRestoreRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetVolumeRestoreRequest.php deleted file mode 100644 index 6413d24fb02a..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetVolumeRestoreRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.gkebackup.v1.GetVolumeRestoreRequest - */ -class GetVolumeRestoreRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Full name of the VolumeRestore resource. - * Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Full name of the VolumeRestore resource. - * Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*` - * Please see {@see BackupForGKEClient::volumeRestoreName()} for help formatting this field. - * - * @return \Google\Cloud\GkeBackup\V1\GetVolumeRestoreRequest - * - * @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. Full name of the VolumeRestore resource. - * Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Full name of the VolumeRestore resource. - * Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*` - * - * 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. Full name of the VolumeRestore resource. - * Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*` - * - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupPlansRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupPlansRequest.php deleted file mode 100644 index 9bf1b6dcee01..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupPlansRequest.php +++ /dev/null @@ -1,262 +0,0 @@ -google.cloud.gkebackup.v1.ListBackupPlansRequest - */ -class ListBackupPlansRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location that contains the BackupPlans to list. - * Format: `projects/*/locations/*` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] - * received from a previous `ListBackupPlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackupPlans` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Field by which to sort the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The location that contains the BackupPlans to list. - * Format: `projects/*/locations/*` - * Please see {@see BackupForGKEClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\GkeBackup\V1\ListBackupPlansRequest - * - * @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 location that contains the BackupPlans to list. - * Format: `projects/*/locations/*` - * @type int $page_size - * Optional. The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * Optional. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] - * received from a previous `ListBackupPlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackupPlans` must match the call that provided the page token. - * @type string $filter - * Optional. Field match expression used to filter the results. - * @type string $order_by - * Optional. Field by which to sort the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location that contains the BackupPlans to list. - * 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 location that contains the BackupPlans to list. - * 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. The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * 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. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] - * received from a previous `ListBackupPlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackupPlans` must match the call that provided the 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. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] - * received from a previous `ListBackupPlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackupPlans` must match the call that provided the 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. Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Field match expression used to filter the results. - * - * 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. Field by which to sort the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Field by which to sort the results. - * - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupPlansResponse.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupPlansResponse.php deleted file mode 100644 index 3c1707f46fd8..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupPlansResponse.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.gkebackup.v1.ListBackupPlansResponse - */ -class ListBackupPlansResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of BackupPlans matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.BackupPlan backup_plans = 1; - */ - private $backup_plans; - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListBackupPlansRequest.page_token] - * in a subsequent `ListBackupPlans` call to retrieve the next page of - * results. If this field is omitted or empty, then there are no more results - * to return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeBackup\V1\BackupPlan>|\Google\Protobuf\Internal\RepeatedField $backup_plans - * The list of BackupPlans matching the given criteria. - * @type string $next_page_token - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListBackupPlansRequest.page_token] - * in a subsequent `ListBackupPlans` call to retrieve the next page of - * results. If this field is omitted or empty, then there are no more results - * to return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * The list of BackupPlans matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.BackupPlan backup_plans = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBackupPlans() - { - return $this->backup_plans; - } - - /** - * The list of BackupPlans matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.BackupPlan backup_plans = 1; - * @param array<\Google\Cloud\GkeBackup\V1\BackupPlan>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBackupPlans($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\BackupPlan::class); - $this->backup_plans = $arr; - - return $this; - } - - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListBackupPlansRequest.page_token] - * in a subsequent `ListBackupPlans` call to retrieve the next page of - * results. If this field is omitted or empty, then there are no more results - * to return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListBackupPlansRequest.page_token] - * in a subsequent `ListBackupPlans` call to retrieve the next page of - * results. If this field is omitted or empty, then there are no more results - * to return. - * - * 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; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupsRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupsRequest.php deleted file mode 100644 index 3c0d1c754e7a..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupsRequest.php +++ /dev/null @@ -1,262 +0,0 @@ -google.cloud.gkebackup.v1.ListBackupsRequest - */ -class ListBackupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The BackupPlan that contains the Backups to list. - * Format: `projects/*/locations/*/backupPlans/*` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] - * received from a previous `ListBackups` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackups` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Field by which to sort the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The BackupPlan that contains the Backups to list. - * Format: `projects/*/locations/*/backupPlans/*` - * Please see {@see BackupForGKEClient::backupPlanName()} for help formatting this field. - * - * @return \Google\Cloud\GkeBackup\V1\ListBackupsRequest - * - * @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 BackupPlan that contains the Backups to list. - * Format: `projects/*/locations/*/backupPlans/*` - * @type int $page_size - * Optional. The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * Optional. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] - * received from a previous `ListBackups` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackups` must match the call that provided the page token. - * @type string $filter - * Optional. Field match expression used to filter the results. - * @type string $order_by - * Optional. Field by which to sort the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The BackupPlan that contains the Backups to list. - * Format: `projects/*/locations/*/backupPlans/*` - * - * 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 BackupPlan that contains the Backups to list. - * Format: `projects/*/locations/*/backupPlans/*` - * - * 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 target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * 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. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] - * received from a previous `ListBackups` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackups` must match the call that provided the 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. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] - * received from a previous `ListBackups` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackups` must match the call that provided the 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. Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Field match expression used to filter the results. - * - * 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. Field by which to sort the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Field by which to sort the results. - * - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupsResponse.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupsResponse.php deleted file mode 100644 index af69b12b2d90..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupsResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.gkebackup.v1.ListBackupsResponse - */ -class ListBackupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Backups matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.Backup backups = 1; - */ - private $backups; - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListBackupsRequest.page_token] in a - * subsequent `ListBackups` call to retrieve the next page of results. If this - * field is omitted or empty, then there are no more results to return. - * - * 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\GkeBackup\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $backups - * The list of Backups matching the given criteria. - * @type string $next_page_token - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListBackupsRequest.page_token] in a - * subsequent `ListBackups` call to retrieve the next page of results. If this - * field is omitted or empty, then there are no more results to return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * The list of Backups matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.Backup backups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBackups() - { - return $this->backups; - } - - /** - * The list of Backups matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.Backup backups = 1; - * @param array<\Google\Cloud\GkeBackup\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBackups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\Backup::class); - $this->backups = $arr; - - return $this; - } - - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListBackupsRequest.page_token] in a - * subsequent `ListBackups` call to retrieve the next page of results. If this - * field is omitted or empty, then there are no more results to return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListBackupsRequest.page_token] in a - * subsequent `ListBackups` call to retrieve the next page of results. If this - * field is omitted or empty, then there are no more results to return. - * - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestorePlansRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestorePlansRequest.php deleted file mode 100644 index 232d0124bfa6..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestorePlansRequest.php +++ /dev/null @@ -1,262 +0,0 @@ -google.cloud.gkebackup.v1.ListRestorePlansRequest - */ -class ListRestorePlansRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location that contains the RestorePlans to list. - * Format: `projects/*/locations/*` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] - * received from a previous `ListRestorePlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListRestorePlans` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Field by which to sort the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The location that contains the RestorePlans to list. - * Format: `projects/*/locations/*` - * Please see {@see BackupForGKEClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\GkeBackup\V1\ListRestorePlansRequest - * - * @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 location that contains the RestorePlans to list. - * Format: `projects/*/locations/*` - * @type int $page_size - * Optional. The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * Optional. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] - * received from a previous `ListRestorePlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListRestorePlans` must match the call that provided the page token. - * @type string $filter - * Optional. Field match expression used to filter the results. - * @type string $order_by - * Optional. Field by which to sort the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location that contains the RestorePlans to list. - * 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 location that contains the RestorePlans to list. - * 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. The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * 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. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] - * received from a previous `ListRestorePlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListRestorePlans` must match the call that provided the 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. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] - * received from a previous `ListRestorePlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListRestorePlans` must match the call that provided the 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. Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Field match expression used to filter the results. - * - * 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. Field by which to sort the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Field by which to sort the results. - * - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestorePlansResponse.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestorePlansResponse.php deleted file mode 100644 index 6f2aa3e5a5e7..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestorePlansResponse.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.gkebackup.v1.ListRestorePlansResponse - */ -class ListRestorePlansResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of RestorePlans matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestorePlan restore_plans = 1; - */ - private $restore_plans; - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListRestorePlansRequest.page_token] - * in a subsequent `ListRestorePlans` call to retrieve the next page of - * results. If this field is omitted or empty, then there are no more results - * to return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeBackup\V1\RestorePlan>|\Google\Protobuf\Internal\RepeatedField $restore_plans - * The list of RestorePlans matching the given criteria. - * @type string $next_page_token - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListRestorePlansRequest.page_token] - * in a subsequent `ListRestorePlans` call to retrieve the next page of - * results. If this field is omitted or empty, then there are no more results - * to return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * The list of RestorePlans matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestorePlan restore_plans = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRestorePlans() - { - return $this->restore_plans; - } - - /** - * The list of RestorePlans matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestorePlan restore_plans = 1; - * @param array<\Google\Cloud\GkeBackup\V1\RestorePlan>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRestorePlans($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\RestorePlan::class); - $this->restore_plans = $arr; - - return $this; - } - - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListRestorePlansRequest.page_token] - * in a subsequent `ListRestorePlans` call to retrieve the next page of - * results. If this field is omitted or empty, then there are no more results - * to return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListRestorePlansRequest.page_token] - * in a subsequent `ListRestorePlans` call to retrieve the next page of - * results. If this field is omitted or empty, then there are no more results - * to return. - * - * 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; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestoresRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestoresRequest.php deleted file mode 100644 index cabe7916198f..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestoresRequest.php +++ /dev/null @@ -1,262 +0,0 @@ -google.cloud.gkebackup.v1.ListRestoresRequest - */ -class ListRestoresRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The RestorePlan that contains the Restores to list. - * Format: `projects/*/locations/*/restorePlans/*` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] - * received from a previous `ListRestores` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to `ListRestores` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Field by which to sort the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The RestorePlan that contains the Restores to list. - * Format: `projects/*/locations/*/restorePlans/*` - * Please see {@see BackupForGKEClient::restorePlanName()} for help formatting this field. - * - * @return \Google\Cloud\GkeBackup\V1\ListRestoresRequest - * - * @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 RestorePlan that contains the Restores to list. - * Format: `projects/*/locations/*/restorePlans/*` - * @type int $page_size - * Optional. The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * Optional. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] - * received from a previous `ListRestores` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to `ListRestores` - * must match the call that provided the page token. - * @type string $filter - * Optional. Field match expression used to filter the results. - * @type string $order_by - * Optional. Field by which to sort the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The RestorePlan that contains the Restores to list. - * Format: `projects/*/locations/*/restorePlans/*` - * - * 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 RestorePlan that contains the Restores to list. - * Format: `projects/*/locations/*/restorePlans/*` - * - * 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 target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * 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. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] - * received from a previous `ListRestores` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to `ListRestores` - * must match the call that provided the 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. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] - * received from a previous `ListRestores` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to `ListRestores` - * must match the call that provided the 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. Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Field match expression used to filter the results. - * - * 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. Field by which to sort the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Field by which to sort the results. - * - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestoresResponse.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestoresResponse.php deleted file mode 100644 index 03c3d35a9e61..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestoresResponse.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.gkebackup.v1.ListRestoresResponse - */ -class ListRestoresResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Restores matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.Restore restores = 1; - */ - private $restores; - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListRestoresRequest.page_token] in a - * subsequent `ListRestores` call to retrieve the next page of results. If - * this field is omitted or empty, then there are no more results to return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeBackup\V1\Restore>|\Google\Protobuf\Internal\RepeatedField $restores - * The list of Restores matching the given criteria. - * @type string $next_page_token - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListRestoresRequest.page_token] in a - * subsequent `ListRestores` call to retrieve the next page of results. If - * this field is omitted or empty, then there are no more results to return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * The list of Restores matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.Restore restores = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRestores() - { - return $this->restores; - } - - /** - * The list of Restores matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.Restore restores = 1; - * @param array<\Google\Cloud\GkeBackup\V1\Restore>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRestores($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\Restore::class); - $this->restores = $arr; - - return $this; - } - - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListRestoresRequest.page_token] in a - * subsequent `ListRestores` call to retrieve the next page of results. If - * this field is omitted or empty, then there are no more results to return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListRestoresRequest.page_token] in a - * subsequent `ListRestores` call to retrieve the next page of results. If - * this field is omitted or empty, then there are no more results to return. - * - * 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; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeBackupsRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeBackupsRequest.php deleted file mode 100644 index ad352e4ccd0d..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeBackupsRequest.php +++ /dev/null @@ -1,262 +0,0 @@ -google.cloud.gkebackup.v1.ListVolumeBackupsRequest - */ -class ListVolumeBackupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Backup that contains the VolumeBackups to list. - * Format: `projects/*/locations/*/backupPlans/*/backups/*` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] - * received from a previous `ListVolumeBackups` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListVolumeBackups` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Field by which to sort the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The Backup that contains the VolumeBackups to list. - * Format: `projects/*/locations/*/backupPlans/*/backups/*` - * Please see {@see BackupForGKEClient::backupName()} for help formatting this field. - * - * @return \Google\Cloud\GkeBackup\V1\ListVolumeBackupsRequest - * - * @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 Backup that contains the VolumeBackups to list. - * Format: `projects/*/locations/*/backupPlans/*/backups/*` - * @type int $page_size - * Optional. The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * Optional. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] - * received from a previous `ListVolumeBackups` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListVolumeBackups` must match the call that provided the page token. - * @type string $filter - * Optional. Field match expression used to filter the results. - * @type string $order_by - * Optional. Field by which to sort the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Backup that contains the VolumeBackups to list. - * Format: `projects/*/locations/*/backupPlans/*/backups/*` - * - * 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 Backup that contains the VolumeBackups to list. - * Format: `projects/*/locations/*/backupPlans/*/backups/*` - * - * 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 target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * 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. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] - * received from a previous `ListVolumeBackups` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListVolumeBackups` must match the call that provided the 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. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] - * received from a previous `ListVolumeBackups` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListVolumeBackups` must match the call that provided the 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. Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Field match expression used to filter the results. - * - * 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. Field by which to sort the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Field by which to sort the results. - * - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeBackupsResponse.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeBackupsResponse.php deleted file mode 100644 index b8f1edc3cd20..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeBackupsResponse.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.gkebackup.v1.ListVolumeBackupsResponse - */ -class ListVolumeBackupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of VolumeBackups matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeBackup volume_backups = 1; - */ - private $volume_backups; - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListVolumeBackupsRequest.page_token] - * in a subsequent `ListVolumeBackups` call to retrieve the next page of - * results. If this field is omitted or empty, then there are no more results - * to return. - * - * 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\GkeBackup\V1\VolumeBackup>|\Google\Protobuf\Internal\RepeatedField $volume_backups - * The list of VolumeBackups matching the given criteria. - * @type string $next_page_token - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListVolumeBackupsRequest.page_token] - * in a subsequent `ListVolumeBackups` call to retrieve the next page of - * results. If this field is omitted or empty, then there are no more results - * to return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * The list of VolumeBackups matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeBackup volume_backups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVolumeBackups() - { - return $this->volume_backups; - } - - /** - * The list of VolumeBackups matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeBackup volume_backups = 1; - * @param array<\Google\Cloud\GkeBackup\V1\VolumeBackup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVolumeBackups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\VolumeBackup::class); - $this->volume_backups = $arr; - - return $this; - } - - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListVolumeBackupsRequest.page_token] - * in a subsequent `ListVolumeBackups` call to retrieve the next page of - * results. If this field is omitted or empty, then there are no more results - * to return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListVolumeBackupsRequest.page_token] - * in a subsequent `ListVolumeBackups` call to retrieve the next page of - * results. If this field is omitted or empty, then there are no more results - * to return. - * - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeRestoresRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeRestoresRequest.php deleted file mode 100644 index 3fbbaf0291a3..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeRestoresRequest.php +++ /dev/null @@ -1,262 +0,0 @@ -google.cloud.gkebackup.v1.ListVolumeRestoresRequest - */ -class ListVolumeRestoresRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Restore that contains the VolumeRestores to list. - * Format: `projects/*/locations/*/restorePlans/*/restores/*` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] - * received from a previous `ListVolumeRestores` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListVolumeRestores` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Field by which to sort the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The Restore that contains the VolumeRestores to list. - * Format: `projects/*/locations/*/restorePlans/*/restores/*` - * Please see {@see BackupForGKEClient::restoreName()} for help formatting this field. - * - * @return \Google\Cloud\GkeBackup\V1\ListVolumeRestoresRequest - * - * @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 Restore that contains the VolumeRestores to list. - * Format: `projects/*/locations/*/restorePlans/*/restores/*` - * @type int $page_size - * Optional. The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * Optional. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] - * received from a previous `ListVolumeRestores` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListVolumeRestores` must match the call that provided the page token. - * @type string $filter - * Optional. Field match expression used to filter the results. - * @type string $order_by - * Optional. Field by which to sort the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Restore that contains the VolumeRestores to list. - * Format: `projects/*/locations/*/restorePlans/*/restores/*` - * - * 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 Restore that contains the VolumeRestores to list. - * Format: `projects/*/locations/*/restorePlans/*/restores/*` - * - * 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 target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * 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. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] - * received from a previous `ListVolumeRestores` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListVolumeRestores` must match the call that provided the 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. The value of - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] - * received from a previous `ListVolumeRestores` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListVolumeRestores` must match the call that provided the 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. Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Field match expression used to filter the results. - * - * 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. Field by which to sort the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Field by which to sort the results. - * - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeRestoresResponse.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeRestoresResponse.php deleted file mode 100644 index 8fc1e433c5e5..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeRestoresResponse.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.gkebackup.v1.ListVolumeRestoresResponse - */ -class ListVolumeRestoresResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of VolumeRestores matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeRestore volume_restores = 1; - */ - private $volume_restores; - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListVolumeRestoresRequest.page_token] - * in a subsequent `ListVolumeRestores` call to retrieve the next page of - * results. If this field is omitted or empty, then there are no more results - * to return. - * - * 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\GkeBackup\V1\VolumeRestore>|\Google\Protobuf\Internal\RepeatedField $volume_restores - * The list of VolumeRestores matching the given criteria. - * @type string $next_page_token - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListVolumeRestoresRequest.page_token] - * in a subsequent `ListVolumeRestores` call to retrieve the next page of - * results. If this field is omitted or empty, then there are no more results - * to return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * The list of VolumeRestores matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeRestore volume_restores = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVolumeRestores() - { - return $this->volume_restores; - } - - /** - * The list of VolumeRestores matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeRestore volume_restores = 1; - * @param array<\Google\Cloud\GkeBackup\V1\VolumeRestore>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVolumeRestores($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\VolumeRestore::class); - $this->volume_restores = $arr; - - return $this; - } - - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListVolumeRestoresRequest.page_token] - * in a subsequent `ListVolumeRestores` call to retrieve the next page of - * results. If this field is omitted or empty, then there are no more results - * to return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListVolumeRestoresRequest.page_token] - * in a subsequent `ListVolumeRestores` call to retrieve the next page of - * results. If this field is omitted or empty, then there are no more results - * to return. - * - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/NamespacedName.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/NamespacedName.php deleted file mode 100644 index ede7ff3d8c39..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/NamespacedName.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.gkebackup.v1.NamespacedName - */ -class NamespacedName extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The Namespace of the Kubernetes resource. - * - * Generated from protobuf field string namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $namespace = ''; - /** - * Optional. The name of the Kubernetes resource. - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $namespace - * Optional. The Namespace of the Kubernetes resource. - * @type string $name - * Optional. The name of the Kubernetes resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The Namespace of the Kubernetes resource. - * - * Generated from protobuf field string namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNamespace() - { - return $this->namespace; - } - - /** - * Optional. The Namespace of the Kubernetes resource. - * - * Generated from protobuf field string namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setNamespace($var) - { - GPBUtil::checkString($var, True); - $this->namespace = $var; - - return $this; - } - - /** - * Optional. The name of the Kubernetes resource. - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Optional. The name of the Kubernetes resource. - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/NamespacedNames.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/NamespacedNames.php deleted file mode 100644 index ea0494a0e587..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/NamespacedNames.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkebackup.v1.NamespacedNames - */ -class NamespacedNames extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A list of namespaced Kubernetes resources. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.NamespacedName namespaced_names = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $namespaced_names; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeBackup\V1\NamespacedName>|\Google\Protobuf\Internal\RepeatedField $namespaced_names - * Optional. A list of namespaced Kubernetes resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A list of namespaced Kubernetes resources. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.NamespacedName namespaced_names = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNamespacedNames() - { - return $this->namespaced_names; - } - - /** - * Optional. A list of namespaced Kubernetes resources. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.NamespacedName namespaced_names = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeBackup\V1\NamespacedName>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNamespacedNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\NamespacedName::class); - $this->namespaced_names = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Namespaces.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Namespaces.php deleted file mode 100644 index 4b4da96f2ba9..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Namespaces.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkebackup.v1.Namespaces - */ -class Namespaces extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A list of Kubernetes Namespaces - * - * Generated from protobuf field repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $namespaces; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $namespaces - * Optional. A list of Kubernetes Namespaces - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A list of Kubernetes Namespaces - * - * Generated from protobuf field repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNamespaces() - { - return $this->namespaces; - } - - /** - * Optional. A list of Kubernetes Namespaces - * - * Generated from protobuf field repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNamespaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespaces = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/OperationMetadata.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/OperationMetadata.php deleted file mode 100644 index 5137a33b7e8a..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.gkebackup.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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 the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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 the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ResourceSelector.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ResourceSelector.php deleted file mode 100644 index 8a23e047b719..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ResourceSelector.php +++ /dev/null @@ -1,232 +0,0 @@ -google.cloud.gkebackup.v1.ResourceSelector - */ -class ResourceSelector extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Selects resources using their Kubernetes GroupKinds. If - * specified, only resources of provided GroupKind will be selected. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kind = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $group_kind = null; - /** - * Optional. Selects resources using their resource names. If specified, - * only resources with the provided name will be selected. - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $name = ''; - /** - * Optional. Selects resources using their namespaces. This only applies to - * namespace scoped resources and cannot be used for selecting - * cluster scoped resources. If specified, only resources in the provided - * namespace will be selected. If not specified, the filter will apply to - * both cluster scoped and namespace scoped resources (e.g. name or label). - * The [Namespace](https://pkg.go.dev/k8s.io/api/core/v1#Namespace) resource - * itself will be restored if and only if any resources within the namespace - * are restored. - * - * Generated from protobuf field string namespace = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $namespace = ''; - /** - * Optional. Selects resources using Kubernetes - * [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). - * If specified, a resource will be selected if and only if the resource - * has all of the provided labels and all the label values match. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind $group_kind - * Optional. Selects resources using their Kubernetes GroupKinds. If - * specified, only resources of provided GroupKind will be selected. - * @type string $name - * Optional. Selects resources using their resource names. If specified, - * only resources with the provided name will be selected. - * @type string $namespace - * Optional. Selects resources using their namespaces. This only applies to - * namespace scoped resources and cannot be used for selecting - * cluster scoped resources. If specified, only resources in the provided - * namespace will be selected. If not specified, the filter will apply to - * both cluster scoped and namespace scoped resources (e.g. name or label). - * The [Namespace](https://pkg.go.dev/k8s.io/api/core/v1#Namespace) resource - * itself will be restored if and only if any resources within the namespace - * are restored. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Selects resources using Kubernetes - * [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). - * If specified, a resource will be selected if and only if the resource - * has all of the provided labels and all the label values match. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Selects resources using their Kubernetes GroupKinds. If - * specified, only resources of provided GroupKind will be selected. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kind = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind|null - */ - public function getGroupKind() - { - return $this->group_kind; - } - - public function hasGroupKind() - { - return isset($this->group_kind); - } - - public function clearGroupKind() - { - unset($this->group_kind); - } - - /** - * Optional. Selects resources using their Kubernetes GroupKinds. If - * specified, only resources of provided GroupKind will be selected. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kind = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind $var - * @return $this - */ - public function setGroupKind($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind::class); - $this->group_kind = $var; - - return $this; - } - - /** - * Optional. Selects resources using their resource names. If specified, - * only resources with the provided name will be selected. - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Optional. Selects resources using their resource names. If specified, - * only resources with the provided name will be selected. - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Selects resources using their namespaces. This only applies to - * namespace scoped resources and cannot be used for selecting - * cluster scoped resources. If specified, only resources in the provided - * namespace will be selected. If not specified, the filter will apply to - * both cluster scoped and namespace scoped resources (e.g. name or label). - * The [Namespace](https://pkg.go.dev/k8s.io/api/core/v1#Namespace) resource - * itself will be restored if and only if any resources within the namespace - * are restored. - * - * Generated from protobuf field string namespace = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNamespace() - { - return $this->namespace; - } - - /** - * Optional. Selects resources using their namespaces. This only applies to - * namespace scoped resources and cannot be used for selecting - * cluster scoped resources. If specified, only resources in the provided - * namespace will be selected. If not specified, the filter will apply to - * both cluster scoped and namespace scoped resources (e.g. name or label). - * The [Namespace](https://pkg.go.dev/k8s.io/api/core/v1#Namespace) resource - * itself will be restored if and only if any resources within the namespace - * are restored. - * - * Generated from protobuf field string namespace = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setNamespace($var) - { - GPBUtil::checkString($var, True); - $this->namespace = $var; - - return $this; - } - - /** - * Optional. Selects resources using Kubernetes - * [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). - * If specified, a resource will be selected if and only if the resource - * has all of the provided labels and all the label values match. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Selects resources using Kubernetes - * [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). - * If specified, a resource will be selected if and only if the resource - * has all of the provided labels and all the label values match. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @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; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore.php deleted file mode 100644 index 4137716b37aa..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore.php +++ /dev/null @@ -1,858 +0,0 @@ -google.cloud.gkebackup.v1.Restore - */ -class Restore extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The full name of the Restore resource. - * Format: `projects/*/locations/*/restorePlans/*/restores/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The timestamp when this Restore resource 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 timestamp when this Restore resource was last - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User specified descriptive string for this Restore. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - /** - * Required. Immutable. A reference to the - * [Backup][google.cloud.gkebackup.v1.Backup] used as the source from which - * this Restore will restore. Note that this Backup must be a sub-resource of - * the RestorePlan's - * [backup_plan][google.cloud.gkebackup.v1.RestorePlan.backup_plan]. Format: - * `projects/*/locations/*/backupPlans/*/backups/*`. - * - * Generated from protobuf field string backup = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $backup = ''; - /** - * Output only. The target cluster into which this Restore will restore data. - * Valid formats: - * - `projects/*/locations/*/clusters/*` - * - `projects/*/zones/*/clusters/*` - * Inherited from parent RestorePlan's - * [cluster][google.cloud.gkebackup.v1.RestorePlan.cluster] value. - * - * Generated from protobuf field string cluster = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $cluster = ''; - /** - * Output only. Configuration of the Restore. Inherited from parent - * RestorePlan's - * [restore_config][google.cloud.gkebackup.v1.RestorePlan.restore_config]. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig restore_config = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $restore_config = null; - /** - * A set of custom labels supplied by user. - * - * Generated from protobuf field map labels = 9; - */ - private $labels; - /** - * Output only. The current state of the Restore. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Restore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Human-readable description of why the Restore is in its - * current state. - * - * Generated from protobuf field string state_reason = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_reason = ''; - /** - * Output only. Timestamp of when the restore operation completed. - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $complete_time = null; - /** - * Output only. Number of resources restored during the restore execution. - * - * Generated from protobuf field int32 resources_restored_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $resources_restored_count = 0; - /** - * Output only. Number of resources excluded during the restore execution. - * - * Generated from protobuf field int32 resources_excluded_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $resources_excluded_count = 0; - /** - * Output only. Number of resources that failed to be restored during the - * restore execution. - * - * Generated from protobuf field int32 resources_failed_count = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $resources_failed_count = 0; - /** - * Output only. Number of volumes restored during the restore execution. - * - * Generated from protobuf field int32 volumes_restored_count = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $volumes_restored_count = 0; - /** - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a restore from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform restore updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetRestore`, - * and systems are expected to put that etag in the request to - * `UpdateRestore` or `DeleteRestore` to ensure that their change will be - * applied to the same version of the resource. - * - * Generated from protobuf field string etag = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $etag = ''; - /** - * Optional. Immutable. Filters resources for `Restore`. If not specified, the - * scope of the restore will remain the same as defined in the `RestorePlan`. - * If this is specified, and no resources are matched by the - * `inclusion_filters` or everyting is excluded by the `exclusion_filters`, - * nothing will be restored. This filter can only be specified if the value of - * [namespaced_resource_restore_mode][google.cloud.gkebackup.v1.RestoreConfig.namespaced_resource_restore_mode] - * is set to `MERGE_SKIP_ON_CONFLICT`, `MERGE_REPLACE_VOLUME_ON_CONFLICT` or - * `MERGE_REPLACE_ON_CONFLICT`. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Restore.Filter filter = 18 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = null; - /** - * Optional. Immutable. Overrides the volume data restore policies selected in - * the Restore Config for override-scoped resources. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride volume_data_restore_policy_overrides = 19 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - */ - private $volume_data_restore_policy_overrides; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The full name of the Restore resource. - * Format: `projects/*/locations/*/restorePlans/*/restores/*` - * @type string $uid - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when this Restore resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when this Restore resource was last - * updated. - * @type string $description - * User specified descriptive string for this Restore. - * @type string $backup - * Required. Immutable. A reference to the - * [Backup][google.cloud.gkebackup.v1.Backup] used as the source from which - * this Restore will restore. Note that this Backup must be a sub-resource of - * the RestorePlan's - * [backup_plan][google.cloud.gkebackup.v1.RestorePlan.backup_plan]. Format: - * `projects/*/locations/*/backupPlans/*/backups/*`. - * @type string $cluster - * Output only. The target cluster into which this Restore will restore data. - * Valid formats: - * - `projects/*/locations/*/clusters/*` - * - `projects/*/zones/*/clusters/*` - * Inherited from parent RestorePlan's - * [cluster][google.cloud.gkebackup.v1.RestorePlan.cluster] value. - * @type \Google\Cloud\GkeBackup\V1\RestoreConfig $restore_config - * Output only. Configuration of the Restore. Inherited from parent - * RestorePlan's - * [restore_config][google.cloud.gkebackup.v1.RestorePlan.restore_config]. - * @type array|\Google\Protobuf\Internal\MapField $labels - * A set of custom labels supplied by user. - * @type int $state - * Output only. The current state of the Restore. - * @type string $state_reason - * Output only. Human-readable description of why the Restore is in its - * current state. - * @type \Google\Protobuf\Timestamp $complete_time - * Output only. Timestamp of when the restore operation completed. - * @type int $resources_restored_count - * Output only. Number of resources restored during the restore execution. - * @type int $resources_excluded_count - * Output only. Number of resources excluded during the restore execution. - * @type int $resources_failed_count - * Output only. Number of resources that failed to be restored during the - * restore execution. - * @type int $volumes_restored_count - * Output only. Number of volumes restored during the restore execution. - * @type string $etag - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a restore from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform restore updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetRestore`, - * and systems are expected to put that etag in the request to - * `UpdateRestore` or `DeleteRestore` to ensure that their change will be - * applied to the same version of the resource. - * @type \Google\Cloud\GkeBackup\V1\Restore\Filter $filter - * Optional. Immutable. Filters resources for `Restore`. If not specified, the - * scope of the restore will remain the same as defined in the `RestorePlan`. - * If this is specified, and no resources are matched by the - * `inclusion_filters` or everyting is excluded by the `exclusion_filters`, - * nothing will be restored. This filter can only be specified if the value of - * [namespaced_resource_restore_mode][google.cloud.gkebackup.v1.RestoreConfig.namespaced_resource_restore_mode] - * is set to `MERGE_SKIP_ON_CONFLICT`, `MERGE_REPLACE_VOLUME_ON_CONFLICT` or - * `MERGE_REPLACE_ON_CONFLICT`. - * @type array<\Google\Cloud\GkeBackup\V1\VolumeDataRestorePolicyOverride>|\Google\Protobuf\Internal\RepeatedField $volume_data_restore_policy_overrides - * Optional. Immutable. Overrides the volume data restore policies selected in - * the Restore Config for override-scoped resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The full name of the Restore resource. - * Format: `projects/*/locations/*/restorePlans/*/restores/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The full name of the Restore resource. - * Format: `projects/*/locations/*/restorePlans/*/restores/*` - * - * 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. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The timestamp when this Restore resource 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 timestamp when this Restore resource 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 timestamp when this Restore resource was last - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when this Restore resource was last - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * User specified descriptive string for this Restore. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User specified descriptive string for this Restore. - * - * Generated from protobuf field string description = 5; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. Immutable. A reference to the - * [Backup][google.cloud.gkebackup.v1.Backup] used as the source from which - * this Restore will restore. Note that this Backup must be a sub-resource of - * the RestorePlan's - * [backup_plan][google.cloud.gkebackup.v1.RestorePlan.backup_plan]. Format: - * `projects/*/locations/*/backupPlans/*/backups/*`. - * - * Generated from protobuf field string backup = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getBackup() - { - return $this->backup; - } - - /** - * Required. Immutable. A reference to the - * [Backup][google.cloud.gkebackup.v1.Backup] used as the source from which - * this Restore will restore. Note that this Backup must be a sub-resource of - * the RestorePlan's - * [backup_plan][google.cloud.gkebackup.v1.RestorePlan.backup_plan]. Format: - * `projects/*/locations/*/backupPlans/*/backups/*`. - * - * Generated from protobuf field string backup = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkString($var, True); - $this->backup = $var; - - return $this; - } - - /** - * Output only. The target cluster into which this Restore will restore data. - * Valid formats: - * - `projects/*/locations/*/clusters/*` - * - `projects/*/zones/*/clusters/*` - * Inherited from parent RestorePlan's - * [cluster][google.cloud.gkebackup.v1.RestorePlan.cluster] value. - * - * Generated from protobuf field string cluster = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * Output only. The target cluster into which this Restore will restore data. - * Valid formats: - * - `projects/*/locations/*/clusters/*` - * - `projects/*/zones/*/clusters/*` - * Inherited from parent RestorePlan's - * [cluster][google.cloud.gkebackup.v1.RestorePlan.cluster] value. - * - * Generated from protobuf field string cluster = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkString($var, True); - $this->cluster = $var; - - return $this; - } - - /** - * Output only. Configuration of the Restore. Inherited from parent - * RestorePlan's - * [restore_config][google.cloud.gkebackup.v1.RestorePlan.restore_config]. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig restore_config = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeBackup\V1\RestoreConfig|null - */ - public function getRestoreConfig() - { - return $this->restore_config; - } - - public function hasRestoreConfig() - { - return isset($this->restore_config); - } - - public function clearRestoreConfig() - { - unset($this->restore_config); - } - - /** - * Output only. Configuration of the Restore. Inherited from parent - * RestorePlan's - * [restore_config][google.cloud.gkebackup.v1.RestorePlan.restore_config]. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig restore_config = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeBackup\V1\RestoreConfig $var - * @return $this - */ - public function setRestoreConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestoreConfig::class); - $this->restore_config = $var; - - return $this; - } - - /** - * A set of custom labels supplied by user. - * - * Generated from protobuf field map labels = 9; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * A set of custom labels supplied by user. - * - * Generated from protobuf field map labels = 9; - * @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; - } - - /** - * Output only. The current state of the Restore. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Restore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the Restore. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Restore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\Restore\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Human-readable description of why the Restore is in its - * current state. - * - * Generated from protobuf field string state_reason = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateReason() - { - return $this->state_reason; - } - - /** - * Output only. Human-readable description of why the Restore is in its - * current state. - * - * Generated from protobuf field string state_reason = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateReason($var) - { - GPBUtil::checkString($var, True); - $this->state_reason = $var; - - return $this; - } - - /** - * Output only. Timestamp of when the restore operation completed. - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCompleteTime() - { - return $this->complete_time; - } - - public function hasCompleteTime() - { - return isset($this->complete_time); - } - - public function clearCompleteTime() - { - unset($this->complete_time); - } - - /** - * Output only. Timestamp of when the restore operation completed. - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCompleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->complete_time = $var; - - return $this; - } - - /** - * Output only. Number of resources restored during the restore execution. - * - * Generated from protobuf field int32 resources_restored_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getResourcesRestoredCount() - { - return $this->resources_restored_count; - } - - /** - * Output only. Number of resources restored during the restore execution. - * - * Generated from protobuf field int32 resources_restored_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setResourcesRestoredCount($var) - { - GPBUtil::checkInt32($var); - $this->resources_restored_count = $var; - - return $this; - } - - /** - * Output only. Number of resources excluded during the restore execution. - * - * Generated from protobuf field int32 resources_excluded_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getResourcesExcludedCount() - { - return $this->resources_excluded_count; - } - - /** - * Output only. Number of resources excluded during the restore execution. - * - * Generated from protobuf field int32 resources_excluded_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setResourcesExcludedCount($var) - { - GPBUtil::checkInt32($var); - $this->resources_excluded_count = $var; - - return $this; - } - - /** - * Output only. Number of resources that failed to be restored during the - * restore execution. - * - * Generated from protobuf field int32 resources_failed_count = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getResourcesFailedCount() - { - return $this->resources_failed_count; - } - - /** - * Output only. Number of resources that failed to be restored during the - * restore execution. - * - * Generated from protobuf field int32 resources_failed_count = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setResourcesFailedCount($var) - { - GPBUtil::checkInt32($var); - $this->resources_failed_count = $var; - - return $this; - } - - /** - * Output only. Number of volumes restored during the restore execution. - * - * Generated from protobuf field int32 volumes_restored_count = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getVolumesRestoredCount() - { - return $this->volumes_restored_count; - } - - /** - * Output only. Number of volumes restored during the restore execution. - * - * Generated from protobuf field int32 volumes_restored_count = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setVolumesRestoredCount($var) - { - GPBUtil::checkInt32($var); - $this->volumes_restored_count = $var; - - return $this; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a restore from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform restore updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetRestore`, - * and systems are expected to put that etag in the request to - * `UpdateRestore` or `DeleteRestore` to ensure that their change will be - * applied to the same version of the resource. - * - * Generated from protobuf field string etag = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a restore from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform restore updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetRestore`, - * and systems are expected to put that etag in the request to - * `UpdateRestore` or `DeleteRestore` to ensure that their change will be - * applied to the same version of the resource. - * - * Generated from protobuf field string etag = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. Immutable. Filters resources for `Restore`. If not specified, the - * scope of the restore will remain the same as defined in the `RestorePlan`. - * If this is specified, and no resources are matched by the - * `inclusion_filters` or everyting is excluded by the `exclusion_filters`, - * nothing will be restored. This filter can only be specified if the value of - * [namespaced_resource_restore_mode][google.cloud.gkebackup.v1.RestoreConfig.namespaced_resource_restore_mode] - * is set to `MERGE_SKIP_ON_CONFLICT`, `MERGE_REPLACE_VOLUME_ON_CONFLICT` or - * `MERGE_REPLACE_ON_CONFLICT`. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Restore.Filter filter = 18 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeBackup\V1\Restore\Filter|null - */ - public function getFilter() - { - return $this->filter; - } - - public function hasFilter() - { - return isset($this->filter); - } - - public function clearFilter() - { - unset($this->filter); - } - - /** - * Optional. Immutable. Filters resources for `Restore`. If not specified, the - * scope of the restore will remain the same as defined in the `RestorePlan`. - * If this is specified, and no resources are matched by the - * `inclusion_filters` or everyting is excluded by the `exclusion_filters`, - * nothing will be restored. This filter can only be specified if the value of - * [namespaced_resource_restore_mode][google.cloud.gkebackup.v1.RestoreConfig.namespaced_resource_restore_mode] - * is set to `MERGE_SKIP_ON_CONFLICT`, `MERGE_REPLACE_VOLUME_ON_CONFLICT` or - * `MERGE_REPLACE_ON_CONFLICT`. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Restore.Filter filter = 18 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeBackup\V1\Restore\Filter $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Restore\Filter::class); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Immutable. Overrides the volume data restore policies selected in - * the Restore Config for override-scoped resources. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride volume_data_restore_policy_overrides = 19 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVolumeDataRestorePolicyOverrides() - { - return $this->volume_data_restore_policy_overrides; - } - - /** - * Optional. Immutable. Overrides the volume data restore policies selected in - * the Restore Config for override-scoped resources. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride volume_data_restore_policy_overrides = 19 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeBackup\V1\VolumeDataRestorePolicyOverride>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVolumeDataRestorePolicyOverrides($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\VolumeDataRestorePolicyOverride::class); - $this->volume_data_restore_policy_overrides = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore/Filter.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore/Filter.php deleted file mode 100644 index 35bd91567ba4..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore/Filter.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.gkebackup.v1.Restore.Filter - */ -class Filter extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Selects resources for restoration. If specified, only resources - * which match `inclusion_filters` will be selected for restoration. A - * resource will be selected if it matches any `ResourceSelector` of the - * `inclusion_filters`. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.ResourceSelector inclusion_filters = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $inclusion_filters; - /** - * Optional. Excludes resources from restoration. If specified, - * a resource will not be restored if it matches - * any `ResourceSelector` of the `exclusion_filters`. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.ResourceSelector exclusion_filters = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $exclusion_filters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeBackup\V1\ResourceSelector>|\Google\Protobuf\Internal\RepeatedField $inclusion_filters - * Optional. Selects resources for restoration. If specified, only resources - * which match `inclusion_filters` will be selected for restoration. A - * resource will be selected if it matches any `ResourceSelector` of the - * `inclusion_filters`. - * @type array<\Google\Cloud\GkeBackup\V1\ResourceSelector>|\Google\Protobuf\Internal\RepeatedField $exclusion_filters - * Optional. Excludes resources from restoration. If specified, - * a resource will not be restored if it matches - * any `ResourceSelector` of the `exclusion_filters`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Selects resources for restoration. If specified, only resources - * which match `inclusion_filters` will be selected for restoration. A - * resource will be selected if it matches any `ResourceSelector` of the - * `inclusion_filters`. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.ResourceSelector inclusion_filters = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInclusionFilters() - { - return $this->inclusion_filters; - } - - /** - * Optional. Selects resources for restoration. If specified, only resources - * which match `inclusion_filters` will be selected for restoration. A - * resource will be selected if it matches any `ResourceSelector` of the - * `inclusion_filters`. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.ResourceSelector inclusion_filters = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeBackup\V1\ResourceSelector>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInclusionFilters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\ResourceSelector::class); - $this->inclusion_filters = $arr; - - return $this; - } - - /** - * Optional. Excludes resources from restoration. If specified, - * a resource will not be restored if it matches - * any `ResourceSelector` of the `exclusion_filters`. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.ResourceSelector exclusion_filters = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExclusionFilters() - { - return $this->exclusion_filters; - } - - /** - * Optional. Excludes resources from restoration. If specified, - * a resource will not be restored if it matches - * any `ResourceSelector` of the `exclusion_filters`. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.ResourceSelector exclusion_filters = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeBackup\V1\ResourceSelector>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExclusionFilters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\ResourceSelector::class); - $this->exclusion_filters = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Filter::class, \Google\Cloud\GkeBackup\V1\Restore_Filter::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore/State.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore/State.php deleted file mode 100644 index 3c28235bc7c4..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore/State.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.gkebackup.v1.Restore.State - */ -class State -{ - /** - * The Restore resource is in the process of being created. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The Restore resource has been created and the associated RestoreJob - * Kubernetes resource has been injected into target cluster. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The gkebackup agent in the cluster has begun executing the restore - * operation. - * - * Generated from protobuf enum IN_PROGRESS = 2; - */ - const IN_PROGRESS = 2; - /** - * The restore operation has completed successfully. Restored workloads may - * not yet be operational. - * - * Generated from protobuf enum SUCCEEDED = 3; - */ - const SUCCEEDED = 3; - /** - * The restore operation has failed. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - /** - * This Restore resource is in the process of being deleted. - * - * Generated from protobuf enum DELETING = 5; - */ - const DELETING = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::IN_PROGRESS => 'IN_PROGRESS', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::DELETING => 'DELETING', - ]; - - 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\GkeBackup\V1\Restore_State::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig.php deleted file mode 100644 index 0358c01cb4d4..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig.php +++ /dev/null @@ -1,601 +0,0 @@ -google.cloud.gkebackup.v1.RestoreConfig - */ -class RestoreConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Specifies the mechanism to be used to restore volume data. - * Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as - * NO_VOLUME_DATA_RESTORATION). - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy volume_data_restore_policy = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $volume_data_restore_policy = 0; - /** - * Optional. Defines the behavior for handling the situation where - * cluster-scoped resources being restored already exist in the target - * cluster. This MUST be set to a value other than - * CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if - * [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope] - * is not empty. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy cluster_resource_conflict_policy = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cluster_resource_conflict_policy = 0; - /** - * Optional. Defines the behavior for handling the situation where sets of - * namespaced resources being restored already exist in the target cluster. - * This MUST be set to a value other than - * NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode namespaced_resource_restore_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $namespaced_resource_restore_mode = 0; - /** - * Optional. Identifies the cluster-scoped resources to restore from the - * Backup. Not specifying it means NO cluster resource will be restored. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cluster_resource_restore_scope = null; - /** - * Optional. A list of transformation rules to be applied against Kubernetes - * resources as they are selected for restoration from a Backup. Rules are - * executed in order defined - this order matters, as changes made by a rule - * may impact the filtering logic of subsequent rules. An empty list means no - * substitution will occur. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $substitution_rules; - /** - * Optional. A list of transformation rules to be applied against Kubernetes - * resources as they are selected for restoration from a Backup. Rules are - * executed in order defined - this order matters, as changes made by a rule - * may impact the filtering logic of subsequent rules. An empty list means no - * transformation will occur. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $transformation_rules; - /** - * Optional. A table that binds volumes by their scope to a restore policy. - * Bindings must have a unique scope. Any volumes not scoped in the bindings - * are subject to the policy defined in volume_data_restore_policy. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $volume_data_restore_policy_bindings; - /** - * Optional. RestoreOrder contains custom ordering to use on a Restore. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder restore_order = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $restore_order = null; - protected $namespaced_resource_restore_scope; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $volume_data_restore_policy - * Optional. Specifies the mechanism to be used to restore volume data. - * Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as - * NO_VOLUME_DATA_RESTORATION). - * @type int $cluster_resource_conflict_policy - * Optional. Defines the behavior for handling the situation where - * cluster-scoped resources being restored already exist in the target - * cluster. This MUST be set to a value other than - * CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if - * [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope] - * is not empty. - * @type int $namespaced_resource_restore_mode - * Optional. Defines the behavior for handling the situation where sets of - * namespaced resources being restored already exist in the target cluster. - * This MUST be set to a value other than - * NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. - * @type \Google\Cloud\GkeBackup\V1\RestoreConfig\ClusterResourceRestoreScope $cluster_resource_restore_scope - * Optional. Identifies the cluster-scoped resources to restore from the - * Backup. Not specifying it means NO cluster resource will be restored. - * @type bool $all_namespaces - * Restore all namespaced resources in the Backup if set to "True". - * Specifying this field to "False" is an error. - * @type \Google\Cloud\GkeBackup\V1\Namespaces $selected_namespaces - * A list of selected Namespaces to restore from the Backup. The listed - * Namespaces and all resources contained in them will be restored. - * @type \Google\Cloud\GkeBackup\V1\NamespacedNames $selected_applications - * A list of selected ProtectedApplications to restore. The listed - * ProtectedApplications and all the resources to which they refer will be - * restored. - * @type bool $no_namespaces - * Do not restore any namespaced resources if set to "True". - * Specifying this field to "False" is not allowed. - * @type \Google\Cloud\GkeBackup\V1\Namespaces $excluded_namespaces - * A list of selected namespaces excluded from restoration. All - * namespaces except those in this list will be restored. - * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\SubstitutionRule>|\Google\Protobuf\Internal\RepeatedField $substitution_rules - * Optional. A list of transformation rules to be applied against Kubernetes - * resources as they are selected for restoration from a Backup. Rules are - * executed in order defined - this order matters, as changes made by a rule - * may impact the filtering logic of subsequent rules. An empty list means no - * substitution will occur. - * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\TransformationRule>|\Google\Protobuf\Internal\RepeatedField $transformation_rules - * Optional. A list of transformation rules to be applied against Kubernetes - * resources as they are selected for restoration from a Backup. Rules are - * executed in order defined - this order matters, as changes made by a rule - * may impact the filtering logic of subsequent rules. An empty list means no - * transformation will occur. - * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\VolumeDataRestorePolicyBinding>|\Google\Protobuf\Internal\RepeatedField $volume_data_restore_policy_bindings - * Optional. A table that binds volumes by their scope to a restore policy. - * Bindings must have a unique scope. Any volumes not scoped in the bindings - * are subject to the policy defined in volume_data_restore_policy. - * @type \Google\Cloud\GkeBackup\V1\RestoreConfig\RestoreOrder $restore_order - * Optional. RestoreOrder contains custom ordering to use on a Restore. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Specifies the mechanism to be used to restore volume data. - * Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as - * NO_VOLUME_DATA_RESTORATION). - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy volume_data_restore_policy = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getVolumeDataRestorePolicy() - { - return $this->volume_data_restore_policy; - } - - /** - * Optional. Specifies the mechanism to be used to restore volume data. - * Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as - * NO_VOLUME_DATA_RESTORATION). - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy volume_data_restore_policy = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setVolumeDataRestorePolicy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\VolumeDataRestorePolicy::class); - $this->volume_data_restore_policy = $var; - - return $this; - } - - /** - * Optional. Defines the behavior for handling the situation where - * cluster-scoped resources being restored already exist in the target - * cluster. This MUST be set to a value other than - * CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if - * [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope] - * is not empty. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy cluster_resource_conflict_policy = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getClusterResourceConflictPolicy() - { - return $this->cluster_resource_conflict_policy; - } - - /** - * Optional. Defines the behavior for handling the situation where - * cluster-scoped resources being restored already exist in the target - * cluster. This MUST be set to a value other than - * CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if - * [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope] - * is not empty. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy cluster_resource_conflict_policy = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setClusterResourceConflictPolicy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\ClusterResourceConflictPolicy::class); - $this->cluster_resource_conflict_policy = $var; - - return $this; - } - - /** - * Optional. Defines the behavior for handling the situation where sets of - * namespaced resources being restored already exist in the target cluster. - * This MUST be set to a value other than - * NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode namespaced_resource_restore_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getNamespacedResourceRestoreMode() - { - return $this->namespaced_resource_restore_mode; - } - - /** - * Optional. Defines the behavior for handling the situation where sets of - * namespaced resources being restored already exist in the target cluster. - * This MUST be set to a value other than - * NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode namespaced_resource_restore_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setNamespacedResourceRestoreMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\NamespacedResourceRestoreMode::class); - $this->namespaced_resource_restore_mode = $var; - - return $this; - } - - /** - * Optional. Identifies the cluster-scoped resources to restore from the - * Backup. Not specifying it means NO cluster resource will be restored. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeBackup\V1\RestoreConfig\ClusterResourceRestoreScope|null - */ - public function getClusterResourceRestoreScope() - { - return $this->cluster_resource_restore_scope; - } - - public function hasClusterResourceRestoreScope() - { - return isset($this->cluster_resource_restore_scope); - } - - public function clearClusterResourceRestoreScope() - { - unset($this->cluster_resource_restore_scope); - } - - /** - * Optional. Identifies the cluster-scoped resources to restore from the - * Backup. Not specifying it means NO cluster resource will be restored. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeBackup\V1\RestoreConfig\ClusterResourceRestoreScope $var - * @return $this - */ - public function setClusterResourceRestoreScope($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\ClusterResourceRestoreScope::class); - $this->cluster_resource_restore_scope = $var; - - return $this; - } - - /** - * Restore all namespaced resources in the Backup if set to "True". - * Specifying this field to "False" is an error. - * - * Generated from protobuf field bool all_namespaces = 5; - * @return bool - */ - public function getAllNamespaces() - { - return $this->readOneof(5); - } - - public function hasAllNamespaces() - { - return $this->hasOneof(5); - } - - /** - * Restore all namespaced resources in the Backup if set to "True". - * Specifying this field to "False" is an error. - * - * Generated from protobuf field bool all_namespaces = 5; - * @param bool $var - * @return $this - */ - public function setAllNamespaces($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * A list of selected Namespaces to restore from the Backup. The listed - * Namespaces and all resources contained in them will be restored. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 6; - * @return \Google\Cloud\GkeBackup\V1\Namespaces|null - */ - public function getSelectedNamespaces() - { - return $this->readOneof(6); - } - - public function hasSelectedNamespaces() - { - return $this->hasOneof(6); - } - - /** - * A list of selected Namespaces to restore from the Backup. The listed - * Namespaces and all resources contained in them will be restored. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 6; - * @param \Google\Cloud\GkeBackup\V1\Namespaces $var - * @return $this - */ - public function setSelectedNamespaces($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Namespaces::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * A list of selected ProtectedApplications to restore. The listed - * ProtectedApplications and all the resources to which they refer will be - * restored. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 7; - * @return \Google\Cloud\GkeBackup\V1\NamespacedNames|null - */ - public function getSelectedApplications() - { - return $this->readOneof(7); - } - - public function hasSelectedApplications() - { - return $this->hasOneof(7); - } - - /** - * A list of selected ProtectedApplications to restore. The listed - * ProtectedApplications and all the resources to which they refer will be - * restored. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 7; - * @param \Google\Cloud\GkeBackup\V1\NamespacedNames $var - * @return $this - */ - public function setSelectedApplications($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\NamespacedNames::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Do not restore any namespaced resources if set to "True". - * Specifying this field to "False" is not allowed. - * - * Generated from protobuf field bool no_namespaces = 9; - * @return bool - */ - public function getNoNamespaces() - { - return $this->readOneof(9); - } - - public function hasNoNamespaces() - { - return $this->hasOneof(9); - } - - /** - * Do not restore any namespaced resources if set to "True". - * Specifying this field to "False" is not allowed. - * - * Generated from protobuf field bool no_namespaces = 9; - * @param bool $var - * @return $this - */ - public function setNoNamespaces($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * A list of selected namespaces excluded from restoration. All - * namespaces except those in this list will be restored. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Namespaces excluded_namespaces = 10; - * @return \Google\Cloud\GkeBackup\V1\Namespaces|null - */ - public function getExcludedNamespaces() - { - return $this->readOneof(10); - } - - public function hasExcludedNamespaces() - { - return $this->hasOneof(10); - } - - /** - * A list of selected namespaces excluded from restoration. All - * namespaces except those in this list will be restored. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Namespaces excluded_namespaces = 10; - * @param \Google\Cloud\GkeBackup\V1\Namespaces $var - * @return $this - */ - public function setExcludedNamespaces($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Namespaces::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Optional. A list of transformation rules to be applied against Kubernetes - * resources as they are selected for restoration from a Backup. Rules are - * executed in order defined - this order matters, as changes made by a rule - * may impact the filtering logic of subsequent rules. An empty list means no - * substitution will occur. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSubstitutionRules() - { - return $this->substitution_rules; - } - - /** - * Optional. A list of transformation rules to be applied against Kubernetes - * resources as they are selected for restoration from a Backup. Rules are - * executed in order defined - this order matters, as changes made by a rule - * may impact the filtering logic of subsequent rules. An empty list means no - * substitution will occur. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\SubstitutionRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSubstitutionRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\RestoreConfig\SubstitutionRule::class); - $this->substitution_rules = $arr; - - return $this; - } - - /** - * Optional. A list of transformation rules to be applied against Kubernetes - * resources as they are selected for restoration from a Backup. Rules are - * executed in order defined - this order matters, as changes made by a rule - * may impact the filtering logic of subsequent rules. An empty list means no - * transformation will occur. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransformationRules() - { - return $this->transformation_rules; - } - - /** - * Optional. A list of transformation rules to be applied against Kubernetes - * resources as they are selected for restoration from a Backup. Rules are - * executed in order defined - this order matters, as changes made by a rule - * may impact the filtering logic of subsequent rules. An empty list means no - * transformation will occur. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\TransformationRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransformationRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\RestoreConfig\TransformationRule::class); - $this->transformation_rules = $arr; - - return $this; - } - - /** - * Optional. A table that binds volumes by their scope to a restore policy. - * Bindings must have a unique scope. Any volumes not scoped in the bindings - * are subject to the policy defined in volume_data_restore_policy. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVolumeDataRestorePolicyBindings() - { - return $this->volume_data_restore_policy_bindings; - } - - /** - * Optional. A table that binds volumes by their scope to a restore policy. - * Bindings must have a unique scope. Any volumes not scoped in the bindings - * are subject to the policy defined in volume_data_restore_policy. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\VolumeDataRestorePolicyBinding>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVolumeDataRestorePolicyBindings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\RestoreConfig\VolumeDataRestorePolicyBinding::class); - $this->volume_data_restore_policy_bindings = $arr; - - return $this; - } - - /** - * Optional. RestoreOrder contains custom ordering to use on a Restore. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder restore_order = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeBackup\V1\RestoreConfig\RestoreOrder|null - */ - public function getRestoreOrder() - { - return $this->restore_order; - } - - public function hasRestoreOrder() - { - return isset($this->restore_order); - } - - public function clearRestoreOrder() - { - unset($this->restore_order); - } - - /** - * Optional. RestoreOrder contains custom ordering to use on a Restore. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder restore_order = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeBackup\V1\RestoreConfig\RestoreOrder $var - * @return $this - */ - public function setRestoreOrder($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\RestoreOrder::class); - $this->restore_order = $var; - - return $this; - } - - /** - * @return string - */ - public function getNamespacedResourceRestoreScope() - { - return $this->whichOneof("namespaced_resource_restore_scope"); - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ClusterResourceConflictPolicy.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ClusterResourceConflictPolicy.php deleted file mode 100644 index e604ecd59aca..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ClusterResourceConflictPolicy.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy - */ -class ClusterResourceConflictPolicy -{ - /** - * Unspecified. Only allowed if no cluster-scoped resources will be - * restored. - * - * Generated from protobuf enum CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0; - */ - const CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0; - /** - * Do not attempt to restore the conflicting resource. - * - * Generated from protobuf enum USE_EXISTING_VERSION = 1; - */ - const USE_EXISTING_VERSION = 1; - /** - * Delete the existing version before re-creating it from the Backup. - * This is a dangerous option which could cause unintentional - * data loss if used inappropriately. For example, deleting a CRD will - * cause Kubernetes to delete all CRs of that type. - * - * Generated from protobuf enum USE_BACKUP_VERSION = 2; - */ - const USE_BACKUP_VERSION = 2; - - private static $valueToName = [ - self::CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED => 'CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED', - self::USE_EXISTING_VERSION => 'USE_EXISTING_VERSION', - self::USE_BACKUP_VERSION => 'USE_BACKUP_VERSION', - ]; - - 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(ClusterResourceConflictPolicy::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_ClusterResourceConflictPolicy::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ClusterResourceRestoreScope.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ClusterResourceRestoreScope.php deleted file mode 100644 index 20c239dfbeb2..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ClusterResourceRestoreScope.php +++ /dev/null @@ -1,219 +0,0 @@ -google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope - */ -class ClusterResourceRestoreScope extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A list of cluster-scoped resource group kinds to restore from - * the backup. If specified, only the selected resources will be restored. - * Mutually exclusive to any other field in the message. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $selected_group_kinds; - /** - * Optional. A list of cluster-scoped resource group kinds to NOT restore - * from the backup. If specified, all valid cluster-scoped resources will be - * restored except for those specified in the list. - * Mutually exclusive to any other field in the message. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $excluded_group_kinds; - /** - * Optional. If True, all valid cluster-scoped resources will be restored. - * Mutually exclusive to any other field in the message. - * - * Generated from protobuf field bool all_group_kinds = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $all_group_kinds = false; - /** - * Optional. If True, no cluster-scoped resources will be restored. - * This has the same restore scope as if the message is not defined. - * Mutually exclusive to any other field in the message. - * - * Generated from protobuf field bool no_group_kinds = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $no_group_kinds = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $selected_group_kinds - * Optional. A list of cluster-scoped resource group kinds to restore from - * the backup. If specified, only the selected resources will be restored. - * Mutually exclusive to any other field in the message. - * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $excluded_group_kinds - * Optional. A list of cluster-scoped resource group kinds to NOT restore - * from the backup. If specified, all valid cluster-scoped resources will be - * restored except for those specified in the list. - * Mutually exclusive to any other field in the message. - * @type bool $all_group_kinds - * Optional. If True, all valid cluster-scoped resources will be restored. - * Mutually exclusive to any other field in the message. - * @type bool $no_group_kinds - * Optional. If True, no cluster-scoped resources will be restored. - * This has the same restore scope as if the message is not defined. - * Mutually exclusive to any other field in the message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A list of cluster-scoped resource group kinds to restore from - * the backup. If specified, only the selected resources will be restored. - * Mutually exclusive to any other field in the message. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSelectedGroupKinds() - { - return $this->selected_group_kinds; - } - - /** - * Optional. A list of cluster-scoped resource group kinds to restore from - * the backup. If specified, only the selected resources will be restored. - * Mutually exclusive to any other field in the message. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSelectedGroupKinds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind::class); - $this->selected_group_kinds = $arr; - - return $this; - } - - /** - * Optional. A list of cluster-scoped resource group kinds to NOT restore - * from the backup. If specified, all valid cluster-scoped resources will be - * restored except for those specified in the list. - * Mutually exclusive to any other field in the message. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExcludedGroupKinds() - { - return $this->excluded_group_kinds; - } - - /** - * Optional. A list of cluster-scoped resource group kinds to NOT restore - * from the backup. If specified, all valid cluster-scoped resources will be - * restored except for those specified in the list. - * Mutually exclusive to any other field in the message. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExcludedGroupKinds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind::class); - $this->excluded_group_kinds = $arr; - - return $this; - } - - /** - * Optional. If True, all valid cluster-scoped resources will be restored. - * Mutually exclusive to any other field in the message. - * - * Generated from protobuf field bool all_group_kinds = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAllGroupKinds() - { - return $this->all_group_kinds; - } - - /** - * Optional. If True, all valid cluster-scoped resources will be restored. - * Mutually exclusive to any other field in the message. - * - * Generated from protobuf field bool all_group_kinds = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAllGroupKinds($var) - { - GPBUtil::checkBool($var); - $this->all_group_kinds = $var; - - return $this; - } - - /** - * Optional. If True, no cluster-scoped resources will be restored. - * This has the same restore scope as if the message is not defined. - * Mutually exclusive to any other field in the message. - * - * Generated from protobuf field bool no_group_kinds = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getNoGroupKinds() - { - return $this->no_group_kinds; - } - - /** - * Optional. If True, no cluster-scoped resources will be restored. - * This has the same restore scope as if the message is not defined. - * Mutually exclusive to any other field in the message. - * - * Generated from protobuf field bool no_group_kinds = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setNoGroupKinds($var) - { - GPBUtil::checkBool($var); - $this->no_group_kinds = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ClusterResourceRestoreScope::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_ClusterResourceRestoreScope::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/GroupKind.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/GroupKind.php deleted file mode 100644 index 25b59279699e..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/GroupKind.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.gkebackup.v1.RestoreConfig.GroupKind - */ -class GroupKind extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. API group string of a Kubernetes resource, e.g. - * "apiextensions.k8s.io", "storage.k8s.io", etc. - * Note: use empty string for core API group - * - * Generated from protobuf field string resource_group = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $resource_group = ''; - /** - * Optional. Kind of a Kubernetes resource, must be in UpperCamelCase - * (PascalCase) and singular form. E.g. "CustomResourceDefinition", - * "StorageClass", etc. - * - * Generated from protobuf field string resource_kind = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $resource_kind = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource_group - * Optional. API group string of a Kubernetes resource, e.g. - * "apiextensions.k8s.io", "storage.k8s.io", etc. - * Note: use empty string for core API group - * @type string $resource_kind - * Optional. Kind of a Kubernetes resource, must be in UpperCamelCase - * (PascalCase) and singular form. E.g. "CustomResourceDefinition", - * "StorageClass", etc. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. API group string of a Kubernetes resource, e.g. - * "apiextensions.k8s.io", "storage.k8s.io", etc. - * Note: use empty string for core API group - * - * Generated from protobuf field string resource_group = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getResourceGroup() - { - return $this->resource_group; - } - - /** - * Optional. API group string of a Kubernetes resource, e.g. - * "apiextensions.k8s.io", "storage.k8s.io", etc. - * Note: use empty string for core API group - * - * Generated from protobuf field string resource_group = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setResourceGroup($var) - { - GPBUtil::checkString($var, True); - $this->resource_group = $var; - - return $this; - } - - /** - * Optional. Kind of a Kubernetes resource, must be in UpperCamelCase - * (PascalCase) and singular form. E.g. "CustomResourceDefinition", - * "StorageClass", etc. - * - * Generated from protobuf field string resource_kind = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getResourceKind() - { - return $this->resource_kind; - } - - /** - * Optional. Kind of a Kubernetes resource, must be in UpperCamelCase - * (PascalCase) and singular form. E.g. "CustomResourceDefinition", - * "StorageClass", etc. - * - * Generated from protobuf field string resource_kind = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setResourceKind($var) - { - GPBUtil::checkString($var, True); - $this->resource_kind = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GroupKind::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_GroupKind::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/NamespacedResourceRestoreMode.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/NamespacedResourceRestoreMode.php deleted file mode 100644 index dd3b7ea66f8b..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/NamespacedResourceRestoreMode.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode - */ -class NamespacedResourceRestoreMode -{ - /** - * Unspecified (invalid). - * - * Generated from protobuf enum NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0; - */ - const NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0; - /** - * When conflicting top-level resources (either Namespaces or - * ProtectedApplications, depending upon the scope) are encountered, this - * will first trigger a delete of the conflicting resource AND ALL OF ITS - * REFERENCED RESOURCES (e.g., all resources in the Namespace or all - * resources referenced by the ProtectedApplication) before restoring the - * resources from the Backup. This mode should only be used when you are - * intending to revert some portion of a cluster to an earlier state. - * - * Generated from protobuf enum DELETE_AND_RESTORE = 1; - */ - const DELETE_AND_RESTORE = 1; - /** - * If conflicting top-level resources (either Namespaces or - * ProtectedApplications, depending upon the scope) are encountered at the - * beginning of a restore process, the Restore will fail. If a conflict - * occurs during the restore process itself (e.g., because an out of band - * process creates conflicting resources), a conflict will be reported. - * - * Generated from protobuf enum FAIL_ON_CONFLICT = 2; - */ - const FAIL_ON_CONFLICT = 2; - /** - * This mode merges the backup and the target cluster and skips the - * conflicting resources. If a single resource to restore exists in the - * cluster before restoration, the resource will be skipped, otherwise it - * will be restored. - * - * Generated from protobuf enum MERGE_SKIP_ON_CONFLICT = 3; - */ - const MERGE_SKIP_ON_CONFLICT = 3; - /** - * This mode merges the backup and the target cluster and skips the - * conflicting resources except volume data. If a PVC to restore already - * exists, this mode will restore/reconnect the volume without overwriting - * the PVC. It is similar to MERGE_SKIP_ON_CONFLICT except that it will - * apply the volume data policy for the conflicting PVCs: - * - RESTORE_VOLUME_DATA_FROM_BACKUP: restore data only and respect the - * reclaim policy of the original PV; - * - REUSE_VOLUME_HANDLE_FROM_BACKUP: reconnect and respect the reclaim - * policy of the original PV; - * - NO_VOLUME_DATA_RESTORATION: new provision and respect the reclaim - * policy of the original PV. - * Note that this mode could cause data loss as the original PV can be - * retained or deleted depending on its reclaim policy. - * - * Generated from protobuf enum MERGE_REPLACE_VOLUME_ON_CONFLICT = 4; - */ - const MERGE_REPLACE_VOLUME_ON_CONFLICT = 4; - /** - * This mode merges the backup and the target cluster and replaces the - * conflicting resources with the ones in the backup. If a single resource - * to restore exists in the cluster before restoration, the resource will be - * replaced with the one from the backup. To replace an existing resource, - * the first attempt is to update the resource to match the one from the - * backup; if the update fails, the second attempt is to delete the resource - * and restore it from the backup. - * Note that this mode could cause data loss as it replaces the existing - * resources in the target cluster, and the original PV can be retained or - * deleted depending on its reclaim policy. - * - * Generated from protobuf enum MERGE_REPLACE_ON_CONFLICT = 5; - */ - const MERGE_REPLACE_ON_CONFLICT = 5; - - private static $valueToName = [ - self::NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED => 'NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED', - self::DELETE_AND_RESTORE => 'DELETE_AND_RESTORE', - self::FAIL_ON_CONFLICT => 'FAIL_ON_CONFLICT', - self::MERGE_SKIP_ON_CONFLICT => 'MERGE_SKIP_ON_CONFLICT', - self::MERGE_REPLACE_VOLUME_ON_CONFLICT => 'MERGE_REPLACE_VOLUME_ON_CONFLICT', - self::MERGE_REPLACE_ON_CONFLICT => 'MERGE_REPLACE_ON_CONFLICT', - ]; - - 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(NamespacedResourceRestoreMode::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_NamespacedResourceRestoreMode::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ResourceFilter.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ResourceFilter.php deleted file mode 100644 index 6fc12eb700f8..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ResourceFilter.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter - */ -class ResourceFilter extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. (Filtering parameter) Any resource subject to transformation - * must be contained within one of the listed Kubernetes Namespace in the - * Backup. If this field is not provided, no namespace filtering will be - * performed (all resources in all Namespaces, including all cluster-scoped - * resources, will be candidates for transformation). - * - * Generated from protobuf field repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $namespaces; - /** - * Optional. (Filtering parameter) Any resource subject to transformation - * must belong to one of the listed "types". If this field is not provided, - * no type filtering will be performed (all resources of all types matching - * previous filtering parameters will be candidates for transformation). - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $group_kinds; - /** - * Optional. This is a [JSONPath] - * (https://github.com/json-path/JsonPath/blob/master/README.md) - * expression that matches specific fields of candidate - * resources and it operates as a filtering parameter (resources that - * are not matched with this expression will not be candidates for - * transformation). - * - * Generated from protobuf field string json_path = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $json_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $namespaces - * Optional. (Filtering parameter) Any resource subject to transformation - * must be contained within one of the listed Kubernetes Namespace in the - * Backup. If this field is not provided, no namespace filtering will be - * performed (all resources in all Namespaces, including all cluster-scoped - * resources, will be candidates for transformation). - * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $group_kinds - * Optional. (Filtering parameter) Any resource subject to transformation - * must belong to one of the listed "types". If this field is not provided, - * no type filtering will be performed (all resources of all types matching - * previous filtering parameters will be candidates for transformation). - * @type string $json_path - * Optional. This is a [JSONPath] - * (https://github.com/json-path/JsonPath/blob/master/README.md) - * expression that matches specific fields of candidate - * resources and it operates as a filtering parameter (resources that - * are not matched with this expression will not be candidates for - * transformation). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. (Filtering parameter) Any resource subject to transformation - * must be contained within one of the listed Kubernetes Namespace in the - * Backup. If this field is not provided, no namespace filtering will be - * performed (all resources in all Namespaces, including all cluster-scoped - * resources, will be candidates for transformation). - * - * Generated from protobuf field repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNamespaces() - { - return $this->namespaces; - } - - /** - * Optional. (Filtering parameter) Any resource subject to transformation - * must be contained within one of the listed Kubernetes Namespace in the - * Backup. If this field is not provided, no namespace filtering will be - * performed (all resources in all Namespaces, including all cluster-scoped - * resources, will be candidates for transformation). - * - * Generated from protobuf field repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNamespaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespaces = $arr; - - return $this; - } - - /** - * Optional. (Filtering parameter) Any resource subject to transformation - * must belong to one of the listed "types". If this field is not provided, - * no type filtering will be performed (all resources of all types matching - * previous filtering parameters will be candidates for transformation). - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGroupKinds() - { - return $this->group_kinds; - } - - /** - * Optional. (Filtering parameter) Any resource subject to transformation - * must belong to one of the listed "types". If this field is not provided, - * no type filtering will be performed (all resources of all types matching - * previous filtering parameters will be candidates for transformation). - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGroupKinds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind::class); - $this->group_kinds = $arr; - - return $this; - } - - /** - * Optional. This is a [JSONPath] - * (https://github.com/json-path/JsonPath/blob/master/README.md) - * expression that matches specific fields of candidate - * resources and it operates as a filtering parameter (resources that - * are not matched with this expression will not be candidates for - * transformation). - * - * Generated from protobuf field string json_path = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getJsonPath() - { - return $this->json_path; - } - - /** - * Optional. This is a [JSONPath] - * (https://github.com/json-path/JsonPath/blob/master/README.md) - * expression that matches specific fields of candidate - * resources and it operates as a filtering parameter (resources that - * are not matched with this expression will not be candidates for - * transformation). - * - * Generated from protobuf field string json_path = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setJsonPath($var) - { - GPBUtil::checkString($var, True); - $this->json_path = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ResourceFilter::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_ResourceFilter::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/RestoreOrder.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/RestoreOrder.php deleted file mode 100644 index 072bd68e7767..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/RestoreOrder.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder - */ -class RestoreOrder extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Contains a list of group kind dependency pairs provided - * by the customer, that is used by Backup for GKE to - * generate a group kind restore order. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $group_kind_dependencies; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\RestoreOrder\GroupKindDependency>|\Google\Protobuf\Internal\RepeatedField $group_kind_dependencies - * Optional. Contains a list of group kind dependency pairs provided - * by the customer, that is used by Backup for GKE to - * generate a group kind restore order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Contains a list of group kind dependency pairs provided - * by the customer, that is used by Backup for GKE to - * generate a group kind restore order. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGroupKindDependencies() - { - return $this->group_kind_dependencies; - } - - /** - * Optional. Contains a list of group kind dependency pairs provided - * by the customer, that is used by Backup for GKE to - * generate a group kind restore order. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\RestoreOrder\GroupKindDependency>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGroupKindDependencies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\RestoreConfig\RestoreOrder\GroupKindDependency::class); - $this->group_kind_dependencies = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RestoreOrder::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_RestoreOrder::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/RestoreOrder/GroupKindDependency.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/RestoreOrder/GroupKindDependency.php deleted file mode 100644 index de9037549886..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/RestoreOrder/GroupKindDependency.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency - */ -class GroupKindDependency extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The satisfying group kind must be restored first - * in order to satisfy the dependency. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $satisfying = null; - /** - * Required. The requiring group kind requires that the other - * group kind be restored first. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $requiring = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind $satisfying - * Required. The satisfying group kind must be restored first - * in order to satisfy the dependency. - * @type \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind $requiring - * Required. The requiring group kind requires that the other - * group kind be restored first. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The satisfying group kind must be restored first - * in order to satisfy the dependency. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind|null - */ - public function getSatisfying() - { - return $this->satisfying; - } - - public function hasSatisfying() - { - return isset($this->satisfying); - } - - public function clearSatisfying() - { - unset($this->satisfying); - } - - /** - * Required. The satisfying group kind must be restored first - * in order to satisfy the dependency. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind $var - * @return $this - */ - public function setSatisfying($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind::class); - $this->satisfying = $var; - - return $this; - } - - /** - * Required. The requiring group kind requires that the other - * group kind be restored first. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind|null - */ - public function getRequiring() - { - return $this->requiring; - } - - public function hasRequiring() - { - return isset($this->requiring); - } - - public function clearRequiring() - { - unset($this->requiring); - } - - /** - * Required. The requiring group kind requires that the other - * group kind be restored first. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind $var - * @return $this - */ - public function setRequiring($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind::class); - $this->requiring = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GroupKindDependency::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_RestoreOrder_GroupKindDependency::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/SubstitutionRule.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/SubstitutionRule.php deleted file mode 100644 index 59c1bf426d5e..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/SubstitutionRule.php +++ /dev/null @@ -1,312 +0,0 @@ -google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule - */ -class SubstitutionRule extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. (Filtering parameter) Any resource subject to substitution must - * be contained within one of the listed Kubernetes Namespace in the Backup. - * If this field is not provided, no namespace filtering will be performed - * (all resources in all Namespaces, including all cluster-scoped resources, - * will be candidates for substitution). - * To mix cluster-scoped and namespaced resources in the same rule, use an - * empty string ("") as one of the target namespaces. - * - * Generated from protobuf field repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $target_namespaces; - /** - * Optional. (Filtering parameter) Any resource subject to substitution must - * belong to one of the listed "types". If this field is not provided, no - * type filtering will be performed (all resources of all types matching - * previous filtering parameters will be candidates for substitution). - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $target_group_kinds; - /** - * Required. This is a [JSONPath] - * (https://kubernetes.io/docs/reference/kubectl/jsonpath/) - * expression that matches specific fields of candidate - * resources and it operates as both a filtering parameter (resources that - * are not matched with this expression will not be candidates for - * substitution) as well as a field identifier (identifies exactly which - * fields out of the candidate resources will be modified). - * - * Generated from protobuf field string target_json_path = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $target_json_path = ''; - /** - * Optional. (Filtering parameter) This is a [regular expression] - * (https://en.wikipedia.org/wiki/Regular_expression) - * that is compared against the fields matched by the target_json_path - * expression (and must also have passed the previous filters). - * Substitution will not be performed against fields whose - * value does not match this expression. If this field is NOT specified, - * then ALL fields matched by the target_json_path expression will undergo - * substitution. Note that an empty (e.g., "", rather than unspecified) - * value for this field will only match empty fields. - * - * Generated from protobuf field string original_value_pattern = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $original_value_pattern = ''; - /** - * Optional. This is the new value to set for any fields that pass the - * filtering and selection criteria. To remove a value from a Kubernetes - * resource, either leave this field unspecified, or set it to the empty - * string (""). - * - * Generated from protobuf field string new_value = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $new_value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $target_namespaces - * Optional. (Filtering parameter) Any resource subject to substitution must - * be contained within one of the listed Kubernetes Namespace in the Backup. - * If this field is not provided, no namespace filtering will be performed - * (all resources in all Namespaces, including all cluster-scoped resources, - * will be candidates for substitution). - * To mix cluster-scoped and namespaced resources in the same rule, use an - * empty string ("") as one of the target namespaces. - * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $target_group_kinds - * Optional. (Filtering parameter) Any resource subject to substitution must - * belong to one of the listed "types". If this field is not provided, no - * type filtering will be performed (all resources of all types matching - * previous filtering parameters will be candidates for substitution). - * @type string $target_json_path - * Required. This is a [JSONPath] - * (https://kubernetes.io/docs/reference/kubectl/jsonpath/) - * expression that matches specific fields of candidate - * resources and it operates as both a filtering parameter (resources that - * are not matched with this expression will not be candidates for - * substitution) as well as a field identifier (identifies exactly which - * fields out of the candidate resources will be modified). - * @type string $original_value_pattern - * Optional. (Filtering parameter) This is a [regular expression] - * (https://en.wikipedia.org/wiki/Regular_expression) - * that is compared against the fields matched by the target_json_path - * expression (and must also have passed the previous filters). - * Substitution will not be performed against fields whose - * value does not match this expression. If this field is NOT specified, - * then ALL fields matched by the target_json_path expression will undergo - * substitution. Note that an empty (e.g., "", rather than unspecified) - * value for this field will only match empty fields. - * @type string $new_value - * Optional. This is the new value to set for any fields that pass the - * filtering and selection criteria. To remove a value from a Kubernetes - * resource, either leave this field unspecified, or set it to the empty - * string (""). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. (Filtering parameter) Any resource subject to substitution must - * be contained within one of the listed Kubernetes Namespace in the Backup. - * If this field is not provided, no namespace filtering will be performed - * (all resources in all Namespaces, including all cluster-scoped resources, - * will be candidates for substitution). - * To mix cluster-scoped and namespaced resources in the same rule, use an - * empty string ("") as one of the target namespaces. - * - * Generated from protobuf field repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargetNamespaces() - { - return $this->target_namespaces; - } - - /** - * Optional. (Filtering parameter) Any resource subject to substitution must - * be contained within one of the listed Kubernetes Namespace in the Backup. - * If this field is not provided, no namespace filtering will be performed - * (all resources in all Namespaces, including all cluster-scoped resources, - * will be candidates for substitution). - * To mix cluster-scoped and namespaced resources in the same rule, use an - * empty string ("") as one of the target namespaces. - * - * Generated from protobuf field repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargetNamespaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->target_namespaces = $arr; - - return $this; - } - - /** - * Optional. (Filtering parameter) Any resource subject to substitution must - * belong to one of the listed "types". If this field is not provided, no - * type filtering will be performed (all resources of all types matching - * previous filtering parameters will be candidates for substitution). - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargetGroupKinds() - { - return $this->target_group_kinds; - } - - /** - * Optional. (Filtering parameter) Any resource subject to substitution must - * belong to one of the listed "types". If this field is not provided, no - * type filtering will be performed (all resources of all types matching - * previous filtering parameters will be candidates for substitution). - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargetGroupKinds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind::class); - $this->target_group_kinds = $arr; - - return $this; - } - - /** - * Required. This is a [JSONPath] - * (https://kubernetes.io/docs/reference/kubectl/jsonpath/) - * expression that matches specific fields of candidate - * resources and it operates as both a filtering parameter (resources that - * are not matched with this expression will not be candidates for - * substitution) as well as a field identifier (identifies exactly which - * fields out of the candidate resources will be modified). - * - * Generated from protobuf field string target_json_path = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTargetJsonPath() - { - return $this->target_json_path; - } - - /** - * Required. This is a [JSONPath] - * (https://kubernetes.io/docs/reference/kubectl/jsonpath/) - * expression that matches specific fields of candidate - * resources and it operates as both a filtering parameter (resources that - * are not matched with this expression will not be candidates for - * substitution) as well as a field identifier (identifies exactly which - * fields out of the candidate resources will be modified). - * - * Generated from protobuf field string target_json_path = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTargetJsonPath($var) - { - GPBUtil::checkString($var, True); - $this->target_json_path = $var; - - return $this; - } - - /** - * Optional. (Filtering parameter) This is a [regular expression] - * (https://en.wikipedia.org/wiki/Regular_expression) - * that is compared against the fields matched by the target_json_path - * expression (and must also have passed the previous filters). - * Substitution will not be performed against fields whose - * value does not match this expression. If this field is NOT specified, - * then ALL fields matched by the target_json_path expression will undergo - * substitution. Note that an empty (e.g., "", rather than unspecified) - * value for this field will only match empty fields. - * - * Generated from protobuf field string original_value_pattern = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOriginalValuePattern() - { - return $this->original_value_pattern; - } - - /** - * Optional. (Filtering parameter) This is a [regular expression] - * (https://en.wikipedia.org/wiki/Regular_expression) - * that is compared against the fields matched by the target_json_path - * expression (and must also have passed the previous filters). - * Substitution will not be performed against fields whose - * value does not match this expression. If this field is NOT specified, - * then ALL fields matched by the target_json_path expression will undergo - * substitution. Note that an empty (e.g., "", rather than unspecified) - * value for this field will only match empty fields. - * - * Generated from protobuf field string original_value_pattern = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOriginalValuePattern($var) - { - GPBUtil::checkString($var, True); - $this->original_value_pattern = $var; - - return $this; - } - - /** - * Optional. This is the new value to set for any fields that pass the - * filtering and selection criteria. To remove a value from a Kubernetes - * resource, either leave this field unspecified, or set it to the empty - * string (""). - * - * Generated from protobuf field string new_value = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNewValue() - { - return $this->new_value; - } - - /** - * Optional. This is the new value to set for any fields that pass the - * filtering and selection criteria. To remove a value from a Kubernetes - * resource, either leave this field unspecified, or set it to the empty - * string (""). - * - * Generated from protobuf field string new_value = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setNewValue($var) - { - GPBUtil::checkString($var, True); - $this->new_value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SubstitutionRule::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_SubstitutionRule::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/TransformationRule.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/TransformationRule.php deleted file mode 100644 index 1c693f9c1c6a..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/TransformationRule.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.gkebackup.v1.RestoreConfig.TransformationRule - */ -class TransformationRule extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A list of transformation rule actions to take against candidate - * resources. Actions are executed in order defined - this order matters, as - * they could potentially interfere with each other and the first operation - * could affect the outcome of the second operation. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $field_actions; - /** - * Optional. This field is used to specify a set of fields that should be - * used to determine which resources in backup should be acted upon by the - * supplied transformation rule actions, and this will ensure that only - * specific resources are affected by transformation rule actions. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $resource_filter = null; - /** - * Optional. The description is a user specified string description of the - * transformation rule. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\TransformationRuleAction>|\Google\Protobuf\Internal\RepeatedField $field_actions - * Required. A list of transformation rule actions to take against candidate - * resources. Actions are executed in order defined - this order matters, as - * they could potentially interfere with each other and the first operation - * could affect the outcome of the second operation. - * @type \Google\Cloud\GkeBackup\V1\RestoreConfig\ResourceFilter $resource_filter - * Optional. This field is used to specify a set of fields that should be - * used to determine which resources in backup should be acted upon by the - * supplied transformation rule actions, and this will ensure that only - * specific resources are affected by transformation rule actions. - * @type string $description - * Optional. The description is a user specified string description of the - * transformation rule. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); - parent::__construct($data); - } - - /** - * Required. A list of transformation rule actions to take against candidate - * resources. Actions are executed in order defined - this order matters, as - * they could potentially interfere with each other and the first operation - * could affect the outcome of the second operation. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFieldActions() - { - return $this->field_actions; - } - - /** - * Required. A list of transformation rule actions to take against candidate - * resources. Actions are executed in order defined - this order matters, as - * they could potentially interfere with each other and the first operation - * could affect the outcome of the second operation. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\TransformationRuleAction>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFieldActions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\RestoreConfig\TransformationRuleAction::class); - $this->field_actions = $arr; - - return $this; - } - - /** - * Optional. This field is used to specify a set of fields that should be - * used to determine which resources in backup should be acted upon by the - * supplied transformation rule actions, and this will ensure that only - * specific resources are affected by transformation rule actions. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeBackup\V1\RestoreConfig\ResourceFilter|null - */ - public function getResourceFilter() - { - return $this->resource_filter; - } - - public function hasResourceFilter() - { - return isset($this->resource_filter); - } - - public function clearResourceFilter() - { - unset($this->resource_filter); - } - - /** - * Optional. This field is used to specify a set of fields that should be - * used to determine which resources in backup should be acted upon by the - * supplied transformation rule actions, and this will ensure that only - * specific resources are affected by transformation rule actions. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeBackup\V1\RestoreConfig\ResourceFilter $var - * @return $this - */ - public function setResourceFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\ResourceFilter::class); - $this->resource_filter = $var; - - return $this; - } - - /** - * Optional. The description is a user specified string description of the - * transformation rule. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. The description is a user specified string description of the - * transformation rule. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TransformationRule::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_TransformationRule::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/TransformationRuleAction.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/TransformationRuleAction.php deleted file mode 100644 index 1d98cda0fcf9..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/TransformationRuleAction.php +++ /dev/null @@ -1,185 +0,0 @@ -google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction - */ -class TransformationRuleAction extends \Google\Protobuf\Internal\Message -{ - /** - * Required. op specifies the operation to perform. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op op = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $op = 0; - /** - * Optional. A string containing a JSON Pointer value that references the - * location in the target document to move the value from. - * - * Generated from protobuf field string from_path = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $from_path = ''; - /** - * Optional. A string containing a JSON-Pointer value that references a - * location within the target document where the operation is performed. - * - * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $path = ''; - /** - * Optional. A string that specifies the desired value in string format to - * use for transformation. - * - * Generated from protobuf field string value = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $op - * Required. op specifies the operation to perform. - * @type string $from_path - * Optional. A string containing a JSON Pointer value that references the - * location in the target document to move the value from. - * @type string $path - * Optional. A string containing a JSON-Pointer value that references a - * location within the target document where the operation is performed. - * @type string $value - * Optional. A string that specifies the desired value in string format to - * use for transformation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); - parent::__construct($data); - } - - /** - * Required. op specifies the operation to perform. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op op = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getOp() - { - return $this->op; - } - - /** - * Required. op specifies the operation to perform. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op op = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setOp($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\TransformationRuleAction\Op::class); - $this->op = $var; - - return $this; - } - - /** - * Optional. A string containing a JSON Pointer value that references the - * location in the target document to move the value from. - * - * Generated from protobuf field string from_path = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFromPath() - { - return $this->from_path; - } - - /** - * Optional. A string containing a JSON Pointer value that references the - * location in the target document to move the value from. - * - * Generated from protobuf field string from_path = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFromPath($var) - { - GPBUtil::checkString($var, True); - $this->from_path = $var; - - return $this; - } - - /** - * Optional. A string containing a JSON-Pointer value that references a - * location within the target document where the operation is performed. - * - * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Optional. A string containing a JSON-Pointer value that references a - * location within the target document where the operation is performed. - * - * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * Optional. A string that specifies the desired value in string format to - * use for transformation. - * - * Generated from protobuf field string value = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Optional. A string that specifies the desired value in string format to - * use for transformation. - * - * Generated from protobuf field string value = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TransformationRuleAction::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_TransformationRuleAction::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/TransformationRuleAction/Op.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/TransformationRuleAction/Op.php deleted file mode 100644 index fb777eac605f..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/TransformationRuleAction/Op.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op - */ -class Op -{ - /** - * Unspecified operation - * - * Generated from protobuf enum OP_UNSPECIFIED = 0; - */ - const OP_UNSPECIFIED = 0; - /** - * The "remove" operation removes the value at the target location. - * - * Generated from protobuf enum REMOVE = 1; - */ - const REMOVE = 1; - /** - * The "move" operation removes the value at a specified location and - * adds it to the target location. - * - * Generated from protobuf enum MOVE = 2; - */ - const MOVE = 2; - /** - * The "copy" operation copies the value at a specified location to the - * target location. - * - * Generated from protobuf enum COPY = 3; - */ - const COPY = 3; - /** - * The "add" operation performs one of the following functions, - * depending upon what the target location references: - * 1. If the target location specifies an array index, a new value is - * inserted into the array at the specified index. - * 2. If the target location specifies an object member that does not - * already exist, a new member is added to the object. - * 3. If the target location specifies an object member that does exist, - * that member's value is replaced. - * - * Generated from protobuf enum ADD = 4; - */ - const ADD = 4; - /** - * The "test" operation tests that a value at the target location is - * equal to a specified value. - * - * Generated from protobuf enum TEST = 5; - */ - const TEST = 5; - /** - * The "replace" operation replaces the value at the target location - * with a new value. The operation object MUST contain a "value" member - * whose content specifies the replacement value. - * - * Generated from protobuf enum REPLACE = 6; - */ - const REPLACE = 6; - - private static $valueToName = [ - self::OP_UNSPECIFIED => 'OP_UNSPECIFIED', - self::REMOVE => 'REMOVE', - self::MOVE => 'MOVE', - self::COPY => 'COPY', - self::ADD => 'ADD', - self::TEST => 'TEST', - self::REPLACE => 'REPLACE', - ]; - - 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(Op::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_TransformationRuleAction_Op::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/VolumeDataRestorePolicy.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/VolumeDataRestorePolicy.php deleted file mode 100644 index a9cc0fed86ea..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/VolumeDataRestorePolicy.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy - */ -class VolumeDataRestorePolicy -{ - /** - * Unspecified (illegal). - * - * Generated from protobuf enum VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0; - */ - const VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0; - /** - * For each PVC to be restored, create a new underlying volume and PV - * from the corresponding VolumeBackup contained within the Backup. - * - * Generated from protobuf enum RESTORE_VOLUME_DATA_FROM_BACKUP = 1; - */ - const RESTORE_VOLUME_DATA_FROM_BACKUP = 1; - /** - * For each PVC to be restored, attempt to reuse the original PV contained - * in the Backup (with its original underlying volume). This option - * is likely only usable when restoring a workload to its original cluster. - * - * Generated from protobuf enum REUSE_VOLUME_HANDLE_FROM_BACKUP = 2; - */ - const REUSE_VOLUME_HANDLE_FROM_BACKUP = 2; - /** - * For each PVC to be restored, create PVC without any particular - * action to restore data. In this case, the normal Kubernetes provisioning - * logic would kick in, and this would likely result in either dynamically - * provisioning blank PVs or binding to statically provisioned PVs. - * - * Generated from protobuf enum NO_VOLUME_DATA_RESTORATION = 3; - */ - const NO_VOLUME_DATA_RESTORATION = 3; - - private static $valueToName = [ - self::VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED => 'VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED', - self::RESTORE_VOLUME_DATA_FROM_BACKUP => 'RESTORE_VOLUME_DATA_FROM_BACKUP', - self::REUSE_VOLUME_HANDLE_FROM_BACKUP => 'REUSE_VOLUME_HANDLE_FROM_BACKUP', - self::NO_VOLUME_DATA_RESTORATION => 'NO_VOLUME_DATA_RESTORATION', - ]; - - 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(VolumeDataRestorePolicy::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_VolumeDataRestorePolicy::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/VolumeDataRestorePolicyBinding.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/VolumeDataRestorePolicyBinding.php deleted file mode 100644 index 63e83c5737fe..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/VolumeDataRestorePolicyBinding.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding - */ -class VolumeDataRestorePolicyBinding extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The VolumeDataRestorePolicy to apply when restoring volumes in - * scope. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $policy = 0; - protected $scope; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $policy - * Required. The VolumeDataRestorePolicy to apply when restoring volumes in - * scope. - * @type int $volume_type - * The volume type, as determined by the PVC's bound PV, - * to apply the policy to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The VolumeDataRestorePolicy to apply when restoring volumes in - * scope. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getPolicy() - { - return $this->policy; - } - - /** - * Required. The VolumeDataRestorePolicy to apply when restoring volumes in - * scope. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setPolicy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\VolumeDataRestorePolicy::class); - $this->policy = $var; - - return $this; - } - - /** - * The volume type, as determined by the PVC's bound PV, - * to apply the policy to. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType volume_type = 2; - * @return int - */ - public function getVolumeType() - { - return $this->readOneof(2); - } - - public function hasVolumeType() - { - return $this->hasOneof(2); - } - - /** - * The volume type, as determined by the PVC's bound PV, - * to apply the policy to. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType volume_type = 2; - * @param int $var - * @return $this - */ - public function setVolumeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\VolumeTypeEnum\VolumeType::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getScope() - { - return $this->whichOneof("scope"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VolumeDataRestorePolicyBinding::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_VolumeDataRestorePolicyBinding::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestorePlan.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestorePlan.php deleted file mode 100644 index 3129811771de..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestorePlan.php +++ /dev/null @@ -1,556 +0,0 @@ -google.cloud.gkebackup.v1.RestorePlan - */ -class RestorePlan extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The full name of the RestorePlan resource. - * Format: `projects/*/locations/*/restorePlans/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The timestamp when this RestorePlan resource 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 timestamp when this RestorePlan resource was last - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. User specified descriptive string for this RestorePlan. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Required. Immutable. A reference to the - * [BackupPlan][google.cloud.gkebackup.v1.BackupPlan] from which Backups may - * be used as the source for Restores created via this RestorePlan. Format: - * `projects/*/locations/*/backupPlans/*`. - * - * Generated from protobuf field string backup_plan = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $backup_plan = ''; - /** - * Required. Immutable. The target cluster into which Restores created via - * this RestorePlan will restore data. NOTE: the cluster's region must be the - * same as the RestorePlan. Valid formats: - * - `projects/*/locations/*/clusters/*` - * - `projects/*/zones/*/clusters/*` - * - * Generated from protobuf field string cluster = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $cluster = ''; - /** - * Required. Configuration of Restores created via this RestorePlan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig restore_config = 8 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $restore_config = null; - /** - * Optional. A set of custom labels supplied by user. - * - * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a restore from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform restore updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetRestorePlan`, - * and systems are expected to put that etag in the request to - * `UpdateRestorePlan` or `DeleteRestorePlan` to ensure that their change - * will be applied to the same version of the resource. - * - * Generated from protobuf field string etag = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $etag = ''; - /** - * Output only. State of the RestorePlan. This State field reflects the - * various stages a RestorePlan can be in - * during the Create operation. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestorePlan.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Human-readable description of why RestorePlan is in the - * current `state` - * - * Generated from protobuf field string state_reason = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_reason = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The full name of the RestorePlan resource. - * Format: `projects/*/locations/*/restorePlans/*`. - * @type string $uid - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when this RestorePlan resource was - * created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when this RestorePlan resource was last - * updated. - * @type string $description - * Optional. User specified descriptive string for this RestorePlan. - * @type string $backup_plan - * Required. Immutable. A reference to the - * [BackupPlan][google.cloud.gkebackup.v1.BackupPlan] from which Backups may - * be used as the source for Restores created via this RestorePlan. Format: - * `projects/*/locations/*/backupPlans/*`. - * @type string $cluster - * Required. Immutable. The target cluster into which Restores created via - * this RestorePlan will restore data. NOTE: the cluster's region must be the - * same as the RestorePlan. Valid formats: - * - `projects/*/locations/*/clusters/*` - * - `projects/*/zones/*/clusters/*` - * @type \Google\Cloud\GkeBackup\V1\RestoreConfig $restore_config - * Required. Configuration of Restores created via this RestorePlan. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. A set of custom labels supplied by user. - * @type string $etag - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a restore from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform restore updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetRestorePlan`, - * and systems are expected to put that etag in the request to - * `UpdateRestorePlan` or `DeleteRestorePlan` to ensure that their change - * will be applied to the same version of the resource. - * @type int $state - * Output only. State of the RestorePlan. This State field reflects the - * various stages a RestorePlan can be in - * during the Create operation. - * @type string $state_reason - * Output only. Human-readable description of why RestorePlan is in the - * current `state` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\RestorePlan::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The full name of the RestorePlan resource. - * Format: `projects/*/locations/*/restorePlans/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The full name of the RestorePlan resource. - * Format: `projects/*/locations/*/restorePlans/*`. - * - * 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. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The timestamp when this RestorePlan resource 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 timestamp when this RestorePlan resource 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 timestamp when this RestorePlan resource was last - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when this RestorePlan resource was last - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. User specified descriptive string for this RestorePlan. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. User specified descriptive string for this RestorePlan. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. Immutable. A reference to the - * [BackupPlan][google.cloud.gkebackup.v1.BackupPlan] from which Backups may - * be used as the source for Restores created via this RestorePlan. Format: - * `projects/*/locations/*/backupPlans/*`. - * - * Generated from protobuf field string backup_plan = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getBackupPlan() - { - return $this->backup_plan; - } - - /** - * Required. Immutable. A reference to the - * [BackupPlan][google.cloud.gkebackup.v1.BackupPlan] from which Backups may - * be used as the source for Restores created via this RestorePlan. Format: - * `projects/*/locations/*/backupPlans/*`. - * - * Generated from protobuf field string backup_plan = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBackupPlan($var) - { - GPBUtil::checkString($var, True); - $this->backup_plan = $var; - - return $this; - } - - /** - * Required. Immutable. The target cluster into which Restores created via - * this RestorePlan will restore data. NOTE: the cluster's region must be the - * same as the RestorePlan. Valid formats: - * - `projects/*/locations/*/clusters/*` - * - `projects/*/zones/*/clusters/*` - * - * Generated from protobuf field string cluster = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * Required. Immutable. The target cluster into which Restores created via - * this RestorePlan will restore data. NOTE: the cluster's region must be the - * same as the RestorePlan. Valid formats: - * - `projects/*/locations/*/clusters/*` - * - `projects/*/zones/*/clusters/*` - * - * Generated from protobuf field string cluster = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkString($var, True); - $this->cluster = $var; - - return $this; - } - - /** - * Required. Configuration of Restores created via this RestorePlan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig restore_config = 8 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeBackup\V1\RestoreConfig|null - */ - public function getRestoreConfig() - { - return $this->restore_config; - } - - public function hasRestoreConfig() - { - return isset($this->restore_config); - } - - public function clearRestoreConfig() - { - unset($this->restore_config); - } - - /** - * Required. Configuration of Restores created via this RestorePlan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig restore_config = 8 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeBackup\V1\RestoreConfig $var - * @return $this - */ - public function setRestoreConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestoreConfig::class); - $this->restore_config = $var; - - return $this; - } - - /** - * Optional. A set of custom labels supplied by user. - * - * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. A set of custom labels supplied by user. - * - * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @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; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a restore from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform restore updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetRestorePlan`, - * and systems are expected to put that etag in the request to - * `UpdateRestorePlan` or `DeleteRestorePlan` to ensure that their change - * will be applied to the same version of the resource. - * - * Generated from protobuf field string etag = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a restore from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform restore updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetRestorePlan`, - * and systems are expected to put that etag in the request to - * `UpdateRestorePlan` or `DeleteRestorePlan` to ensure that their change - * will be applied to the same version of the resource. - * - * Generated from protobuf field string etag = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Output only. State of the RestorePlan. This State field reflects the - * various stages a RestorePlan can be in - * during the Create operation. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestorePlan.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the RestorePlan. This State field reflects the - * various stages a RestorePlan can be in - * during the Create operation. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestorePlan.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\RestorePlan\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Human-readable description of why RestorePlan is in the - * current `state` - * - * Generated from protobuf field string state_reason = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateReason() - { - return $this->state_reason; - } - - /** - * Output only. Human-readable description of why RestorePlan is in the - * current `state` - * - * Generated from protobuf field string state_reason = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateReason($var) - { - GPBUtil::checkString($var, True); - $this->state_reason = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestorePlan/State.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestorePlan/State.php deleted file mode 100644 index 2b40f2c7ba19..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestorePlan/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.gkebackup.v1.RestorePlan.State - */ -class State -{ - /** - * Default first value for Enums. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Waiting for cluster state to be RUNNING. - * - * Generated from protobuf enum CLUSTER_PENDING = 1; - */ - const CLUSTER_PENDING = 1; - /** - * The RestorePlan has successfully been created and is ready for Restores. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * RestorePlan creation has failed. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * The RestorePlan is in the process of being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CLUSTER_PENDING => 'CLUSTER_PENDING', - self::READY => 'READY', - self::FAILED => 'FAILED', - self::DELETING => 'DELETING', - ]; - - 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\GkeBackup\V1\RestorePlan_State::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RpoConfig.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RpoConfig.php deleted file mode 100644 index a2e92f1b708a..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RpoConfig.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.gkebackup.v1.RpoConfig - */ -class RpoConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Defines the target RPO for the BackupPlan in minutes, which means - * the target maximum data loss in time that is acceptable for this - * BackupPlan. This must be at least 60, i.e., 1 hour, and at most 86400, - * i.e., 60 days. - * - * Generated from protobuf field int32 target_rpo_minutes = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $target_rpo_minutes = 0; - /** - * Optional. User specified time windows during which backup can NOT happen - * for this BackupPlan - backups should start and finish outside of any given - * exclusion window. Note: backup jobs will be scheduled to start and - * finish outside the duration of the window as much as possible, but - * running jobs will not get canceled when it runs into the window. - * All the time and date values in exclusion_windows entry in the API are in - * UTC. - * We only allow <=1 recurrence (daily or weekly) exclusion window for a - * BackupPlan while no restriction on number of single occurrence - * windows. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $exclusion_windows; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $target_rpo_minutes - * Required. Defines the target RPO for the BackupPlan in minutes, which means - * the target maximum data loss in time that is acceptable for this - * BackupPlan. This must be at least 60, i.e., 1 hour, and at most 86400, - * i.e., 60 days. - * @type array<\Google\Cloud\GkeBackup\V1\ExclusionWindow>|\Google\Protobuf\Internal\RepeatedField $exclusion_windows - * Optional. User specified time windows during which backup can NOT happen - * for this BackupPlan - backups should start and finish outside of any given - * exclusion window. Note: backup jobs will be scheduled to start and - * finish outside the duration of the window as much as possible, but - * running jobs will not get canceled when it runs into the window. - * All the time and date values in exclusion_windows entry in the API are in - * UTC. - * We only allow <=1 recurrence (daily or weekly) exclusion window for a - * BackupPlan while no restriction on number of single occurrence - * windows. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\BackupPlan::initOnce(); - parent::__construct($data); - } - - /** - * Required. Defines the target RPO for the BackupPlan in minutes, which means - * the target maximum data loss in time that is acceptable for this - * BackupPlan. This must be at least 60, i.e., 1 hour, and at most 86400, - * i.e., 60 days. - * - * Generated from protobuf field int32 target_rpo_minutes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getTargetRpoMinutes() - { - return $this->target_rpo_minutes; - } - - /** - * Required. Defines the target RPO for the BackupPlan in minutes, which means - * the target maximum data loss in time that is acceptable for this - * BackupPlan. This must be at least 60, i.e., 1 hour, and at most 86400, - * i.e., 60 days. - * - * Generated from protobuf field int32 target_rpo_minutes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setTargetRpoMinutes($var) - { - GPBUtil::checkInt32($var); - $this->target_rpo_minutes = $var; - - return $this; - } - - /** - * Optional. User specified time windows during which backup can NOT happen - * for this BackupPlan - backups should start and finish outside of any given - * exclusion window. Note: backup jobs will be scheduled to start and - * finish outside the duration of the window as much as possible, but - * running jobs will not get canceled when it runs into the window. - * All the time and date values in exclusion_windows entry in the API are in - * UTC. - * We only allow <=1 recurrence (daily or weekly) exclusion window for a - * BackupPlan while no restriction on number of single occurrence - * windows. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExclusionWindows() - { - return $this->exclusion_windows; - } - - /** - * Optional. User specified time windows during which backup can NOT happen - * for this BackupPlan - backups should start and finish outside of any given - * exclusion window. Note: backup jobs will be scheduled to start and - * finish outside the duration of the window as much as possible, but - * running jobs will not get canceled when it runs into the window. - * All the time and date values in exclusion_windows entry in the API are in - * UTC. - * We only allow <=1 recurrence (daily or weekly) exclusion window for a - * BackupPlan while no restriction on number of single occurrence - * windows. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeBackup\V1\ExclusionWindow>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExclusionWindows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\ExclusionWindow::class); - $this->exclusion_windows = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateBackupPlanRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateBackupPlanRequest.php deleted file mode 100644 index 678a625fd548..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateBackupPlanRequest.php +++ /dev/null @@ -1,181 +0,0 @@ -google.cloud.gkebackup.v1.UpdateBackupPlanRequest - */ -class UpdateBackupPlanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A new version of the BackupPlan resource that contains updated - * fields. This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_plan = null; - /** - * Optional. This is used to specify the fields to be overwritten in the - * BackupPlan targeted for update. The values for each of these - * updated fields will be taken from the `backup_plan` provided - * with this request. Field names are relative to the root of the resource - * (e.g., `description`, `backup_config.include_volume_data`, etc.) - * If no `update_mask` is provided, all fields in `backup_plan` will be - * written to the target BackupPlan resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored - * and are not used to update the target BackupPlan. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\GkeBackup\V1\BackupPlan $backupPlan Required. A new version of the BackupPlan resource that contains updated - * fields. This may be sparsely populated if an `update_mask` is provided. - * @param \Google\Protobuf\FieldMask $updateMask Optional. This is used to specify the fields to be overwritten in the - * BackupPlan targeted for update. The values for each of these - * updated fields will be taken from the `backup_plan` provided - * with this request. Field names are relative to the root of the resource - * (e.g., `description`, `backup_config.include_volume_data`, etc.) - * If no `update_mask` is provided, all fields in `backup_plan` will be - * written to the target BackupPlan resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored - * and are not used to update the target BackupPlan. - * - * @return \Google\Cloud\GkeBackup\V1\UpdateBackupPlanRequest - * - * @experimental - */ - public static function build(\Google\Cloud\GkeBackup\V1\BackupPlan $backupPlan, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setBackupPlan($backupPlan) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeBackup\V1\BackupPlan $backup_plan - * Required. A new version of the BackupPlan resource that contains updated - * fields. This may be sparsely populated if an `update_mask` is provided. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. This is used to specify the fields to be overwritten in the - * BackupPlan targeted for update. The values for each of these - * updated fields will be taken from the `backup_plan` provided - * with this request. Field names are relative to the root of the resource - * (e.g., `description`, `backup_config.include_volume_data`, etc.) - * If no `update_mask` is provided, all fields in `backup_plan` will be - * written to the target BackupPlan resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored - * and are not used to update the target BackupPlan. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. A new version of the BackupPlan resource that contains updated - * fields. This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeBackup\V1\BackupPlan|null - */ - public function getBackupPlan() - { - return $this->backup_plan; - } - - public function hasBackupPlan() - { - return isset($this->backup_plan); - } - - public function clearBackupPlan() - { - unset($this->backup_plan); - } - - /** - * Required. A new version of the BackupPlan resource that contains updated - * fields. This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeBackup\V1\BackupPlan $var - * @return $this - */ - public function setBackupPlan($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\BackupPlan::class); - $this->backup_plan = $var; - - return $this; - } - - /** - * Optional. This is used to specify the fields to be overwritten in the - * BackupPlan targeted for update. The values for each of these - * updated fields will be taken from the `backup_plan` provided - * with this request. Field names are relative to the root of the resource - * (e.g., `description`, `backup_config.include_volume_data`, etc.) - * If no `update_mask` is provided, all fields in `backup_plan` will be - * written to the target BackupPlan resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored - * and are not used to update the target BackupPlan. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. This is used to specify the fields to be overwritten in the - * BackupPlan targeted for update. The values for each of these - * updated fields will be taken from the `backup_plan` provided - * with this request. Field names are relative to the root of the resource - * (e.g., `description`, `backup_config.include_volume_data`, etc.) - * If no `update_mask` is provided, all fields in `backup_plan` will be - * written to the target BackupPlan resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored - * and are not used to update the target BackupPlan. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateBackupRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateBackupRequest.php deleted file mode 100644 index e35fc6c00f98..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateBackupRequest.php +++ /dev/null @@ -1,176 +0,0 @@ -google.cloud.gkebackup.v1.UpdateBackupRequest - */ -class UpdateBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A new version of the Backup resource that contains updated - * fields. This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup = null; - /** - * Optional. This is used to specify the fields to be overwritten in the - * Backup targeted for update. The values for each of these - * updated fields will be taken from the `backup_plan` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `backup` will be - * written to the target Backup resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored - * and are not used to update the target Backup. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\GkeBackup\V1\Backup $backup Required. A new version of the Backup resource that contains updated - * fields. This may be sparsely populated if an `update_mask` is provided. - * @param \Google\Protobuf\FieldMask $updateMask Optional. This is used to specify the fields to be overwritten in the - * Backup targeted for update. The values for each of these - * updated fields will be taken from the `backup_plan` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `backup` will be - * written to the target Backup resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored - * and are not used to update the target Backup. - * - * @return \Google\Cloud\GkeBackup\V1\UpdateBackupRequest - * - * @experimental - */ - public static function build(\Google\Cloud\GkeBackup\V1\Backup $backup, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setBackup($backup) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeBackup\V1\Backup $backup - * Required. A new version of the Backup resource that contains updated - * fields. This may be sparsely populated if an `update_mask` is provided. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. This is used to specify the fields to be overwritten in the - * Backup targeted for update. The values for each of these - * updated fields will be taken from the `backup_plan` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `backup` will be - * written to the target Backup resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored - * and are not used to update the target Backup. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. A new version of the Backup resource that contains updated - * fields. This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeBackup\V1\Backup|null - */ - public function getBackup() - { - return $this->backup; - } - - public function hasBackup() - { - return isset($this->backup); - } - - public function clearBackup() - { - unset($this->backup); - } - - /** - * Required. A new version of the Backup resource that contains updated - * fields. This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeBackup\V1\Backup $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Backup::class); - $this->backup = $var; - - return $this; - } - - /** - * Optional. This is used to specify the fields to be overwritten in the - * Backup targeted for update. The values for each of these - * updated fields will be taken from the `backup_plan` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `backup` will be - * written to the target Backup resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored - * and are not used to update the target Backup. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. This is used to specify the fields to be overwritten in the - * Backup targeted for update. The values for each of these - * updated fields will be taken from the `backup_plan` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `backup` will be - * written to the target Backup resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored - * and are not used to update the target Backup. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateRestorePlanRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateRestorePlanRequest.php deleted file mode 100644 index ae81d68b2089..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateRestorePlanRequest.php +++ /dev/null @@ -1,176 +0,0 @@ -google.cloud.gkebackup.v1.UpdateRestorePlanRequest - */ -class UpdateRestorePlanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A new version of the RestorePlan resource that contains updated - * fields. This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestorePlan restore_plan = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $restore_plan = null; - /** - * Optional. This is used to specify the fields to be overwritten in the - * RestorePlan targeted for update. The values for each of these - * updated fields will be taken from the `restore_plan` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `restore_plan` will be - * written to the target RestorePlan resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored - * and are not used to update the target RestorePlan. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\GkeBackup\V1\RestorePlan $restorePlan Required. A new version of the RestorePlan resource that contains updated - * fields. This may be sparsely populated if an `update_mask` is provided. - * @param \Google\Protobuf\FieldMask $updateMask Optional. This is used to specify the fields to be overwritten in the - * RestorePlan targeted for update. The values for each of these - * updated fields will be taken from the `restore_plan` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `restore_plan` will be - * written to the target RestorePlan resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored - * and are not used to update the target RestorePlan. - * - * @return \Google\Cloud\GkeBackup\V1\UpdateRestorePlanRequest - * - * @experimental - */ - public static function build(\Google\Cloud\GkeBackup\V1\RestorePlan $restorePlan, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setRestorePlan($restorePlan) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeBackup\V1\RestorePlan $restore_plan - * Required. A new version of the RestorePlan resource that contains updated - * fields. This may be sparsely populated if an `update_mask` is provided. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. This is used to specify the fields to be overwritten in the - * RestorePlan targeted for update. The values for each of these - * updated fields will be taken from the `restore_plan` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `restore_plan` will be - * written to the target RestorePlan resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored - * and are not used to update the target RestorePlan. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. A new version of the RestorePlan resource that contains updated - * fields. This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestorePlan restore_plan = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeBackup\V1\RestorePlan|null - */ - public function getRestorePlan() - { - return $this->restore_plan; - } - - public function hasRestorePlan() - { - return isset($this->restore_plan); - } - - public function clearRestorePlan() - { - unset($this->restore_plan); - } - - /** - * Required. A new version of the RestorePlan resource that contains updated - * fields. This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestorePlan restore_plan = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeBackup\V1\RestorePlan $var - * @return $this - */ - public function setRestorePlan($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestorePlan::class); - $this->restore_plan = $var; - - return $this; - } - - /** - * Optional. This is used to specify the fields to be overwritten in the - * RestorePlan targeted for update. The values for each of these - * updated fields will be taken from the `restore_plan` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `restore_plan` will be - * written to the target RestorePlan resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored - * and are not used to update the target RestorePlan. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. This is used to specify the fields to be overwritten in the - * RestorePlan targeted for update. The values for each of these - * updated fields will be taken from the `restore_plan` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `restore_plan` will be - * written to the target RestorePlan resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored - * and are not used to update the target RestorePlan. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateRestoreRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateRestoreRequest.php deleted file mode 100644 index aa0a7b210a0b..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateRestoreRequest.php +++ /dev/null @@ -1,176 +0,0 @@ -google.cloud.gkebackup.v1.UpdateRestoreRequest - */ -class UpdateRestoreRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A new version of the Restore resource that contains updated - * fields. This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Restore restore = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $restore = null; - /** - * Optional. This is used to specify the fields to be overwritten in the - * Restore targeted for update. The values for each of these - * updated fields will be taken from the `restore` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `restore` will be - * written to the target Restore resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored - * and are not used to update the target Restore. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\GkeBackup\V1\Restore $restore Required. A new version of the Restore resource that contains updated - * fields. This may be sparsely populated if an `update_mask` is provided. - * @param \Google\Protobuf\FieldMask $updateMask Optional. This is used to specify the fields to be overwritten in the - * Restore targeted for update. The values for each of these - * updated fields will be taken from the `restore` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `restore` will be - * written to the target Restore resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored - * and are not used to update the target Restore. - * - * @return \Google\Cloud\GkeBackup\V1\UpdateRestoreRequest - * - * @experimental - */ - public static function build(\Google\Cloud\GkeBackup\V1\Restore $restore, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setRestore($restore) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeBackup\V1\Restore $restore - * Required. A new version of the Restore resource that contains updated - * fields. This may be sparsely populated if an `update_mask` is provided. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. This is used to specify the fields to be overwritten in the - * Restore targeted for update. The values for each of these - * updated fields will be taken from the `restore` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `restore` will be - * written to the target Restore resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored - * and are not used to update the target Restore. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. A new version of the Restore resource that contains updated - * fields. This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Restore restore = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeBackup\V1\Restore|null - */ - public function getRestore() - { - return $this->restore; - } - - public function hasRestore() - { - return isset($this->restore); - } - - public function clearRestore() - { - unset($this->restore); - } - - /** - * Required. A new version of the Restore resource that contains updated - * fields. This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Restore restore = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeBackup\V1\Restore $var - * @return $this - */ - public function setRestore($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Restore::class); - $this->restore = $var; - - return $this; - } - - /** - * Optional. This is used to specify the fields to be overwritten in the - * Restore targeted for update. The values for each of these - * updated fields will be taken from the `restore` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `restore` will be - * written to the target Restore resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored - * and are not used to update the target Restore. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. This is used to specify the fields to be overwritten in the - * Restore targeted for update. The values for each of these - * updated fields will be taken from the `restore` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `restore` will be - * written to the target Restore resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored - * and are not used to update the target Restore. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup.php deleted file mode 100644 index 04c10734b60b..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup.php +++ /dev/null @@ -1,585 +0,0 @@ -google.cloud.gkebackup.v1.VolumeBackup - */ -class VolumeBackup extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The full name of the VolumeBackup resource. - * Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The timestamp when this VolumeBackup resource 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 timestamp when this VolumeBackup resource was last - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. A reference to the source Kubernetes PVC from which this - * VolumeBackup was created. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedName source_pvc = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source_pvc = null; - /** - * Output only. A storage system-specific opaque handle to the underlying - * volume backup. - * - * Generated from protobuf field string volume_backup_handle = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $volume_backup_handle = ''; - /** - * Output only. The format used for the volume backup. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeBackup.VolumeBackupFormat format = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $format = 0; - /** - * Output only. The aggregate size of the underlying artifacts associated with - * this VolumeBackup in the backup storage. This may change over time when - * multiple backups of the same volume share the same backup storage - * location. In particular, this is likely to increase in size when - * the immediately preceding backup of the same volume is deleted. - * - * Generated from protobuf field int64 storage_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $storage_bytes = 0; - /** - * Output only. The minimum size of the disk to which this VolumeBackup can be - * restored. - * - * Generated from protobuf field int64 disk_size_bytes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $disk_size_bytes = 0; - /** - * Output only. The timestamp when the associated underlying volume backup - * operation completed. - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $complete_time = null; - /** - * Output only. The current state of this VolumeBackup. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeBackup.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. A human readable message explaining why the VolumeBackup is in - * its current state. - * - * Generated from protobuf field string state_message = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_message = ''; - /** - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a volume backup from overwriting each - * other. It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform volume backup updates in order to avoid - * race conditions. - * - * Generated from protobuf field string etag = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The full name of the VolumeBackup resource. - * Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`. - * @type string $uid - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when this VolumeBackup resource was - * created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when this VolumeBackup resource was last - * updated. - * @type \Google\Cloud\GkeBackup\V1\NamespacedName $source_pvc - * Output only. A reference to the source Kubernetes PVC from which this - * VolumeBackup was created. - * @type string $volume_backup_handle - * Output only. A storage system-specific opaque handle to the underlying - * volume backup. - * @type int $format - * Output only. The format used for the volume backup. - * @type int|string $storage_bytes - * Output only. The aggregate size of the underlying artifacts associated with - * this VolumeBackup in the backup storage. This may change over time when - * multiple backups of the same volume share the same backup storage - * location. In particular, this is likely to increase in size when - * the immediately preceding backup of the same volume is deleted. - * @type int|string $disk_size_bytes - * Output only. The minimum size of the disk to which this VolumeBackup can be - * restored. - * @type \Google\Protobuf\Timestamp $complete_time - * Output only. The timestamp when the associated underlying volume backup - * operation completed. - * @type int $state - * Output only. The current state of this VolumeBackup. - * @type string $state_message - * Output only. A human readable message explaining why the VolumeBackup is in - * its current state. - * @type string $etag - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a volume backup from overwriting each - * other. It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform volume backup updates in order to avoid - * race conditions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The full name of the VolumeBackup resource. - * Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The full name of the VolumeBackup resource. - * Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`. - * - * 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. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The timestamp when this VolumeBackup resource 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 timestamp when this VolumeBackup resource 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 timestamp when this VolumeBackup resource was last - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when this VolumeBackup resource was last - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. A reference to the source Kubernetes PVC from which this - * VolumeBackup was created. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedName source_pvc = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeBackup\V1\NamespacedName|null - */ - public function getSourcePvc() - { - return $this->source_pvc; - } - - public function hasSourcePvc() - { - return isset($this->source_pvc); - } - - public function clearSourcePvc() - { - unset($this->source_pvc); - } - - /** - * Output only. A reference to the source Kubernetes PVC from which this - * VolumeBackup was created. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedName source_pvc = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeBackup\V1\NamespacedName $var - * @return $this - */ - public function setSourcePvc($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\NamespacedName::class); - $this->source_pvc = $var; - - return $this; - } - - /** - * Output only. A storage system-specific opaque handle to the underlying - * volume backup. - * - * Generated from protobuf field string volume_backup_handle = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVolumeBackupHandle() - { - return $this->volume_backup_handle; - } - - /** - * Output only. A storage system-specific opaque handle to the underlying - * volume backup. - * - * Generated from protobuf field string volume_backup_handle = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVolumeBackupHandle($var) - { - GPBUtil::checkString($var, True); - $this->volume_backup_handle = $var; - - return $this; - } - - /** - * Output only. The format used for the volume backup. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeBackup.VolumeBackupFormat format = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getFormat() - { - return $this->format; - } - - /** - * Output only. The format used for the volume backup. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeBackup.VolumeBackupFormat format = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\VolumeBackup\VolumeBackupFormat::class); - $this->format = $var; - - return $this; - } - - /** - * Output only. The aggregate size of the underlying artifacts associated with - * this VolumeBackup in the backup storage. This may change over time when - * multiple backups of the same volume share the same backup storage - * location. In particular, this is likely to increase in size when - * the immediately preceding backup of the same volume is deleted. - * - * Generated from protobuf field int64 storage_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getStorageBytes() - { - return $this->storage_bytes; - } - - /** - * Output only. The aggregate size of the underlying artifacts associated with - * this VolumeBackup in the backup storage. This may change over time when - * multiple backups of the same volume share the same backup storage - * location. In particular, this is likely to increase in size when - * the immediately preceding backup of the same volume is deleted. - * - * Generated from protobuf field int64 storage_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setStorageBytes($var) - { - GPBUtil::checkInt64($var); - $this->storage_bytes = $var; - - return $this; - } - - /** - * Output only. The minimum size of the disk to which this VolumeBackup can be - * restored. - * - * Generated from protobuf field int64 disk_size_bytes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getDiskSizeBytes() - { - return $this->disk_size_bytes; - } - - /** - * Output only. The minimum size of the disk to which this VolumeBackup can be - * restored. - * - * Generated from protobuf field int64 disk_size_bytes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setDiskSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->disk_size_bytes = $var; - - return $this; - } - - /** - * Output only. The timestamp when the associated underlying volume backup - * operation completed. - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCompleteTime() - { - return $this->complete_time; - } - - public function hasCompleteTime() - { - return isset($this->complete_time); - } - - public function clearCompleteTime() - { - unset($this->complete_time); - } - - /** - * Output only. The timestamp when the associated underlying volume backup - * operation completed. - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCompleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->complete_time = $var; - - return $this; - } - - /** - * Output only. The current state of this VolumeBackup. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeBackup.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of this VolumeBackup. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeBackup.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\VolumeBackup\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. A human readable message explaining why the VolumeBackup is in - * its current state. - * - * Generated from protobuf field string state_message = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateMessage() - { - return $this->state_message; - } - - /** - * Output only. A human readable message explaining why the VolumeBackup is in - * its current state. - * - * Generated from protobuf field string state_message = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateMessage($var) - { - GPBUtil::checkString($var, True); - $this->state_message = $var; - - return $this; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a volume backup from overwriting each - * other. It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform volume backup updates in order to avoid - * race conditions. - * - * Generated from protobuf field string etag = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a volume backup from overwriting each - * other. It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform volume backup updates in order to avoid - * race conditions. - * - * Generated from protobuf field string etag = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup/State.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup/State.php deleted file mode 100644 index fbe20d6856c2..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup/State.php +++ /dev/null @@ -1,98 +0,0 @@ -google.cloud.gkebackup.v1.VolumeBackup.State - */ -class State -{ - /** - * This is an illegal state and should not be encountered. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * A volume for the backup was identified and backup process is about to - * start. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The volume backup operation has begun and is in the initial "snapshot" - * phase of the process. Any defined ProtectedApplication "pre" hooks will - * be executed before entering this state and "post" hooks will be executed - * upon leaving this state. - * - * Generated from protobuf enum SNAPSHOTTING = 2; - */ - const SNAPSHOTTING = 2; - /** - * The snapshot phase of the volume backup operation has completed and - * the snapshot is now being uploaded to backup storage. - * - * Generated from protobuf enum UPLOADING = 3; - */ - const UPLOADING = 3; - /** - * The volume backup operation has completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 4; - */ - const SUCCEEDED = 4; - /** - * The volume backup operation has failed. - * - * Generated from protobuf enum FAILED = 5; - */ - const FAILED = 5; - /** - * This VolumeBackup resource (and its associated artifacts) is in the - * process of being deleted. - * - * Generated from protobuf enum DELETING = 6; - */ - const DELETING = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::SNAPSHOTTING => 'SNAPSHOTTING', - self::UPLOADING => 'UPLOADING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::DELETING => 'DELETING', - ]; - - 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\GkeBackup\V1\VolumeBackup_State::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup/VolumeBackupFormat.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup/VolumeBackupFormat.php deleted file mode 100644 index de6484fc4519..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup/VolumeBackupFormat.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.gkebackup.v1.VolumeBackup.VolumeBackupFormat - */ -class VolumeBackupFormat -{ - /** - * Default value, not specified. - * - * Generated from protobuf enum VOLUME_BACKUP_FORMAT_UNSPECIFIED = 0; - */ - const VOLUME_BACKUP_FORMAT_UNSPECIFIED = 0; - /** - * Compute Engine Persistent Disk snapshot based volume backup. - * - * Generated from protobuf enum GCE_PERSISTENT_DISK = 1; - */ - const GCE_PERSISTENT_DISK = 1; - - private static $valueToName = [ - self::VOLUME_BACKUP_FORMAT_UNSPECIFIED => 'VOLUME_BACKUP_FORMAT_UNSPECIFIED', - self::GCE_PERSISTENT_DISK => 'GCE_PERSISTENT_DISK', - ]; - - 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(VolumeBackupFormat::class, \Google\Cloud\GkeBackup\V1\VolumeBackup_VolumeBackupFormat::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeDataRestorePolicyOverride.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeDataRestorePolicyOverride.php deleted file mode 100644 index d75e5e1d6add..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeDataRestorePolicyOverride.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride - */ -class VolumeDataRestorePolicyOverride extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The VolumeDataRestorePolicy to apply when restoring volumes in - * scope. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $policy = 0; - protected $scope; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $policy - * Required. The VolumeDataRestorePolicy to apply when restoring volumes in - * scope. - * @type \Google\Cloud\GkeBackup\V1\NamespacedNames $selected_pvcs - * A list of PVCs to apply the policy override to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The VolumeDataRestorePolicy to apply when restoring volumes in - * scope. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getPolicy() - { - return $this->policy; - } - - /** - * Required. The VolumeDataRestorePolicy to apply when restoring volumes in - * scope. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setPolicy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\VolumeDataRestorePolicy::class); - $this->policy = $var; - - return $this; - } - - /** - * A list of PVCs to apply the policy override to. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedNames selected_pvcs = 2; - * @return \Google\Cloud\GkeBackup\V1\NamespacedNames|null - */ - public function getSelectedPvcs() - { - return $this->readOneof(2); - } - - public function hasSelectedPvcs() - { - return $this->hasOneof(2); - } - - /** - * A list of PVCs to apply the policy override to. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedNames selected_pvcs = 2; - * @param \Google\Cloud\GkeBackup\V1\NamespacedNames $var - * @return $this - */ - public function setSelectedPvcs($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\NamespacedNames::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getScope() - { - return $this->whichOneof("scope"); - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore.php deleted file mode 100644 index b62ab5c93c4d..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore.php +++ /dev/null @@ -1,533 +0,0 @@ -google.cloud.gkebackup.v1.VolumeRestore - */ -class VolumeRestore extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Full name of the VolumeRestore resource. - * Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The timestamp when this VolumeRestore resource 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 timestamp when this VolumeRestore resource was last - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The full name of the VolumeBackup from which the volume will - * be restored. Format: - * `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`. - * - * Generated from protobuf field string volume_backup = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $volume_backup = ''; - /** - * Output only. The reference to the target Kubernetes PVC to be restored. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedName target_pvc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target_pvc = null; - /** - * Output only. A storage system-specific opaque handler to the underlying - * volume created for the target PVC from the volume backup. - * - * Generated from protobuf field string volume_handle = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $volume_handle = ''; - /** - * Output only. The type of volume provisioned - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeRestore.VolumeType volume_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $volume_type = 0; - /** - * Output only. The timestamp when the associated underlying volume - * restoration completed. - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $complete_time = null; - /** - * Output only. The current state of this VolumeRestore. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeRestore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. A human readable message explaining why the VolumeRestore is - * in its current state. - * - * Generated from protobuf field string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_message = ''; - /** - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a volume restore from overwriting each - * other. It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform volume restore updates in order to avoid - * race conditions. - * - * Generated from protobuf field string etag = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Full name of the VolumeRestore resource. - * Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*` - * @type string $uid - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when this VolumeRestore resource was - * created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when this VolumeRestore resource was last - * updated. - * @type string $volume_backup - * Output only. The full name of the VolumeBackup from which the volume will - * be restored. Format: - * `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`. - * @type \Google\Cloud\GkeBackup\V1\NamespacedName $target_pvc - * Output only. The reference to the target Kubernetes PVC to be restored. - * @type string $volume_handle - * Output only. A storage system-specific opaque handler to the underlying - * volume created for the target PVC from the volume backup. - * @type int $volume_type - * Output only. The type of volume provisioned - * @type \Google\Protobuf\Timestamp $complete_time - * Output only. The timestamp when the associated underlying volume - * restoration completed. - * @type int $state - * Output only. The current state of this VolumeRestore. - * @type string $state_message - * Output only. A human readable message explaining why the VolumeRestore is - * in its current state. - * @type string $etag - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a volume restore from overwriting each - * other. It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform volume restore updates in order to avoid - * race conditions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Full name of the VolumeRestore resource. - * Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Full name of the VolumeRestore resource. - * Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*` - * - * 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. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The timestamp when this VolumeRestore resource 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 timestamp when this VolumeRestore resource 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 timestamp when this VolumeRestore resource was last - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when this VolumeRestore resource was last - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. The full name of the VolumeBackup from which the volume will - * be restored. Format: - * `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`. - * - * Generated from protobuf field string volume_backup = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVolumeBackup() - { - return $this->volume_backup; - } - - /** - * Output only. The full name of the VolumeBackup from which the volume will - * be restored. Format: - * `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`. - * - * Generated from protobuf field string volume_backup = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVolumeBackup($var) - { - GPBUtil::checkString($var, True); - $this->volume_backup = $var; - - return $this; - } - - /** - * Output only. The reference to the target Kubernetes PVC to be restored. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedName target_pvc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeBackup\V1\NamespacedName|null - */ - public function getTargetPvc() - { - return $this->target_pvc; - } - - public function hasTargetPvc() - { - return isset($this->target_pvc); - } - - public function clearTargetPvc() - { - unset($this->target_pvc); - } - - /** - * Output only. The reference to the target Kubernetes PVC to be restored. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedName target_pvc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeBackup\V1\NamespacedName $var - * @return $this - */ - public function setTargetPvc($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\NamespacedName::class); - $this->target_pvc = $var; - - return $this; - } - - /** - * Output only. A storage system-specific opaque handler to the underlying - * volume created for the target PVC from the volume backup. - * - * Generated from protobuf field string volume_handle = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVolumeHandle() - { - return $this->volume_handle; - } - - /** - * Output only. A storage system-specific opaque handler to the underlying - * volume created for the target PVC from the volume backup. - * - * Generated from protobuf field string volume_handle = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVolumeHandle($var) - { - GPBUtil::checkString($var, True); - $this->volume_handle = $var; - - return $this; - } - - /** - * Output only. The type of volume provisioned - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeRestore.VolumeType volume_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getVolumeType() - { - return $this->volume_type; - } - - /** - * Output only. The type of volume provisioned - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeRestore.VolumeType volume_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setVolumeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\VolumeRestore\VolumeType::class); - $this->volume_type = $var; - - return $this; - } - - /** - * Output only. The timestamp when the associated underlying volume - * restoration completed. - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCompleteTime() - { - return $this->complete_time; - } - - public function hasCompleteTime() - { - return isset($this->complete_time); - } - - public function clearCompleteTime() - { - unset($this->complete_time); - } - - /** - * Output only. The timestamp when the associated underlying volume - * restoration completed. - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCompleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->complete_time = $var; - - return $this; - } - - /** - * Output only. The current state of this VolumeRestore. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeRestore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of this VolumeRestore. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeRestore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\VolumeRestore\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. A human readable message explaining why the VolumeRestore is - * in its current state. - * - * Generated from protobuf field string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateMessage() - { - return $this->state_message; - } - - /** - * Output only. A human readable message explaining why the VolumeRestore is - * in its current state. - * - * Generated from protobuf field string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateMessage($var) - { - GPBUtil::checkString($var, True); - $this->state_message = $var; - - return $this; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a volume restore from overwriting each - * other. It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform volume restore updates in order to avoid - * race conditions. - * - * Generated from protobuf field string etag = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to - * help prevent simultaneous updates of a volume restore from overwriting each - * other. It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform volume restore updates in order to avoid - * race conditions. - * - * Generated from protobuf field string etag = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore/State.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore/State.php deleted file mode 100644 index 2528f29c845a..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore/State.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.gkebackup.v1.VolumeRestore.State - */ -class State -{ - /** - * This is an illegal state and should not be encountered. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * A volume for the restore was identified and restore process is about to - * start. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The volume is currently being restored. - * - * Generated from protobuf enum RESTORING = 2; - */ - const RESTORING = 2; - /** - * The volume has been successfully restored. - * - * Generated from protobuf enum SUCCEEDED = 3; - */ - const SUCCEEDED = 3; - /** - * The volume restoration process failed. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - /** - * This VolumeRestore resource is in the process of being deleted. - * - * Generated from protobuf enum DELETING = 5; - */ - const DELETING = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::RESTORING => 'RESTORING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::DELETING => 'DELETING', - ]; - - 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\GkeBackup\V1\VolumeRestore_State::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore/VolumeType.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore/VolumeType.php deleted file mode 100644 index 460afb38ce7f..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore/VolumeType.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.gkebackup.v1.VolumeRestore.VolumeType - */ -class VolumeType -{ - /** - * Default - * - * Generated from protobuf enum VOLUME_TYPE_UNSPECIFIED = 0; - */ - const VOLUME_TYPE_UNSPECIFIED = 0; - /** - * Compute Engine Persistent Disk volume - * - * Generated from protobuf enum GCE_PERSISTENT_DISK = 1; - */ - const GCE_PERSISTENT_DISK = 1; - - private static $valueToName = [ - self::VOLUME_TYPE_UNSPECIFIED => 'VOLUME_TYPE_UNSPECIFIED', - self::GCE_PERSISTENT_DISK => 'GCE_PERSISTENT_DISK', - ]; - - 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(VolumeType::class, \Google\Cloud\GkeBackup\V1\VolumeRestore_VolumeType::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeTypeEnum.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeTypeEnum.php deleted file mode 100644 index 2ca64f837a78..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeTypeEnum.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.gkebackup.v1.VolumeTypeEnum - */ -class VolumeTypeEnum extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Common::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeTypeEnum/VolumeType.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeTypeEnum/VolumeType.php deleted file mode 100644 index 0fa3089f64e3..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeTypeEnum/VolumeType.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType - */ -class VolumeType -{ - /** - * Default - * - * Generated from protobuf enum VOLUME_TYPE_UNSPECIFIED = 0; - */ - const VOLUME_TYPE_UNSPECIFIED = 0; - /** - * Compute Engine Persistent Disk volume - * - * Generated from protobuf enum GCE_PERSISTENT_DISK = 1; - */ - const GCE_PERSISTENT_DISK = 1; - - private static $valueToName = [ - self::VOLUME_TYPE_UNSPECIFIED => 'VOLUME_TYPE_UNSPECIFIED', - self::GCE_PERSISTENT_DISK => 'GCE_PERSISTENT_DISK', - ]; - - 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(VolumeType::class, \Google\Cloud\GkeBackup\V1\VolumeTypeEnum_VolumeType::class); - diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_backup.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_backup.php deleted file mode 100644 index 24983218fe9a..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_backup.php +++ /dev/null @@ -1,84 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $backupForGKEClient->createBackup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Backup $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 = BackupForGKEClient::backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - - create_backup_sample($formattedParent); -} -// [END gkebackup_v1_generated_BackupForGKE_CreateBackup_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_backup_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_backup_plan.php deleted file mode 100644 index 0e71af3a4d71..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_backup_plan.php +++ /dev/null @@ -1,111 +0,0 @@ -setCluster($formattedBackupPlanCluster); - $request = (new CreateBackupPlanRequest()) - ->setParent($formattedParent) - ->setBackupPlan($backupPlan) - ->setBackupPlanId($backupPlanId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $backupForGKEClient->createBackupPlan($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BackupPlan $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 = BackupForGKEClient::locationName('[PROJECT]', '[LOCATION]'); - $formattedBackupPlanCluster = BackupForGKEClient::clusterName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]' - ); - $backupPlanId = '[BACKUP_PLAN_ID]'; - - create_backup_plan_sample($formattedParent, $formattedBackupPlanCluster, $backupPlanId); -} -// [END gkebackup_v1_generated_BackupForGKE_CreateBackupPlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_restore.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_restore.php deleted file mode 100644 index 4bd11761187f..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_restore.php +++ /dev/null @@ -1,113 +0,0 @@ -setBackup($formattedRestoreBackup); - $request = (new CreateRestoreRequest()) - ->setParent($formattedParent) - ->setRestore($restore) - ->setRestoreId($restoreId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $backupForGKEClient->createRestore($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Restore $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 = BackupForGKEClient::restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - $formattedRestoreBackup = BackupForGKEClient::backupName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_PLAN]', - '[BACKUP]' - ); - $restoreId = '[RESTORE_ID]'; - - create_restore_sample($formattedParent, $formattedRestoreBackup, $restoreId); -} -// [END gkebackup_v1_generated_BackupForGKE_CreateRestore_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_restore_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_restore_plan.php deleted file mode 100644 index 2c174640976f..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_restore_plan.php +++ /dev/null @@ -1,132 +0,0 @@ -setBackupPlan($formattedRestorePlanBackupPlan) - ->setCluster($formattedRestorePlanCluster) - ->setRestoreConfig($restorePlanRestoreConfig); - $request = (new CreateRestorePlanRequest()) - ->setParent($formattedParent) - ->setRestorePlan($restorePlan) - ->setRestorePlanId($restorePlanId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $backupForGKEClient->createRestorePlan($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var RestorePlan $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 = BackupForGKEClient::locationName('[PROJECT]', '[LOCATION]'); - $formattedRestorePlanBackupPlan = BackupForGKEClient::backupPlanName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_PLAN]' - ); - $formattedRestorePlanCluster = BackupForGKEClient::clusterName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]' - ); - $restorePlanId = '[RESTORE_PLAN_ID]'; - - create_restore_plan_sample( - $formattedParent, - $formattedRestorePlanBackupPlan, - $formattedRestorePlanCluster, - $restorePlanId - ); -} -// [END gkebackup_v1_generated_BackupForGKE_CreateRestorePlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_backup.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_backup.php deleted file mode 100644 index 85788bbc4deb..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_backup.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $backupForGKEClient->deleteBackup($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 = BackupForGKEClient::backupName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_PLAN]', - '[BACKUP]' - ); - - delete_backup_sample($formattedName); -} -// [END gkebackup_v1_generated_BackupForGKE_DeleteBackup_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_backup_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_backup_plan.php deleted file mode 100644 index 3d18b947af2b..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_backup_plan.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $backupForGKEClient->deleteBackupPlan($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 = BackupForGKEClient::backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - - delete_backup_plan_sample($formattedName); -} -// [END gkebackup_v1_generated_BackupForGKE_DeleteBackupPlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_restore.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_restore.php deleted file mode 100644 index 62e104407aca..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_restore.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $backupForGKEClient->deleteRestore($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 = BackupForGKEClient::restoreName( - '[PROJECT]', - '[LOCATION]', - '[RESTORE_PLAN]', - '[RESTORE]' - ); - - delete_restore_sample($formattedName); -} -// [END gkebackup_v1_generated_BackupForGKE_DeleteRestore_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_restore_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_restore_plan.php deleted file mode 100644 index 6f12bb20e252..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_restore_plan.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $backupForGKEClient->deleteRestorePlan($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 = BackupForGKEClient::restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - - delete_restore_plan_sample($formattedName); -} -// [END gkebackup_v1_generated_BackupForGKE_DeleteRestorePlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup.php deleted file mode 100644 index 31cf6805fc0a..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Backup $response */ - $response = $backupForGKEClient->getBackup($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 = BackupForGKEClient::backupName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_PLAN]', - '[BACKUP]' - ); - - get_backup_sample($formattedName); -} -// [END gkebackup_v1_generated_BackupForGKE_GetBackup_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup_index_download_url.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup_index_download_url.php deleted file mode 100644 index 9e8dd874dec3..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup_index_download_url.php +++ /dev/null @@ -1,78 +0,0 @@ -setBackup($formattedBackup); - - // Call the API and handle any network failures. - try { - /** @var GetBackupIndexDownloadUrlResponse $response */ - $response = $backupForGKEClient->getBackupIndexDownloadUrl($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 -{ - $formattedBackup = BackupForGKEClient::backupName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_PLAN]', - '[BACKUP]' - ); - - get_backup_index_download_url_sample($formattedBackup); -} -// [END gkebackup_v1_generated_BackupForGKE_GetBackupIndexDownloadUrl_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup_plan.php deleted file mode 100644 index 0cf5f4d682a6..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup_plan.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var BackupPlan $response */ - $response = $backupForGKEClient->getBackupPlan($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 = BackupForGKEClient::backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - - get_backup_plan_sample($formattedName); -} -// [END gkebackup_v1_generated_BackupForGKE_GetBackupPlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_iam_policy.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_iam_policy.php deleted file mode 100644 index 5a532e53454c..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/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 = $backupForGKEClient->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 gkebackup_v1_generated_BackupForGKE_GetIamPolicy_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_location.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_location.php deleted file mode 100644 index 75fb8baf24ed..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/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 gkebackup_v1_generated_BackupForGKE_GetLocation_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_restore.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_restore.php deleted file mode 100644 index 79ac06b01322..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_restore.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Restore $response */ - $response = $backupForGKEClient->getRestore($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 = BackupForGKEClient::restoreName( - '[PROJECT]', - '[LOCATION]', - '[RESTORE_PLAN]', - '[RESTORE]' - ); - - get_restore_sample($formattedName); -} -// [END gkebackup_v1_generated_BackupForGKE_GetRestore_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_restore_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_restore_plan.php deleted file mode 100644 index 4f94e2baca88..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_restore_plan.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var RestorePlan $response */ - $response = $backupForGKEClient->getRestorePlan($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 = BackupForGKEClient::restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - - get_restore_plan_sample($formattedName); -} -// [END gkebackup_v1_generated_BackupForGKE_GetRestorePlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_volume_backup.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_volume_backup.php deleted file mode 100644 index f7483267e157..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_volume_backup.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var VolumeBackup $response */ - $response = $backupForGKEClient->getVolumeBackup($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 = BackupForGKEClient::volumeBackupName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_PLAN]', - '[BACKUP]', - '[VOLUME_BACKUP]' - ); - - get_volume_backup_sample($formattedName); -} -// [END gkebackup_v1_generated_BackupForGKE_GetVolumeBackup_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_volume_restore.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_volume_restore.php deleted file mode 100644 index e4ef66b4e78b..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_volume_restore.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var VolumeRestore $response */ - $response = $backupForGKEClient->getVolumeRestore($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 = BackupForGKEClient::volumeRestoreName( - '[PROJECT]', - '[LOCATION]', - '[RESTORE_PLAN]', - '[RESTORE]', - '[VOLUME_RESTORE]' - ); - - get_volume_restore_sample($formattedName); -} -// [END gkebackup_v1_generated_BackupForGKE_GetVolumeRestore_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_backup_plans.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_backup_plans.php deleted file mode 100644 index fdec972daa39..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_backup_plans.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $backupForGKEClient->listBackupPlans($request); - - /** @var BackupPlan $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 = BackupForGKEClient::locationName('[PROJECT]', '[LOCATION]'); - - list_backup_plans_sample($formattedParent); -} -// [END gkebackup_v1_generated_BackupForGKE_ListBackupPlans_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_backups.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_backups.php deleted file mode 100644 index 78743fc2ab0b..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_backups.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $backupForGKEClient->listBackups($request); - - /** @var Backup $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 = BackupForGKEClient::backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - - list_backups_sample($formattedParent); -} -// [END gkebackup_v1_generated_BackupForGKE_ListBackups_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_locations.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_locations.php deleted file mode 100644 index fb8a2c64b8fa..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_locations.php +++ /dev/null @@ -1,62 +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 gkebackup_v1_generated_BackupForGKE_ListLocations_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_restore_plans.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_restore_plans.php deleted file mode 100644 index b21754de7722..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_restore_plans.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $backupForGKEClient->listRestorePlans($request); - - /** @var RestorePlan $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 = BackupForGKEClient::locationName('[PROJECT]', '[LOCATION]'); - - list_restore_plans_sample($formattedParent); -} -// [END gkebackup_v1_generated_BackupForGKE_ListRestorePlans_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_restores.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_restores.php deleted file mode 100644 index b9bc24fca4ca..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_restores.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $backupForGKEClient->listRestores($request); - - /** @var Restore $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 = BackupForGKEClient::restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - - list_restores_sample($formattedParent); -} -// [END gkebackup_v1_generated_BackupForGKE_ListRestores_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_volume_backups.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_volume_backups.php deleted file mode 100644 index b24d4de0a9aa..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_volume_backups.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $backupForGKEClient->listVolumeBackups($request); - - /** @var VolumeBackup $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 = BackupForGKEClient::backupName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_PLAN]', - '[BACKUP]' - ); - - list_volume_backups_sample($formattedParent); -} -// [END gkebackup_v1_generated_BackupForGKE_ListVolumeBackups_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_volume_restores.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_volume_restores.php deleted file mode 100644 index 6e4fb18e5826..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_volume_restores.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $backupForGKEClient->listVolumeRestores($request); - - /** @var VolumeRestore $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 = BackupForGKEClient::restoreName( - '[PROJECT]', - '[LOCATION]', - '[RESTORE_PLAN]', - '[RESTORE]' - ); - - list_volume_restores_sample($formattedParent); -} -// [END gkebackup_v1_generated_BackupForGKE_ListVolumeRestores_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/set_iam_policy.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/set_iam_policy.php deleted file mode 100644 index 793684f17ec5..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/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 = $backupForGKEClient->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 gkebackup_v1_generated_BackupForGKE_SetIamPolicy_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/test_iam_permissions.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/test_iam_permissions.php deleted file mode 100644 index 340bcbbb0a86..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/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 = $backupForGKEClient->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 gkebackup_v1_generated_BackupForGKE_TestIamPermissions_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_backup.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_backup.php deleted file mode 100644 index e83e41bb0605..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_backup.php +++ /dev/null @@ -1,71 +0,0 @@ -setBackup($backup); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $backupForGKEClient->updateBackup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Backup $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()); - } -} -// [END gkebackup_v1_generated_BackupForGKE_UpdateBackup_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_backup_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_backup_plan.php deleted file mode 100644 index 6ba79b2ba95e..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_backup_plan.php +++ /dev/null @@ -1,93 +0,0 @@ -setCluster($formattedBackupPlanCluster); - $request = (new UpdateBackupPlanRequest()) - ->setBackupPlan($backupPlan); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $backupForGKEClient->updateBackupPlan($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BackupPlan $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 -{ - $formattedBackupPlanCluster = BackupForGKEClient::clusterName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]' - ); - - update_backup_plan_sample($formattedBackupPlanCluster); -} -// [END gkebackup_v1_generated_BackupForGKE_UpdateBackupPlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_restore.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_restore.php deleted file mode 100644 index 9fdd60697b1c..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_restore.php +++ /dev/null @@ -1,95 +0,0 @@ -setBackup($formattedRestoreBackup); - $request = (new UpdateRestoreRequest()) - ->setRestore($restore); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $backupForGKEClient->updateRestore($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Restore $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 -{ - $formattedRestoreBackup = BackupForGKEClient::backupName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_PLAN]', - '[BACKUP]' - ); - - update_restore_sample($formattedRestoreBackup); -} -// [END gkebackup_v1_generated_BackupForGKE_UpdateRestore_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_restore_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_restore_plan.php deleted file mode 100644 index ae45a109e7c2..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_restore_plan.php +++ /dev/null @@ -1,110 +0,0 @@ -setBackupPlan($formattedRestorePlanBackupPlan) - ->setCluster($formattedRestorePlanCluster) - ->setRestoreConfig($restorePlanRestoreConfig); - $request = (new UpdateRestorePlanRequest()) - ->setRestorePlan($restorePlan); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $backupForGKEClient->updateRestorePlan($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var RestorePlan $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 -{ - $formattedRestorePlanBackupPlan = BackupForGKEClient::backupPlanName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_PLAN]' - ); - $formattedRestorePlanCluster = BackupForGKEClient::clusterName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]' - ); - - update_restore_plan_sample($formattedRestorePlanBackupPlan, $formattedRestorePlanCluster); -} -// [END gkebackup_v1_generated_BackupForGKE_UpdateRestorePlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/src/V1/Client/BackupForGKEClient.php b/owl-bot-staging/GkeBackup/v1/src/V1/Client/BackupForGKEClient.php deleted file mode 100644 index 3a9c16026103..000000000000 --- a/owl-bot-staging/GkeBackup/v1/src/V1/Client/BackupForGKEClient.php +++ /dev/null @@ -1,1304 +0,0 @@ - createBackupAsync(CreateBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface createBackupPlanAsync(CreateBackupPlanRequest $request, array $optionalArgs = []) - * @method PromiseInterface createRestoreAsync(CreateRestoreRequest $request, array $optionalArgs = []) - * @method PromiseInterface createRestorePlanAsync(CreateRestorePlanRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBackupAsync(DeleteBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBackupPlanAsync(DeleteBackupPlanRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteRestoreAsync(DeleteRestoreRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteRestorePlanAsync(DeleteRestorePlanRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBackupAsync(GetBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBackupIndexDownloadUrlAsync(GetBackupIndexDownloadUrlRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBackupPlanAsync(GetBackupPlanRequest $request, array $optionalArgs = []) - * @method PromiseInterface getRestoreAsync(GetRestoreRequest $request, array $optionalArgs = []) - * @method PromiseInterface getRestorePlanAsync(GetRestorePlanRequest $request, array $optionalArgs = []) - * @method PromiseInterface getVolumeBackupAsync(GetVolumeBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getVolumeRestoreAsync(GetVolumeRestoreRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBackupPlansAsync(ListBackupPlansRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBackupsAsync(ListBackupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listRestorePlansAsync(ListRestorePlansRequest $request, array $optionalArgs = []) - * @method PromiseInterface listRestoresAsync(ListRestoresRequest $request, array $optionalArgs = []) - * @method PromiseInterface listVolumeBackupsAsync(ListVolumeBackupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listVolumeRestoresAsync(ListVolumeRestoresRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBackupAsync(UpdateBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBackupPlanAsync(UpdateBackupPlanRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateRestoreAsync(UpdateRestoreRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateRestorePlanAsync(UpdateRestorePlanRequest $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 BackupForGKEClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.gkebackup.v1.BackupForGKE'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'gkebackup.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'gkebackup.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', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/backup_for_gke_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/backup_for_gke_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/backup_for_gke_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/backup_for_gke_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 = isset($this->descriptors[$methodName]['longRunning']) ? $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 backup - * resource. - * - * @param string $project - * @param string $location - * @param string $backupPlan - * @param string $backup - * - * @return string The formatted backup resource. - */ - public static function backupName(string $project, string $location, string $backupPlan, string $backup): string - { - return self::getPathTemplate('backup')->render([ - 'project' => $project, - 'location' => $location, - 'backup_plan' => $backupPlan, - 'backup' => $backup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a backup_plan - * resource. - * - * @param string $project - * @param string $location - * @param string $backupPlan - * - * @return string The formatted backup_plan resource. - */ - public static function backupPlanName(string $project, string $location, string $backupPlan): string - { - return self::getPathTemplate('backupPlan')->render([ - 'project' => $project, - 'location' => $location, - 'backup_plan' => $backupPlan, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a cluster - * resource. - * - * @param string $project - * @param string $location - * @param string $cluster - * - * @return string The formatted cluster resource. - */ - public static function clusterName(string $project, string $location, string $cluster): string - { - return self::getPathTemplate('cluster')->render([ - 'project' => $project, - 'location' => $location, - 'cluster' => $cluster, - ]); - } - - /** - * 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 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 restore - * resource. - * - * @param string $project - * @param string $location - * @param string $restorePlan - * @param string $restore - * - * @return string The formatted restore resource. - */ - public static function restoreName(string $project, string $location, string $restorePlan, string $restore): string - { - return self::getPathTemplate('restore')->render([ - 'project' => $project, - 'location' => $location, - 'restore_plan' => $restorePlan, - 'restore' => $restore, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a restore_plan - * resource. - * - * @param string $project - * @param string $location - * @param string $restorePlan - * - * @return string The formatted restore_plan resource. - */ - public static function restorePlanName(string $project, string $location, string $restorePlan): string - { - return self::getPathTemplate('restorePlan')->render([ - 'project' => $project, - 'location' => $location, - 'restore_plan' => $restorePlan, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * volume_backup resource. - * - * @param string $project - * @param string $location - * @param string $backupPlan - * @param string $backup - * @param string $volumeBackup - * - * @return string The formatted volume_backup resource. - */ - public static function volumeBackupName(string $project, string $location, string $backupPlan, string $backup, string $volumeBackup): string - { - return self::getPathTemplate('volumeBackup')->render([ - 'project' => $project, - 'location' => $location, - 'backup_plan' => $backupPlan, - 'backup' => $backup, - 'volume_backup' => $volumeBackup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * volume_restore resource. - * - * @param string $project - * @param string $location - * @param string $restorePlan - * @param string $restore - * @param string $volumeRestore - * - * @return string The formatted volume_restore resource. - */ - public static function volumeRestoreName(string $project, string $location, string $restorePlan, string $restore, string $volumeRestore): string - { - return self::getPathTemplate('volumeRestore')->render([ - 'project' => $project, - 'location' => $location, - 'restore_plan' => $restorePlan, - 'restore' => $restore, - 'volume_restore' => $volumeRestore, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - backup: projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup} - * - backupPlan: projects/{project}/locations/{location}/backupPlans/{backup_plan} - * - cluster: projects/{project}/locations/{location}/clusters/{cluster} - * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} - * - location: projects/{project}/locations/{location} - * - restore: projects/{project}/locations/{location}/restorePlans/{restore_plan}/restores/{restore} - * - restorePlan: projects/{project}/locations/{location}/restorePlans/{restore_plan} - * - volumeBackup: projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}/volumeBackups/{volume_backup} - * - volumeRestore: projects/{project}/locations/{location}/restorePlans/{restore_plan}/restores/{restore}/volumeRestores/{volume_restore} - * - * 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 $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 'gkebackup.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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 Backup for the given BackupPlan. - * - * The async variant is {@see BackupForGKEClient::createBackupAsync()} . - * - * @example samples/V1/BackupForGKEClient/create_backup.php - * - * @param CreateBackupRequest $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 createBackup(CreateBackupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateBackup', $request, $callOptions)->wait(); - } - - /** - * Creates a new BackupPlan in a given location. - * - * The async variant is {@see BackupForGKEClient::createBackupPlanAsync()} . - * - * @example samples/V1/BackupForGKEClient/create_backup_plan.php - * - * @param CreateBackupPlanRequest $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 createBackupPlan(CreateBackupPlanRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateBackupPlan', $request, $callOptions)->wait(); - } - - /** - * Creates a new Restore for the given RestorePlan. - * - * The async variant is {@see BackupForGKEClient::createRestoreAsync()} . - * - * @example samples/V1/BackupForGKEClient/create_restore.php - * - * @param CreateRestoreRequest $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 createRestore(CreateRestoreRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateRestore', $request, $callOptions)->wait(); - } - - /** - * Creates a new RestorePlan in a given location. - * - * The async variant is {@see BackupForGKEClient::createRestorePlanAsync()} . - * - * @example samples/V1/BackupForGKEClient/create_restore_plan.php - * - * @param CreateRestorePlanRequest $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 createRestorePlan(CreateRestorePlanRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateRestorePlan', $request, $callOptions)->wait(); - } - - /** - * Deletes an existing Backup. - * - * The async variant is {@see BackupForGKEClient::deleteBackupAsync()} . - * - * @example samples/V1/BackupForGKEClient/delete_backup.php - * - * @param DeleteBackupRequest $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 deleteBackup(DeleteBackupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteBackup', $request, $callOptions)->wait(); - } - - /** - * Deletes an existing BackupPlan. - * - * The async variant is {@see BackupForGKEClient::deleteBackupPlanAsync()} . - * - * @example samples/V1/BackupForGKEClient/delete_backup_plan.php - * - * @param DeleteBackupPlanRequest $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 deleteBackupPlan(DeleteBackupPlanRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteBackupPlan', $request, $callOptions)->wait(); - } - - /** - * Deletes an existing Restore. - * - * The async variant is {@see BackupForGKEClient::deleteRestoreAsync()} . - * - * @example samples/V1/BackupForGKEClient/delete_restore.php - * - * @param DeleteRestoreRequest $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 deleteRestore(DeleteRestoreRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteRestore', $request, $callOptions)->wait(); - } - - /** - * Deletes an existing RestorePlan. - * - * The async variant is {@see BackupForGKEClient::deleteRestorePlanAsync()} . - * - * @example samples/V1/BackupForGKEClient/delete_restore_plan.php - * - * @param DeleteRestorePlanRequest $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 deleteRestorePlan(DeleteRestorePlanRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteRestorePlan', $request, $callOptions)->wait(); - } - - /** - * Retrieve the details of a single Backup. - * - * The async variant is {@see BackupForGKEClient::getBackupAsync()} . - * - * @example samples/V1/BackupForGKEClient/get_backup.php - * - * @param GetBackupRequest $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 Backup - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBackup(GetBackupRequest $request, array $callOptions = []): Backup - { - return $this->startApiCall('GetBackup', $request, $callOptions)->wait(); - } - - /** - * Retrieve the link to the backupIndex. - * - * The async variant is {@see BackupForGKEClient::getBackupIndexDownloadUrlAsync()} - * . - * - * @example samples/V1/BackupForGKEClient/get_backup_index_download_url.php - * - * @param GetBackupIndexDownloadUrlRequest $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 GetBackupIndexDownloadUrlResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBackupIndexDownloadUrl(GetBackupIndexDownloadUrlRequest $request, array $callOptions = []): GetBackupIndexDownloadUrlResponse - { - return $this->startApiCall('GetBackupIndexDownloadUrl', $request, $callOptions)->wait(); - } - - /** - * Retrieve the details of a single BackupPlan. - * - * The async variant is {@see BackupForGKEClient::getBackupPlanAsync()} . - * - * @example samples/V1/BackupForGKEClient/get_backup_plan.php - * - * @param GetBackupPlanRequest $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 BackupPlan - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBackupPlan(GetBackupPlanRequest $request, array $callOptions = []): BackupPlan - { - return $this->startApiCall('GetBackupPlan', $request, $callOptions)->wait(); - } - - /** - * Retrieves the details of a single Restore. - * - * The async variant is {@see BackupForGKEClient::getRestoreAsync()} . - * - * @example samples/V1/BackupForGKEClient/get_restore.php - * - * @param GetRestoreRequest $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 Restore - * - * @throws ApiException Thrown if the API call fails. - */ - public function getRestore(GetRestoreRequest $request, array $callOptions = []): Restore - { - return $this->startApiCall('GetRestore', $request, $callOptions)->wait(); - } - - /** - * Retrieve the details of a single RestorePlan. - * - * The async variant is {@see BackupForGKEClient::getRestorePlanAsync()} . - * - * @example samples/V1/BackupForGKEClient/get_restore_plan.php - * - * @param GetRestorePlanRequest $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 RestorePlan - * - * @throws ApiException Thrown if the API call fails. - */ - public function getRestorePlan(GetRestorePlanRequest $request, array $callOptions = []): RestorePlan - { - return $this->startApiCall('GetRestorePlan', $request, $callOptions)->wait(); - } - - /** - * Retrieve the details of a single VolumeBackup. - * - * The async variant is {@see BackupForGKEClient::getVolumeBackupAsync()} . - * - * @example samples/V1/BackupForGKEClient/get_volume_backup.php - * - * @param GetVolumeBackupRequest $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 VolumeBackup - * - * @throws ApiException Thrown if the API call fails. - */ - public function getVolumeBackup(GetVolumeBackupRequest $request, array $callOptions = []): VolumeBackup - { - return $this->startApiCall('GetVolumeBackup', $request, $callOptions)->wait(); - } - - /** - * Retrieve the details of a single VolumeRestore. - * - * The async variant is {@see BackupForGKEClient::getVolumeRestoreAsync()} . - * - * @example samples/V1/BackupForGKEClient/get_volume_restore.php - * - * @param GetVolumeRestoreRequest $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 VolumeRestore - * - * @throws ApiException Thrown if the API call fails. - */ - public function getVolumeRestore(GetVolumeRestoreRequest $request, array $callOptions = []): VolumeRestore - { - return $this->startApiCall('GetVolumeRestore', $request, $callOptions)->wait(); - } - - /** - * Lists BackupPlans in a given location. - * - * The async variant is {@see BackupForGKEClient::listBackupPlansAsync()} . - * - * @example samples/V1/BackupForGKEClient/list_backup_plans.php - * - * @param ListBackupPlansRequest $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 listBackupPlans(ListBackupPlansRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListBackupPlans', $request, $callOptions); - } - - /** - * Lists the Backups for a given BackupPlan. - * - * The async variant is {@see BackupForGKEClient::listBackupsAsync()} . - * - * @example samples/V1/BackupForGKEClient/list_backups.php - * - * @param ListBackupsRequest $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 listBackups(ListBackupsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListBackups', $request, $callOptions); - } - - /** - * Lists RestorePlans in a given location. - * - * The async variant is {@see BackupForGKEClient::listRestorePlansAsync()} . - * - * @example samples/V1/BackupForGKEClient/list_restore_plans.php - * - * @param ListRestorePlansRequest $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 listRestorePlans(ListRestorePlansRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListRestorePlans', $request, $callOptions); - } - - /** - * Lists the Restores for a given RestorePlan. - * - * The async variant is {@see BackupForGKEClient::listRestoresAsync()} . - * - * @example samples/V1/BackupForGKEClient/list_restores.php - * - * @param ListRestoresRequest $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 listRestores(ListRestoresRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListRestores', $request, $callOptions); - } - - /** - * Lists the VolumeBackups for a given Backup. - * - * The async variant is {@see BackupForGKEClient::listVolumeBackupsAsync()} . - * - * @example samples/V1/BackupForGKEClient/list_volume_backups.php - * - * @param ListVolumeBackupsRequest $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 listVolumeBackups(ListVolumeBackupsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListVolumeBackups', $request, $callOptions); - } - - /** - * Lists the VolumeRestores for a given Restore. - * - * The async variant is {@see BackupForGKEClient::listVolumeRestoresAsync()} . - * - * @example samples/V1/BackupForGKEClient/list_volume_restores.php - * - * @param ListVolumeRestoresRequest $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 listVolumeRestores(ListVolumeRestoresRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListVolumeRestores', $request, $callOptions); - } - - /** - * Update a Backup. - * - * The async variant is {@see BackupForGKEClient::updateBackupAsync()} . - * - * @example samples/V1/BackupForGKEClient/update_backup.php - * - * @param UpdateBackupRequest $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 updateBackup(UpdateBackupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateBackup', $request, $callOptions)->wait(); - } - - /** - * Update a BackupPlan. - * - * The async variant is {@see BackupForGKEClient::updateBackupPlanAsync()} . - * - * @example samples/V1/BackupForGKEClient/update_backup_plan.php - * - * @param UpdateBackupPlanRequest $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 updateBackupPlan(UpdateBackupPlanRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateBackupPlan', $request, $callOptions)->wait(); - } - - /** - * Update a Restore. - * - * The async variant is {@see BackupForGKEClient::updateRestoreAsync()} . - * - * @example samples/V1/BackupForGKEClient/update_restore.php - * - * @param UpdateRestoreRequest $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 updateRestore(UpdateRestoreRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateRestore', $request, $callOptions)->wait(); - } - - /** - * Update a RestorePlan. - * - * The async variant is {@see BackupForGKEClient::updateRestorePlanAsync()} . - * - * @example samples/V1/BackupForGKEClient/update_restore_plan.php - * - * @param UpdateRestorePlanRequest $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 updateRestorePlan(UpdateRestorePlanRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateRestorePlan', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see BackupForGKEClient::getLocationAsync()} . - * - * @example samples/V1/BackupForGKEClient/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. - * - * The async variant is {@see BackupForGKEClient::listLocationsAsync()} . - * - * @example samples/V1/BackupForGKEClient/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 BackupForGKEClient::getIamPolicyAsync()} . - * - * @example samples/V1/BackupForGKEClient/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 BackupForGKEClient::setIamPolicyAsync()} . - * - * @example samples/V1/BackupForGKEClient/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 BackupForGKEClient::testIamPermissionsAsync()} . - * - * @example samples/V1/BackupForGKEClient/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/GkeBackup/v1/src/V1/gapic_metadata.json b/owl-bot-staging/GkeBackup/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 6f12478d150e..000000000000 --- a/owl-bot-staging/GkeBackup/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.gkebackup.v1", - "libraryPackage": "Google\\Cloud\\GkeBackup\\V1", - "services": { - "BackupForGKE": { - "clients": { - "grpc": { - "libraryClient": "BackupForGKEGapicClient", - "rpcs": { - "CreateBackup": { - "methods": [ - "createBackup" - ] - }, - "CreateBackupPlan": { - "methods": [ - "createBackupPlan" - ] - }, - "CreateRestore": { - "methods": [ - "createRestore" - ] - }, - "CreateRestorePlan": { - "methods": [ - "createRestorePlan" - ] - }, - "DeleteBackup": { - "methods": [ - "deleteBackup" - ] - }, - "DeleteBackupPlan": { - "methods": [ - "deleteBackupPlan" - ] - }, - "DeleteRestore": { - "methods": [ - "deleteRestore" - ] - }, - "DeleteRestorePlan": { - "methods": [ - "deleteRestorePlan" - ] - }, - "GetBackup": { - "methods": [ - "getBackup" - ] - }, - "GetBackupIndexDownloadUrl": { - "methods": [ - "getBackupIndexDownloadUrl" - ] - }, - "GetBackupPlan": { - "methods": [ - "getBackupPlan" - ] - }, - "GetRestore": { - "methods": [ - "getRestore" - ] - }, - "GetRestorePlan": { - "methods": [ - "getRestorePlan" - ] - }, - "GetVolumeBackup": { - "methods": [ - "getVolumeBackup" - ] - }, - "GetVolumeRestore": { - "methods": [ - "getVolumeRestore" - ] - }, - "ListBackupPlans": { - "methods": [ - "listBackupPlans" - ] - }, - "ListBackups": { - "methods": [ - "listBackups" - ] - }, - "ListRestorePlans": { - "methods": [ - "listRestorePlans" - ] - }, - "ListRestores": { - "methods": [ - "listRestores" - ] - }, - "ListVolumeBackups": { - "methods": [ - "listVolumeBackups" - ] - }, - "ListVolumeRestores": { - "methods": [ - "listVolumeRestores" - ] - }, - "UpdateBackup": { - "methods": [ - "updateBackup" - ] - }, - "UpdateBackupPlan": { - "methods": [ - "updateBackupPlan" - ] - }, - "UpdateRestore": { - "methods": [ - "updateRestore" - ] - }, - "UpdateRestorePlan": { - "methods": [ - "updateRestorePlan" - ] - }, - "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/GkeBackup/v1/src/V1/resources/backup_for_gke_client_config.json b/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_client_config.json deleted file mode 100644 index 3e02520d4f8c..000000000000 --- a/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_client_config.json +++ /dev/null @@ -1,214 +0,0 @@ -{ - "interfaces": { - "google.cloud.gkebackup.v1.BackupForGKE": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [], - "no_retry_2_codes": [], - "no_retry_3_codes": [] - }, - "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": 1000, - "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 - }, - "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 - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 120000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 120000, - "total_timeout_millis": 120000 - }, - "no_retry_3_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 300000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 300000, - "total_timeout_millis": 300000 - } - }, - "methods": { - "CreateBackup": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreateBackupPlan": { - "timeout_millis": 300000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" - }, - "CreateRestore": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreateRestorePlan": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "DeleteBackup": { - "timeout_millis": 300000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" - }, - "DeleteBackupPlan": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteRestore": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteRestorePlan": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetBackup": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetBackupIndexDownloadUrl": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetBackupPlan": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetRestore": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetRestorePlan": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetVolumeBackup": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetVolumeRestore": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListBackupPlans": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListBackups": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListRestorePlans": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListRestores": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListVolumeBackups": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListVolumeRestores": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateBackup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateBackupPlan": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateRestore": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateRestorePlan": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_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/GkeBackup/v1/src/V1/resources/backup_for_gke_descriptor_config.php b/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_descriptor_config.php deleted file mode 100644 index 8b4932b4baf8..000000000000 --- a/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_descriptor_config.php +++ /dev/null @@ -1,548 +0,0 @@ - [ - 'google.cloud.gkebackup.v1.BackupForGKE' => [ - 'CreateBackup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\Backup', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateBackupPlan' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\BackupPlan', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateRestore' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\Restore', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateRestorePlan' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\RestorePlan', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteBackup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteBackupPlan' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteRestore' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteRestorePlan' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateBackup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\Backup', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'backup.name', - 'fieldAccessors' => [ - 'getBackup', - 'getName', - ], - ], - ], - ], - 'UpdateBackupPlan' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\BackupPlan', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'backup_plan.name', - 'fieldAccessors' => [ - 'getBackupPlan', - 'getName', - ], - ], - ], - ], - 'UpdateRestore' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\Restore', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'restore.name', - 'fieldAccessors' => [ - 'getRestore', - 'getName', - ], - ], - ], - ], - 'UpdateRestorePlan' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\RestorePlan', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'restore_plan.name', - 'fieldAccessors' => [ - 'getRestorePlan', - 'getName', - ], - ], - ], - ], - 'GetBackup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeBackup\V1\Backup', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetBackupIndexDownloadUrl' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeBackup\V1\GetBackupIndexDownloadUrlResponse', - 'headerParams' => [ - [ - 'keyName' => 'backup', - 'fieldAccessors' => [ - 'getBackup', - ], - ], - ], - ], - 'GetBackupPlan' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeBackup\V1\BackupPlan', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetRestore' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeBackup\V1\Restore', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetRestorePlan' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeBackup\V1\RestorePlan', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetVolumeBackup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeBackup\V1\VolumeBackup', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetVolumeRestore' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeBackup\V1\VolumeRestore', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListBackupPlans' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBackupPlans', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeBackup\V1\ListBackupPlansResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListBackups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBackups', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeBackup\V1\ListBackupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListRestorePlans' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRestorePlans', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeBackup\V1\ListRestorePlansResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListRestores' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRestores', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeBackup\V1\ListRestoresResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListVolumeBackups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getVolumeBackups', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeBackup\V1\ListVolumeBackupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListVolumeRestores' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getVolumeRestores', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeBackup\V1\ListVolumeRestoresResponse', - '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' => [ - 'backup' => 'projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}', - 'backupPlan' => 'projects/{project}/locations/{location}/backupPlans/{backup_plan}', - 'cluster' => 'projects/{project}/locations/{location}/clusters/{cluster}', - 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', - 'location' => 'projects/{project}/locations/{location}', - 'restore' => 'projects/{project}/locations/{location}/restorePlans/{restore_plan}/restores/{restore}', - 'restorePlan' => 'projects/{project}/locations/{location}/restorePlans/{restore_plan}', - 'volumeBackup' => 'projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}/volumeBackups/{volume_backup}', - 'volumeRestore' => 'projects/{project}/locations/{location}/restorePlans/{restore_plan}/restores/{restore}/volumeRestores/{volume_restore}', - ], - ], - ], -]; diff --git a/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_rest_client_config.php b/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_rest_client_config.php deleted file mode 100644 index 2da9a805e611..000000000000 --- a/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_rest_client_config.php +++ /dev/null @@ -1,509 +0,0 @@ - [ - 'google.cloud.gkebackup.v1.BackupForGKE' => [ - 'CreateBackup' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/backupPlans/*}/backups', - 'body' => 'backup', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateBackupPlan' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupPlans', - 'body' => 'backup_plan', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'backup_plan_id', - ], - ], - 'CreateRestore' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/restorePlans/*}/restores', - 'body' => 'restore', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'restore_id', - ], - ], - 'CreateRestorePlan' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/restorePlans', - 'body' => 'restore_plan', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'restore_plan_id', - ], - ], - 'DeleteBackup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPlans/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteBackupPlan' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPlans/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteRestore' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteRestorePlan' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/restorePlans/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBackup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPlans/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBackupIndexDownloadUrl' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{backup=projects/*/locations/*/backupPlans/*/backups/*}:getBackupIndexDownloadUrl', - 'placeholders' => [ - 'backup' => [ - 'getters' => [ - 'getBackup', - ], - ], - ], - ], - 'GetBackupPlan' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPlans/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetRestore' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetRestorePlan' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/restorePlans/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetVolumeBackup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetVolumeRestore' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListBackupPlans' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupPlans', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListBackups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/backupPlans/*}/backups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListRestorePlans' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/restorePlans', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListRestores' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/restorePlans/*}/restores', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListVolumeBackups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/backupPlans/*/backups/*}/volumeBackups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListVolumeRestores' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/restorePlans/*/restores/*}/volumeRestores', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateBackup' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{backup.name=projects/*/locations/*/backupPlans/*/backups/*}', - 'body' => 'backup', - 'placeholders' => [ - 'backup.name' => [ - 'getters' => [ - 'getBackup', - 'getName', - ], - ], - ], - ], - 'UpdateBackupPlan' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{backup_plan.name=projects/*/locations/*/backupPlans/*}', - 'body' => 'backup_plan', - 'placeholders' => [ - 'backup_plan.name' => [ - 'getters' => [ - 'getBackupPlan', - 'getName', - ], - ], - ], - ], - 'UpdateRestore' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{restore.name=projects/*/locations/*/restorePlans/*/restores/*}', - 'body' => 'restore', - 'placeholders' => [ - 'restore.name' => [ - 'getters' => [ - 'getRestore', - 'getName', - ], - ], - ], - ], - 'UpdateRestorePlan' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{restore_plan.name=projects/*/locations/*/restorePlans/*}', - 'body' => 'restore_plan', - 'placeholders' => [ - 'restore_plan.name' => [ - 'getters' => [ - 'getRestorePlan', - '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/*/backupPlans/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/GkeBackup/v1/tests/Unit/V1/Client/BackupForGKEClientTest.php b/owl-bot-staging/GkeBackup/v1/tests/Unit/V1/Client/BackupForGKEClientTest.php deleted file mode 100644 index fe61e21a7468..000000000000 --- a/owl-bot-staging/GkeBackup/v1/tests/Unit/V1/Client/BackupForGKEClientTest.php +++ /dev/null @@ -1,3233 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BackupForGKEClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BackupForGKEClient($options); - } - - /** @test */ - public function createBackupTest() - { - $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/createBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $manual = true; - $deleteLockDays = 1638724265; - $retainDays = 1380805807; - $allNamespaces = true; - $containsVolumeData = false; - $containsSecrets = false; - $stateReason = 'stateReason282113458'; - $resourceCount = 287552926; - $volumeCount = 1362665558; - $sizeBytes = 1796325715; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $podCount = 977657493; - $configBackupSizeBytes = 606785139; - $permissiveMode = false; - $expectedResponse = new Backup(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setManual($manual); - $expectedResponse->setDeleteLockDays($deleteLockDays); - $expectedResponse->setRetainDays($retainDays); - $expectedResponse->setAllNamespaces($allNamespaces); - $expectedResponse->setContainsVolumeData($containsVolumeData); - $expectedResponse->setContainsSecrets($containsSecrets); - $expectedResponse->setStateReason($stateReason); - $expectedResponse->setResourceCount($resourceCount); - $expectedResponse->setVolumeCount($volumeCount); - $expectedResponse->setSizeBytes($sizeBytes); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $expectedResponse->setPodCount($podCount); - $expectedResponse->setConfigBackupSizeBytes($configBackupSizeBytes); - $expectedResponse->setPermissiveMode($permissiveMode); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createBackupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $request = (new CreateBackupRequest()) - ->setParent($formattedParent); - $response = $gapicClient->createBackup($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.gkebackup.v1.BackupForGKE/CreateBackup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackupTest'); - $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 createBackupExceptionTest() - { - $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/createBackupTest'); - $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->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $request = (new CreateBackupRequest()) - ->setParent($formattedParent); - $response = $gapicClient->createBackup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackupTest'); - 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 createBackupPlanTest() - { - $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/createBackupPlanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $cluster = 'cluster872092154'; - $etag = 'etag3123477'; - $deactivated = true; - $protectedPodCount = 1494678716; - $stateReason = 'stateReason282113458'; - $rpoRiskLevel = 1939768030; - $rpoRiskReason = 'rpoRiskReason167896166'; - $expectedResponse = new BackupPlan(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setCluster($cluster); - $expectedResponse->setEtag($etag); - $expectedResponse->setDeactivated($deactivated); - $expectedResponse->setProtectedPodCount($protectedPodCount); - $expectedResponse->setStateReason($stateReason); - $expectedResponse->setRpoRiskLevel($rpoRiskLevel); - $expectedResponse->setRpoRiskReason($rpoRiskReason); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createBackupPlanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $backupPlan = new BackupPlan(); - $backupPlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $backupPlan->setCluster($backupPlanCluster); - $backupPlanId = 'backupPlanId-25762700'; - $request = (new CreateBackupPlanRequest()) - ->setParent($formattedParent) - ->setBackupPlan($backupPlan) - ->setBackupPlanId($backupPlanId); - $response = $gapicClient->createBackupPlan($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.gkebackup.v1.BackupForGKE/CreateBackupPlan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getBackupPlan(); - $this->assertProtobufEquals($backupPlan, $actualValue); - $actualValue = $actualApiRequestObject->getBackupPlanId(); - $this->assertProtobufEquals($backupPlanId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackupPlanTest'); - $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 createBackupPlanExceptionTest() - { - $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/createBackupPlanTest'); - $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]'); - $backupPlan = new BackupPlan(); - $backupPlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $backupPlan->setCluster($backupPlanCluster); - $backupPlanId = 'backupPlanId-25762700'; - $request = (new CreateBackupPlanRequest()) - ->setParent($formattedParent) - ->setBackupPlan($backupPlan) - ->setBackupPlanId($backupPlanId); - $response = $gapicClient->createBackupPlan($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackupPlanTest'); - 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 createRestoreTest() - { - $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/createRestoreTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $backup = 'backup-1396673086'; - $cluster = 'cluster872092154'; - $stateReason = 'stateReason282113458'; - $resourcesRestoredCount = 882879616; - $resourcesExcludedCount = 338652236; - $resourcesFailedCount = 217904743; - $volumesRestoredCount = 1005533068; - $etag = 'etag3123477'; - $expectedResponse = new Restore(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setBackup($backup); - $expectedResponse->setCluster($cluster); - $expectedResponse->setStateReason($stateReason); - $expectedResponse->setResourcesRestoredCount($resourcesRestoredCount); - $expectedResponse->setResourcesExcludedCount($resourcesExcludedCount); - $expectedResponse->setResourcesFailedCount($resourcesFailedCount); - $expectedResponse->setVolumesRestoredCount($volumesRestoredCount); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createRestoreTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - $restore = new Restore(); - $restoreBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); - $restore->setBackup($restoreBackup); - $restoreId = 'restoreId-1374819220'; - $request = (new CreateRestoreRequest()) - ->setParent($formattedParent) - ->setRestore($restore) - ->setRestoreId($restoreId); - $response = $gapicClient->createRestore($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.gkebackup.v1.BackupForGKE/CreateRestore', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getRestore(); - $this->assertProtobufEquals($restore, $actualValue); - $actualValue = $actualApiRequestObject->getRestoreId(); - $this->assertProtobufEquals($restoreId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createRestoreTest'); - $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 createRestoreExceptionTest() - { - $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/createRestoreTest'); - $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->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - $restore = new Restore(); - $restoreBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); - $restore->setBackup($restoreBackup); - $restoreId = 'restoreId-1374819220'; - $request = (new CreateRestoreRequest()) - ->setParent($formattedParent) - ->setRestore($restore) - ->setRestoreId($restoreId); - $response = $gapicClient->createRestore($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createRestoreTest'); - 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 createRestorePlanTest() - { - $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/createRestorePlanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $backupPlan = 'backupPlan1119623046'; - $cluster = 'cluster872092154'; - $etag = 'etag3123477'; - $stateReason = 'stateReason282113458'; - $expectedResponse = new RestorePlan(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setBackupPlan($backupPlan); - $expectedResponse->setCluster($cluster); - $expectedResponse->setEtag($etag); - $expectedResponse->setStateReason($stateReason); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createRestorePlanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $restorePlan = new RestorePlan(); - $restorePlanBackupPlan = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $restorePlan->setBackupPlan($restorePlanBackupPlan); - $restorePlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $restorePlan->setCluster($restorePlanCluster); - $restorePlanRestoreConfig = new RestoreConfig(); - $restorePlan->setRestoreConfig($restorePlanRestoreConfig); - $restorePlanId = 'restorePlanId126727488'; - $request = (new CreateRestorePlanRequest()) - ->setParent($formattedParent) - ->setRestorePlan($restorePlan) - ->setRestorePlanId($restorePlanId); - $response = $gapicClient->createRestorePlan($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.gkebackup.v1.BackupForGKE/CreateRestorePlan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getRestorePlan(); - $this->assertProtobufEquals($restorePlan, $actualValue); - $actualValue = $actualApiRequestObject->getRestorePlanId(); - $this->assertProtobufEquals($restorePlanId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createRestorePlanTest'); - $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 createRestorePlanExceptionTest() - { - $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/createRestorePlanTest'); - $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]'); - $restorePlan = new RestorePlan(); - $restorePlanBackupPlan = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $restorePlan->setBackupPlan($restorePlanBackupPlan); - $restorePlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $restorePlan->setCluster($restorePlanCluster); - $restorePlanRestoreConfig = new RestoreConfig(); - $restorePlan->setRestoreConfig($restorePlanRestoreConfig); - $restorePlanId = 'restorePlanId126727488'; - $request = (new CreateRestorePlanRequest()) - ->setParent($formattedParent) - ->setRestorePlan($restorePlan) - ->setRestorePlanId($restorePlanId); - $response = $gapicClient->createRestorePlan($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createRestorePlanTest'); - 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 deleteBackupTest() - { - $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/deleteBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteBackupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); - $request = (new DeleteBackupRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteBackup($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.gkebackup.v1.BackupForGKE/DeleteBackup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteBackupTest'); - $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 deleteBackupExceptionTest() - { - $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/deleteBackupTest'); - $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->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); - $request = (new DeleteBackupRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteBackup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteBackupTest'); - 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 deleteBackupPlanTest() - { - $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/deleteBackupPlanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteBackupPlanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $request = (new DeleteBackupPlanRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteBackupPlan($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.gkebackup.v1.BackupForGKE/DeleteBackupPlan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteBackupPlanTest'); - $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 deleteBackupPlanExceptionTest() - { - $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/deleteBackupPlanTest'); - $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->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $request = (new DeleteBackupPlanRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteBackupPlan($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteBackupPlanTest'); - 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 deleteRestoreTest() - { - $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/deleteRestoreTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteRestoreTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); - $request = (new DeleteRestoreRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteRestore($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.gkebackup.v1.BackupForGKE/DeleteRestore', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRestoreTest'); - $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 deleteRestoreExceptionTest() - { - $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/deleteRestoreTest'); - $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->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); - $request = (new DeleteRestoreRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteRestore($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRestoreTest'); - 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 deleteRestorePlanTest() - { - $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/deleteRestorePlanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteRestorePlanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - $request = (new DeleteRestorePlanRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteRestorePlan($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.gkebackup.v1.BackupForGKE/DeleteRestorePlan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRestorePlanTest'); - $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 deleteRestorePlanExceptionTest() - { - $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/deleteRestorePlanTest'); - $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->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - $request = (new DeleteRestorePlanRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteRestorePlan($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRestorePlanTest'); - 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 getBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $manual = true; - $deleteLockDays = 1638724265; - $retainDays = 1380805807; - $allNamespaces = true; - $containsVolumeData = false; - $containsSecrets = false; - $stateReason = 'stateReason282113458'; - $resourceCount = 287552926; - $volumeCount = 1362665558; - $sizeBytes = 1796325715; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $podCount = 977657493; - $configBackupSizeBytes = 606785139; - $permissiveMode = false; - $expectedResponse = new Backup(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setManual($manual); - $expectedResponse->setDeleteLockDays($deleteLockDays); - $expectedResponse->setRetainDays($retainDays); - $expectedResponse->setAllNamespaces($allNamespaces); - $expectedResponse->setContainsVolumeData($containsVolumeData); - $expectedResponse->setContainsSecrets($containsSecrets); - $expectedResponse->setStateReason($stateReason); - $expectedResponse->setResourceCount($resourceCount); - $expectedResponse->setVolumeCount($volumeCount); - $expectedResponse->setSizeBytes($sizeBytes); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $expectedResponse->setPodCount($podCount); - $expectedResponse->setConfigBackupSizeBytes($configBackupSizeBytes); - $expectedResponse->setPermissiveMode($permissiveMode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); - $request = (new GetBackupRequest()) - ->setName($formattedName); - $response = $gapicClient->getBackup($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.gkebackup.v1.BackupForGKE/GetBackup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupExceptionTest() - { - $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->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); - $request = (new GetBackupRequest()) - ->setName($formattedName); - try { - $gapicClient->getBackup($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 getBackupIndexDownloadUrlTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $signedUrl = 'signedUrl-979536436'; - $expectedResponse = new GetBackupIndexDownloadUrlResponse(); - $expectedResponse->setSignedUrl($signedUrl); - $transport->addResponse($expectedResponse); - // Mock request - $formattedBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); - $request = (new GetBackupIndexDownloadUrlRequest()) - ->setBackup($formattedBackup); - $response = $gapicClient->getBackupIndexDownloadUrl($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.gkebackup.v1.BackupForGKE/GetBackupIndexDownloadUrl', $actualFuncCall); - $actualValue = $actualRequestObject->getBackup(); - $this->assertProtobufEquals($formattedBackup, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupIndexDownloadUrlExceptionTest() - { - $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 - $formattedBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); - $request = (new GetBackupIndexDownloadUrlRequest()) - ->setBackup($formattedBackup); - try { - $gapicClient->getBackupIndexDownloadUrl($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 getBackupPlanTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $cluster = 'cluster872092154'; - $etag = 'etag3123477'; - $deactivated = true; - $protectedPodCount = 1494678716; - $stateReason = 'stateReason282113458'; - $rpoRiskLevel = 1939768030; - $rpoRiskReason = 'rpoRiskReason167896166'; - $expectedResponse = new BackupPlan(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setCluster($cluster); - $expectedResponse->setEtag($etag); - $expectedResponse->setDeactivated($deactivated); - $expectedResponse->setProtectedPodCount($protectedPodCount); - $expectedResponse->setStateReason($stateReason); - $expectedResponse->setRpoRiskLevel($rpoRiskLevel); - $expectedResponse->setRpoRiskReason($rpoRiskReason); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $request = (new GetBackupPlanRequest()) - ->setName($formattedName); - $response = $gapicClient->getBackupPlan($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.gkebackup.v1.BackupForGKE/GetBackupPlan', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupPlanExceptionTest() - { - $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->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $request = (new GetBackupPlanRequest()) - ->setName($formattedName); - try { - $gapicClient->getBackupPlan($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 getRestoreTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $backup = 'backup-1396673086'; - $cluster = 'cluster872092154'; - $stateReason = 'stateReason282113458'; - $resourcesRestoredCount = 882879616; - $resourcesExcludedCount = 338652236; - $resourcesFailedCount = 217904743; - $volumesRestoredCount = 1005533068; - $etag = 'etag3123477'; - $expectedResponse = new Restore(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setBackup($backup); - $expectedResponse->setCluster($cluster); - $expectedResponse->setStateReason($stateReason); - $expectedResponse->setResourcesRestoredCount($resourcesRestoredCount); - $expectedResponse->setResourcesExcludedCount($resourcesExcludedCount); - $expectedResponse->setResourcesFailedCount($resourcesFailedCount); - $expectedResponse->setVolumesRestoredCount($volumesRestoredCount); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); - $request = (new GetRestoreRequest()) - ->setName($formattedName); - $response = $gapicClient->getRestore($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.gkebackup.v1.BackupForGKE/GetRestore', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRestoreExceptionTest() - { - $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->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); - $request = (new GetRestoreRequest()) - ->setName($formattedName); - try { - $gapicClient->getRestore($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 getRestorePlanTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $backupPlan = 'backupPlan1119623046'; - $cluster = 'cluster872092154'; - $etag = 'etag3123477'; - $stateReason = 'stateReason282113458'; - $expectedResponse = new RestorePlan(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setBackupPlan($backupPlan); - $expectedResponse->setCluster($cluster); - $expectedResponse->setEtag($etag); - $expectedResponse->setStateReason($stateReason); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - $request = (new GetRestorePlanRequest()) - ->setName($formattedName); - $response = $gapicClient->getRestorePlan($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.gkebackup.v1.BackupForGKE/GetRestorePlan', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRestorePlanExceptionTest() - { - $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->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - $request = (new GetRestorePlanRequest()) - ->setName($formattedName); - try { - $gapicClient->getRestorePlan($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 getVolumeBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $volumeBackupHandle = 'volumeBackupHandle-2105959712'; - $storageBytes = 2035244455; - $diskSizeBytes = 275393905; - $stateMessage = 'stateMessage29641305'; - $etag = 'etag3123477'; - $expectedResponse = new VolumeBackup(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setVolumeBackupHandle($volumeBackupHandle); - $expectedResponse->setStorageBytes($storageBytes); - $expectedResponse->setDiskSizeBytes($diskSizeBytes); - $expectedResponse->setStateMessage($stateMessage); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->volumeBackupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]', '[VOLUME_BACKUP]'); - $request = (new GetVolumeBackupRequest()) - ->setName($formattedName); - $response = $gapicClient->getVolumeBackup($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.gkebackup.v1.BackupForGKE/GetVolumeBackup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVolumeBackupExceptionTest() - { - $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->volumeBackupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]', '[VOLUME_BACKUP]'); - $request = (new GetVolumeBackupRequest()) - ->setName($formattedName); - try { - $gapicClient->getVolumeBackup($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 getVolumeRestoreTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $volumeBackup = 'volumeBackup664943239'; - $volumeHandle = 'volumeHandle837038829'; - $stateMessage = 'stateMessage29641305'; - $etag = 'etag3123477'; - $expectedResponse = new VolumeRestore(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setVolumeBackup($volumeBackup); - $expectedResponse->setVolumeHandle($volumeHandle); - $expectedResponse->setStateMessage($stateMessage); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->volumeRestoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]', '[VOLUME_RESTORE]'); - $request = (new GetVolumeRestoreRequest()) - ->setName($formattedName); - $response = $gapicClient->getVolumeRestore($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.gkebackup.v1.BackupForGKE/GetVolumeRestore', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVolumeRestoreExceptionTest() - { - $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->volumeRestoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]', '[VOLUME_RESTORE]'); - $request = (new GetVolumeRestoreRequest()) - ->setName($formattedName); - try { - $gapicClient->getVolumeRestore($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 listBackupPlansTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $backupPlansElement = new BackupPlan(); - $backupPlans = [ - $backupPlansElement, - ]; - $expectedResponse = new ListBackupPlansResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBackupPlans($backupPlans); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListBackupPlansRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBackupPlans($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBackupPlans()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/ListBackupPlans', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupPlansExceptionTest() - { - $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 ListBackupPlansRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listBackupPlans($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 listBackupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $backupsElement = new Backup(); - $backups = [ - $backupsElement, - ]; - $expectedResponse = new ListBackupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBackups($backups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $request = (new ListBackupsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBackups($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBackups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/ListBackups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupsExceptionTest() - { - $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->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $request = (new ListBackupsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listBackups($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 listRestorePlansTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $restorePlansElement = new RestorePlan(); - $restorePlans = [ - $restorePlansElement, - ]; - $expectedResponse = new ListRestorePlansResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRestorePlans($restorePlans); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListRestorePlansRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listRestorePlans($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRestorePlans()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/ListRestorePlans', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRestorePlansExceptionTest() - { - $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 ListRestorePlansRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listRestorePlans($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 listRestoresTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $restoresElement = new Restore(); - $restores = [ - $restoresElement, - ]; - $expectedResponse = new ListRestoresResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRestores($restores); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - $request = (new ListRestoresRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listRestores($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRestores()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/ListRestores', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRestoresExceptionTest() - { - $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->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - $request = (new ListRestoresRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listRestores($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 listVolumeBackupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $volumeBackupsElement = new VolumeBackup(); - $volumeBackups = [ - $volumeBackupsElement, - ]; - $expectedResponse = new ListVolumeBackupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setVolumeBackups($volumeBackups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); - $request = (new ListVolumeBackupsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listVolumeBackups($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getVolumeBackups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/ListVolumeBackups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVolumeBackupsExceptionTest() - { - $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->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); - $request = (new ListVolumeBackupsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listVolumeBackups($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 listVolumeRestoresTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $volumeRestoresElement = new VolumeRestore(); - $volumeRestores = [ - $volumeRestoresElement, - ]; - $expectedResponse = new ListVolumeRestoresResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setVolumeRestores($volumeRestores); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); - $request = (new ListVolumeRestoresRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listVolumeRestores($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getVolumeRestores()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/ListVolumeRestores', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVolumeRestoresExceptionTest() - { - $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->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); - $request = (new ListVolumeRestoresRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listVolumeRestores($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 updateBackupTest() - { - $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/updateBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $manual = true; - $deleteLockDays = 1638724265; - $retainDays = 1380805807; - $allNamespaces = true; - $containsVolumeData = false; - $containsSecrets = false; - $stateReason = 'stateReason282113458'; - $resourceCount = 287552926; - $volumeCount = 1362665558; - $sizeBytes = 1796325715; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $podCount = 977657493; - $configBackupSizeBytes = 606785139; - $permissiveMode = false; - $expectedResponse = new Backup(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setManual($manual); - $expectedResponse->setDeleteLockDays($deleteLockDays); - $expectedResponse->setRetainDays($retainDays); - $expectedResponse->setAllNamespaces($allNamespaces); - $expectedResponse->setContainsVolumeData($containsVolumeData); - $expectedResponse->setContainsSecrets($containsSecrets); - $expectedResponse->setStateReason($stateReason); - $expectedResponse->setResourceCount($resourceCount); - $expectedResponse->setVolumeCount($volumeCount); - $expectedResponse->setSizeBytes($sizeBytes); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $expectedResponse->setPodCount($podCount); - $expectedResponse->setConfigBackupSizeBytes($configBackupSizeBytes); - $expectedResponse->setPermissiveMode($permissiveMode); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateBackupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $backup = new Backup(); - $request = (new UpdateBackupRequest()) - ->setBackup($backup); - $response = $gapicClient->updateBackup($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.gkebackup.v1.BackupForGKE/UpdateBackup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getBackup(); - $this->assertProtobufEquals($backup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBackupTest'); - $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 updateBackupExceptionTest() - { - $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/updateBackupTest'); - $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 - $backup = new Backup(); - $request = (new UpdateBackupRequest()) - ->setBackup($backup); - $response = $gapicClient->updateBackup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBackupTest'); - 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 updateBackupPlanTest() - { - $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/updateBackupPlanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $cluster = 'cluster872092154'; - $etag = 'etag3123477'; - $deactivated = true; - $protectedPodCount = 1494678716; - $stateReason = 'stateReason282113458'; - $rpoRiskLevel = 1939768030; - $rpoRiskReason = 'rpoRiskReason167896166'; - $expectedResponse = new BackupPlan(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setCluster($cluster); - $expectedResponse->setEtag($etag); - $expectedResponse->setDeactivated($deactivated); - $expectedResponse->setProtectedPodCount($protectedPodCount); - $expectedResponse->setStateReason($stateReason); - $expectedResponse->setRpoRiskLevel($rpoRiskLevel); - $expectedResponse->setRpoRiskReason($rpoRiskReason); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateBackupPlanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $backupPlan = new BackupPlan(); - $backupPlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $backupPlan->setCluster($backupPlanCluster); - $request = (new UpdateBackupPlanRequest()) - ->setBackupPlan($backupPlan); - $response = $gapicClient->updateBackupPlan($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.gkebackup.v1.BackupForGKE/UpdateBackupPlan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getBackupPlan(); - $this->assertProtobufEquals($backupPlan, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBackupPlanTest'); - $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 updateBackupPlanExceptionTest() - { - $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/updateBackupPlanTest'); - $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 - $backupPlan = new BackupPlan(); - $backupPlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $backupPlan->setCluster($backupPlanCluster); - $request = (new UpdateBackupPlanRequest()) - ->setBackupPlan($backupPlan); - $response = $gapicClient->updateBackupPlan($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBackupPlanTest'); - 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 updateRestoreTest() - { - $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/updateRestoreTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $backup = 'backup-1396673086'; - $cluster = 'cluster872092154'; - $stateReason = 'stateReason282113458'; - $resourcesRestoredCount = 882879616; - $resourcesExcludedCount = 338652236; - $resourcesFailedCount = 217904743; - $volumesRestoredCount = 1005533068; - $etag = 'etag3123477'; - $expectedResponse = new Restore(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setBackup($backup); - $expectedResponse->setCluster($cluster); - $expectedResponse->setStateReason($stateReason); - $expectedResponse->setResourcesRestoredCount($resourcesRestoredCount); - $expectedResponse->setResourcesExcludedCount($resourcesExcludedCount); - $expectedResponse->setResourcesFailedCount($resourcesFailedCount); - $expectedResponse->setVolumesRestoredCount($volumesRestoredCount); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateRestoreTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $restore = new Restore(); - $restoreBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); - $restore->setBackup($restoreBackup); - $request = (new UpdateRestoreRequest()) - ->setRestore($restore); - $response = $gapicClient->updateRestore($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.gkebackup.v1.BackupForGKE/UpdateRestore', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRestore(); - $this->assertProtobufEquals($restore, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateRestoreTest'); - $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 updateRestoreExceptionTest() - { - $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/updateRestoreTest'); - $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 - $restore = new Restore(); - $restoreBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); - $restore->setBackup($restoreBackup); - $request = (new UpdateRestoreRequest()) - ->setRestore($restore); - $response = $gapicClient->updateRestore($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateRestoreTest'); - 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 updateRestorePlanTest() - { - $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/updateRestorePlanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $backupPlan = 'backupPlan1119623046'; - $cluster = 'cluster872092154'; - $etag = 'etag3123477'; - $stateReason = 'stateReason282113458'; - $expectedResponse = new RestorePlan(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setBackupPlan($backupPlan); - $expectedResponse->setCluster($cluster); - $expectedResponse->setEtag($etag); - $expectedResponse->setStateReason($stateReason); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateRestorePlanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $restorePlan = new RestorePlan(); - $restorePlanBackupPlan = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $restorePlan->setBackupPlan($restorePlanBackupPlan); - $restorePlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $restorePlan->setCluster($restorePlanCluster); - $restorePlanRestoreConfig = new RestoreConfig(); - $restorePlan->setRestoreConfig($restorePlanRestoreConfig); - $request = (new UpdateRestorePlanRequest()) - ->setRestorePlan($restorePlan); - $response = $gapicClient->updateRestorePlan($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.gkebackup.v1.BackupForGKE/UpdateRestorePlan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRestorePlan(); - $this->assertProtobufEquals($restorePlan, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateRestorePlanTest'); - $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 updateRestorePlanExceptionTest() - { - $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/updateRestorePlanTest'); - $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 - $restorePlan = new RestorePlan(); - $restorePlanBackupPlan = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $restorePlan->setBackupPlan($restorePlanBackupPlan); - $restorePlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $restorePlan->setCluster($restorePlanCluster); - $restorePlanRestoreConfig = new RestoreConfig(); - $restorePlan->setRestoreConfig($restorePlanRestoreConfig); - $request = (new UpdateRestorePlanRequest()) - ->setRestorePlan($restorePlan); - $response = $gapicClient->updateRestorePlan($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateRestorePlanTest'); - 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 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 createBackupAsyncTest() - { - $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/createBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $manual = true; - $deleteLockDays = 1638724265; - $retainDays = 1380805807; - $allNamespaces = true; - $containsVolumeData = false; - $containsSecrets = false; - $stateReason = 'stateReason282113458'; - $resourceCount = 287552926; - $volumeCount = 1362665558; - $sizeBytes = 1796325715; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $podCount = 977657493; - $configBackupSizeBytes = 606785139; - $permissiveMode = false; - $expectedResponse = new Backup(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setManual($manual); - $expectedResponse->setDeleteLockDays($deleteLockDays); - $expectedResponse->setRetainDays($retainDays); - $expectedResponse->setAllNamespaces($allNamespaces); - $expectedResponse->setContainsVolumeData($containsVolumeData); - $expectedResponse->setContainsSecrets($containsSecrets); - $expectedResponse->setStateReason($stateReason); - $expectedResponse->setResourceCount($resourceCount); - $expectedResponse->setVolumeCount($volumeCount); - $expectedResponse->setSizeBytes($sizeBytes); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $expectedResponse->setPodCount($podCount); - $expectedResponse->setConfigBackupSizeBytes($configBackupSizeBytes); - $expectedResponse->setPermissiveMode($permissiveMode); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createBackupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $request = (new CreateBackupRequest()) - ->setParent($formattedParent); - $response = $gapicClient->createBackupAsync($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.gkebackup.v1.BackupForGKE/CreateBackup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackupTest'); - $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/GkeConnectGateway/v1/proto/src/GPBMetadata/Google/Cloud/Gkeconnect/Gateway/V1/Control.php b/owl-bot-staging/GkeConnectGateway/v1/proto/src/GPBMetadata/Google/Cloud/Gkeconnect/Gateway/V1/Control.php deleted file mode 100644 index eef8ed0cbee0..000000000000 Binary files a/owl-bot-staging/GkeConnectGateway/v1/proto/src/GPBMetadata/Google/Cloud/Gkeconnect/Gateway/V1/Control.php and /dev/null differ diff --git a/owl-bot-staging/GkeConnectGateway/v1/proto/src/Google/Cloud/GkeConnect/Gateway/V1/GenerateCredentialsRequest.php b/owl-bot-staging/GkeConnectGateway/v1/proto/src/Google/Cloud/GkeConnect/Gateway/V1/GenerateCredentialsRequest.php deleted file mode 100644 index ff63067fdfdb..000000000000 --- a/owl-bot-staging/GkeConnectGateway/v1/proto/src/Google/Cloud/GkeConnect/Gateway/V1/GenerateCredentialsRequest.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.gkeconnect.gateway.v1.GenerateCredentialsRequest - */ -class GenerateCredentialsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Fleet membership resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. Whether to force the use of Connect Agent-based transport. - * This will return a configuration that uses Connect Agent as the underlying - * transport mechanism for cluster types that would otherwise have used a - * different transport. Requires that Connect Agent be installed on the - * cluster. Setting this field to false is equivalent to not setting it. - * - * Generated from protobuf field bool force_use_agent = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force_use_agent = false; - /** - * Optional. The Connect Gateway version to be used in the resulting - * configuration. - * Leave this field blank to let the server choose the version (recommended). - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $version = ''; - /** - * Optional. The namespace to use in the kubeconfig context. - * If this field is specified, the server will set the `namespace` field in - * kubeconfig context. If not specified, the `namespace` field is omitted. - * - * Generated from protobuf field string kubernetes_namespace = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kubernetes_namespace = ''; - /** - * Optional. The operating system where the kubeconfig will be used. - * - * Generated from protobuf field .google.cloud.gkeconnect.gateway.v1.GenerateCredentialsRequest.OperatingSystem operating_system = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $operating_system = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The Fleet membership resource. - * @type bool $force_use_agent - * Optional. Whether to force the use of Connect Agent-based transport. - * This will return a configuration that uses Connect Agent as the underlying - * transport mechanism for cluster types that would otherwise have used a - * different transport. Requires that Connect Agent be installed on the - * cluster. Setting this field to false is equivalent to not setting it. - * @type string $version - * Optional. The Connect Gateway version to be used in the resulting - * configuration. - * Leave this field blank to let the server choose the version (recommended). - * @type string $kubernetes_namespace - * Optional. The namespace to use in the kubeconfig context. - * If this field is specified, the server will set the `namespace` field in - * kubeconfig context. If not specified, the `namespace` field is omitted. - * @type int $operating_system - * Optional. The operating system where the kubeconfig will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkeconnect\Gateway\V1\Control::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Fleet membership resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The Fleet membership resource. - * - * 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; - } - - /** - * Optional. Whether to force the use of Connect Agent-based transport. - * This will return a configuration that uses Connect Agent as the underlying - * transport mechanism for cluster types that would otherwise have used a - * different transport. Requires that Connect Agent be installed on the - * cluster. Setting this field to false is equivalent to not setting it. - * - * Generated from protobuf field bool force_use_agent = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForceUseAgent() - { - return $this->force_use_agent; - } - - /** - * Optional. Whether to force the use of Connect Agent-based transport. - * This will return a configuration that uses Connect Agent as the underlying - * transport mechanism for cluster types that would otherwise have used a - * different transport. Requires that Connect Agent be installed on the - * cluster. Setting this field to false is equivalent to not setting it. - * - * Generated from protobuf field bool force_use_agent = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForceUseAgent($var) - { - GPBUtil::checkBool($var); - $this->force_use_agent = $var; - - return $this; - } - - /** - * Optional. The Connect Gateway version to be used in the resulting - * configuration. - * Leave this field blank to let the server choose the version (recommended). - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Optional. The Connect Gateway version to be used in the resulting - * configuration. - * Leave this field blank to let the server choose the version (recommended). - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Optional. The namespace to use in the kubeconfig context. - * If this field is specified, the server will set the `namespace` field in - * kubeconfig context. If not specified, the `namespace` field is omitted. - * - * Generated from protobuf field string kubernetes_namespace = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKubernetesNamespace() - { - return $this->kubernetes_namespace; - } - - /** - * Optional. The namespace to use in the kubeconfig context. - * If this field is specified, the server will set the `namespace` field in - * kubeconfig context. If not specified, the `namespace` field is omitted. - * - * Generated from protobuf field string kubernetes_namespace = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKubernetesNamespace($var) - { - GPBUtil::checkString($var, True); - $this->kubernetes_namespace = $var; - - return $this; - } - - /** - * Optional. The operating system where the kubeconfig will be used. - * - * Generated from protobuf field .google.cloud.gkeconnect.gateway.v1.GenerateCredentialsRequest.OperatingSystem operating_system = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getOperatingSystem() - { - return $this->operating_system; - } - - /** - * Optional. The operating system where the kubeconfig will be used. - * - * Generated from protobuf field .google.cloud.gkeconnect.gateway.v1.GenerateCredentialsRequest.OperatingSystem operating_system = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setOperatingSystem($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeConnect\Gateway\V1\GenerateCredentialsRequest\OperatingSystem::class); - $this->operating_system = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeConnectGateway/v1/proto/src/Google/Cloud/GkeConnect/Gateway/V1/GenerateCredentialsRequest/OperatingSystem.php b/owl-bot-staging/GkeConnectGateway/v1/proto/src/Google/Cloud/GkeConnect/Gateway/V1/GenerateCredentialsRequest/OperatingSystem.php deleted file mode 100644 index 3cd4fd313777..000000000000 --- a/owl-bot-staging/GkeConnectGateway/v1/proto/src/Google/Cloud/GkeConnect/Gateway/V1/GenerateCredentialsRequest/OperatingSystem.php +++ /dev/null @@ -1,59 +0,0 @@ -google.cloud.gkeconnect.gateway.v1.GenerateCredentialsRequest.OperatingSystem - */ -class OperatingSystem -{ - /** - * Generates a kubeconfig that works for all operating systems not defined - * below. - * - * Generated from protobuf enum OPERATING_SYSTEM_UNSPECIFIED = 0; - */ - const OPERATING_SYSTEM_UNSPECIFIED = 0; - /** - * Generates a kubeconfig that is specifically designed to work with - * Windows. - * - * Generated from protobuf enum OPERATING_SYSTEM_WINDOWS = 1; - */ - const OPERATING_SYSTEM_WINDOWS = 1; - - private static $valueToName = [ - self::OPERATING_SYSTEM_UNSPECIFIED => 'OPERATING_SYSTEM_UNSPECIFIED', - self::OPERATING_SYSTEM_WINDOWS => 'OPERATING_SYSTEM_WINDOWS', - ]; - - 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(OperatingSystem::class, \Google\Cloud\GkeConnect\Gateway\V1\GenerateCredentialsRequest_OperatingSystem::class); - diff --git a/owl-bot-staging/GkeConnectGateway/v1/proto/src/Google/Cloud/GkeConnect/Gateway/V1/GenerateCredentialsResponse.php b/owl-bot-staging/GkeConnectGateway/v1/proto/src/Google/Cloud/GkeConnect/Gateway/V1/GenerateCredentialsResponse.php deleted file mode 100644 index b828cc93beae..000000000000 --- a/owl-bot-staging/GkeConnectGateway/v1/proto/src/Google/Cloud/GkeConnect/Gateway/V1/GenerateCredentialsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.gkeconnect.gateway.v1.GenerateCredentialsResponse - */ -class GenerateCredentialsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A full YAML kubeconfig in serialized format. - * - * Generated from protobuf field bytes kubeconfig = 1; - */ - protected $kubeconfig = ''; - /** - * The generated URI of the cluster as accessed through the Connect Gateway - * API. - * - * Generated from protobuf field string endpoint = 2; - */ - protected $endpoint = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kubeconfig - * A full YAML kubeconfig in serialized format. - * @type string $endpoint - * The generated URI of the cluster as accessed through the Connect Gateway - * API. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkeconnect\Gateway\V1\Control::initOnce(); - parent::__construct($data); - } - - /** - * A full YAML kubeconfig in serialized format. - * - * Generated from protobuf field bytes kubeconfig = 1; - * @return string - */ - public function getKubeconfig() - { - return $this->kubeconfig; - } - - /** - * A full YAML kubeconfig in serialized format. - * - * Generated from protobuf field bytes kubeconfig = 1; - * @param string $var - * @return $this - */ - public function setKubeconfig($var) - { - GPBUtil::checkString($var, False); - $this->kubeconfig = $var; - - return $this; - } - - /** - * The generated URI of the cluster as accessed through the Connect Gateway - * API. - * - * Generated from protobuf field string endpoint = 2; - * @return string - */ - public function getEndpoint() - { - return $this->endpoint; - } - - /** - * The generated URI of the cluster as accessed through the Connect Gateway - * API. - * - * Generated from protobuf field string endpoint = 2; - * @param string $var - * @return $this - */ - public function setEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->endpoint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeConnectGateway/v1/samples/V1/GatewayControlClient/generate_credentials.php b/owl-bot-staging/GkeConnectGateway/v1/samples/V1/GatewayControlClient/generate_credentials.php deleted file mode 100644 index 12e5deebb089..000000000000 --- a/owl-bot-staging/GkeConnectGateway/v1/samples/V1/GatewayControlClient/generate_credentials.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var GenerateCredentialsResponse $response */ - $response = $gatewayControlClient->generateCredentials($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]'; - - generate_credentials_sample($name); -} -// [END connectgateway_v1_generated_GatewayControl_GenerateCredentials_sync] diff --git a/owl-bot-staging/GkeConnectGateway/v1/src/V1/Client/GatewayControlClient.php b/owl-bot-staging/GkeConnectGateway/v1/src/V1/Client/GatewayControlClient.php deleted file mode 100644 index 6ac0651528f7..000000000000 --- a/owl-bot-staging/GkeConnectGateway/v1/src/V1/Client/GatewayControlClient.php +++ /dev/null @@ -1,205 +0,0 @@ - generateCredentialsAsync(GenerateCredentialsRequest $request, array $optionalArgs = []) - */ -final class GatewayControlClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.gkeconnect.gateway.v1.GatewayControl'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'connectgateway.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'connectgateway.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', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/gateway_control_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/gateway_control_descriptor_config.php', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - 'useJwtAccessWithScope' => false, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/gateway_control_rest_client_config.php', - ], - ], - ]; - } - - /** Implements GapicClientTrait::defaultTransport. */ - private static function defaultTransport() - { - return 'rest'; - } - - /** Implements ClientOptionsTrait::supportedTransports. */ - private static function supportedTransports() - { - return [ - 'rest', - ]; - } - - /** - * Constructor. - * - * @param array $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 'connectgateway.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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. At the moment, supports only - * `rest`. *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 = [ - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method 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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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); - } - - /** - * GenerateCredentials provides connection information that allows a user to - * access the specified membership using Connect Gateway. - * - * The async variant is {@see GatewayControlClient::generateCredentialsAsync()} . - * - * @example samples/V1/GatewayControlClient/generate_credentials.php - * - * @param GenerateCredentialsRequest $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 GenerateCredentialsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateCredentials(GenerateCredentialsRequest $request, array $callOptions = []): GenerateCredentialsResponse - { - return $this->startApiCall('GenerateCredentials', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/GkeConnectGateway/v1/src/V1/gapic_metadata.json b/owl-bot-staging/GkeConnectGateway/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 20c8ae43a70f..000000000000 --- a/owl-bot-staging/GkeConnectGateway/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.gkeconnect.gateway.v1", - "libraryPackage": "Google\\Cloud\\GkeConnect\\Gateway\\V1", - "services": { - "GatewayControl": { - "clients": { - "grpc": { - "libraryClient": "GatewayControlGapicClient", - "rpcs": { - "GenerateCredentials": { - "methods": [ - "generateCredentials" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/GkeConnectGateway/v1/src/V1/resources/gateway_control_client_config.json b/owl-bot-staging/GkeConnectGateway/v1/src/V1/resources/gateway_control_client_config.json deleted file mode 100644 index b44b85d1de3f..000000000000 --- a/owl-bot-staging/GkeConnectGateway/v1/src/V1/resources/gateway_control_client_config.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "interfaces": { - "google.cloud.gkeconnect.gateway.v1.GatewayControl": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ] - }, - "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": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "GenerateCredentials": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/GkeConnectGateway/v1/src/V1/resources/gateway_control_descriptor_config.php b/owl-bot-staging/GkeConnectGateway/v1/src/V1/resources/gateway_control_descriptor_config.php deleted file mode 100644 index 451015d18a21..000000000000 --- a/owl-bot-staging/GkeConnectGateway/v1/src/V1/resources/gateway_control_descriptor_config.php +++ /dev/null @@ -1,40 +0,0 @@ - [ - 'google.cloud.gkeconnect.gateway.v1.GatewayControl' => [ - 'GenerateCredentials' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeConnect\Gateway\V1\GenerateCredentialsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/GkeConnectGateway/v1/src/V1/resources/gateway_control_rest_client_config.php b/owl-bot-staging/GkeConnectGateway/v1/src/V1/resources/gateway_control_rest_client_config.php deleted file mode 100644 index 22f11b39b0bf..000000000000 --- a/owl-bot-staging/GkeConnectGateway/v1/src/V1/resources/gateway_control_rest_client_config.php +++ /dev/null @@ -1,40 +0,0 @@ - [ - 'google.cloud.gkeconnect.gateway.v1.GatewayControl' => [ - 'GenerateCredentials' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*}:generateCredentials', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/GkeConnectGateway/v1/tests/Unit/V1/Client/GatewayControlClientTest.php b/owl-bot-staging/GkeConnectGateway/v1/tests/Unit/V1/Client/GatewayControlClientTest.php deleted file mode 100644 index e61a2b6b9720..000000000000 --- a/owl-bot-staging/GkeConnectGateway/v1/tests/Unit/V1/Client/GatewayControlClientTest.php +++ /dev/null @@ -1,159 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return GatewayControlClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new GatewayControlClient($options); - } - - /** @test */ - public function generateCredentialsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kubeconfig = '-81'; - $endpoint = 'endpoint1741102485'; - $expectedResponse = new GenerateCredentialsResponse(); - $expectedResponse->setKubeconfig($kubeconfig); - $expectedResponse->setEndpoint($endpoint); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new GenerateCredentialsRequest()) - ->setName($name); - $response = $gapicClient->generateCredentials($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.gkeconnect.gateway.v1.GatewayControl/GenerateCredentials', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateCredentialsExceptionTest() - { - $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'; - $request = (new GenerateCredentialsRequest()) - ->setName($name); - try { - $gapicClient->generateCredentials($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 generateCredentialsAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kubeconfig = '-81'; - $endpoint = 'endpoint1741102485'; - $expectedResponse = new GenerateCredentialsResponse(); - $expectedResponse->setKubeconfig($kubeconfig); - $expectedResponse->setEndpoint($endpoint); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new GenerateCredentialsRequest()) - ->setName($name); - $response = $gapicClient->generateCredentialsAsync($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.gkeconnect.gateway.v1.GatewayControl/GenerateCredentials', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/GkeConnectGateway/v1beta1/proto/src/GPBMetadata/Google/Cloud/Gkeconnect/Gateway/V1Beta1/Control.php b/owl-bot-staging/GkeConnectGateway/v1beta1/proto/src/GPBMetadata/Google/Cloud/Gkeconnect/Gateway/V1Beta1/Control.php deleted file mode 100644 index 297fc3e5193d..000000000000 Binary files a/owl-bot-staging/GkeConnectGateway/v1beta1/proto/src/GPBMetadata/Google/Cloud/Gkeconnect/Gateway/V1Beta1/Control.php and /dev/null differ diff --git a/owl-bot-staging/GkeConnectGateway/v1beta1/proto/src/Google/Cloud/GkeConnect/Gateway/V1beta1/GenerateCredentialsRequest.php b/owl-bot-staging/GkeConnectGateway/v1beta1/proto/src/Google/Cloud/GkeConnect/Gateway/V1beta1/GenerateCredentialsRequest.php deleted file mode 100644 index 9f500f5955a9..000000000000 --- a/owl-bot-staging/GkeConnectGateway/v1beta1/proto/src/Google/Cloud/GkeConnect/Gateway/V1beta1/GenerateCredentialsRequest.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.gkeconnect.gateway.v1beta1.GenerateCredentialsRequest - */ -class GenerateCredentialsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Fleet membership resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. Whether to force the use of Connect Agent-based transport. - * This will return a configuration that uses Connect Agent as the underlying - * transport mechanism for cluster types that would otherwise have used a - * different transport. Requires that Connect Agent be installed on the - * cluster. Setting this field to false is equivalent to not setting it. - * - * Generated from protobuf field bool force_use_agent = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force_use_agent = false; - /** - * Optional. The Connect Gateway version to be used in the resulting - * configuration. - * Leave this field blank to let the server choose the version (recommended). - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $version = ''; - /** - * Optional. The namespace to use in the kubeconfig context. - * If this field is specified, the server will set the `namespace` field in - * kubeconfig context. If not specified, the `namespace` field is omitted. - * - * Generated from protobuf field string kubernetes_namespace = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kubernetes_namespace = ''; - /** - * Optional. The operating system where the kubeconfig will be used. - * - * Generated from protobuf field .google.cloud.gkeconnect.gateway.v1beta1.GenerateCredentialsRequest.OperatingSystem operating_system = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $operating_system = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The Fleet membership resource. - * @type bool $force_use_agent - * Optional. Whether to force the use of Connect Agent-based transport. - * This will return a configuration that uses Connect Agent as the underlying - * transport mechanism for cluster types that would otherwise have used a - * different transport. Requires that Connect Agent be installed on the - * cluster. Setting this field to false is equivalent to not setting it. - * @type string $version - * Optional. The Connect Gateway version to be used in the resulting - * configuration. - * Leave this field blank to let the server choose the version (recommended). - * @type string $kubernetes_namespace - * Optional. The namespace to use in the kubeconfig context. - * If this field is specified, the server will set the `namespace` field in - * kubeconfig context. If not specified, the `namespace` field is omitted. - * @type int $operating_system - * Optional. The operating system where the kubeconfig will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkeconnect\Gateway\V1Beta1\Control::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Fleet membership resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The Fleet membership resource. - * - * 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; - } - - /** - * Optional. Whether to force the use of Connect Agent-based transport. - * This will return a configuration that uses Connect Agent as the underlying - * transport mechanism for cluster types that would otherwise have used a - * different transport. Requires that Connect Agent be installed on the - * cluster. Setting this field to false is equivalent to not setting it. - * - * Generated from protobuf field bool force_use_agent = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForceUseAgent() - { - return $this->force_use_agent; - } - - /** - * Optional. Whether to force the use of Connect Agent-based transport. - * This will return a configuration that uses Connect Agent as the underlying - * transport mechanism for cluster types that would otherwise have used a - * different transport. Requires that Connect Agent be installed on the - * cluster. Setting this field to false is equivalent to not setting it. - * - * Generated from protobuf field bool force_use_agent = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForceUseAgent($var) - { - GPBUtil::checkBool($var); - $this->force_use_agent = $var; - - return $this; - } - - /** - * Optional. The Connect Gateway version to be used in the resulting - * configuration. - * Leave this field blank to let the server choose the version (recommended). - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Optional. The Connect Gateway version to be used in the resulting - * configuration. - * Leave this field blank to let the server choose the version (recommended). - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Optional. The namespace to use in the kubeconfig context. - * If this field is specified, the server will set the `namespace` field in - * kubeconfig context. If not specified, the `namespace` field is omitted. - * - * Generated from protobuf field string kubernetes_namespace = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKubernetesNamespace() - { - return $this->kubernetes_namespace; - } - - /** - * Optional. The namespace to use in the kubeconfig context. - * If this field is specified, the server will set the `namespace` field in - * kubeconfig context. If not specified, the `namespace` field is omitted. - * - * Generated from protobuf field string kubernetes_namespace = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKubernetesNamespace($var) - { - GPBUtil::checkString($var, True); - $this->kubernetes_namespace = $var; - - return $this; - } - - /** - * Optional. The operating system where the kubeconfig will be used. - * - * Generated from protobuf field .google.cloud.gkeconnect.gateway.v1beta1.GenerateCredentialsRequest.OperatingSystem operating_system = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getOperatingSystem() - { - return $this->operating_system; - } - - /** - * Optional. The operating system where the kubeconfig will be used. - * - * Generated from protobuf field .google.cloud.gkeconnect.gateway.v1beta1.GenerateCredentialsRequest.OperatingSystem operating_system = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setOperatingSystem($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeConnect\Gateway\V1beta1\GenerateCredentialsRequest\OperatingSystem::class); - $this->operating_system = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeConnectGateway/v1beta1/proto/src/Google/Cloud/GkeConnect/Gateway/V1beta1/GenerateCredentialsRequest/OperatingSystem.php b/owl-bot-staging/GkeConnectGateway/v1beta1/proto/src/Google/Cloud/GkeConnect/Gateway/V1beta1/GenerateCredentialsRequest/OperatingSystem.php deleted file mode 100644 index 4ab5e2b2180c..000000000000 --- a/owl-bot-staging/GkeConnectGateway/v1beta1/proto/src/Google/Cloud/GkeConnect/Gateway/V1beta1/GenerateCredentialsRequest/OperatingSystem.php +++ /dev/null @@ -1,59 +0,0 @@ -google.cloud.gkeconnect.gateway.v1beta1.GenerateCredentialsRequest.OperatingSystem - */ -class OperatingSystem -{ - /** - * Generates a kubeconfig that works for all operating systems not defined - * below. - * - * Generated from protobuf enum OPERATING_SYSTEM_UNSPECIFIED = 0; - */ - const OPERATING_SYSTEM_UNSPECIFIED = 0; - /** - * Generates a kubeconfig that is specifically designed to work with - * Windows. - * - * Generated from protobuf enum OPERATING_SYSTEM_WINDOWS = 1; - */ - const OPERATING_SYSTEM_WINDOWS = 1; - - private static $valueToName = [ - self::OPERATING_SYSTEM_UNSPECIFIED => 'OPERATING_SYSTEM_UNSPECIFIED', - self::OPERATING_SYSTEM_WINDOWS => 'OPERATING_SYSTEM_WINDOWS', - ]; - - 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(OperatingSystem::class, \Google\Cloud\GkeConnect\Gateway\V1beta1\GenerateCredentialsRequest_OperatingSystem::class); - diff --git a/owl-bot-staging/GkeConnectGateway/v1beta1/proto/src/Google/Cloud/GkeConnect/Gateway/V1beta1/GenerateCredentialsResponse.php b/owl-bot-staging/GkeConnectGateway/v1beta1/proto/src/Google/Cloud/GkeConnect/Gateway/V1beta1/GenerateCredentialsResponse.php deleted file mode 100644 index 327f1fe485c9..000000000000 --- a/owl-bot-staging/GkeConnectGateway/v1beta1/proto/src/Google/Cloud/GkeConnect/Gateway/V1beta1/GenerateCredentialsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.gkeconnect.gateway.v1beta1.GenerateCredentialsResponse - */ -class GenerateCredentialsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A full YAML kubeconfig in serialized format. - * - * Generated from protobuf field bytes kubeconfig = 1; - */ - protected $kubeconfig = ''; - /** - * The generated URI of the cluster as accessed through the Connect Gateway - * API. - * - * Generated from protobuf field string endpoint = 2; - */ - protected $endpoint = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kubeconfig - * A full YAML kubeconfig in serialized format. - * @type string $endpoint - * The generated URI of the cluster as accessed through the Connect Gateway - * API. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkeconnect\Gateway\V1Beta1\Control::initOnce(); - parent::__construct($data); - } - - /** - * A full YAML kubeconfig in serialized format. - * - * Generated from protobuf field bytes kubeconfig = 1; - * @return string - */ - public function getKubeconfig() - { - return $this->kubeconfig; - } - - /** - * A full YAML kubeconfig in serialized format. - * - * Generated from protobuf field bytes kubeconfig = 1; - * @param string $var - * @return $this - */ - public function setKubeconfig($var) - { - GPBUtil::checkString($var, False); - $this->kubeconfig = $var; - - return $this; - } - - /** - * The generated URI of the cluster as accessed through the Connect Gateway - * API. - * - * Generated from protobuf field string endpoint = 2; - * @return string - */ - public function getEndpoint() - { - return $this->endpoint; - } - - /** - * The generated URI of the cluster as accessed through the Connect Gateway - * API. - * - * Generated from protobuf field string endpoint = 2; - * @param string $var - * @return $this - */ - public function setEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->endpoint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeConnectGateway/v1beta1/samples/V1beta1/GatewayControlClient/generate_credentials.php b/owl-bot-staging/GkeConnectGateway/v1beta1/samples/V1beta1/GatewayControlClient/generate_credentials.php deleted file mode 100644 index cb70c4c5132c..000000000000 --- a/owl-bot-staging/GkeConnectGateway/v1beta1/samples/V1beta1/GatewayControlClient/generate_credentials.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var GenerateCredentialsResponse $response */ - $response = $gatewayControlClient->generateCredentials($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]'; - - generate_credentials_sample($name); -} -// [END connectgateway_v1beta1_generated_GatewayControl_GenerateCredentials_sync] diff --git a/owl-bot-staging/GkeConnectGateway/v1beta1/src/V1beta1/Client/GatewayControlClient.php b/owl-bot-staging/GkeConnectGateway/v1beta1/src/V1beta1/Client/GatewayControlClient.php deleted file mode 100644 index 6234da984ceb..000000000000 --- a/owl-bot-staging/GkeConnectGateway/v1beta1/src/V1beta1/Client/GatewayControlClient.php +++ /dev/null @@ -1,213 +0,0 @@ - generateCredentialsAsync(GenerateCredentialsRequest $request, array $optionalArgs = []) - */ -final class GatewayControlClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.gkeconnect.gateway.v1beta1.GatewayControl'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'connectgateway.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'connectgateway.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', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/gateway_control_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/gateway_control_descriptor_config.php', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - 'useJwtAccessWithScope' => false, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/gateway_control_rest_client_config.php', - ], - ], - ]; - } - - /** Implements GapicClientTrait::defaultTransport. */ - private static function defaultTransport() - { - return 'rest'; - } - - /** Implements ClientOptionsTrait::supportedTransports. */ - private static function supportedTransports() - { - return [ - 'rest', - ]; - } - - /** - * Constructor. - * - * @param array $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 'connectgateway.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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. At the moment, supports only - * `rest`. *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 = [ - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method 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 - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $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); - } - - /** - * GenerateCredentials provides connection information that allows a user to - * access the specified membership using Connect Gateway. - * - * The async variant is {@see GatewayControlClient::generateCredentialsAsync()} . - * - * @example samples/V1beta1/GatewayControlClient/generate_credentials.php - * - * @param GenerateCredentialsRequest $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 GenerateCredentialsResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function generateCredentials(GenerateCredentialsRequest $request, array $callOptions = []): GenerateCredentialsResponse - { - return $this->startApiCall('GenerateCredentials', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/GkeConnectGateway/v1beta1/src/V1beta1/Enums/GenerateCredentialsRequest/OperatingSystem.php b/owl-bot-staging/GkeConnectGateway/v1beta1/src/V1beta1/Enums/GenerateCredentialsRequest/OperatingSystem.php deleted file mode 100644 index f4c035aa6a07..000000000000 --- a/owl-bot-staging/GkeConnectGateway/v1beta1/src/V1beta1/Enums/GenerateCredentialsRequest/OperatingSystem.php +++ /dev/null @@ -1,38 +0,0 @@ -generateCredentials($name); - * } finally { - * $gatewayControlClient->close(); - * } - * ``` - * - * @experimental - * - * @deprecated Please use the new service client {@see \Google\Cloud\GkeConnect\Gateway\V1beta1\Client\GatewayControlClient}. - */ -class GatewayControlGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.gkeconnect.gateway.v1beta1.GatewayControl'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'connectgateway.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'connectgateway.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/gateway_control_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/gateway_control_descriptor_config.php', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - 'useJwtAccessWithScope' => false, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/gateway_control_rest_client_config.php', - ], - ], - ]; - } - - /** Implements GapicClientTrait::defaultTransport. */ - private static function defaultTransport() - { - return 'rest'; - } - - /** Implements GapicClientTrait::supportedTransports. */ - private static function supportedTransports() - { - return [ - 'rest', - ]; - } - - /** - * Constructor. - * - * @param array $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 'connectgateway.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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. At the moment, supports only - * `rest`. *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 = [ - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method 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. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * GenerateCredentials provides connection information that allows a user to - * access the specified membership using Connect Gateway. - * - * Sample code: - * ``` - * $gatewayControlClient = new GatewayControlClient(); - * try { - * $name = 'name'; - * $response = $gatewayControlClient->generateCredentials($name); - * } finally { - * $gatewayControlClient->close(); - * } - * ``` - * - * @param string $name Required. The Fleet membership resource. - * @param array $optionalArgs { - * Optional. - * - * @type bool $forceUseAgent - * Optional. Whether to force the use of Connect Agent-based transport. - * - * This will return a configuration that uses Connect Agent as the underlying - * transport mechanism for cluster types that would otherwise have used a - * different transport. Requires that Connect Agent be installed on the - * cluster. Setting this field to false is equivalent to not setting it. - * @type string $version - * Optional. The Connect Gateway version to be used in the resulting - * configuration. - * - * Leave this field blank to let the server choose the version (recommended). - * @type string $kubernetesNamespace - * Optional. The namespace to use in the kubeconfig context. - * - * If this field is specified, the server will set the `namespace` field in - * kubeconfig context. If not specified, the `namespace` field is omitted. - * @type int $operatingSystem - * Optional. The operating system where the kubeconfig will be used. - * For allowed values, use constants defined on {@see \Google\Cloud\GkeConnect\Gateway\V1beta1\GenerateCredentialsRequest\OperatingSystem} - * @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 \Google\Cloud\GkeConnect\Gateway\V1beta1\GenerateCredentialsResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function generateCredentials($name, array $optionalArgs = []) - { - $request = new GenerateCredentialsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['forceUseAgent'])) { - $request->setForceUseAgent($optionalArgs['forceUseAgent']); - } - - if (isset($optionalArgs['version'])) { - $request->setVersion($optionalArgs['version']); - } - - if (isset($optionalArgs['kubernetesNamespace'])) { - $request->setKubernetesNamespace($optionalArgs['kubernetesNamespace']); - } - - if (isset($optionalArgs['operatingSystem'])) { - $request->setOperatingSystem($optionalArgs['operatingSystem']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GenerateCredentials', GenerateCredentialsResponse::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/GkeConnectGateway/v1beta1/src/V1beta1/GatewayControlClient.php b/owl-bot-staging/GkeConnectGateway/v1beta1/src/V1beta1/GatewayControlClient.php deleted file mode 100644 index afb71d1a3ffa..000000000000 --- a/owl-bot-staging/GkeConnectGateway/v1beta1/src/V1beta1/GatewayControlClient.php +++ /dev/null @@ -1,36 +0,0 @@ - [ - 'google.cloud.gkeconnect.gateway.v1beta1.GatewayControl' => [ - 'GenerateCredentials' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeConnect\Gateway\V1beta1\GenerateCredentialsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/GkeConnectGateway/v1beta1/src/V1beta1/resources/gateway_control_rest_client_config.php b/owl-bot-staging/GkeConnectGateway/v1beta1/src/V1beta1/resources/gateway_control_rest_client_config.php deleted file mode 100644 index 117fdbbbea9e..000000000000 --- a/owl-bot-staging/GkeConnectGateway/v1beta1/src/V1beta1/resources/gateway_control_rest_client_config.php +++ /dev/null @@ -1,39 +0,0 @@ - [ - 'google.cloud.gkeconnect.gateway.v1beta1.GatewayControl' => [ - 'GenerateCredentials' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/memberships/*}:generateCredentials', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/GkeConnectGateway/v1beta1/tests/Unit/V1beta1/Client/GatewayControlClientTest.php b/owl-bot-staging/GkeConnectGateway/v1beta1/tests/Unit/V1beta1/Client/GatewayControlClientTest.php deleted file mode 100644 index 812cae3d34cb..000000000000 --- a/owl-bot-staging/GkeConnectGateway/v1beta1/tests/Unit/V1beta1/Client/GatewayControlClientTest.php +++ /dev/null @@ -1,159 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return GatewayControlClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new GatewayControlClient($options); - } - - /** @test */ - public function generateCredentialsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kubeconfig = '-81'; - $endpoint = 'endpoint1741102485'; - $expectedResponse = new GenerateCredentialsResponse(); - $expectedResponse->setKubeconfig($kubeconfig); - $expectedResponse->setEndpoint($endpoint); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new GenerateCredentialsRequest()) - ->setName($name); - $response = $gapicClient->generateCredentials($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.gkeconnect.gateway.v1beta1.GatewayControl/GenerateCredentials', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateCredentialsExceptionTest() - { - $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'; - $request = (new GenerateCredentialsRequest()) - ->setName($name); - try { - $gapicClient->generateCredentials($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 generateCredentialsAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kubeconfig = '-81'; - $endpoint = 'endpoint1741102485'; - $expectedResponse = new GenerateCredentialsResponse(); - $expectedResponse->setKubeconfig($kubeconfig); - $expectedResponse->setEndpoint($endpoint); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new GenerateCredentialsRequest()) - ->setName($name); - $response = $gapicClient->generateCredentialsAsync($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.gkeconnect.gateway.v1beta1.GatewayControl/GenerateCredentials', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/GkeConnectGateway/v1beta1/tests/Unit/V1beta1/GatewayControlClientTest.php b/owl-bot-staging/GkeConnectGateway/v1beta1/tests/Unit/V1beta1/GatewayControlClientTest.php deleted file mode 100644 index 33ddb8083932..000000000000 --- a/owl-bot-staging/GkeConnectGateway/v1beta1/tests/Unit/V1beta1/GatewayControlClientTest.php +++ /dev/null @@ -1,123 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return GatewayControlClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new GatewayControlClient($options); - } - - /** @test */ - public function generateCredentialsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kubeconfig = '-81'; - $endpoint = 'endpoint1741102485'; - $expectedResponse = new GenerateCredentialsResponse(); - $expectedResponse->setKubeconfig($kubeconfig); - $expectedResponse->setEndpoint($endpoint); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->generateCredentials($name); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkeconnect.gateway.v1beta1.GatewayControl/GenerateCredentials', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateCredentialsExceptionTest() - { - $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'; - try { - $gapicClient->generateCredentials($name); - // 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()); - } -} diff --git a/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Configmanagement/Configmanagement.php b/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Configmanagement/Configmanagement.php deleted file mode 100644 index 871dfa00a5ed..000000000000 Binary files a/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Configmanagement/Configmanagement.php and /dev/null differ diff --git a/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Feature.php b/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Feature.php deleted file mode 100644 index d26e5f8ddeaa..000000000000 Binary files a/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Feature.php and /dev/null differ diff --git a/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Membership.php b/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Membership.php deleted file mode 100644 index ea4840e791dc..000000000000 Binary files a/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Membership.php and /dev/null differ diff --git a/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Multiclusteringress/Multiclusteringress.php b/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Multiclusteringress/Multiclusteringress.php deleted file mode 100644 index e48863d0ce20..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Multiclusteringress/Multiclusteringress.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - ' -à -Dgoogle/cloud/gkehub/v1/multiclusteringress/multiclusteringress.proto*google.cloud.gkehub.multiclusteringress.v1"( - FeatureSpec -config_membership ( B¹ -.com.google.cloud.gkehub.multiclusteringress.v1BMultiClusterIngressProtoPZ`cloud.google.com/go/gkehub/multiclusteringress/apiv1/multiclusteringresspb;multiclusteringresspbª*Google.Cloud.GkeHub.MultiClusterIngress.V1Ê*Google\\Cloud\\GkeHub\\MultiClusterIngress\\V1ê.Google::Cloud::GkeHub::MultiClusterIngress::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Service.php b/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Service.php deleted file mode 100644 index b7547bb0b1fd..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Service.php +++ /dev/null @@ -1,150 +0,0 @@ -internalAddGeneratedFile( - ' -´) -$google/cloud/gkehub/v1/service.protogoogle.cloud.gkehub.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto$google/cloud/gkehub/v1/feature.proto\'google/cloud/gkehub/v1/membership.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"¯ -ListMembershipsRequest8 -parent ( B(àAúA" gkehub.googleapis.com/Membership - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"~ -ListMembershipsResponse5 - resources ( 2".google.cloud.gkehub.v1.Membership -next_page_token (  - unreachable ( "N -GetMembershipRequest6 -name ( B(àAúA" - gkehub.googleapis.com/Membership"à -CreateMembershipRequest8 -parent ( B(àAúA" gkehub.googleapis.com/Membership - membership_id ( BàA9 -resource ( 2".google.cloud.gkehub.v1.MembershipBàA - -request_id ( BàA"~ -DeleteMembershipRequest6 -name ( B(àAúA" - gkehub.googleapis.com/Membership - -request_id ( BàA -force (BàA"Û -UpdateMembershipRequest6 -name ( B(àAúA" - gkehub.googleapis.com/Membership4 - update_mask ( 2.google.protobuf.FieldMaskBàA9 -resource ( 2".google.cloud.gkehub.v1.MembershipBàA - -request_id ( BàA"ò -GenerateConnectManifestRequest6 -name ( B(àAúA" - gkehub.googleapis.com/Membership - namespace ( BàA -proxy ( BàA -version ( BàA - -is_upgrade (BàA -registry ( BàA& -image_pull_secret_content ( BàA"a -GenerateConnectManifestResponse> -manifest ( 2,.google.cloud.gkehub.v1.ConnectAgentResource"X -ConnectAgentResource. -type ( 2 .google.cloud.gkehub.v1.TypeMeta -manifest ( "- -TypeMeta -kind (  - api_version ( "’ -ListFeaturesRequest2 -parent ( B"úAgkehub.googleapis.com/Feature - page_size ( - -page_token (  -filter (  -order_by ( "c -ListFeaturesResponse2 - resources ( 2.google.cloud.gkehub.v1.Feature -next_page_token ( "E -GetFeatureRequest0 -name ( B"úA -gkehub.googleapis.com/Feature"¥ -CreateFeatureRequest2 -parent ( B"úAgkehub.googleapis.com/Feature - -feature_id ( 1 -resource ( 2.google.cloud.gkehub.v1.Feature - -request_id ( "p -DeleteFeatureRequest0 -name ( B"úA -gkehub.googleapis.com/Feature -force ( - -request_id ( BàA"À -UpdateFeatureRequest0 -name ( B"úA -gkehub.googleapis.com/Feature/ - update_mask ( 2.google.protobuf.FieldMask1 -resource ( 2.google.cloud.gkehub.v1.Feature - -request_id ( "ù -OperationMetadata4 - create_time ( 2.google.protobuf.TimestampBàA1 -end_time ( 2.google.protobuf.TimestampBàA -target ( BàA -verb ( BàA - status_detail ( BàA -cancel_requested (BàA - api_version ( BàA2ð -GkeHub´ -ListMemberships..google.cloud.gkehub.v1.ListMembershipsRequest/.google.cloud.gkehub.v1.ListMembershipsResponse"@ÚAparent‚Óä“1//v1/{parent=projects/*/locations/*}/memberships¨ - ListFeatures+.google.cloud.gkehub.v1.ListFeaturesRequest,.google.cloud.gkehub.v1.ListFeaturesResponse"=ÚAparent‚Óä“.,/v1/{parent=projects/*/locations/*}/features¡ - GetMembership,.google.cloud.gkehub.v1.GetMembershipRequest".google.cloud.gkehub.v1.Membership">ÚAname‚Óä“1//v1/{name=projects/*/locations/*/memberships/*}• - -GetFeature).google.cloud.gkehub.v1.GetFeatureRequest.google.cloud.gkehub.v1.Feature";ÚAname‚Óä“.,/v1/{name=projects/*/locations/*/features/*}è -CreateMembership/.google.cloud.gkehub.v1.CreateMembershipRequest.google.longrunning.Operation"ƒÊA - -MembershipOperationMetadataÚAparent,resource,membership_id‚Óä“;"//v1/{parent=projects/*/locations/*}/memberships:resourceØ - CreateFeature,.google.cloud.gkehub.v1.CreateFeatureRequest.google.longrunning.Operation"zÊA -FeatureOperationMetadataÚAparent,resource,feature_id‚Óä“8",/v1/{parent=projects/*/locations/*}/features:resourceÏ -DeleteMembership/.google.cloud.gkehub.v1.DeleteMembershipRequest.google.longrunning.Operation"kÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“1*//v1/{name=projects/*/locations/*/memberships/*}Æ - DeleteFeature,.google.cloud.gkehub.v1.DeleteFeatureRequest.google.longrunning.Operation"hÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“.*,/v1/{name=projects/*/locations/*/features/*}ã -UpdateMembership/.google.cloud.gkehub.v1.UpdateMembershipRequest.google.longrunning.Operation"ÊA - -MembershipOperationMetadataÚAname,resource,update_mask‚Óä“;2//v1/{name=projects/*/locations/*/memberships/*}:resource× - UpdateFeature,.google.cloud.gkehub.v1.UpdateFeatureRequest.google.longrunning.Operation"yÊA -FeatureOperationMetadataÚAname,resource,update_mask‚Óä“82,/v1/{name=projects/*/locations/*/features/*}:resourceÛ -GenerateConnectManifest6.google.cloud.gkehub.v1.GenerateConnectManifestRequest7.google.cloud.gkehub.v1.GenerateConnectManifestResponse"O‚Óä“IG/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifestIÊAgkehub.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB® -com.google.cloud.gkehub.v1B ServiceProtoPZ2cloud.google.com/go/gkehub/apiv1/gkehubpb;gkehubpbªGoogle.Cloud.GkeHub.V1ÊGoogle\\Cloud\\GkeHub\\V1êGoogle::Cloud::GkeHub::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSync.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSync.php deleted file mode 100644 index eba4ae705143..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSync.php +++ /dev/null @@ -1,323 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.ConfigSync - */ -class ConfigSync extends \Google\Protobuf\Internal\Message -{ - /** - * Git repo configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GitConfig git = 7; - */ - protected $git = null; - /** - * Specifies whether the Config Sync Repo is - * in "hierarchical" or "unstructured" mode. - * - * Generated from protobuf field string source_format = 8; - */ - protected $source_format = ''; - /** - * Enables the installation of ConfigSync. - * If set to true, ConfigSync resources will be created and the other - * ConfigSync fields will be applied if exist. - * If set to false, all other ConfigSync fields will be ignored, ConfigSync - * resources will be deleted. - * If omitted, ConfigSync resources will be managed depends on the presence - * of the git or oci field. - * - * Generated from protobuf field optional bool enabled = 10; - */ - protected $enabled = null; - /** - * Set to true to enable the Config Sync admission webhook to prevent drifts. - * If set to `false`, disables the Config Sync admission webhook and does not - * prevent drifts. - * - * Generated from protobuf field bool prevent_drift = 11; - */ - protected $prevent_drift = false; - /** - * OCI repo configuration for the cluster - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.OciConfig oci = 12; - */ - protected $oci = null; - /** - * The Email of the Google Cloud Service Account (GSA) used for exporting - * Config Sync metrics to Cloud Monitoring when Workload Identity is enabled. - * The GSA should have the Monitoring Metric Writer - * (roles/monitoring.metricWriter) IAM role. - * The Kubernetes ServiceAccount `default` in the namespace - * `config-management-monitoring` should be bound to the GSA. - * - * Generated from protobuf field string metrics_gcp_service_account_email = 15; - */ - protected $metrics_gcp_service_account_email = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\GitConfig $git - * Git repo configuration for the cluster. - * @type string $source_format - * Specifies whether the Config Sync Repo is - * in "hierarchical" or "unstructured" mode. - * @type bool $enabled - * Enables the installation of ConfigSync. - * If set to true, ConfigSync resources will be created and the other - * ConfigSync fields will be applied if exist. - * If set to false, all other ConfigSync fields will be ignored, ConfigSync - * resources will be deleted. - * If omitted, ConfigSync resources will be managed depends on the presence - * of the git or oci field. - * @type bool $prevent_drift - * Set to true to enable the Config Sync admission webhook to prevent drifts. - * If set to `false`, disables the Config Sync admission webhook and does not - * prevent drifts. - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\OciConfig $oci - * OCI repo configuration for the cluster - * @type string $metrics_gcp_service_account_email - * The Email of the Google Cloud Service Account (GSA) used for exporting - * Config Sync metrics to Cloud Monitoring when Workload Identity is enabled. - * The GSA should have the Monitoring Metric Writer - * (roles/monitoring.metricWriter) IAM role. - * The Kubernetes ServiceAccount `default` in the namespace - * `config-management-monitoring` should be bound to the GSA. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * Git repo configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GitConfig git = 7; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\GitConfig|null - */ - public function getGit() - { - return $this->git; - } - - public function hasGit() - { - return isset($this->git); - } - - public function clearGit() - { - unset($this->git); - } - - /** - * Git repo configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GitConfig git = 7; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\GitConfig $var - * @return $this - */ - public function setGit($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\GitConfig::class); - $this->git = $var; - - return $this; - } - - /** - * Specifies whether the Config Sync Repo is - * in "hierarchical" or "unstructured" mode. - * - * Generated from protobuf field string source_format = 8; - * @return string - */ - public function getSourceFormat() - { - return $this->source_format; - } - - /** - * Specifies whether the Config Sync Repo is - * in "hierarchical" or "unstructured" mode. - * - * Generated from protobuf field string source_format = 8; - * @param string $var - * @return $this - */ - public function setSourceFormat($var) - { - GPBUtil::checkString($var, True); - $this->source_format = $var; - - return $this; - } - - /** - * Enables the installation of ConfigSync. - * If set to true, ConfigSync resources will be created and the other - * ConfigSync fields will be applied if exist. - * If set to false, all other ConfigSync fields will be ignored, ConfigSync - * resources will be deleted. - * If omitted, ConfigSync resources will be managed depends on the presence - * of the git or oci field. - * - * Generated from protobuf field optional bool enabled = 10; - * @return bool - */ - public function getEnabled() - { - return isset($this->enabled) ? $this->enabled : false; - } - - public function hasEnabled() - { - return isset($this->enabled); - } - - public function clearEnabled() - { - unset($this->enabled); - } - - /** - * Enables the installation of ConfigSync. - * If set to true, ConfigSync resources will be created and the other - * ConfigSync fields will be applied if exist. - * If set to false, all other ConfigSync fields will be ignored, ConfigSync - * resources will be deleted. - * If omitted, ConfigSync resources will be managed depends on the presence - * of the git or oci field. - * - * Generated from protobuf field optional bool enabled = 10; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Set to true to enable the Config Sync admission webhook to prevent drifts. - * If set to `false`, disables the Config Sync admission webhook and does not - * prevent drifts. - * - * Generated from protobuf field bool prevent_drift = 11; - * @return bool - */ - public function getPreventDrift() - { - return $this->prevent_drift; - } - - /** - * Set to true to enable the Config Sync admission webhook to prevent drifts. - * If set to `false`, disables the Config Sync admission webhook and does not - * prevent drifts. - * - * Generated from protobuf field bool prevent_drift = 11; - * @param bool $var - * @return $this - */ - public function setPreventDrift($var) - { - GPBUtil::checkBool($var); - $this->prevent_drift = $var; - - return $this; - } - - /** - * OCI repo configuration for the cluster - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.OciConfig oci = 12; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\OciConfig|null - */ - public function getOci() - { - return $this->oci; - } - - public function hasOci() - { - return isset($this->oci); - } - - public function clearOci() - { - unset($this->oci); - } - - /** - * OCI repo configuration for the cluster - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.OciConfig oci = 12; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\OciConfig $var - * @return $this - */ - public function setOci($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\OciConfig::class); - $this->oci = $var; - - return $this; - } - - /** - * The Email of the Google Cloud Service Account (GSA) used for exporting - * Config Sync metrics to Cloud Monitoring when Workload Identity is enabled. - * The GSA should have the Monitoring Metric Writer - * (roles/monitoring.metricWriter) IAM role. - * The Kubernetes ServiceAccount `default` in the namespace - * `config-management-monitoring` should be bound to the GSA. - * - * Generated from protobuf field string metrics_gcp_service_account_email = 15; - * @return string - */ - public function getMetricsGcpServiceAccountEmail() - { - return $this->metrics_gcp_service_account_email; - } - - /** - * The Email of the Google Cloud Service Account (GSA) used for exporting - * Config Sync metrics to Cloud Monitoring when Workload Identity is enabled. - * The GSA should have the Monitoring Metric Writer - * (roles/monitoring.metricWriter) IAM role. - * The Kubernetes ServiceAccount `default` in the namespace - * `config-management-monitoring` should be bound to the GSA. - * - * Generated from protobuf field string metrics_gcp_service_account_email = 15; - * @param string $var - * @return $this - */ - public function setMetricsGcpServiceAccountEmail($var) - { - GPBUtil::checkString($var, True); - $this->metrics_gcp_service_account_email = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncDeploymentState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncDeploymentState.php deleted file mode 100644 index 828c82a203d3..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncDeploymentState.php +++ /dev/null @@ -1,271 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.ConfigSyncDeploymentState - */ -class ConfigSyncDeploymentState extends \Google\Protobuf\Internal\Message -{ - /** - * Deployment state of the importer pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState importer = 1; - */ - protected $importer = 0; - /** - * Deployment state of the syncer pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState syncer = 2; - */ - protected $syncer = 0; - /** - * Deployment state of the git-sync pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState git_sync = 3; - */ - protected $git_sync = 0; - /** - * Deployment state of the monitor pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState monitor = 4; - */ - protected $monitor = 0; - /** - * Deployment state of reconciler-manager pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState reconciler_manager = 5; - */ - protected $reconciler_manager = 0; - /** - * Deployment state of root-reconciler - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState root_reconciler = 6; - */ - protected $root_reconciler = 0; - /** - * Deployment state of admission-webhook - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState admission_webhook = 7; - */ - protected $admission_webhook = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $importer - * Deployment state of the importer pod - * @type int $syncer - * Deployment state of the syncer pod - * @type int $git_sync - * Deployment state of the git-sync pod - * @type int $monitor - * Deployment state of the monitor pod - * @type int $reconciler_manager - * Deployment state of reconciler-manager pod - * @type int $root_reconciler - * Deployment state of root-reconciler - * @type int $admission_webhook - * Deployment state of admission-webhook - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * Deployment state of the importer pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState importer = 1; - * @return int - */ - public function getImporter() - { - return $this->importer; - } - - /** - * Deployment state of the importer pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState importer = 1; - * @param int $var - * @return $this - */ - public function setImporter($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->importer = $var; - - return $this; - } - - /** - * Deployment state of the syncer pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState syncer = 2; - * @return int - */ - public function getSyncer() - { - return $this->syncer; - } - - /** - * Deployment state of the syncer pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState syncer = 2; - * @param int $var - * @return $this - */ - public function setSyncer($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->syncer = $var; - - return $this; - } - - /** - * Deployment state of the git-sync pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState git_sync = 3; - * @return int - */ - public function getGitSync() - { - return $this->git_sync; - } - - /** - * Deployment state of the git-sync pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState git_sync = 3; - * @param int $var - * @return $this - */ - public function setGitSync($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->git_sync = $var; - - return $this; - } - - /** - * Deployment state of the monitor pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState monitor = 4; - * @return int - */ - public function getMonitor() - { - return $this->monitor; - } - - /** - * Deployment state of the monitor pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState monitor = 4; - * @param int $var - * @return $this - */ - public function setMonitor($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->monitor = $var; - - return $this; - } - - /** - * Deployment state of reconciler-manager pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState reconciler_manager = 5; - * @return int - */ - public function getReconcilerManager() - { - return $this->reconciler_manager; - } - - /** - * Deployment state of reconciler-manager pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState reconciler_manager = 5; - * @param int $var - * @return $this - */ - public function setReconcilerManager($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->reconciler_manager = $var; - - return $this; - } - - /** - * Deployment state of root-reconciler - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState root_reconciler = 6; - * @return int - */ - public function getRootReconciler() - { - return $this->root_reconciler; - } - - /** - * Deployment state of root-reconciler - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState root_reconciler = 6; - * @param int $var - * @return $this - */ - public function setRootReconciler($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->root_reconciler = $var; - - return $this; - } - - /** - * Deployment state of admission-webhook - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState admission_webhook = 7; - * @return int - */ - public function getAdmissionWebhook() - { - return $this->admission_webhook; - } - - /** - * Deployment state of admission-webhook - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState admission_webhook = 7; - * @param int $var - * @return $this - */ - public function setAdmissionWebhook($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->admission_webhook = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncError.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncError.php deleted file mode 100644 index 2aefa6086d1e..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncError.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.ConfigSyncError - */ -class ConfigSyncError extends \Google\Protobuf\Internal\Message -{ - /** - * A string representing the user facing error message - * - * Generated from protobuf field string error_message = 1; - */ - protected $error_message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $error_message - * A string representing the user facing error message - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * A string representing the user facing error message - * - * Generated from protobuf field string error_message = 1; - * @return string - */ - public function getErrorMessage() - { - return $this->error_message; - } - - /** - * A string representing the user facing error message - * - * Generated from protobuf field string error_message = 1; - * @param string $var - * @return $this - */ - public function setErrorMessage($var) - { - GPBUtil::checkString($var, True); - $this->error_message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState.php deleted file mode 100644 index d2fb6690daf1..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState.php +++ /dev/null @@ -1,309 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.ConfigSyncState - */ -class ConfigSyncState extends \Google\Protobuf\Internal\Message -{ - /** - * The version of ConfigSync deployed - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncVersion version = 1; - */ - protected $version = null; - /** - * Information about the deployment of ConfigSync, including the version - * of the various Pods deployed - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncDeploymentState deployment_state = 2; - */ - protected $deployment_state = null; - /** - * The state of ConfigSync's process to sync configs to a cluster - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.SyncState sync_state = 3; - */ - protected $sync_state = null; - /** - * Errors pertaining to the installation of Config Sync. - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.ConfigSyncError errors = 4; - */ - private $errors; - /** - * The state of the RootSync CRD - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState rootsync_crd = 5; - */ - protected $rootsync_crd = 0; - /** - * The state of the Reposync CRD - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState reposync_crd = 6; - */ - protected $reposync_crd = 0; - /** - * The state of CS - * This field summarizes the other fields in this message. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.State state = 7; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncVersion $version - * The version of ConfigSync deployed - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncDeploymentState $deployment_state - * Information about the deployment of ConfigSync, including the version - * of the various Pods deployed - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\SyncState $sync_state - * The state of ConfigSync's process to sync configs to a cluster - * @type array<\Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncError>|\Google\Protobuf\Internal\RepeatedField $errors - * Errors pertaining to the installation of Config Sync. - * @type int $rootsync_crd - * The state of the RootSync CRD - * @type int $reposync_crd - * The state of the Reposync CRD - * @type int $state - * The state of CS - * This field summarizes the other fields in this message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * The version of ConfigSync deployed - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncVersion version = 1; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncVersion|null - */ - public function getVersion() - { - return $this->version; - } - - public function hasVersion() - { - return isset($this->version); - } - - public function clearVersion() - { - unset($this->version); - } - - /** - * The version of ConfigSync deployed - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncVersion version = 1; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncVersion $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncVersion::class); - $this->version = $var; - - return $this; - } - - /** - * Information about the deployment of ConfigSync, including the version - * of the various Pods deployed - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncDeploymentState deployment_state = 2; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncDeploymentState|null - */ - public function getDeploymentState() - { - return $this->deployment_state; - } - - public function hasDeploymentState() - { - return isset($this->deployment_state); - } - - public function clearDeploymentState() - { - unset($this->deployment_state); - } - - /** - * Information about the deployment of ConfigSync, including the version - * of the various Pods deployed - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncDeploymentState deployment_state = 2; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncDeploymentState $var - * @return $this - */ - public function setDeploymentState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncDeploymentState::class); - $this->deployment_state = $var; - - return $this; - } - - /** - * The state of ConfigSync's process to sync configs to a cluster - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.SyncState sync_state = 3; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\SyncState|null - */ - public function getSyncState() - { - return $this->sync_state; - } - - public function hasSyncState() - { - return isset($this->sync_state); - } - - public function clearSyncState() - { - unset($this->sync_state); - } - - /** - * The state of ConfigSync's process to sync configs to a cluster - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.SyncState sync_state = 3; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\SyncState $var - * @return $this - */ - public function setSyncState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\SyncState::class); - $this->sync_state = $var; - - return $this; - } - - /** - * Errors pertaining to the installation of Config Sync. - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.ConfigSyncError errors = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Errors pertaining to the installation of Config Sync. - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.ConfigSyncError errors = 4; - * @param array<\Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncError::class); - $this->errors = $arr; - - return $this; - } - - /** - * The state of the RootSync CRD - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState rootsync_crd = 5; - * @return int - */ - public function getRootsyncCrd() - { - return $this->rootsync_crd; - } - - /** - * The state of the RootSync CRD - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState rootsync_crd = 5; - * @param int $var - * @return $this - */ - public function setRootsyncCrd($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState\CRDState::class); - $this->rootsync_crd = $var; - - return $this; - } - - /** - * The state of the Reposync CRD - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState reposync_crd = 6; - * @return int - */ - public function getReposyncCrd() - { - return $this->reposync_crd; - } - - /** - * The state of the Reposync CRD - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState reposync_crd = 6; - * @param int $var - * @return $this - */ - public function setReposyncCrd($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState\CRDState::class); - $this->reposync_crd = $var; - - return $this; - } - - /** - * The state of CS - * This field summarizes the other fields in this message. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.State state = 7; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of CS - * This field summarizes the other fields in this message. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.State state = 7; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState/CRDState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState/CRDState.php deleted file mode 100644 index 2876176a286e..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState/CRDState.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState - */ -class CRDState -{ - /** - * CRD's state cannot be determined - * - * Generated from protobuf enum CRD_STATE_UNSPECIFIED = 0; - */ - const CRD_STATE_UNSPECIFIED = 0; - /** - * CRD is not installed - * - * Generated from protobuf enum NOT_INSTALLED = 1; - */ - const NOT_INSTALLED = 1; - /** - * CRD is installed - * - * Generated from protobuf enum INSTALLED = 2; - */ - const INSTALLED = 2; - /** - * CRD is terminating (i.e., it has been deleted and is cleaning up) - * - * Generated from protobuf enum TERMINATING = 3; - */ - const TERMINATING = 3; - /** - * CRD is installing - * - * Generated from protobuf enum INSTALLING = 4; - */ - const INSTALLING = 4; - - private static $valueToName = [ - self::CRD_STATE_UNSPECIFIED => 'CRD_STATE_UNSPECIFIED', - self::NOT_INSTALLED => 'NOT_INSTALLED', - self::INSTALLED => 'INSTALLED', - self::TERMINATING => 'TERMINATING', - self::INSTALLING => 'INSTALLING', - ]; - - 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(CRDState::class, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState_CRDState::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState/State.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState/State.php deleted file mode 100644 index 090be33ad0df..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState/State.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.ConfigSyncState.State - */ -class State -{ - /** - * CS's state cannot be determined. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * CS is not installed. - * - * Generated from protobuf enum CONFIG_SYNC_NOT_INSTALLED = 1; - */ - const CONFIG_SYNC_NOT_INSTALLED = 1; - /** - * The expected CS version is installed successfully. - * - * Generated from protobuf enum CONFIG_SYNC_INSTALLED = 2; - */ - const CONFIG_SYNC_INSTALLED = 2; - /** - * CS encounters errors. - * - * Generated from protobuf enum CONFIG_SYNC_ERROR = 3; - */ - const CONFIG_SYNC_ERROR = 3; - /** - * CS is installing or terminating. - * - * Generated from protobuf enum CONFIG_SYNC_PENDING = 4; - */ - const CONFIG_SYNC_PENDING = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CONFIG_SYNC_NOT_INSTALLED => 'CONFIG_SYNC_NOT_INSTALLED', - self::CONFIG_SYNC_INSTALLED => 'CONFIG_SYNC_INSTALLED', - self::CONFIG_SYNC_ERROR => 'CONFIG_SYNC_ERROR', - self::CONFIG_SYNC_PENDING => 'CONFIG_SYNC_PENDING', - ]; - - 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\GkeHub\ConfigManagement\V1\ConfigSyncState_State::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncVersion.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncVersion.php deleted file mode 100644 index b89d0a14f997..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncVersion.php +++ /dev/null @@ -1,271 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.ConfigSyncVersion - */ -class ConfigSyncVersion extends \Google\Protobuf\Internal\Message -{ - /** - * Version of the deployed importer pod - * - * Generated from protobuf field string importer = 1; - */ - protected $importer = ''; - /** - * Version of the deployed syncer pod - * - * Generated from protobuf field string syncer = 2; - */ - protected $syncer = ''; - /** - * Version of the deployed git-sync pod - * - * Generated from protobuf field string git_sync = 3; - */ - protected $git_sync = ''; - /** - * Version of the deployed monitor pod - * - * Generated from protobuf field string monitor = 4; - */ - protected $monitor = ''; - /** - * Version of the deployed reconciler-manager pod - * - * Generated from protobuf field string reconciler_manager = 5; - */ - protected $reconciler_manager = ''; - /** - * Version of the deployed reconciler container in root-reconciler pod - * - * Generated from protobuf field string root_reconciler = 6; - */ - protected $root_reconciler = ''; - /** - * Version of the deployed admission_webhook pod - * - * Generated from protobuf field string admission_webhook = 7; - */ - protected $admission_webhook = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $importer - * Version of the deployed importer pod - * @type string $syncer - * Version of the deployed syncer pod - * @type string $git_sync - * Version of the deployed git-sync pod - * @type string $monitor - * Version of the deployed monitor pod - * @type string $reconciler_manager - * Version of the deployed reconciler-manager pod - * @type string $root_reconciler - * Version of the deployed reconciler container in root-reconciler pod - * @type string $admission_webhook - * Version of the deployed admission_webhook pod - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * Version of the deployed importer pod - * - * Generated from protobuf field string importer = 1; - * @return string - */ - public function getImporter() - { - return $this->importer; - } - - /** - * Version of the deployed importer pod - * - * Generated from protobuf field string importer = 1; - * @param string $var - * @return $this - */ - public function setImporter($var) - { - GPBUtil::checkString($var, True); - $this->importer = $var; - - return $this; - } - - /** - * Version of the deployed syncer pod - * - * Generated from protobuf field string syncer = 2; - * @return string - */ - public function getSyncer() - { - return $this->syncer; - } - - /** - * Version of the deployed syncer pod - * - * Generated from protobuf field string syncer = 2; - * @param string $var - * @return $this - */ - public function setSyncer($var) - { - GPBUtil::checkString($var, True); - $this->syncer = $var; - - return $this; - } - - /** - * Version of the deployed git-sync pod - * - * Generated from protobuf field string git_sync = 3; - * @return string - */ - public function getGitSync() - { - return $this->git_sync; - } - - /** - * Version of the deployed git-sync pod - * - * Generated from protobuf field string git_sync = 3; - * @param string $var - * @return $this - */ - public function setGitSync($var) - { - GPBUtil::checkString($var, True); - $this->git_sync = $var; - - return $this; - } - - /** - * Version of the deployed monitor pod - * - * Generated from protobuf field string monitor = 4; - * @return string - */ - public function getMonitor() - { - return $this->monitor; - } - - /** - * Version of the deployed monitor pod - * - * Generated from protobuf field string monitor = 4; - * @param string $var - * @return $this - */ - public function setMonitor($var) - { - GPBUtil::checkString($var, True); - $this->monitor = $var; - - return $this; - } - - /** - * Version of the deployed reconciler-manager pod - * - * Generated from protobuf field string reconciler_manager = 5; - * @return string - */ - public function getReconcilerManager() - { - return $this->reconciler_manager; - } - - /** - * Version of the deployed reconciler-manager pod - * - * Generated from protobuf field string reconciler_manager = 5; - * @param string $var - * @return $this - */ - public function setReconcilerManager($var) - { - GPBUtil::checkString($var, True); - $this->reconciler_manager = $var; - - return $this; - } - - /** - * Version of the deployed reconciler container in root-reconciler pod - * - * Generated from protobuf field string root_reconciler = 6; - * @return string - */ - public function getRootReconciler() - { - return $this->root_reconciler; - } - - /** - * Version of the deployed reconciler container in root-reconciler pod - * - * Generated from protobuf field string root_reconciler = 6; - * @param string $var - * @return $this - */ - public function setRootReconciler($var) - { - GPBUtil::checkString($var, True); - $this->root_reconciler = $var; - - return $this; - } - - /** - * Version of the deployed admission_webhook pod - * - * Generated from protobuf field string admission_webhook = 7; - * @return string - */ - public function getAdmissionWebhook() - { - return $this->admission_webhook; - } - - /** - * Version of the deployed admission_webhook pod - * - * Generated from protobuf field string admission_webhook = 7; - * @param string $var - * @return $this - */ - public function setAdmissionWebhook($var) - { - GPBUtil::checkString($var, True); - $this->admission_webhook = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/DeploymentState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/DeploymentState.php deleted file mode 100644 index 802546aeafdd..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/DeploymentState.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.DeploymentState - */ -class DeploymentState -{ - /** - * Deployment's state cannot be determined - * - * Generated from protobuf enum DEPLOYMENT_STATE_UNSPECIFIED = 0; - */ - const DEPLOYMENT_STATE_UNSPECIFIED = 0; - /** - * Deployment is not installed - * - * Generated from protobuf enum NOT_INSTALLED = 1; - */ - const NOT_INSTALLED = 1; - /** - * Deployment is installed - * - * Generated from protobuf enum INSTALLED = 2; - */ - const INSTALLED = 2; - /** - * Deployment was attempted to be installed, but has errors - * - * Generated from protobuf enum ERROR = 3; - */ - const ERROR = 3; - /** - * Deployment is installing or terminating - * - * Generated from protobuf enum PENDING = 4; - */ - const PENDING = 4; - - private static $valueToName = [ - self::DEPLOYMENT_STATE_UNSPECIFIED => 'DEPLOYMENT_STATE_UNSPECIFIED', - self::NOT_INSTALLED => 'NOT_INSTALLED', - self::INSTALLED => 'INSTALLED', - self::ERROR => 'ERROR', - self::PENDING => 'PENDING', - ]; - - 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ErrorResource.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ErrorResource.php deleted file mode 100644 index 2eccf955ae58..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ErrorResource.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.ErrorResource - */ -class ErrorResource extends \Google\Protobuf\Internal\Message -{ - /** - * Path in the git repo of the erroneous config - * - * Generated from protobuf field string source_path = 1; - */ - protected $source_path = ''; - /** - * Metadata name of the resource that is causing an error - * - * Generated from protobuf field string resource_name = 2; - */ - protected $resource_name = ''; - /** - * Namespace of the resource that is causing an error - * - * Generated from protobuf field string resource_namespace = 3; - */ - protected $resource_namespace = ''; - /** - * Group/version/kind of the resource that is causing an error - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GroupVersionKind resource_gvk = 4; - */ - protected $resource_gvk = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $source_path - * Path in the git repo of the erroneous config - * @type string $resource_name - * Metadata name of the resource that is causing an error - * @type string $resource_namespace - * Namespace of the resource that is causing an error - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\GroupVersionKind $resource_gvk - * Group/version/kind of the resource that is causing an error - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * Path in the git repo of the erroneous config - * - * Generated from protobuf field string source_path = 1; - * @return string - */ - public function getSourcePath() - { - return $this->source_path; - } - - /** - * Path in the git repo of the erroneous config - * - * Generated from protobuf field string source_path = 1; - * @param string $var - * @return $this - */ - public function setSourcePath($var) - { - GPBUtil::checkString($var, True); - $this->source_path = $var; - - return $this; - } - - /** - * Metadata name of the resource that is causing an error - * - * Generated from protobuf field string resource_name = 2; - * @return string - */ - public function getResourceName() - { - return $this->resource_name; - } - - /** - * Metadata name of the resource that is causing an error - * - * Generated from protobuf field string resource_name = 2; - * @param string $var - * @return $this - */ - public function setResourceName($var) - { - GPBUtil::checkString($var, True); - $this->resource_name = $var; - - return $this; - } - - /** - * Namespace of the resource that is causing an error - * - * Generated from protobuf field string resource_namespace = 3; - * @return string - */ - public function getResourceNamespace() - { - return $this->resource_namespace; - } - - /** - * Namespace of the resource that is causing an error - * - * Generated from protobuf field string resource_namespace = 3; - * @param string $var - * @return $this - */ - public function setResourceNamespace($var) - { - GPBUtil::checkString($var, True); - $this->resource_namespace = $var; - - return $this; - } - - /** - * Group/version/kind of the resource that is causing an error - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GroupVersionKind resource_gvk = 4; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\GroupVersionKind|null - */ - public function getResourceGvk() - { - return $this->resource_gvk; - } - - public function hasResourceGvk() - { - return isset($this->resource_gvk); - } - - public function clearResourceGvk() - { - unset($this->resource_gvk); - } - - /** - * Group/version/kind of the resource that is causing an error - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GroupVersionKind resource_gvk = 4; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\GroupVersionKind $var - * @return $this - */ - public function setResourceGvk($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\GroupVersionKind::class); - $this->resource_gvk = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GatekeeperDeploymentState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GatekeeperDeploymentState.php deleted file mode 100644 index 711ded4041be..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GatekeeperDeploymentState.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.GatekeeperDeploymentState - */ -class GatekeeperDeploymentState extends \Google\Protobuf\Internal\Message -{ - /** - * Status of gatekeeper-controller-manager pod. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState gatekeeper_controller_manager_state = 1; - */ - protected $gatekeeper_controller_manager_state = 0; - /** - * Status of gatekeeper-audit deployment. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState gatekeeper_audit = 2; - */ - protected $gatekeeper_audit = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $gatekeeper_controller_manager_state - * Status of gatekeeper-controller-manager pod. - * @type int $gatekeeper_audit - * Status of gatekeeper-audit deployment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * Status of gatekeeper-controller-manager pod. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState gatekeeper_controller_manager_state = 1; - * @return int - */ - public function getGatekeeperControllerManagerState() - { - return $this->gatekeeper_controller_manager_state; - } - - /** - * Status of gatekeeper-controller-manager pod. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState gatekeeper_controller_manager_state = 1; - * @param int $var - * @return $this - */ - public function setGatekeeperControllerManagerState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->gatekeeper_controller_manager_state = $var; - - return $this; - } - - /** - * Status of gatekeeper-audit deployment. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState gatekeeper_audit = 2; - * @return int - */ - public function getGatekeeperAudit() - { - return $this->gatekeeper_audit; - } - - /** - * Status of gatekeeper-audit deployment. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState gatekeeper_audit = 2; - * @param int $var - * @return $this - */ - public function setGatekeeperAudit($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->gatekeeper_audit = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GitConfig.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GitConfig.php deleted file mode 100644 index e31ce65e990b..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GitConfig.php +++ /dev/null @@ -1,321 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.GitConfig - */ -class GitConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The URL of the Git repository to use as the source of truth. - * - * Generated from protobuf field string sync_repo = 1; - */ - protected $sync_repo = ''; - /** - * The branch of the repository to sync from. Default: master. - * - * Generated from protobuf field string sync_branch = 2; - */ - protected $sync_branch = ''; - /** - * The path within the Git repository that represents the top level of the - * repo to sync. Default: the root directory of the repository. - * - * Generated from protobuf field string policy_dir = 3; - */ - protected $policy_dir = ''; - /** - * Period in seconds between consecutive syncs. Default: 15. - * - * Generated from protobuf field int64 sync_wait_secs = 4; - */ - protected $sync_wait_secs = 0; - /** - * Git revision (tag or hash) to check out. Default HEAD. - * - * Generated from protobuf field string sync_rev = 5; - */ - protected $sync_rev = ''; - /** - * Type of secret configured for access to the Git repo. Must be one of ssh, - * cookiefile, gcenode, token, gcpserviceaccount or none. The - * validation of this is case-sensitive. Required. - * - * Generated from protobuf field string secret_type = 6; - */ - protected $secret_type = ''; - /** - * URL for the HTTPS proxy to be used when communicating with the Git repo. - * - * Generated from protobuf field string https_proxy = 7; - */ - protected $https_proxy = ''; - /** - * The Google Cloud Service Account Email used for auth when secret_type is - * gcpServiceAccount. - * - * Generated from protobuf field string gcp_service_account_email = 8; - */ - protected $gcp_service_account_email = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sync_repo - * The URL of the Git repository to use as the source of truth. - * @type string $sync_branch - * The branch of the repository to sync from. Default: master. - * @type string $policy_dir - * The path within the Git repository that represents the top level of the - * repo to sync. Default: the root directory of the repository. - * @type int|string $sync_wait_secs - * Period in seconds between consecutive syncs. Default: 15. - * @type string $sync_rev - * Git revision (tag or hash) to check out. Default HEAD. - * @type string $secret_type - * Type of secret configured for access to the Git repo. Must be one of ssh, - * cookiefile, gcenode, token, gcpserviceaccount or none. The - * validation of this is case-sensitive. Required. - * @type string $https_proxy - * URL for the HTTPS proxy to be used when communicating with the Git repo. - * @type string $gcp_service_account_email - * The Google Cloud Service Account Email used for auth when secret_type is - * gcpServiceAccount. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * The URL of the Git repository to use as the source of truth. - * - * Generated from protobuf field string sync_repo = 1; - * @return string - */ - public function getSyncRepo() - { - return $this->sync_repo; - } - - /** - * The URL of the Git repository to use as the source of truth. - * - * Generated from protobuf field string sync_repo = 1; - * @param string $var - * @return $this - */ - public function setSyncRepo($var) - { - GPBUtil::checkString($var, True); - $this->sync_repo = $var; - - return $this; - } - - /** - * The branch of the repository to sync from. Default: master. - * - * Generated from protobuf field string sync_branch = 2; - * @return string - */ - public function getSyncBranch() - { - return $this->sync_branch; - } - - /** - * The branch of the repository to sync from. Default: master. - * - * Generated from protobuf field string sync_branch = 2; - * @param string $var - * @return $this - */ - public function setSyncBranch($var) - { - GPBUtil::checkString($var, True); - $this->sync_branch = $var; - - return $this; - } - - /** - * The path within the Git repository that represents the top level of the - * repo to sync. Default: the root directory of the repository. - * - * Generated from protobuf field string policy_dir = 3; - * @return string - */ - public function getPolicyDir() - { - return $this->policy_dir; - } - - /** - * The path within the Git repository that represents the top level of the - * repo to sync. Default: the root directory of the repository. - * - * Generated from protobuf field string policy_dir = 3; - * @param string $var - * @return $this - */ - public function setPolicyDir($var) - { - GPBUtil::checkString($var, True); - $this->policy_dir = $var; - - return $this; - } - - /** - * Period in seconds between consecutive syncs. Default: 15. - * - * Generated from protobuf field int64 sync_wait_secs = 4; - * @return int|string - */ - public function getSyncWaitSecs() - { - return $this->sync_wait_secs; - } - - /** - * Period in seconds between consecutive syncs. Default: 15. - * - * Generated from protobuf field int64 sync_wait_secs = 4; - * @param int|string $var - * @return $this - */ - public function setSyncWaitSecs($var) - { - GPBUtil::checkInt64($var); - $this->sync_wait_secs = $var; - - return $this; - } - - /** - * Git revision (tag or hash) to check out. Default HEAD. - * - * Generated from protobuf field string sync_rev = 5; - * @return string - */ - public function getSyncRev() - { - return $this->sync_rev; - } - - /** - * Git revision (tag or hash) to check out. Default HEAD. - * - * Generated from protobuf field string sync_rev = 5; - * @param string $var - * @return $this - */ - public function setSyncRev($var) - { - GPBUtil::checkString($var, True); - $this->sync_rev = $var; - - return $this; - } - - /** - * Type of secret configured for access to the Git repo. Must be one of ssh, - * cookiefile, gcenode, token, gcpserviceaccount or none. The - * validation of this is case-sensitive. Required. - * - * Generated from protobuf field string secret_type = 6; - * @return string - */ - public function getSecretType() - { - return $this->secret_type; - } - - /** - * Type of secret configured for access to the Git repo. Must be one of ssh, - * cookiefile, gcenode, token, gcpserviceaccount or none. The - * validation of this is case-sensitive. Required. - * - * Generated from protobuf field string secret_type = 6; - * @param string $var - * @return $this - */ - public function setSecretType($var) - { - GPBUtil::checkString($var, True); - $this->secret_type = $var; - - return $this; - } - - /** - * URL for the HTTPS proxy to be used when communicating with the Git repo. - * - * Generated from protobuf field string https_proxy = 7; - * @return string - */ - public function getHttpsProxy() - { - return $this->https_proxy; - } - - /** - * URL for the HTTPS proxy to be used when communicating with the Git repo. - * - * Generated from protobuf field string https_proxy = 7; - * @param string $var - * @return $this - */ - public function setHttpsProxy($var) - { - GPBUtil::checkString($var, True); - $this->https_proxy = $var; - - return $this; - } - - /** - * The Google Cloud Service Account Email used for auth when secret_type is - * gcpServiceAccount. - * - * Generated from protobuf field string gcp_service_account_email = 8; - * @return string - */ - public function getGcpServiceAccountEmail() - { - return $this->gcp_service_account_email; - } - - /** - * The Google Cloud Service Account Email used for auth when secret_type is - * gcpServiceAccount. - * - * Generated from protobuf field string gcp_service_account_email = 8; - * @param string $var - * @return $this - */ - public function setGcpServiceAccountEmail($var) - { - GPBUtil::checkString($var, True); - $this->gcp_service_account_email = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GroupVersionKind.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GroupVersionKind.php deleted file mode 100644 index bea54d39e71d..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GroupVersionKind.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.GroupVersionKind - */ -class GroupVersionKind extends \Google\Protobuf\Internal\Message -{ - /** - * Kubernetes Group - * - * Generated from protobuf field string group = 1; - */ - protected $group = ''; - /** - * Kubernetes Version - * - * Generated from protobuf field string version = 2; - */ - protected $version = ''; - /** - * Kubernetes Kind - * - * Generated from protobuf field string kind = 3; - */ - protected $kind = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $group - * Kubernetes Group - * @type string $version - * Kubernetes Version - * @type string $kind - * Kubernetes Kind - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * Kubernetes Group - * - * Generated from protobuf field string group = 1; - * @return string - */ - public function getGroup() - { - return $this->group; - } - - /** - * Kubernetes Group - * - * Generated from protobuf field string group = 1; - * @param string $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkString($var, True); - $this->group = $var; - - return $this; - } - - /** - * Kubernetes Version - * - * Generated from protobuf field string version = 2; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Kubernetes Version - * - * Generated from protobuf field string version = 2; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Kubernetes Kind - * - * Generated from protobuf field string kind = 3; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * Kubernetes Kind - * - * Generated from protobuf field string kind = 3; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerConfig.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerConfig.php deleted file mode 100644 index 0f5c352c5b10..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerConfig.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.HierarchyControllerConfig - */ -class HierarchyControllerConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Whether Hierarchy Controller is enabled in this cluster. - * - * Generated from protobuf field bool enabled = 1; - */ - protected $enabled = false; - /** - * Whether pod tree labels are enabled in this cluster. - * - * Generated from protobuf field bool enable_pod_tree_labels = 2; - */ - protected $enable_pod_tree_labels = false; - /** - * Whether hierarchical resource quota is enabled in this cluster. - * - * Generated from protobuf field bool enable_hierarchical_resource_quota = 3; - */ - protected $enable_hierarchical_resource_quota = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * Whether Hierarchy Controller is enabled in this cluster. - * @type bool $enable_pod_tree_labels - * Whether pod tree labels are enabled in this cluster. - * @type bool $enable_hierarchical_resource_quota - * Whether hierarchical resource quota is enabled in this cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * Whether Hierarchy Controller is enabled in this cluster. - * - * Generated from protobuf field bool enabled = 1; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Whether Hierarchy Controller is enabled in this cluster. - * - * Generated from protobuf field bool enabled = 1; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Whether pod tree labels are enabled in this cluster. - * - * Generated from protobuf field bool enable_pod_tree_labels = 2; - * @return bool - */ - public function getEnablePodTreeLabels() - { - return $this->enable_pod_tree_labels; - } - - /** - * Whether pod tree labels are enabled in this cluster. - * - * Generated from protobuf field bool enable_pod_tree_labels = 2; - * @param bool $var - * @return $this - */ - public function setEnablePodTreeLabels($var) - { - GPBUtil::checkBool($var); - $this->enable_pod_tree_labels = $var; - - return $this; - } - - /** - * Whether hierarchical resource quota is enabled in this cluster. - * - * Generated from protobuf field bool enable_hierarchical_resource_quota = 3; - * @return bool - */ - public function getEnableHierarchicalResourceQuota() - { - return $this->enable_hierarchical_resource_quota; - } - - /** - * Whether hierarchical resource quota is enabled in this cluster. - * - * Generated from protobuf field bool enable_hierarchical_resource_quota = 3; - * @param bool $var - * @return $this - */ - public function setEnableHierarchicalResourceQuota($var) - { - GPBUtil::checkBool($var); - $this->enable_hierarchical_resource_quota = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerDeploymentState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerDeploymentState.php deleted file mode 100644 index d348a6ff5617..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerDeploymentState.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.HierarchyControllerDeploymentState - */ -class HierarchyControllerDeploymentState extends \Google\Protobuf\Internal\Message -{ - /** - * The deployment state for open source HNC (e.g. v0.7.0-hc.0) - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState hnc = 1; - */ - protected $hnc = 0; - /** - * The deployment state for Hierarchy Controller extension (e.g. v0.7.0-hc.1) - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState extension = 2; - */ - protected $extension = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $hnc - * The deployment state for open source HNC (e.g. v0.7.0-hc.0) - * @type int $extension - * The deployment state for Hierarchy Controller extension (e.g. v0.7.0-hc.1) - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * The deployment state for open source HNC (e.g. v0.7.0-hc.0) - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState hnc = 1; - * @return int - */ - public function getHnc() - { - return $this->hnc; - } - - /** - * The deployment state for open source HNC (e.g. v0.7.0-hc.0) - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState hnc = 1; - * @param int $var - * @return $this - */ - public function setHnc($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->hnc = $var; - - return $this; - } - - /** - * The deployment state for Hierarchy Controller extension (e.g. v0.7.0-hc.1) - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState extension = 2; - * @return int - */ - public function getExtension() - { - return $this->extension; - } - - /** - * The deployment state for Hierarchy Controller extension (e.g. v0.7.0-hc.1) - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState extension = 2; - * @param int $var - * @return $this - */ - public function setExtension($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->extension = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerState.php deleted file mode 100644 index 0fa804532730..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerState.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.HierarchyControllerState - */ -class HierarchyControllerState extends \Google\Protobuf\Internal\Message -{ - /** - * The version for Hierarchy Controller - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerVersion version = 1; - */ - protected $version = null; - /** - * The deployment state for Hierarchy Controller - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerDeploymentState state = 2; - */ - protected $state = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerVersion $version - * The version for Hierarchy Controller - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerDeploymentState $state - * The deployment state for Hierarchy Controller - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * The version for Hierarchy Controller - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerVersion version = 1; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerVersion|null - */ - public function getVersion() - { - return $this->version; - } - - public function hasVersion() - { - return isset($this->version); - } - - public function clearVersion() - { - unset($this->version); - } - - /** - * The version for Hierarchy Controller - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerVersion version = 1; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerVersion $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerVersion::class); - $this->version = $var; - - return $this; - } - - /** - * The deployment state for Hierarchy Controller - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerDeploymentState state = 2; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerDeploymentState|null - */ - public function getState() - { - return $this->state; - } - - public function hasState() - { - return isset($this->state); - } - - public function clearState() - { - unset($this->state); - } - - /** - * The deployment state for Hierarchy Controller - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerDeploymentState state = 2; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerDeploymentState $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerDeploymentState::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerVersion.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerVersion.php deleted file mode 100644 index 7a29821ab300..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerVersion.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.HierarchyControllerVersion - */ -class HierarchyControllerVersion extends \Google\Protobuf\Internal\Message -{ - /** - * Version for open source HNC - * - * Generated from protobuf field string hnc = 1; - */ - protected $hnc = ''; - /** - * Version for Hierarchy Controller extension - * - * Generated from protobuf field string extension = 2; - */ - protected $extension = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $hnc - * Version for open source HNC - * @type string $extension - * Version for Hierarchy Controller extension - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * Version for open source HNC - * - * Generated from protobuf field string hnc = 1; - * @return string - */ - public function getHnc() - { - return $this->hnc; - } - - /** - * Version for open source HNC - * - * Generated from protobuf field string hnc = 1; - * @param string $var - * @return $this - */ - public function setHnc($var) - { - GPBUtil::checkString($var, True); - $this->hnc = $var; - - return $this; - } - - /** - * Version for Hierarchy Controller extension - * - * Generated from protobuf field string extension = 2; - * @return string - */ - public function getExtension() - { - return $this->extension; - } - - /** - * Version for Hierarchy Controller extension - * - * Generated from protobuf field string extension = 2; - * @param string $var - * @return $this - */ - public function setExtension($var) - { - GPBUtil::checkString($var, True); - $this->extension = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/InstallError.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/InstallError.php deleted file mode 100644 index 5616df50e468..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/InstallError.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.InstallError - */ -class InstallError extends \Google\Protobuf\Internal\Message -{ - /** - * A string representing the user facing error message - * - * Generated from protobuf field string error_message = 1; - */ - protected $error_message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $error_message - * A string representing the user facing error message - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * A string representing the user facing error message - * - * Generated from protobuf field string error_message = 1; - * @return string - */ - public function getErrorMessage() - { - return $this->error_message; - } - - /** - * A string representing the user facing error message - * - * Generated from protobuf field string error_message = 1; - * @param string $var - * @return $this - */ - public function setErrorMessage($var) - { - GPBUtil::checkString($var, True); - $this->error_message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipSpec.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipSpec.php deleted file mode 100644 index e785153b26a9..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipSpec.php +++ /dev/null @@ -1,292 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.MembershipSpec - */ -class MembershipSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Config Sync configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSync config_sync = 1; - */ - protected $config_sync = null; - /** - * Policy Controller configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyController policy_controller = 2; - */ - protected $policy_controller = null; - /** - * Hierarchy Controller configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerConfig hierarchy_controller = 4; - */ - protected $hierarchy_controller = null; - /** - * Version of ACM installed. - * - * Generated from protobuf field string version = 10; - */ - protected $version = ''; - /** - * The user-specified cluster name used by Config Sync cluster-name-selector - * annotation or ClusterSelector, for applying configs to only a subset - * of clusters. - * Omit this field if the cluster's fleet membership name is used by Config - * Sync cluster-name-selector annotation or ClusterSelector. - * Set this field if a name different from the cluster's fleet membership name - * is used by Config Sync cluster-name-selector annotation or ClusterSelector. - * - * Generated from protobuf field string cluster = 11; - */ - protected $cluster = ''; - /** - * Enables automatic Feature management. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec.Management management = 12; - */ - protected $management = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSync $config_sync - * Config Sync configuration for the cluster. - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyController $policy_controller - * Policy Controller configuration for the cluster. - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerConfig $hierarchy_controller - * Hierarchy Controller configuration for the cluster. - * @type string $version - * Version of ACM installed. - * @type string $cluster - * The user-specified cluster name used by Config Sync cluster-name-selector - * annotation or ClusterSelector, for applying configs to only a subset - * of clusters. - * Omit this field if the cluster's fleet membership name is used by Config - * Sync cluster-name-selector annotation or ClusterSelector. - * Set this field if a name different from the cluster's fleet membership name - * is used by Config Sync cluster-name-selector annotation or ClusterSelector. - * @type int $management - * Enables automatic Feature management. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * Config Sync configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSync config_sync = 1; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSync|null - */ - public function getConfigSync() - { - return $this->config_sync; - } - - public function hasConfigSync() - { - return isset($this->config_sync); - } - - public function clearConfigSync() - { - unset($this->config_sync); - } - - /** - * Config Sync configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSync config_sync = 1; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSync $var - * @return $this - */ - public function setConfigSync($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSync::class); - $this->config_sync = $var; - - return $this; - } - - /** - * Policy Controller configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyController policy_controller = 2; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyController|null - */ - public function getPolicyController() - { - return $this->policy_controller; - } - - public function hasPolicyController() - { - return isset($this->policy_controller); - } - - public function clearPolicyController() - { - unset($this->policy_controller); - } - - /** - * Policy Controller configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyController policy_controller = 2; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyController $var - * @return $this - */ - public function setPolicyController($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyController::class); - $this->policy_controller = $var; - - return $this; - } - - /** - * Hierarchy Controller configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerConfig hierarchy_controller = 4; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerConfig|null - */ - public function getHierarchyController() - { - return $this->hierarchy_controller; - } - - public function hasHierarchyController() - { - return isset($this->hierarchy_controller); - } - - public function clearHierarchyController() - { - unset($this->hierarchy_controller); - } - - /** - * Hierarchy Controller configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerConfig hierarchy_controller = 4; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerConfig $var - * @return $this - */ - public function setHierarchyController($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerConfig::class); - $this->hierarchy_controller = $var; - - return $this; - } - - /** - * Version of ACM installed. - * - * Generated from protobuf field string version = 10; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Version of ACM installed. - * - * Generated from protobuf field string version = 10; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * The user-specified cluster name used by Config Sync cluster-name-selector - * annotation or ClusterSelector, for applying configs to only a subset - * of clusters. - * Omit this field if the cluster's fleet membership name is used by Config - * Sync cluster-name-selector annotation or ClusterSelector. - * Set this field if a name different from the cluster's fleet membership name - * is used by Config Sync cluster-name-selector annotation or ClusterSelector. - * - * Generated from protobuf field string cluster = 11; - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * The user-specified cluster name used by Config Sync cluster-name-selector - * annotation or ClusterSelector, for applying configs to only a subset - * of clusters. - * Omit this field if the cluster's fleet membership name is used by Config - * Sync cluster-name-selector annotation or ClusterSelector. - * Set this field if a name different from the cluster's fleet membership name - * is used by Config Sync cluster-name-selector annotation or ClusterSelector. - * - * Generated from protobuf field string cluster = 11; - * @param string $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkString($var, True); - $this->cluster = $var; - - return $this; - } - - /** - * Enables automatic Feature management. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec.Management management = 12; - * @return int - */ - public function getManagement() - { - return $this->management; - } - - /** - * Enables automatic Feature management. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec.Management management = 12; - * @param int $var - * @return $this - */ - public function setManagement($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec\Management::class); - $this->management = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipSpec/Management.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipSpec/Management.php deleted file mode 100644 index a7e4823ee480..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipSpec/Management.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.MembershipSpec.Management - */ -class Management -{ - /** - * Unspecified - * - * Generated from protobuf enum MANAGEMENT_UNSPECIFIED = 0; - */ - const MANAGEMENT_UNSPECIFIED = 0; - /** - * Google will manage the Feature for the cluster. - * - * Generated from protobuf enum MANAGEMENT_AUTOMATIC = 1; - */ - const MANAGEMENT_AUTOMATIC = 1; - /** - * User will manually manage the Feature for the cluster. - * - * Generated from protobuf enum MANAGEMENT_MANUAL = 2; - */ - const MANAGEMENT_MANUAL = 2; - - private static $valueToName = [ - self::MANAGEMENT_UNSPECIFIED => 'MANAGEMENT_UNSPECIFIED', - self::MANAGEMENT_AUTOMATIC => 'MANAGEMENT_AUTOMATIC', - self::MANAGEMENT_MANUAL => 'MANAGEMENT_MANUAL', - ]; - - 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(Management::class, \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec_Management::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipState.php deleted file mode 100644 index f9539fae394b..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipState.php +++ /dev/null @@ -1,299 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.MembershipState - */ -class MembershipState extends \Google\Protobuf\Internal\Message -{ - /** - * This field is set to the `cluster_name` field of the Membership Spec if it - * is not empty. Otherwise, it is set to the cluster's fleet membership name. - * - * Generated from protobuf field string cluster_name = 1; - */ - protected $cluster_name = ''; - /** - * Membership configuration in the cluster. This represents the actual state - * in the cluster, while the MembershipSpec in the FeatureSpec represents - * the intended state - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec membership_spec = 2; - */ - protected $membership_spec = null; - /** - * Current install status of ACM's Operator - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.OperatorState operator_state = 3; - */ - protected $operator_state = null; - /** - * Current sync status - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState config_sync_state = 4; - */ - protected $config_sync_state = null; - /** - * PolicyController status - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyControllerState policy_controller_state = 5; - */ - protected $policy_controller_state = null; - /** - * Hierarchy Controller status - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerState hierarchy_controller_state = 7; - */ - protected $hierarchy_controller_state = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cluster_name - * This field is set to the `cluster_name` field of the Membership Spec if it - * is not empty. Otherwise, it is set to the cluster's fleet membership name. - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec $membership_spec - * Membership configuration in the cluster. This represents the actual state - * in the cluster, while the MembershipSpec in the FeatureSpec represents - * the intended state - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\OperatorState $operator_state - * Current install status of ACM's Operator - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState $config_sync_state - * Current sync status - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerState $policy_controller_state - * PolicyController status - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerState $hierarchy_controller_state - * Hierarchy Controller status - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * This field is set to the `cluster_name` field of the Membership Spec if it - * is not empty. Otherwise, it is set to the cluster's fleet membership name. - * - * Generated from protobuf field string cluster_name = 1; - * @return string - */ - public function getClusterName() - { - return $this->cluster_name; - } - - /** - * This field is set to the `cluster_name` field of the Membership Spec if it - * is not empty. Otherwise, it is set to the cluster's fleet membership name. - * - * Generated from protobuf field string cluster_name = 1; - * @param string $var - * @return $this - */ - public function setClusterName($var) - { - GPBUtil::checkString($var, True); - $this->cluster_name = $var; - - return $this; - } - - /** - * Membership configuration in the cluster. This represents the actual state - * in the cluster, while the MembershipSpec in the FeatureSpec represents - * the intended state - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec membership_spec = 2; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec|null - */ - public function getMembershipSpec() - { - return $this->membership_spec; - } - - public function hasMembershipSpec() - { - return isset($this->membership_spec); - } - - public function clearMembershipSpec() - { - unset($this->membership_spec); - } - - /** - * Membership configuration in the cluster. This represents the actual state - * in the cluster, while the MembershipSpec in the FeatureSpec represents - * the intended state - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec membership_spec = 2; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec $var - * @return $this - */ - public function setMembershipSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec::class); - $this->membership_spec = $var; - - return $this; - } - - /** - * Current install status of ACM's Operator - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.OperatorState operator_state = 3; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\OperatorState|null - */ - public function getOperatorState() - { - return $this->operator_state; - } - - public function hasOperatorState() - { - return isset($this->operator_state); - } - - public function clearOperatorState() - { - unset($this->operator_state); - } - - /** - * Current install status of ACM's Operator - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.OperatorState operator_state = 3; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\OperatorState $var - * @return $this - */ - public function setOperatorState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\OperatorState::class); - $this->operator_state = $var; - - return $this; - } - - /** - * Current sync status - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState config_sync_state = 4; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState|null - */ - public function getConfigSyncState() - { - return $this->config_sync_state; - } - - public function hasConfigSyncState() - { - return isset($this->config_sync_state); - } - - public function clearConfigSyncState() - { - unset($this->config_sync_state); - } - - /** - * Current sync status - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState config_sync_state = 4; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState $var - * @return $this - */ - public function setConfigSyncState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState::class); - $this->config_sync_state = $var; - - return $this; - } - - /** - * PolicyController status - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyControllerState policy_controller_state = 5; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerState|null - */ - public function getPolicyControllerState() - { - return $this->policy_controller_state; - } - - public function hasPolicyControllerState() - { - return isset($this->policy_controller_state); - } - - public function clearPolicyControllerState() - { - unset($this->policy_controller_state); - } - - /** - * PolicyController status - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyControllerState policy_controller_state = 5; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerState $var - * @return $this - */ - public function setPolicyControllerState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerState::class); - $this->policy_controller_state = $var; - - return $this; - } - - /** - * Hierarchy Controller status - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerState hierarchy_controller_state = 7; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerState|null - */ - public function getHierarchyControllerState() - { - return $this->hierarchy_controller_state; - } - - public function hasHierarchyControllerState() - { - return isset($this->hierarchy_controller_state); - } - - public function clearHierarchyControllerState() - { - unset($this->hierarchy_controller_state); - } - - /** - * Hierarchy Controller status - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerState hierarchy_controller_state = 7; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerState $var - * @return $this - */ - public function setHierarchyControllerState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerState::class); - $this->hierarchy_controller_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/OciConfig.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/OciConfig.php deleted file mode 100644 index b2b91e6ea01b..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/OciConfig.php +++ /dev/null @@ -1,215 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.OciConfig - */ -class OciConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The OCI image repository URL for the package to sync from. - * e.g. `LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME`. - * - * Generated from protobuf field string sync_repo = 1; - */ - protected $sync_repo = ''; - /** - * The absolute path of the directory that contains - * the local resources. Default: the root directory of the image. - * - * Generated from protobuf field string policy_dir = 2; - */ - protected $policy_dir = ''; - /** - * Period in seconds between consecutive syncs. Default: 15. - * - * Generated from protobuf field int64 sync_wait_secs = 3; - */ - protected $sync_wait_secs = 0; - /** - * Type of secret configured for access to the Git repo. - * - * Generated from protobuf field string secret_type = 4; - */ - protected $secret_type = ''; - /** - * The Google Cloud Service Account Email used for auth when secret_type is - * gcpServiceAccount. - * - * Generated from protobuf field string gcp_service_account_email = 5; - */ - protected $gcp_service_account_email = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sync_repo - * The OCI image repository URL for the package to sync from. - * e.g. `LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME`. - * @type string $policy_dir - * The absolute path of the directory that contains - * the local resources. Default: the root directory of the image. - * @type int|string $sync_wait_secs - * Period in seconds between consecutive syncs. Default: 15. - * @type string $secret_type - * Type of secret configured for access to the Git repo. - * @type string $gcp_service_account_email - * The Google Cloud Service Account Email used for auth when secret_type is - * gcpServiceAccount. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * The OCI image repository URL for the package to sync from. - * e.g. `LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME`. - * - * Generated from protobuf field string sync_repo = 1; - * @return string - */ - public function getSyncRepo() - { - return $this->sync_repo; - } - - /** - * The OCI image repository URL for the package to sync from. - * e.g. `LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME`. - * - * Generated from protobuf field string sync_repo = 1; - * @param string $var - * @return $this - */ - public function setSyncRepo($var) - { - GPBUtil::checkString($var, True); - $this->sync_repo = $var; - - return $this; - } - - /** - * The absolute path of the directory that contains - * the local resources. Default: the root directory of the image. - * - * Generated from protobuf field string policy_dir = 2; - * @return string - */ - public function getPolicyDir() - { - return $this->policy_dir; - } - - /** - * The absolute path of the directory that contains - * the local resources. Default: the root directory of the image. - * - * Generated from protobuf field string policy_dir = 2; - * @param string $var - * @return $this - */ - public function setPolicyDir($var) - { - GPBUtil::checkString($var, True); - $this->policy_dir = $var; - - return $this; - } - - /** - * Period in seconds between consecutive syncs. Default: 15. - * - * Generated from protobuf field int64 sync_wait_secs = 3; - * @return int|string - */ - public function getSyncWaitSecs() - { - return $this->sync_wait_secs; - } - - /** - * Period in seconds between consecutive syncs. Default: 15. - * - * Generated from protobuf field int64 sync_wait_secs = 3; - * @param int|string $var - * @return $this - */ - public function setSyncWaitSecs($var) - { - GPBUtil::checkInt64($var); - $this->sync_wait_secs = $var; - - return $this; - } - - /** - * Type of secret configured for access to the Git repo. - * - * Generated from protobuf field string secret_type = 4; - * @return string - */ - public function getSecretType() - { - return $this->secret_type; - } - - /** - * Type of secret configured for access to the Git repo. - * - * Generated from protobuf field string secret_type = 4; - * @param string $var - * @return $this - */ - public function setSecretType($var) - { - GPBUtil::checkString($var, True); - $this->secret_type = $var; - - return $this; - } - - /** - * The Google Cloud Service Account Email used for auth when secret_type is - * gcpServiceAccount. - * - * Generated from protobuf field string gcp_service_account_email = 5; - * @return string - */ - public function getGcpServiceAccountEmail() - { - return $this->gcp_service_account_email; - } - - /** - * The Google Cloud Service Account Email used for auth when secret_type is - * gcpServiceAccount. - * - * Generated from protobuf field string gcp_service_account_email = 5; - * @param string $var - * @return $this - */ - public function setGcpServiceAccountEmail($var) - { - GPBUtil::checkString($var, True); - $this->gcp_service_account_email = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/OperatorState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/OperatorState.php deleted file mode 100644 index 8b91ffdf0006..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/OperatorState.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.OperatorState - */ -class OperatorState extends \Google\Protobuf\Internal\Message -{ - /** - * The semenatic version number of the operator - * - * Generated from protobuf field string version = 1; - */ - protected $version = ''; - /** - * The state of the Operator's deployment - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState deployment_state = 2; - */ - protected $deployment_state = 0; - /** - * Install errors. - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.InstallError errors = 3; - */ - private $errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * The semenatic version number of the operator - * @type int $deployment_state - * The state of the Operator's deployment - * @type array<\Google\Cloud\GkeHub\ConfigManagement\V1\InstallError>|\Google\Protobuf\Internal\RepeatedField $errors - * Install errors. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * The semenatic version number of the operator - * - * Generated from protobuf field string version = 1; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The semenatic version number of the operator - * - * Generated from protobuf field string version = 1; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * The state of the Operator's deployment - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState deployment_state = 2; - * @return int - */ - public function getDeploymentState() - { - return $this->deployment_state; - } - - /** - * The state of the Operator's deployment - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState deployment_state = 2; - * @param int $var - * @return $this - */ - public function setDeploymentState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->deployment_state = $var; - - return $this; - } - - /** - * Install errors. - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.InstallError errors = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Install errors. - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.InstallError errors = 3; - * @param array<\Google\Cloud\GkeHub\ConfigManagement\V1\InstallError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\ConfigManagement\V1\InstallError::class); - $this->errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyController.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyController.php deleted file mode 100644 index eafd7df91446..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyController.php +++ /dev/null @@ -1,277 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.PolicyController - */ -class PolicyController extends \Google\Protobuf\Internal\Message -{ - /** - * Enables the installation of Policy Controller. - * If false, the rest of PolicyController fields take no - * effect. - * - * Generated from protobuf field bool enabled = 1; - */ - protected $enabled = false; - /** - * Installs the default template library along with Policy Controller. - * - * Generated from protobuf field optional bool template_library_installed = 2; - */ - protected $template_library_installed = null; - /** - * Sets the interval for Policy Controller Audit Scans (in seconds). - * When set to 0, this disables audit functionality altogether. - * - * Generated from protobuf field optional int64 audit_interval_seconds = 3; - */ - protected $audit_interval_seconds = null; - /** - * The set of namespaces that are excluded from Policy Controller checks. - * Namespaces do not need to currently exist on the cluster. - * - * Generated from protobuf field repeated string exemptable_namespaces = 4; - */ - private $exemptable_namespaces; - /** - * Enables the ability to use Constraint Templates that reference to objects - * other than the object currently being evaluated. - * - * Generated from protobuf field bool referential_rules_enabled = 5; - */ - protected $referential_rules_enabled = false; - /** - * Logs all denies and dry run failures. - * - * Generated from protobuf field bool log_denies_enabled = 6; - */ - protected $log_denies_enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * Enables the installation of Policy Controller. - * If false, the rest of PolicyController fields take no - * effect. - * @type bool $template_library_installed - * Installs the default template library along with Policy Controller. - * @type int|string $audit_interval_seconds - * Sets the interval for Policy Controller Audit Scans (in seconds). - * When set to 0, this disables audit functionality altogether. - * @type array|\Google\Protobuf\Internal\RepeatedField $exemptable_namespaces - * The set of namespaces that are excluded from Policy Controller checks. - * Namespaces do not need to currently exist on the cluster. - * @type bool $referential_rules_enabled - * Enables the ability to use Constraint Templates that reference to objects - * other than the object currently being evaluated. - * @type bool $log_denies_enabled - * Logs all denies and dry run failures. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * Enables the installation of Policy Controller. - * If false, the rest of PolicyController fields take no - * effect. - * - * Generated from protobuf field bool enabled = 1; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Enables the installation of Policy Controller. - * If false, the rest of PolicyController fields take no - * effect. - * - * Generated from protobuf field bool enabled = 1; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Installs the default template library along with Policy Controller. - * - * Generated from protobuf field optional bool template_library_installed = 2; - * @return bool - */ - public function getTemplateLibraryInstalled() - { - return isset($this->template_library_installed) ? $this->template_library_installed : false; - } - - public function hasTemplateLibraryInstalled() - { - return isset($this->template_library_installed); - } - - public function clearTemplateLibraryInstalled() - { - unset($this->template_library_installed); - } - - /** - * Installs the default template library along with Policy Controller. - * - * Generated from protobuf field optional bool template_library_installed = 2; - * @param bool $var - * @return $this - */ - public function setTemplateLibraryInstalled($var) - { - GPBUtil::checkBool($var); - $this->template_library_installed = $var; - - return $this; - } - - /** - * Sets the interval for Policy Controller Audit Scans (in seconds). - * When set to 0, this disables audit functionality altogether. - * - * Generated from protobuf field optional int64 audit_interval_seconds = 3; - * @return int|string - */ - public function getAuditIntervalSeconds() - { - return isset($this->audit_interval_seconds) ? $this->audit_interval_seconds : 0; - } - - public function hasAuditIntervalSeconds() - { - return isset($this->audit_interval_seconds); - } - - public function clearAuditIntervalSeconds() - { - unset($this->audit_interval_seconds); - } - - /** - * Sets the interval for Policy Controller Audit Scans (in seconds). - * When set to 0, this disables audit functionality altogether. - * - * Generated from protobuf field optional int64 audit_interval_seconds = 3; - * @param int|string $var - * @return $this - */ - public function setAuditIntervalSeconds($var) - { - GPBUtil::checkInt64($var); - $this->audit_interval_seconds = $var; - - return $this; - } - - /** - * The set of namespaces that are excluded from Policy Controller checks. - * Namespaces do not need to currently exist on the cluster. - * - * Generated from protobuf field repeated string exemptable_namespaces = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExemptableNamespaces() - { - return $this->exemptable_namespaces; - } - - /** - * The set of namespaces that are excluded from Policy Controller checks. - * Namespaces do not need to currently exist on the cluster. - * - * Generated from protobuf field repeated string exemptable_namespaces = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExemptableNamespaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->exemptable_namespaces = $arr; - - return $this; - } - - /** - * Enables the ability to use Constraint Templates that reference to objects - * other than the object currently being evaluated. - * - * Generated from protobuf field bool referential_rules_enabled = 5; - * @return bool - */ - public function getReferentialRulesEnabled() - { - return $this->referential_rules_enabled; - } - - /** - * Enables the ability to use Constraint Templates that reference to objects - * other than the object currently being evaluated. - * - * Generated from protobuf field bool referential_rules_enabled = 5; - * @param bool $var - * @return $this - */ - public function setReferentialRulesEnabled($var) - { - GPBUtil::checkBool($var); - $this->referential_rules_enabled = $var; - - return $this; - } - - /** - * Logs all denies and dry run failures. - * - * Generated from protobuf field bool log_denies_enabled = 6; - * @return bool - */ - public function getLogDeniesEnabled() - { - return $this->log_denies_enabled; - } - - /** - * Logs all denies and dry run failures. - * - * Generated from protobuf field bool log_denies_enabled = 6; - * @param bool $var - * @return $this - */ - public function setLogDeniesEnabled($var) - { - GPBUtil::checkBool($var); - $this->log_denies_enabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyControllerState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyControllerState.php deleted file mode 100644 index e0ba94d19999..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyControllerState.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.PolicyControllerState - */ -class PolicyControllerState extends \Google\Protobuf\Internal\Message -{ - /** - * The version of Gatekeeper Policy Controller deployed. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyControllerVersion version = 1; - */ - protected $version = null; - /** - * The state about the policy controller installation. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GatekeeperDeploymentState deployment_state = 2; - */ - protected $deployment_state = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerVersion $version - * The version of Gatekeeper Policy Controller deployed. - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\GatekeeperDeploymentState $deployment_state - * The state about the policy controller installation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * The version of Gatekeeper Policy Controller deployed. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyControllerVersion version = 1; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerVersion|null - */ - public function getVersion() - { - return $this->version; - } - - public function hasVersion() - { - return isset($this->version); - } - - public function clearVersion() - { - unset($this->version); - } - - /** - * The version of Gatekeeper Policy Controller deployed. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyControllerVersion version = 1; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerVersion $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerVersion::class); - $this->version = $var; - - return $this; - } - - /** - * The state about the policy controller installation. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GatekeeperDeploymentState deployment_state = 2; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\GatekeeperDeploymentState|null - */ - public function getDeploymentState() - { - return $this->deployment_state; - } - - public function hasDeploymentState() - { - return isset($this->deployment_state); - } - - public function clearDeploymentState() - { - unset($this->deployment_state); - } - - /** - * The state about the policy controller installation. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GatekeeperDeploymentState deployment_state = 2; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\GatekeeperDeploymentState $var - * @return $this - */ - public function setDeploymentState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\GatekeeperDeploymentState::class); - $this->deployment_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyControllerVersion.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyControllerVersion.php deleted file mode 100644 index fb70a7bffb04..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyControllerVersion.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.PolicyControllerVersion - */ -class PolicyControllerVersion extends \Google\Protobuf\Internal\Message -{ - /** - * The gatekeeper image tag that is composed of ACM version, git tag, build - * number. - * - * Generated from protobuf field string version = 1; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * The gatekeeper image tag that is composed of ACM version, git tag, build - * number. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * The gatekeeper image tag that is composed of ACM version, git tag, build - * number. - * - * Generated from protobuf field string version = 1; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The gatekeeper image tag that is composed of ACM version, git tag, build - * number. - * - * Generated from protobuf field string version = 1; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncError.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncError.php deleted file mode 100644 index f9a32a75047d..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncError.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.SyncError - */ -class SyncError extends \Google\Protobuf\Internal\Message -{ - /** - * An ACM defined error code - * - * Generated from protobuf field string code = 1; - */ - protected $code = ''; - /** - * A description of the error - * - * Generated from protobuf field string error_message = 2; - */ - protected $error_message = ''; - /** - * A list of config(s) associated with the error, if any - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.ErrorResource error_resources = 3; - */ - private $error_resources; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $code - * An ACM defined error code - * @type string $error_message - * A description of the error - * @type array<\Google\Cloud\GkeHub\ConfigManagement\V1\ErrorResource>|\Google\Protobuf\Internal\RepeatedField $error_resources - * A list of config(s) associated with the error, if any - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * An ACM defined error code - * - * Generated from protobuf field string code = 1; - * @return string - */ - public function getCode() - { - return $this->code; - } - - /** - * An ACM defined error code - * - * Generated from protobuf field string code = 1; - * @param string $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkString($var, True); - $this->code = $var; - - return $this; - } - - /** - * A description of the error - * - * Generated from protobuf field string error_message = 2; - * @return string - */ - public function getErrorMessage() - { - return $this->error_message; - } - - /** - * A description of the error - * - * Generated from protobuf field string error_message = 2; - * @param string $var - * @return $this - */ - public function setErrorMessage($var) - { - GPBUtil::checkString($var, True); - $this->error_message = $var; - - return $this; - } - - /** - * A list of config(s) associated with the error, if any - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.ErrorResource error_resources = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrorResources() - { - return $this->error_resources; - } - - /** - * A list of config(s) associated with the error, if any - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.ErrorResource error_resources = 3; - * @param array<\Google\Cloud\GkeHub\ConfigManagement\V1\ErrorResource>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrorResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\ConfigManagement\V1\ErrorResource::class); - $this->error_resources = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncState.php deleted file mode 100644 index 46dd803be42b..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncState.php +++ /dev/null @@ -1,302 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.SyncState - */ -class SyncState extends \Google\Protobuf\Internal\Message -{ - /** - * Token indicating the state of the repo. - * - * Generated from protobuf field string source_token = 1; - */ - protected $source_token = ''; - /** - * Token indicating the state of the importer. - * - * Generated from protobuf field string import_token = 2; - */ - protected $import_token = ''; - /** - * Token indicating the state of the syncer. - * - * Generated from protobuf field string sync_token = 3; - */ - protected $sync_token = ''; - /** - * Deprecated: use last_sync_time instead. - * Timestamp of when ACM last successfully synced the repo - * The time format is specified in https://golang.org/pkg/time/#Time.String - * - * Generated from protobuf field string last_sync = 4 [deprecated = true]; - * @deprecated - */ - protected $last_sync = ''; - /** - * Timestamp type of when ACM last successfully synced the repo - * - * Generated from protobuf field .google.protobuf.Timestamp last_sync_time = 7; - */ - protected $last_sync_time = null; - /** - * Sync status code - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.SyncState.SyncCode code = 5; - */ - protected $code = 0; - /** - * A list of errors resulting from problematic configs. - * This list will be truncated after 100 errors, although it is - * unlikely for that many errors to simultaneously exist. - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.SyncError errors = 6; - */ - private $errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $source_token - * Token indicating the state of the repo. - * @type string $import_token - * Token indicating the state of the importer. - * @type string $sync_token - * Token indicating the state of the syncer. - * @type string $last_sync - * Deprecated: use last_sync_time instead. - * Timestamp of when ACM last successfully synced the repo - * The time format is specified in https://golang.org/pkg/time/#Time.String - * @type \Google\Protobuf\Timestamp $last_sync_time - * Timestamp type of when ACM last successfully synced the repo - * @type int $code - * Sync status code - * @type array<\Google\Cloud\GkeHub\ConfigManagement\V1\SyncError>|\Google\Protobuf\Internal\RepeatedField $errors - * A list of errors resulting from problematic configs. - * This list will be truncated after 100 errors, although it is - * unlikely for that many errors to simultaneously exist. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * Token indicating the state of the repo. - * - * Generated from protobuf field string source_token = 1; - * @return string - */ - public function getSourceToken() - { - return $this->source_token; - } - - /** - * Token indicating the state of the repo. - * - * Generated from protobuf field string source_token = 1; - * @param string $var - * @return $this - */ - public function setSourceToken($var) - { - GPBUtil::checkString($var, True); - $this->source_token = $var; - - return $this; - } - - /** - * Token indicating the state of the importer. - * - * Generated from protobuf field string import_token = 2; - * @return string - */ - public function getImportToken() - { - return $this->import_token; - } - - /** - * Token indicating the state of the importer. - * - * Generated from protobuf field string import_token = 2; - * @param string $var - * @return $this - */ - public function setImportToken($var) - { - GPBUtil::checkString($var, True); - $this->import_token = $var; - - return $this; - } - - /** - * Token indicating the state of the syncer. - * - * Generated from protobuf field string sync_token = 3; - * @return string - */ - public function getSyncToken() - { - return $this->sync_token; - } - - /** - * Token indicating the state of the syncer. - * - * Generated from protobuf field string sync_token = 3; - * @param string $var - * @return $this - */ - public function setSyncToken($var) - { - GPBUtil::checkString($var, True); - $this->sync_token = $var; - - return $this; - } - - /** - * Deprecated: use last_sync_time instead. - * Timestamp of when ACM last successfully synced the repo - * The time format is specified in https://golang.org/pkg/time/#Time.String - * - * Generated from protobuf field string last_sync = 4 [deprecated = true]; - * @return string - * @deprecated - */ - public function getLastSync() - { - @trigger_error('last_sync is deprecated.', E_USER_DEPRECATED); - return $this->last_sync; - } - - /** - * Deprecated: use last_sync_time instead. - * Timestamp of when ACM last successfully synced the repo - * The time format is specified in https://golang.org/pkg/time/#Time.String - * - * Generated from protobuf field string last_sync = 4 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setLastSync($var) - { - @trigger_error('last_sync is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->last_sync = $var; - - return $this; - } - - /** - * Timestamp type of when ACM last successfully synced the repo - * - * Generated from protobuf field .google.protobuf.Timestamp last_sync_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastSyncTime() - { - return $this->last_sync_time; - } - - public function hasLastSyncTime() - { - return isset($this->last_sync_time); - } - - public function clearLastSyncTime() - { - unset($this->last_sync_time); - } - - /** - * Timestamp type of when ACM last successfully synced the repo - * - * Generated from protobuf field .google.protobuf.Timestamp last_sync_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastSyncTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_sync_time = $var; - - return $this; - } - - /** - * Sync status code - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.SyncState.SyncCode code = 5; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Sync status code - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.SyncState.SyncCode code = 5; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\SyncState\SyncCode::class); - $this->code = $var; - - return $this; - } - - /** - * A list of errors resulting from problematic configs. - * This list will be truncated after 100 errors, although it is - * unlikely for that many errors to simultaneously exist. - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.SyncError errors = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * A list of errors resulting from problematic configs. - * This list will be truncated after 100 errors, although it is - * unlikely for that many errors to simultaneously exist. - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.SyncError errors = 6; - * @param array<\Google\Cloud\GkeHub\ConfigManagement\V1\SyncError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\ConfigManagement\V1\SyncError::class); - $this->errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncState/SyncCode.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncState/SyncCode.php deleted file mode 100644 index 79c8f38a8fd7..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncState/SyncCode.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.SyncState.SyncCode - */ -class SyncCode -{ - /** - * Config Sync cannot determine a sync code - * - * Generated from protobuf enum SYNC_CODE_UNSPECIFIED = 0; - */ - const SYNC_CODE_UNSPECIFIED = 0; - /** - * Config Sync successfully synced the git Repo with the cluster - * - * Generated from protobuf enum SYNCED = 1; - */ - const SYNCED = 1; - /** - * Config Sync is in the progress of syncing a new change - * - * Generated from protobuf enum PENDING = 2; - */ - const PENDING = 2; - /** - * Indicates an error configuring Config Sync, and user action is required - * - * Generated from protobuf enum ERROR = 3; - */ - const ERROR = 3; - /** - * Config Sync has been installed but not configured - * - * Generated from protobuf enum NOT_CONFIGURED = 4; - */ - const NOT_CONFIGURED = 4; - /** - * Config Sync has not been installed - * - * Generated from protobuf enum NOT_INSTALLED = 5; - */ - const NOT_INSTALLED = 5; - /** - * Error authorizing with the cluster - * - * Generated from protobuf enum UNAUTHORIZED = 6; - */ - const UNAUTHORIZED = 6; - /** - * Cluster could not be reached - * - * Generated from protobuf enum UNREACHABLE = 7; - */ - const UNREACHABLE = 7; - - private static $valueToName = [ - self::SYNC_CODE_UNSPECIFIED => 'SYNC_CODE_UNSPECIFIED', - self::SYNCED => 'SYNCED', - self::PENDING => 'PENDING', - self::ERROR => 'ERROR', - self::NOT_CONFIGURED => 'NOT_CONFIGURED', - self::NOT_INSTALLED => 'NOT_INSTALLED', - self::UNAUTHORIZED => 'UNAUTHORIZED', - self::UNREACHABLE => 'UNREACHABLE', - ]; - - 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(SyncCode::class, \Google\Cloud\GkeHub\ConfigManagement\V1\SyncState_SyncCode::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/MultiClusterIngress/V1/FeatureSpec.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/MultiClusterIngress/V1/FeatureSpec.php deleted file mode 100644 index 1031f8479b15..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/MultiClusterIngress/V1/FeatureSpec.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.gkehub.multiclusteringress.v1.FeatureSpec - */ -class FeatureSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Fully-qualified Membership name which hosts the MultiClusterIngress CRD. - * Example: `projects/foo-proj/locations/global/memberships/bar` - * - * Generated from protobuf field string config_membership = 1; - */ - protected $config_membership = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $config_membership - * Fully-qualified Membership name which hosts the MultiClusterIngress CRD. - * Example: `projects/foo-proj/locations/global/memberships/bar` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Multiclusteringress\Multiclusteringress::initOnce(); - parent::__construct($data); - } - - /** - * Fully-qualified Membership name which hosts the MultiClusterIngress CRD. - * Example: `projects/foo-proj/locations/global/memberships/bar` - * - * Generated from protobuf field string config_membership = 1; - * @return string - */ - public function getConfigMembership() - { - return $this->config_membership; - } - - /** - * Fully-qualified Membership name which hosts the MultiClusterIngress CRD. - * Example: `projects/foo-proj/locations/global/memberships/bar` - * - * Generated from protobuf field string config_membership = 1; - * @param string $var - * @return $this - */ - public function setConfigMembership($var) - { - GPBUtil::checkString($var, True); - $this->config_membership = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Authority.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Authority.php deleted file mode 100644 index 7a7413afa5cd..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Authority.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.gkehub.v1.Authority - */ -class Authority extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with - * `https://` and be a valid URL with length <2000 characters. - * If set, then Google will allow valid OIDC tokens from this issuer to - * authenticate within the workload_identity_pool. OIDC discovery will be - * performed on this URI to validate tokens from the issuer. - * Clearing `issuer` disables Workload Identity. `issuer` cannot be directly - * modified; it must be cleared (and Workload Identity disabled) before using - * a new issuer (and re-enabling Workload Identity). - * - * Generated from protobuf field string issuer = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $issuer = ''; - /** - * Output only. The name of the workload identity pool in which `issuer` will - * be recognized. - * There is a single Workload Identity Pool per Hub that is shared - * between all Memberships that belong to that Hub. For a Hub hosted in - * {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, - * although this is subject to change in newer versions of this API. - * - * Generated from protobuf field string workload_identity_pool = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $workload_identity_pool = ''; - /** - * Output only. An identity provider that reflects the `issuer` in the - * workload identity pool. - * - * Generated from protobuf field string identity_provider = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $identity_provider = ''; - /** - * Optional. OIDC verification keys for this Membership in JWKS format (RFC - * 7517). - * When this field is set, OIDC discovery will NOT be performed on `issuer`, - * and instead OIDC tokens will be validated using this field. - * - * Generated from protobuf field bytes oidc_jwks = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $oidc_jwks = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $issuer - * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with - * `https://` and be a valid URL with length <2000 characters. - * If set, then Google will allow valid OIDC tokens from this issuer to - * authenticate within the workload_identity_pool. OIDC discovery will be - * performed on this URI to validate tokens from the issuer. - * Clearing `issuer` disables Workload Identity. `issuer` cannot be directly - * modified; it must be cleared (and Workload Identity disabled) before using - * a new issuer (and re-enabling Workload Identity). - * @type string $workload_identity_pool - * Output only. The name of the workload identity pool in which `issuer` will - * be recognized. - * There is a single Workload Identity Pool per Hub that is shared - * between all Memberships that belong to that Hub. For a Hub hosted in - * {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, - * although this is subject to change in newer versions of this API. - * @type string $identity_provider - * Output only. An identity provider that reflects the `issuer` in the - * workload identity pool. - * @type string $oidc_jwks - * Optional. OIDC verification keys for this Membership in JWKS format (RFC - * 7517). - * When this field is set, OIDC discovery will NOT be performed on `issuer`, - * and instead OIDC tokens will be validated using this field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with - * `https://` and be a valid URL with length <2000 characters. - * If set, then Google will allow valid OIDC tokens from this issuer to - * authenticate within the workload_identity_pool. OIDC discovery will be - * performed on this URI to validate tokens from the issuer. - * Clearing `issuer` disables Workload Identity. `issuer` cannot be directly - * modified; it must be cleared (and Workload Identity disabled) before using - * a new issuer (and re-enabling Workload Identity). - * - * Generated from protobuf field string issuer = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getIssuer() - { - return $this->issuer; - } - - /** - * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with - * `https://` and be a valid URL with length <2000 characters. - * If set, then Google will allow valid OIDC tokens from this issuer to - * authenticate within the workload_identity_pool. OIDC discovery will be - * performed on this URI to validate tokens from the issuer. - * Clearing `issuer` disables Workload Identity. `issuer` cannot be directly - * modified; it must be cleared (and Workload Identity disabled) before using - * a new issuer (and re-enabling Workload Identity). - * - * Generated from protobuf field string issuer = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setIssuer($var) - { - GPBUtil::checkString($var, True); - $this->issuer = $var; - - return $this; - } - - /** - * Output only. The name of the workload identity pool in which `issuer` will - * be recognized. - * There is a single Workload Identity Pool per Hub that is shared - * between all Memberships that belong to that Hub. For a Hub hosted in - * {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, - * although this is subject to change in newer versions of this API. - * - * Generated from protobuf field string workload_identity_pool = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getWorkloadIdentityPool() - { - return $this->workload_identity_pool; - } - - /** - * Output only. The name of the workload identity pool in which `issuer` will - * be recognized. - * There is a single Workload Identity Pool per Hub that is shared - * between all Memberships that belong to that Hub. For a Hub hosted in - * {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, - * although this is subject to change in newer versions of this API. - * - * Generated from protobuf field string workload_identity_pool = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setWorkloadIdentityPool($var) - { - GPBUtil::checkString($var, True); - $this->workload_identity_pool = $var; - - return $this; - } - - /** - * Output only. An identity provider that reflects the `issuer` in the - * workload identity pool. - * - * Generated from protobuf field string identity_provider = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getIdentityProvider() - { - return $this->identity_provider; - } - - /** - * Output only. An identity provider that reflects the `issuer` in the - * workload identity pool. - * - * Generated from protobuf field string identity_provider = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setIdentityProvider($var) - { - GPBUtil::checkString($var, True); - $this->identity_provider = $var; - - return $this; - } - - /** - * Optional. OIDC verification keys for this Membership in JWKS format (RFC - * 7517). - * When this field is set, OIDC discovery will NOT be performed on `issuer`, - * and instead OIDC tokens will be validated using this field. - * - * Generated from protobuf field bytes oidc_jwks = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOidcJwks() - { - return $this->oidc_jwks; - } - - /** - * Optional. OIDC verification keys for this Membership in JWKS format (RFC - * 7517). - * When this field is set, OIDC discovery will NOT be performed on `issuer`, - * and instead OIDC tokens will be validated using this field. - * - * Generated from protobuf field bytes oidc_jwks = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOidcJwks($var) - { - GPBUtil::checkString($var, False); - $this->oidc_jwks = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CommonFeatureSpec.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CommonFeatureSpec.php deleted file mode 100644 index 7f7c7a4ded08..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CommonFeatureSpec.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.gkehub.v1.CommonFeatureSpec - */ -class CommonFeatureSpec extends \Google\Protobuf\Internal\Message -{ - protected $feature_spec; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\MultiClusterIngress\V1\FeatureSpec $multiclusteringress - * Multicluster Ingress-specific spec. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); - parent::__construct($data); - } - - /** - * Multicluster Ingress-specific spec. - * - * Generated from protobuf field .google.cloud.gkehub.multiclusteringress.v1.FeatureSpec multiclusteringress = 102; - * @return \Google\Cloud\GkeHub\MultiClusterIngress\V1\FeatureSpec|null - */ - public function getMulticlusteringress() - { - return $this->readOneof(102); - } - - public function hasMulticlusteringress() - { - return $this->hasOneof(102); - } - - /** - * Multicluster Ingress-specific spec. - * - * Generated from protobuf field .google.cloud.gkehub.multiclusteringress.v1.FeatureSpec multiclusteringress = 102; - * @param \Google\Cloud\GkeHub\MultiClusterIngress\V1\FeatureSpec $var - * @return $this - */ - public function setMulticlusteringress($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\MultiClusterIngress\V1\FeatureSpec::class); - $this->writeOneof(102, $var); - - return $this; - } - - /** - * @return string - */ - public function getFeatureSpec() - { - return $this->whichOneof("feature_spec"); - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CommonFeatureState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CommonFeatureState.php deleted file mode 100644 index 58319d7a887c..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CommonFeatureState.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.gkehub.v1.CommonFeatureState - */ -class CommonFeatureState extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The "running state" of the Feature in this Hub. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\V1\FeatureState $state - * Output only. The "running state" of the Feature in this Hub. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The "running state" of the Feature in this Hub. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeHub\V1\FeatureState|null - */ - public function getState() - { - return $this->state; - } - - public function hasState() - { - return isset($this->state); - } - - public function clearState() - { - unset($this->state); - } - - /** - * Output only. The "running state" of the Feature in this Hub. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeHub\V1\FeatureState $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\FeatureState::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ConnectAgentResource.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ConnectAgentResource.php deleted file mode 100644 index 4514fd3f1b41..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ConnectAgentResource.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.gkehub.v1.ConnectAgentResource - */ -class ConnectAgentResource extends \Google\Protobuf\Internal\Message -{ - /** - * Kubernetes type of the resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.TypeMeta type = 1; - */ - protected $type = null; - /** - * YAML manifest of the resource. - * - * Generated from protobuf field string manifest = 2; - */ - protected $manifest = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\V1\TypeMeta $type - * Kubernetes type of the resource. - * @type string $manifest - * YAML manifest of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Kubernetes type of the resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.TypeMeta type = 1; - * @return \Google\Cloud\GkeHub\V1\TypeMeta|null - */ - public function getType() - { - return $this->type; - } - - public function hasType() - { - return isset($this->type); - } - - public function clearType() - { - unset($this->type); - } - - /** - * Kubernetes type of the resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.TypeMeta type = 1; - * @param \Google\Cloud\GkeHub\V1\TypeMeta $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\TypeMeta::class); - $this->type = $var; - - return $this; - } - - /** - * YAML manifest of the resource. - * - * Generated from protobuf field string manifest = 2; - * @return string - */ - public function getManifest() - { - return $this->manifest; - } - - /** - * YAML manifest of the resource. - * - * Generated from protobuf field string manifest = 2; - * @param string $var - * @return $this - */ - public function setManifest($var) - { - GPBUtil::checkString($var, True); - $this->manifest = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateFeatureRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateFeatureRequest.php deleted file mode 100644 index a43bc5072821..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateFeatureRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.gkehub.v1.CreateFeatureRequest - */ -class CreateFeatureRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the Feature will be created. - * Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The ID of the feature to create. - * - * Generated from protobuf field string feature_id = 2; - */ - protected $feature_id = ''; - /** - * The Feature resource to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Feature resource = 3; - */ - protected $resource = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent (project and location) where the Feature will be created. - * Specified in the format `projects/*/locations/*`. - * @param \Google\Cloud\GkeHub\V1\Feature $resource The Feature resource to create. - * @param string $featureId The ID of the feature to create. - * - * @return \Google\Cloud\GkeHub\V1\CreateFeatureRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeHub\V1\Feature $resource, string $featureId): self - { - return (new self()) - ->setParent($parent) - ->setResource($resource) - ->setFeatureId($featureId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) where the Feature will be created. - * Specified in the format `projects/*/locations/*`. - * @type string $feature_id - * The ID of the feature to create. - * @type \Google\Cloud\GkeHub\V1\Feature $resource - * The Feature resource to create. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the Feature will be created. - * Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent (project and location) where the Feature will be created. - * Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The ID of the feature to create. - * - * Generated from protobuf field string feature_id = 2; - * @return string - */ - public function getFeatureId() - { - return $this->feature_id; - } - - /** - * The ID of the feature to create. - * - * Generated from protobuf field string feature_id = 2; - * @param string $var - * @return $this - */ - public function setFeatureId($var) - { - GPBUtil::checkString($var, True); - $this->feature_id = $var; - - return $this; - } - - /** - * The Feature resource to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Feature resource = 3; - * @return \Google\Cloud\GkeHub\V1\Feature|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * The Feature resource to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Feature resource = 3; - * @param \Google\Cloud\GkeHub\V1\Feature $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Feature::class); - $this->resource = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipRequest.php deleted file mode 100644 index 7ed12c498291..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipRequest.php +++ /dev/null @@ -1,274 +0,0 @@ -google.cloud.gkehub.v1.CreateMembershipRequest - */ -class CreateMembershipRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the Memberships will be - * created. Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Client chosen ID for the membership. `membership_id` must be a - * valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string membership_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $membership_id = ''; - /** - * Required. The membership to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent (project and location) where the Memberships will be - * created. Specified in the format `projects/*/locations/*`. Please see - * {@see GkeHubClient::locationName()} for help formatting this field. - * @param \Google\Cloud\GkeHub\V1\Membership $resource Required. The membership to create. - * @param string $membershipId Required. Client chosen ID for the membership. `membership_id` must be a - * valid RFC 1123 compliant DNS label: - * - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * @return \Google\Cloud\GkeHub\V1\CreateMembershipRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeHub\V1\Membership $resource, string $membershipId): self - { - return (new self()) - ->setParent($parent) - ->setResource($resource) - ->setMembershipId($membershipId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) where the Memberships will be - * created. Specified in the format `projects/*/locations/*`. - * @type string $membership_id - * Required. Client chosen ID for the membership. `membership_id` must be a - * valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * @type \Google\Cloud\GkeHub\V1\Membership $resource - * Required. The membership to create. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the Memberships will be - * created. Specified 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 parent (project and location) where the Memberships will be - * created. Specified 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. Client chosen ID for the membership. `membership_id` must be a - * valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string membership_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMembershipId() - { - return $this->membership_id; - } - - /** - * Required. Client chosen ID for the membership. `membership_id` must be a - * valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string membership_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMembershipId($var) - { - GPBUtil::checkString($var, True); - $this->membership_id = $var; - - return $this; - } - - /** - * Required. The membership to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeHub\V1\Membership|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * Required. The membership to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeHub\V1\Membership $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Membership::class); - $this->resource = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteFeatureRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteFeatureRequest.php deleted file mode 100644 index e4859d9f53cb..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteFeatureRequest.php +++ /dev/null @@ -1,201 +0,0 @@ -google.cloud.gkehub.v1.DeleteFeatureRequest - */ -class DeleteFeatureRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Feature resource name in the format - * `projects/*/locations/*/features/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If set to true, the delete will ignore any outstanding resources for - * this Feature (that is, `FeatureState.has_resources` is set to true). These - * resources will NOT be cleaned up or modified in any way. - * - * Generated from protobuf field bool force = 2; - */ - protected $force = false; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The Feature resource name in the format - * `projects/*/locations/*/features/*`. - * - * @return \Google\Cloud\GkeHub\V1\DeleteFeatureRequest - * - * @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 Feature resource name in the format - * `projects/*/locations/*/features/*`. - * @type bool $force - * If set to true, the delete will ignore any outstanding resources for - * this Feature (that is, `FeatureState.has_resources` is set to true). These - * resources will NOT be cleaned up or modified in any way. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Feature resource name in the format - * `projects/*/locations/*/features/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The Feature resource name in the format - * `projects/*/locations/*/features/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * If set to true, the delete will ignore any outstanding resources for - * this Feature (that is, `FeatureState.has_resources` is set to true). These - * resources will NOT be cleaned up or modified in any way. - * - * Generated from protobuf field bool force = 2; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * If set to true, the delete will ignore any outstanding resources for - * this Feature (that is, `FeatureState.has_resources` is set to true). These - * resources will NOT be cleaned up or modified in any way. - * - * Generated from protobuf field bool force = 2; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipRequest.php deleted file mode 100644 index cf246161bdbe..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipRequest.php +++ /dev/null @@ -1,202 +0,0 @@ -google.cloud.gkehub.v1.DeleteMembershipRequest - */ -class DeleteMembershipRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. If set to true, any subresource from this Membership will also be - * deleted. Otherwise, the request will only work if the Membership has no - * subresource. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - - /** - * @param string $name Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. Please see - * {@see GkeHubClient::membershipName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\DeleteMembershipRequest - * - * @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 Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $force - * Optional. If set to true, any subresource from this Membership will also be - * deleted. Otherwise, the request will only work if the Membership has no - * subresource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * 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 Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set to true, any subresource from this Membership will also be - * deleted. Otherwise, the request will only work if the Membership has no - * subresource. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. If set to true, any subresource from this Membership will also be - * deleted. Otherwise, the request will only work if the Membership has no - * subresource. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Feature.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Feature.php deleted file mode 100644 index 22cbd2b42a1b..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Feature.php +++ /dev/null @@ -1,513 +0,0 @@ -google.cloud.gkehub.v1.Feature - */ -class Feature extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The full, unique name of this Feature resource in the format - * `projects/*/locations/*/features/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * GCP labels for this Feature. - * - * Generated from protobuf field map labels = 2; - */ - private $labels; - /** - * Output only. State of the Feature resource itself. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureResourceState resource_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $resource_state = null; - /** - * Optional. Hub-wide Feature configuration. If this Feature does not support any - * Hub-wide configuration, this field may be unused. - * - * Generated from protobuf field .google.cloud.gkehub.v1.CommonFeatureSpec spec = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $spec = null; - /** - * Optional. Membership-specific configuration for this Feature. If this Feature does - * not support any per-Membership configuration, this field may be unused. - * The keys indicate which Membership the configuration is for, in the form: - * projects/{p}/locations/{l}/memberships/{m} - * Where {p} is the project, {l} is a valid location and {m} is a valid - * Membership in this project at that location. {p} WILL match the Feature's - * project. - * {p} will always be returned as the project number, but the project ID is - * also accepted during input. If the same Membership is specified in the map - * twice (using the project ID form, and the project number form), exactly - * ONE of the entries will be saved, with no guarantees as to which. For this - * reason, it is recommended the same format be used for all entries when - * mutating a Feature. - * - * Generated from protobuf field map membership_specs = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $membership_specs; - /** - * Output only. The Hub-wide Feature state. - * - * Generated from protobuf field .google.cloud.gkehub.v1.CommonFeatureState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = null; - /** - * Output only. Membership-specific Feature status. If this Feature does - * report any per-Membership status, this field may be unused. - * The keys indicate which Membership the state is for, in the form: - * projects/{p}/locations/{l}/memberships/{m} - * Where {p} is the project number, {l} is a valid location and {m} is a valid - * Membership in this project at that location. {p} MUST match the Feature's - * project number. - * - * Generated from protobuf field map membership_states = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $membership_states; - /** - * Output only. When the Feature resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. When the Feature resource was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. When the Feature resource was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10 [(.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. The full, unique name of this Feature resource in the format - * `projects/*/locations/*/features/*`. - * @type array|\Google\Protobuf\Internal\MapField $labels - * GCP labels for this Feature. - * @type \Google\Cloud\GkeHub\V1\FeatureResourceState $resource_state - * Output only. State of the Feature resource itself. - * @type \Google\Cloud\GkeHub\V1\CommonFeatureSpec $spec - * Optional. Hub-wide Feature configuration. If this Feature does not support any - * Hub-wide configuration, this field may be unused. - * @type array|\Google\Protobuf\Internal\MapField $membership_specs - * Optional. Membership-specific configuration for this Feature. If this Feature does - * not support any per-Membership configuration, this field may be unused. - * The keys indicate which Membership the configuration is for, in the form: - * projects/{p}/locations/{l}/memberships/{m} - * Where {p} is the project, {l} is a valid location and {m} is a valid - * Membership in this project at that location. {p} WILL match the Feature's - * project. - * {p} will always be returned as the project number, but the project ID is - * also accepted during input. If the same Membership is specified in the map - * twice (using the project ID form, and the project number form), exactly - * ONE of the entries will be saved, with no guarantees as to which. For this - * reason, it is recommended the same format be used for all entries when - * mutating a Feature. - * @type \Google\Cloud\GkeHub\V1\CommonFeatureState $state - * Output only. The Hub-wide Feature state. - * @type array|\Google\Protobuf\Internal\MapField $membership_states - * Output only. Membership-specific Feature status. If this Feature does - * report any per-Membership status, this field may be unused. - * The keys indicate which Membership the state is for, in the form: - * projects/{p}/locations/{l}/memberships/{m} - * Where {p} is the project number, {l} is a valid location and {m} is a valid - * Membership in this project at that location. {p} MUST match the Feature's - * project number. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. When the Feature resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. When the Feature resource was last updated. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. When the Feature resource was deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The full, unique name of this Feature resource in the format - * `projects/*/locations/*/features/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The full, unique name of this Feature resource in the format - * `projects/*/locations/*/features/*`. - * - * 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; - } - - /** - * GCP labels for this Feature. - * - * Generated from protobuf field map labels = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * GCP labels for this Feature. - * - * Generated from protobuf field map labels = 2; - * @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; - } - - /** - * Output only. State of the Feature resource itself. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureResourceState resource_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeHub\V1\FeatureResourceState|null - */ - public function getResourceState() - { - return $this->resource_state; - } - - public function hasResourceState() - { - return isset($this->resource_state); - } - - public function clearResourceState() - { - unset($this->resource_state); - } - - /** - * Output only. State of the Feature resource itself. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureResourceState resource_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeHub\V1\FeatureResourceState $var - * @return $this - */ - public function setResourceState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\FeatureResourceState::class); - $this->resource_state = $var; - - return $this; - } - - /** - * Optional. Hub-wide Feature configuration. If this Feature does not support any - * Hub-wide configuration, this field may be unused. - * - * Generated from protobuf field .google.cloud.gkehub.v1.CommonFeatureSpec spec = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1\CommonFeatureSpec|null - */ - public function getSpec() - { - return $this->spec; - } - - public function hasSpec() - { - return isset($this->spec); - } - - public function clearSpec() - { - unset($this->spec); - } - - /** - * Optional. Hub-wide Feature configuration. If this Feature does not support any - * Hub-wide configuration, this field may be unused. - * - * Generated from protobuf field .google.cloud.gkehub.v1.CommonFeatureSpec spec = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1\CommonFeatureSpec $var - * @return $this - */ - public function setSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\CommonFeatureSpec::class); - $this->spec = $var; - - return $this; - } - - /** - * Optional. Membership-specific configuration for this Feature. If this Feature does - * not support any per-Membership configuration, this field may be unused. - * The keys indicate which Membership the configuration is for, in the form: - * projects/{p}/locations/{l}/memberships/{m} - * Where {p} is the project, {l} is a valid location and {m} is a valid - * Membership in this project at that location. {p} WILL match the Feature's - * project. - * {p} will always be returned as the project number, but the project ID is - * also accepted during input. If the same Membership is specified in the map - * twice (using the project ID form, and the project number form), exactly - * ONE of the entries will be saved, with no guarantees as to which. For this - * reason, it is recommended the same format be used for all entries when - * mutating a Feature. - * - * Generated from protobuf field map membership_specs = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMembershipSpecs() - { - return $this->membership_specs; - } - - /** - * Optional. Membership-specific configuration for this Feature. If this Feature does - * not support any per-Membership configuration, this field may be unused. - * The keys indicate which Membership the configuration is for, in the form: - * projects/{p}/locations/{l}/memberships/{m} - * Where {p} is the project, {l} is a valid location and {m} is a valid - * Membership in this project at that location. {p} WILL match the Feature's - * project. - * {p} will always be returned as the project number, but the project ID is - * also accepted during input. If the same Membership is specified in the map - * twice (using the project ID form, and the project number form), exactly - * ONE of the entries will be saved, with no guarantees as to which. For this - * reason, it is recommended the same format be used for all entries when - * mutating a Feature. - * - * Generated from protobuf field map membership_specs = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMembershipSpecs($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\MembershipFeatureSpec::class); - $this->membership_specs = $arr; - - return $this; - } - - /** - * Output only. The Hub-wide Feature state. - * - * Generated from protobuf field .google.cloud.gkehub.v1.CommonFeatureState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeHub\V1\CommonFeatureState|null - */ - public function getState() - { - return $this->state; - } - - public function hasState() - { - return isset($this->state); - } - - public function clearState() - { - unset($this->state); - } - - /** - * Output only. The Hub-wide Feature state. - * - * Generated from protobuf field .google.cloud.gkehub.v1.CommonFeatureState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeHub\V1\CommonFeatureState $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\CommonFeatureState::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Membership-specific Feature status. If this Feature does - * report any per-Membership status, this field may be unused. - * The keys indicate which Membership the state is for, in the form: - * projects/{p}/locations/{l}/memberships/{m} - * Where {p} is the project number, {l} is a valid location and {m} is a valid - * Membership in this project at that location. {p} MUST match the Feature's - * project number. - * - * Generated from protobuf field map membership_states = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMembershipStates() - { - return $this->membership_states; - } - - /** - * Output only. Membership-specific Feature status. If this Feature does - * report any per-Membership status, this field may be unused. - * The keys indicate which Membership the state is for, in the form: - * projects/{p}/locations/{l}/memberships/{m} - * Where {p} is the project number, {l} is a valid location and {m} is a valid - * Membership in this project at that location. {p} MUST match the Feature's - * project number. - * - * Generated from protobuf field map membership_states = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMembershipStates($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\MembershipFeatureState::class); - $this->membership_states = $arr; - - return $this; - } - - /** - * Output only. When the Feature resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.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. When the Feature resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.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. When the Feature resource was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. When the Feature resource was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. When the Feature resource was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10 [(.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. When the Feature resource was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10 [(.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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureResourceState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureResourceState.php deleted file mode 100644 index 52b5f7983c2f..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureResourceState.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.gkehub.v1.FeatureResourceState - */ -class FeatureResourceState extends \Google\Protobuf\Internal\Message -{ - /** - * The current state of the Feature resource in the Hub API. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureResourceState.State state = 1; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The current state of the Feature resource in the Hub API. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); - parent::__construct($data); - } - - /** - * The current state of the Feature resource in the Hub API. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureResourceState.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the Feature resource in the Hub API. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureResourceState.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\FeatureResourceState\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureResourceState/State.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureResourceState/State.php deleted file mode 100644 index 127008cae944..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureResourceState/State.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.gkehub.v1.FeatureResourceState.State - */ -class State -{ - /** - * State is unknown or not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The Feature is being enabled, and the Feature resource is being created. - * Once complete, the corresponding Feature will be enabled in this Hub. - * - * Generated from protobuf enum ENABLING = 1; - */ - const ENABLING = 1; - /** - * The Feature is enabled in this Hub, and the Feature resource is fully - * available. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The Feature is being disabled in this Hub, and the Feature resource - * is being deleted. - * - * Generated from protobuf enum DISABLING = 3; - */ - const DISABLING = 3; - /** - * The Feature resource is being updated. - * - * Generated from protobuf enum UPDATING = 4; - */ - const UPDATING = 4; - /** - * The Feature resource is being updated by the Hub Service. - * - * Generated from protobuf enum SERVICE_UPDATING = 5; - */ - const SERVICE_UPDATING = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ENABLING => 'ENABLING', - self::ACTIVE => 'ACTIVE', - self::DISABLING => 'DISABLING', - self::UPDATING => 'UPDATING', - self::SERVICE_UPDATING => 'SERVICE_UPDATING', - ]; - - 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\GkeHub\V1\FeatureResourceState_State::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureState.php deleted file mode 100644 index d2188bb9360d..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureState.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.gkehub.v1.FeatureState - */ -class FeatureState extends \Google\Protobuf\Internal\Message -{ - /** - * The high-level, machine-readable status of this Feature. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState.Code code = 1; - */ - protected $code = 0; - /** - * A human-readable description of the current status. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * The time this status and any related Feature-specific details were updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * The high-level, machine-readable status of this Feature. - * @type string $description - * A human-readable description of the current status. - * @type \Google\Protobuf\Timestamp $update_time - * The time this status and any related Feature-specific details were updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); - parent::__construct($data); - } - - /** - * The high-level, machine-readable status of this Feature. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState.Code code = 1; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * The high-level, machine-readable status of this Feature. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState.Code code = 1; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\FeatureState\Code::class); - $this->code = $var; - - return $this; - } - - /** - * A human-readable description of the current status. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A human-readable description of the current status. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The time this status and any related Feature-specific details were updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * The time this status and any related Feature-specific details were updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureState/Code.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureState/Code.php deleted file mode 100644 index 5fe378f63660..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureState/Code.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.gkehub.v1.FeatureState.Code - */ -class Code -{ - /** - * Unknown or not set. - * - * Generated from protobuf enum CODE_UNSPECIFIED = 0; - */ - const CODE_UNSPECIFIED = 0; - /** - * The Feature is operating normally. - * - * Generated from protobuf enum OK = 1; - */ - const OK = 1; - /** - * The Feature has encountered an issue, and is operating in a degraded - * state. The Feature may need intervention to return to normal operation. - * See the description and any associated Feature-specific details for more - * information. - * - * Generated from protobuf enum WARNING = 2; - */ - const WARNING = 2; - /** - * The Feature is not operating or is in a severely degraded state. - * The Feature may need intervention to return to normal operation. - * See the description and any associated Feature-specific details for more - * information. - * - * Generated from protobuf enum ERROR = 3; - */ - const ERROR = 3; - - private static $valueToName = [ - self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', - self::OK => 'OK', - self::WARNING => 'WARNING', - self::ERROR => 'ERROR', - ]; - - 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(Code::class, \Google\Cloud\GkeHub\V1\FeatureState_Code::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateConnectManifestRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateConnectManifestRequest.php deleted file mode 100644 index 70f450cccddc..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateConnectManifestRequest.php +++ /dev/null @@ -1,321 +0,0 @@ -google.cloud.gkehub.v1.GenerateConnectManifestRequest - */ -class GenerateConnectManifestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Membership resource name the Agent will associate with, in - * the format `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Namespace for GKE Connect agent resources. Defaults to - * `gke-connect`. - * The Connect Agent is authorized automatically when run in the default - * namespace. Otherwise, explicit authorization must be granted with an - * additional IAM binding. - * - * Generated from protobuf field string namespace = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $namespace = ''; - /** - * Optional. URI of a proxy if connectivity from the agent to - * gkeconnect.googleapis.com requires the use of a proxy. Format must be in - * the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol - * supported by the proxy. This will direct the connect agent's outbound - * traffic through a HTTP(S) proxy. - * - * Generated from protobuf field bytes proxy = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $proxy = ''; - /** - * Optional. The Connect agent version to use. Defaults to the most current - * version. - * - * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $version = ''; - /** - * Optional. If true, generate the resources for upgrade only. Some resources - * generated only for installation (e.g. secrets) will be excluded. - * - * Generated from protobuf field bool is_upgrade = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $is_upgrade = false; - /** - * Optional. The registry to fetch the connect agent image from. Defaults to - * gcr.io/gkeconnect. - * - * Generated from protobuf field string registry = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $registry = ''; - /** - * Optional. The image pull secret content for the registry, if not public. - * - * Generated from protobuf field bytes image_pull_secret_content = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $image_pull_secret_content = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The Membership resource name the Agent will associate with, in - * the format `projects/*/locations/*/memberships/*`. - * @type string $namespace - * Optional. Namespace for GKE Connect agent resources. Defaults to - * `gke-connect`. - * The Connect Agent is authorized automatically when run in the default - * namespace. Otherwise, explicit authorization must be granted with an - * additional IAM binding. - * @type string $proxy - * Optional. URI of a proxy if connectivity from the agent to - * gkeconnect.googleapis.com requires the use of a proxy. Format must be in - * the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol - * supported by the proxy. This will direct the connect agent's outbound - * traffic through a HTTP(S) proxy. - * @type string $version - * Optional. The Connect agent version to use. Defaults to the most current - * version. - * @type bool $is_upgrade - * Optional. If true, generate the resources for upgrade only. Some resources - * generated only for installation (e.g. secrets) will be excluded. - * @type string $registry - * Optional. The registry to fetch the connect agent image from. Defaults to - * gcr.io/gkeconnect. - * @type string $image_pull_secret_content - * Optional. The image pull secret content for the registry, if not public. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Membership resource name the Agent will associate with, in - * the format `projects/*/locations/*/memberships/*`. - * - * 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 Membership resource name the Agent will associate with, in - * the format `projects/*/locations/*/memberships/*`. - * - * 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. Namespace for GKE Connect agent resources. Defaults to - * `gke-connect`. - * The Connect Agent is authorized automatically when run in the default - * namespace. Otherwise, explicit authorization must be granted with an - * additional IAM binding. - * - * Generated from protobuf field string namespace = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNamespace() - { - return $this->namespace; - } - - /** - * Optional. Namespace for GKE Connect agent resources. Defaults to - * `gke-connect`. - * The Connect Agent is authorized automatically when run in the default - * namespace. Otherwise, explicit authorization must be granted with an - * additional IAM binding. - * - * Generated from protobuf field string namespace = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setNamespace($var) - { - GPBUtil::checkString($var, True); - $this->namespace = $var; - - return $this; - } - - /** - * Optional. URI of a proxy if connectivity from the agent to - * gkeconnect.googleapis.com requires the use of a proxy. Format must be in - * the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol - * supported by the proxy. This will direct the connect agent's outbound - * traffic through a HTTP(S) proxy. - * - * Generated from protobuf field bytes proxy = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getProxy() - { - return $this->proxy; - } - - /** - * Optional. URI of a proxy if connectivity from the agent to - * gkeconnect.googleapis.com requires the use of a proxy. Format must be in - * the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol - * supported by the proxy. This will direct the connect agent's outbound - * traffic through a HTTP(S) proxy. - * - * Generated from protobuf field bytes proxy = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setProxy($var) - { - GPBUtil::checkString($var, False); - $this->proxy = $var; - - return $this; - } - - /** - * Optional. The Connect agent version to use. Defaults to the most current - * version. - * - * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Optional. The Connect agent version to use. Defaults to the most current - * version. - * - * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Optional. If true, generate the resources for upgrade only. Some resources - * generated only for installation (e.g. secrets) will be excluded. - * - * Generated from protobuf field bool is_upgrade = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIsUpgrade() - { - return $this->is_upgrade; - } - - /** - * Optional. If true, generate the resources for upgrade only. Some resources - * generated only for installation (e.g. secrets) will be excluded. - * - * Generated from protobuf field bool is_upgrade = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIsUpgrade($var) - { - GPBUtil::checkBool($var); - $this->is_upgrade = $var; - - return $this; - } - - /** - * Optional. The registry to fetch the connect agent image from. Defaults to - * gcr.io/gkeconnect. - * - * Generated from protobuf field string registry = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRegistry() - { - return $this->registry; - } - - /** - * Optional. The registry to fetch the connect agent image from. Defaults to - * gcr.io/gkeconnect. - * - * Generated from protobuf field string registry = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRegistry($var) - { - GPBUtil::checkString($var, True); - $this->registry = $var; - - return $this; - } - - /** - * Optional. The image pull secret content for the registry, if not public. - * - * Generated from protobuf field bytes image_pull_secret_content = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getImagePullSecretContent() - { - return $this->image_pull_secret_content; - } - - /** - * Optional. The image pull secret content for the registry, if not public. - * - * Generated from protobuf field bytes image_pull_secret_content = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setImagePullSecretContent($var) - { - GPBUtil::checkString($var, False); - $this->image_pull_secret_content = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateConnectManifestResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateConnectManifestResponse.php deleted file mode 100644 index fbecc64a2c15..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateConnectManifestResponse.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.gkehub.v1.GenerateConnectManifestResponse - */ -class GenerateConnectManifestResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The ordered list of Kubernetes resources that need to be applied to the - * cluster for GKE Connect agent installation/upgrade. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.ConnectAgentResource manifest = 1; - */ - private $manifest; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeHub\V1\ConnectAgentResource>|\Google\Protobuf\Internal\RepeatedField $manifest - * The ordered list of Kubernetes resources that need to be applied to the - * cluster for GKE Connect agent installation/upgrade. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The ordered list of Kubernetes resources that need to be applied to the - * cluster for GKE Connect agent installation/upgrade. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.ConnectAgentResource manifest = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getManifest() - { - return $this->manifest; - } - - /** - * The ordered list of Kubernetes resources that need to be applied to the - * cluster for GKE Connect agent installation/upgrade. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.ConnectAgentResource manifest = 1; - * @param array<\Google\Cloud\GkeHub\V1\ConnectAgentResource>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setManifest($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\ConnectAgentResource::class); - $this->manifest = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetFeatureRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetFeatureRequest.php deleted file mode 100644 index 5fd540450a6b..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetFeatureRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.gkehub.v1.GetFeatureRequest - */ -class GetFeatureRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Feature resource name in the format - * `projects/*/locations/*/features/*` - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The Feature resource name in the format - * `projects/*/locations/*/features/*` - * - * @return \Google\Cloud\GkeHub\V1\GetFeatureRequest - * - * @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 Feature resource name in the format - * `projects/*/locations/*/features/*` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Feature resource name in the format - * `projects/*/locations/*/features/*` - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The Feature resource name in the format - * `projects/*/locations/*/features/*` - * - * Generated from protobuf field string name = 1 [(.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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipRequest.php deleted file mode 100644 index 8f1b1f43d5a4..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.gkehub.v1.GetMembershipRequest - */ -class GetMembershipRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. Please see - * {@see GkeHubClient::membershipName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\GetMembershipRequest - * - * @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 Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * 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 Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GkeCluster.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GkeCluster.php deleted file mode 100644 index 5fc98881e773..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GkeCluster.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.gkehub.v1.GkeCluster - */ -class GkeCluster extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. Self-link of the Google Cloud resource for the GKE cluster. For - * example: - * //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster - * Zonal clusters are also supported. - * - * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $resource_link = ''; - /** - * Output only. If cluster_missing is set then it denotes that the GKE cluster - * no longer exists in the GKE Control Plane. - * - * Generated from protobuf field bool cluster_missing = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster_missing = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource_link - * Immutable. Self-link of the Google Cloud resource for the GKE cluster. For - * example: - * //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster - * Zonal clusters are also supported. - * @type bool $cluster_missing - * Output only. If cluster_missing is set then it denotes that the GKE cluster - * no longer exists in the GKE Control Plane. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. Self-link of the Google Cloud resource for the GKE cluster. For - * example: - * //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster - * Zonal clusters are also supported. - * - * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getResourceLink() - { - return $this->resource_link; - } - - /** - * Immutable. Self-link of the Google Cloud resource for the GKE cluster. For - * example: - * //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster - * Zonal clusters are also supported. - * - * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setResourceLink($var) - { - GPBUtil::checkString($var, True); - $this->resource_link = $var; - - return $this; - } - - /** - * Output only. If cluster_missing is set then it denotes that the GKE cluster - * no longer exists in the GKE Control Plane. - * - * Generated from protobuf field bool cluster_missing = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getClusterMissing() - { - return $this->cluster_missing; - } - - /** - * Output only. If cluster_missing is set then it denotes that the GKE cluster - * no longer exists in the GKE Control Plane. - * - * Generated from protobuf field bool cluster_missing = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setClusterMissing($var) - { - GPBUtil::checkBool($var); - $this->cluster_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/KubernetesMetadata.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/KubernetesMetadata.php deleted file mode 100644 index 54fd9c79de89..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/KubernetesMetadata.php +++ /dev/null @@ -1,276 +0,0 @@ -google.cloud.gkehub.v1.KubernetesMetadata - */ -class KubernetesMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Kubernetes API server version string as reported by - * `/version`. - * - * Generated from protobuf field string kubernetes_api_server_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $kubernetes_api_server_version = ''; - /** - * Output only. Node providerID as reported by the first node in the list of - * nodes on the Kubernetes endpoint. On Kubernetes platforms that support - * zero-node clusters (like GKE-on-GCP), the node_count will be zero and the - * node_provider_id will be empty. - * - * Generated from protobuf field string node_provider_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $node_provider_id = ''; - /** - * Output only. Node count as reported by Kubernetes nodes resources. - * - * Generated from protobuf field int32 node_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $node_count = 0; - /** - * Output only. vCPU count as reported by Kubernetes nodes resources. - * - * Generated from protobuf field int32 vcpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $vcpu_count = 0; - /** - * Output only. The total memory capacity as reported by the sum of all - * Kubernetes nodes resources, defined in MB. - * - * Generated from protobuf field int32 memory_mb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $memory_mb = 0; - /** - * Output only. The time at which these details were last updated. This - * update_time is different from the Membership-level update_time since - * EndpointDetails are updated internally for API consumers. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kubernetes_api_server_version - * Output only. Kubernetes API server version string as reported by - * `/version`. - * @type string $node_provider_id - * Output only. Node providerID as reported by the first node in the list of - * nodes on the Kubernetes endpoint. On Kubernetes platforms that support - * zero-node clusters (like GKE-on-GCP), the node_count will be zero and the - * node_provider_id will be empty. - * @type int $node_count - * Output only. Node count as reported by Kubernetes nodes resources. - * @type int $vcpu_count - * Output only. vCPU count as reported by Kubernetes nodes resources. - * @type int $memory_mb - * Output only. The total memory capacity as reported by the sum of all - * Kubernetes nodes resources, defined in MB. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which these details were last updated. This - * update_time is different from the Membership-level update_time since - * EndpointDetails are updated internally for API consumers. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Kubernetes API server version string as reported by - * `/version`. - * - * Generated from protobuf field string kubernetes_api_server_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getKubernetesApiServerVersion() - { - return $this->kubernetes_api_server_version; - } - - /** - * Output only. Kubernetes API server version string as reported by - * `/version`. - * - * Generated from protobuf field string kubernetes_api_server_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setKubernetesApiServerVersion($var) - { - GPBUtil::checkString($var, True); - $this->kubernetes_api_server_version = $var; - - return $this; - } - - /** - * Output only. Node providerID as reported by the first node in the list of - * nodes on the Kubernetes endpoint. On Kubernetes platforms that support - * zero-node clusters (like GKE-on-GCP), the node_count will be zero and the - * node_provider_id will be empty. - * - * Generated from protobuf field string node_provider_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNodeProviderId() - { - return $this->node_provider_id; - } - - /** - * Output only. Node providerID as reported by the first node in the list of - * nodes on the Kubernetes endpoint. On Kubernetes platforms that support - * zero-node clusters (like GKE-on-GCP), the node_count will be zero and the - * node_provider_id will be empty. - * - * Generated from protobuf field string node_provider_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNodeProviderId($var) - { - GPBUtil::checkString($var, True); - $this->node_provider_id = $var; - - return $this; - } - - /** - * Output only. Node count as reported by Kubernetes nodes resources. - * - * Generated from protobuf field int32 node_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getNodeCount() - { - return $this->node_count; - } - - /** - * Output only. Node count as reported by Kubernetes nodes resources. - * - * Generated from protobuf field int32 node_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->node_count = $var; - - return $this; - } - - /** - * Output only. vCPU count as reported by Kubernetes nodes resources. - * - * Generated from protobuf field int32 vcpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getVcpuCount() - { - return $this->vcpu_count; - } - - /** - * Output only. vCPU count as reported by Kubernetes nodes resources. - * - * Generated from protobuf field int32 vcpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setVcpuCount($var) - { - GPBUtil::checkInt32($var); - $this->vcpu_count = $var; - - return $this; - } - - /** - * Output only. The total memory capacity as reported by the sum of all - * Kubernetes nodes resources, defined in MB. - * - * Generated from protobuf field int32 memory_mb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getMemoryMb() - { - return $this->memory_mb; - } - - /** - * Output only. The total memory capacity as reported by the sum of all - * Kubernetes nodes resources, defined in MB. - * - * Generated from protobuf field int32 memory_mb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setMemoryMb($var) - { - GPBUtil::checkInt32($var); - $this->memory_mb = $var; - - return $this; - } - - /** - * Output only. The time at which these details were last updated. This - * update_time is different from the Membership-level update_time since - * EndpointDetails are updated internally for API consumers. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time at which these details were last updated. This - * update_time is different from the Membership-level update_time since - * EndpointDetails are updated internally for API consumers. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/KubernetesResource.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/KubernetesResource.php deleted file mode 100644 index 6bd38f96b363..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/KubernetesResource.php +++ /dev/null @@ -1,245 +0,0 @@ -google.cloud.gkehub.v1.KubernetesResource - */ -class KubernetesResource extends \Google\Protobuf\Internal\Message -{ - /** - * Input only. The YAML representation of the Membership CR. This field is - * ignored for GKE clusters where Hub can read the CR directly. - * Callers should provide the CR that is currently present in the cluster - * during CreateMembership or UpdateMembership, or leave this field empty if - * none exists. The CR manifest is used to validate the cluster has not been - * registered with another Membership. - * - * Generated from protobuf field string membership_cr_manifest = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $membership_cr_manifest = ''; - /** - * Output only. Additional Kubernetes resources that need to be applied to the - * cluster after Membership creation, and after every update. - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.ResourceManifest membership_resources = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $membership_resources; - /** - * Output only. The Kubernetes resources for installing the GKE Connect agent - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.ResourceManifest connect_resources = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $connect_resources; - /** - * Optional. Options for Kubernetes resource generation. - * - * Generated from protobuf field .google.cloud.gkehub.v1.ResourceOptions resource_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $resource_options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $membership_cr_manifest - * Input only. The YAML representation of the Membership CR. This field is - * ignored for GKE clusters where Hub can read the CR directly. - * Callers should provide the CR that is currently present in the cluster - * during CreateMembership or UpdateMembership, or leave this field empty if - * none exists. The CR manifest is used to validate the cluster has not been - * registered with another Membership. - * @type array<\Google\Cloud\GkeHub\V1\ResourceManifest>|\Google\Protobuf\Internal\RepeatedField $membership_resources - * Output only. Additional Kubernetes resources that need to be applied to the - * cluster after Membership creation, and after every update. - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * @type array<\Google\Cloud\GkeHub\V1\ResourceManifest>|\Google\Protobuf\Internal\RepeatedField $connect_resources - * Output only. The Kubernetes resources for installing the GKE Connect agent - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * @type \Google\Cloud\GkeHub\V1\ResourceOptions $resource_options - * Optional. Options for Kubernetes resource generation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Input only. The YAML representation of the Membership CR. This field is - * ignored for GKE clusters where Hub can read the CR directly. - * Callers should provide the CR that is currently present in the cluster - * during CreateMembership or UpdateMembership, or leave this field empty if - * none exists. The CR manifest is used to validate the cluster has not been - * registered with another Membership. - * - * Generated from protobuf field string membership_cr_manifest = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getMembershipCrManifest() - { - return $this->membership_cr_manifest; - } - - /** - * Input only. The YAML representation of the Membership CR. This field is - * ignored for GKE clusters where Hub can read the CR directly. - * Callers should provide the CR that is currently present in the cluster - * during CreateMembership or UpdateMembership, or leave this field empty if - * none exists. The CR manifest is used to validate the cluster has not been - * registered with another Membership. - * - * Generated from protobuf field string membership_cr_manifest = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMembershipCrManifest($var) - { - GPBUtil::checkString($var, True); - $this->membership_cr_manifest = $var; - - return $this; - } - - /** - * Output only. Additional Kubernetes resources that need to be applied to the - * cluster after Membership creation, and after every update. - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.ResourceManifest membership_resources = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMembershipResources() - { - return $this->membership_resources; - } - - /** - * Output only. Additional Kubernetes resources that need to be applied to the - * cluster after Membership creation, and after every update. - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.ResourceManifest membership_resources = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\GkeHub\V1\ResourceManifest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMembershipResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\ResourceManifest::class); - $this->membership_resources = $arr; - - return $this; - } - - /** - * Output only. The Kubernetes resources for installing the GKE Connect agent - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.ResourceManifest connect_resources = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConnectResources() - { - return $this->connect_resources; - } - - /** - * Output only. The Kubernetes resources for installing the GKE Connect agent - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.ResourceManifest connect_resources = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\GkeHub\V1\ResourceManifest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConnectResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\ResourceManifest::class); - $this->connect_resources = $arr; - - return $this; - } - - /** - * Optional. Options for Kubernetes resource generation. - * - * Generated from protobuf field .google.cloud.gkehub.v1.ResourceOptions resource_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1\ResourceOptions|null - */ - public function getResourceOptions() - { - return $this->resource_options; - } - - public function hasResourceOptions() - { - return isset($this->resource_options); - } - - public function clearResourceOptions() - { - unset($this->resource_options); - } - - /** - * Optional. Options for Kubernetes resource generation. - * - * Generated from protobuf field .google.cloud.gkehub.v1.ResourceOptions resource_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1\ResourceOptions $var - * @return $this - */ - public function setResourceOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\ResourceOptions::class); - $this->resource_options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFeaturesRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFeaturesRequest.php deleted file mode 100644 index 9916c87cca13..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFeaturesRequest.php +++ /dev/null @@ -1,273 +0,0 @@ -google.cloud.gkehub.v1.ListFeaturesRequest - */ -class ListFeaturesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the Features will be listed. - * Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be returned. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Token returned by previous call to `ListFeatures` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Lists Features that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. - * Examples: - * - Feature with the name "servicemesh" in project "foo-proj": - * name = "projects/foo-proj/locations/global/features/servicemesh" - * - Features that have a label called `foo`: - * labels.foo:* - * - Features that have a label called `foo` whose value is `bar`: - * labels.foo = bar - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent (project and location) where the Features will be listed. - * Specified in the format `projects/*/locations/*`. - * - * @return \Google\Cloud\GkeHub\V1\ListFeaturesRequest - * - * @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 parent (project and location) where the Features will be listed. - * Specified in the format `projects/*/locations/*`. - * @type int $page_size - * When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be returned. - * @type string $page_token - * Token returned by previous call to `ListFeatures` which - * specifies the position in the list from where to continue listing the - * resources. - * @type string $filter - * Lists Features that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. - * Examples: - * - Feature with the name "servicemesh" in project "foo-proj": - * name = "projects/foo-proj/locations/global/features/servicemesh" - * - Features that have a label called `foo`: - * labels.foo:* - * - Features that have a label called `foo` whose value is `bar`: - * labels.foo = bar - * @type string $order_by - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the Features will be listed. - * Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent (project and location) where the Features will be listed. - * Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be returned. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be returned. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Token returned by previous call to `ListFeatures` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Token returned by previous call to `ListFeatures` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Lists Features that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. - * Examples: - * - Feature with the name "servicemesh" in project "foo-proj": - * name = "projects/foo-proj/locations/global/features/servicemesh" - * - Features that have a label called `foo`: - * labels.foo:* - * - Features that have a label called `foo` whose value is `bar`: - * labels.foo = bar - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Lists Features that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. - * Examples: - * - Feature with the name "servicemesh" in project "foo-proj": - * name = "projects/foo-proj/locations/global/features/servicemesh" - * - Features that have a label called `foo`: - * labels.foo:* - * - Features that have a label called `foo` whose value is `bar`: - * labels.foo = bar - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5; - * @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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFeaturesResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFeaturesResponse.php deleted file mode 100644 index a1b284439a46..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFeaturesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkehub.v1.ListFeaturesResponse - */ -class ListFeaturesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of matching Features - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Feature resources = 1; - */ - private $resources; - /** - * A token to request the next page of resources from the - * `ListFeatures` method. The value of an empty string means - * that there are no more resources to return. - * - * 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\GkeHub\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $resources - * The list of matching Features - * @type string $next_page_token - * A token to request the next page of resources from the - * `ListFeatures` method. The value of an empty string means - * that there are no more resources to return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of matching Features - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Feature resources = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResources() - { - return $this->resources; - } - - /** - * The list of matching Features - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Feature resources = 1; - * @param array<\Google\Cloud\GkeHub\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\Feature::class); - $this->resources = $arr; - - return $this; - } - - /** - * A token to request the next page of resources from the - * `ListFeatures` method. The value of an empty string means - * that there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to request the next page of resources from the - * `ListFeatures` method. The value of an empty string means - * that there are no more resources to return. - * - * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipsRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipsRequest.php deleted file mode 100644 index 4ae0d7ee4984..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipsRequest.php +++ /dev/null @@ -1,287 +0,0 @@ -google.cloud.gkehub.v1.ListMembershipsRequest - */ -class ListMembershipsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the Memberships will be - * listed. Specified in the format `projects/*/locations/*`. - * `projects/*/locations/-` list memberships in all the regions. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Token returned by previous call to `ListMemberships` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Lists Memberships that match the filter expression, following the - * syntax outlined in https://google.aip.dev/160. - * Examples: - * - Name is `bar` in project `foo-proj` and location `global`: - * name = "projects/foo-proj/locations/global/membership/bar" - * - Memberships that have a label called `foo`: - * labels.foo:* - * - Memberships that have a label called `foo` whose value is `bar`: - * labels.foo = bar - * - Memberships in the CREATING state: - * state = CREATING - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent (project and location) where the Memberships will be - * listed. Specified in the format `projects/*/locations/*`. - * `projects/*/locations/-` list memberships in all the regions. Please see - * {@see GkeHubClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\ListMembershipsRequest - * - * @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 parent (project and location) where the Memberships will be - * listed. Specified in the format `projects/*/locations/*`. - * `projects/*/locations/-` list memberships in all the regions. - * @type int $page_size - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * @type string $page_token - * Optional. Token returned by previous call to `ListMemberships` which - * specifies the position in the list from where to continue listing the - * resources. - * @type string $filter - * Optional. Lists Memberships that match the filter expression, following the - * syntax outlined in https://google.aip.dev/160. - * Examples: - * - Name is `bar` in project `foo-proj` and location `global`: - * name = "projects/foo-proj/locations/global/membership/bar" - * - Memberships that have a label called `foo`: - * labels.foo:* - * - Memberships that have a label called `foo` whose value is `bar`: - * labels.foo = bar - * - Memberships in the CREATING state: - * state = CREATING - * @type string $order_by - * Optional. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the Memberships will be - * listed. Specified in the format `projects/*/locations/*`. - * `projects/*/locations/-` list memberships in all the regions. - * - * 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 parent (project and location) where the Memberships will be - * listed. Specified in the format `projects/*/locations/*`. - * `projects/*/locations/-` list memberships in all the regions. - * - * 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. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * 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. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * 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. Token returned by previous call to `ListMemberships` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Token returned by previous call to `ListMemberships` which - * specifies the position in the list from where to continue listing the - * resources. - * - * 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. Lists Memberships that match the filter expression, following the - * syntax outlined in https://google.aip.dev/160. - * Examples: - * - Name is `bar` in project `foo-proj` and location `global`: - * name = "projects/foo-proj/locations/global/membership/bar" - * - Memberships that have a label called `foo`: - * labels.foo:* - * - Memberships that have a label called `foo` whose value is `bar`: - * labels.foo = bar - * - Memberships in the CREATING state: - * state = CREATING - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Lists Memberships that match the filter expression, following the - * syntax outlined in https://google.aip.dev/160. - * Examples: - * - Name is `bar` in project `foo-proj` and location `global`: - * name = "projects/foo-proj/locations/global/membership/bar" - * - Memberships that have a label called `foo`: - * labels.foo:* - * - Memberships that have a label called `foo` whose value is `bar`: - * labels.foo = bar - * - Memberships in the CREATING state: - * state = CREATING - * - * 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. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipsResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipsResponse.php deleted file mode 100644 index 401758bd06e4..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipsResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.gkehub.v1.ListMembershipsResponse - */ -class ListMembershipsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of matching Memberships. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Membership resources = 1; - */ - private $resources; - /** - * A token to request the next page of resources from the - * `ListMemberships` method. The value of an empty string means that - * there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * List of locations that could not be reached while fetching this list. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeHub\V1\Membership>|\Google\Protobuf\Internal\RepeatedField $resources - * The list of matching Memberships. - * @type string $next_page_token - * A token to request the next page of resources from the - * `ListMemberships` method. The value of an empty string means that - * there are no more resources to return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * List of locations that could not be reached while fetching this list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of matching Memberships. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Membership resources = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResources() - { - return $this->resources; - } - - /** - * The list of matching Memberships. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Membership resources = 1; - * @param array<\Google\Cloud\GkeHub\V1\Membership>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\Membership::class); - $this->resources = $arr; - - return $this; - } - - /** - * A token to request the next page of resources from the - * `ListMemberships` method. The value of an empty string means that - * there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to request the next page of resources from the - * `ListMemberships` method. The value of an empty string means that - * there are no more resources to return. - * - * 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; - } - - /** - * List of locations that could not be reached while fetching this list. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * List of locations that could not be reached while fetching this list. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Membership.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Membership.php deleted file mode 100644 index 38ddfe562907..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Membership.php +++ /dev/null @@ -1,641 +0,0 @@ -google.cloud.gkehub.v1.Membership - */ -class Membership extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The full, unique name of this Membership resource in the - * format `projects/*/locations/*/memberships/{membership_id}`, set during - * creation. - * `membership_id` must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Optional. Labels for this membership. - * - * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Output only. Description of this membership, limited to 63 characters. - * Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*` - * This field is present for legacy purposes. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $description = ''; - /** - * Output only. State of the Membership resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = null; - /** - * Output only. When the Membership was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. When the Membership was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. When the Membership was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Optional. An externally-generated and managed ID for this Membership. This - * ID may be modified after creation, but this is not recommended. - * The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` - * If this Membership represents a Kubernetes cluster, this value should be - * set to the UID of the `kube-system` namespace object. - * - * Generated from protobuf field string external_id = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $external_id = ''; - /** - * Output only. For clusters using Connect, the timestamp of the most recent - * connection established with Google Cloud. This time is updated every - * several minutes, not continuously. For clusters that do not use GKE - * Connect, or that have never connected successfully, this field will be - * unset. - * - * Generated from protobuf field .google.protobuf.Timestamp last_connection_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_connection_time = null; - /** - * Output only. Google-generated UUID for this resource. This is unique across - * all Membership resources. If a Membership resource is deleted and another - * resource with the same name is created, it gets a different unique_id. - * - * Generated from protobuf field string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $unique_id = ''; - /** - * Optional. How to identify workloads from this Membership. - * See the documentation on Workload Identity for more details: - * https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity - * - * Generated from protobuf field .google.cloud.gkehub.v1.Authority authority = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $authority = null; - /** - * Optional. The monitoring config information for this membership. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MonitoringConfig monitoring_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $monitoring_config = null; - protected $type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\V1\MembershipEndpoint $endpoint - * Optional. Endpoint information to reach this member. - * @type string $name - * Output only. The full, unique name of this Membership resource in the - * format `projects/*/locations/*/memberships/{membership_id}`, set during - * creation. - * `membership_id` must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels for this membership. - * @type string $description - * Output only. Description of this membership, limited to 63 characters. - * Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*` - * This field is present for legacy purposes. - * @type \Google\Cloud\GkeHub\V1\MembershipState $state - * Output only. State of the Membership resource. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. When the Membership was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. When the Membership was last updated. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. When the Membership was deleted. - * @type string $external_id - * Optional. An externally-generated and managed ID for this Membership. This - * ID may be modified after creation, but this is not recommended. - * The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` - * If this Membership represents a Kubernetes cluster, this value should be - * set to the UID of the `kube-system` namespace object. - * @type \Google\Protobuf\Timestamp $last_connection_time - * Output only. For clusters using Connect, the timestamp of the most recent - * connection established with Google Cloud. This time is updated every - * several minutes, not continuously. For clusters that do not use GKE - * Connect, or that have never connected successfully, this field will be - * unset. - * @type string $unique_id - * Output only. Google-generated UUID for this resource. This is unique across - * all Membership resources. If a Membership resource is deleted and another - * resource with the same name is created, it gets a different unique_id. - * @type \Google\Cloud\GkeHub\V1\Authority $authority - * Optional. How to identify workloads from this Membership. - * See the documentation on Workload Identity for more details: - * https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity - * @type \Google\Cloud\GkeHub\V1\MonitoringConfig $monitoring_config - * Optional. The monitoring config information for this membership. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Endpoint information to reach this member. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipEndpoint endpoint = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1\MembershipEndpoint|null - */ - public function getEndpoint() - { - return $this->readOneof(4); - } - - public function hasEndpoint() - { - return $this->hasOneof(4); - } - - /** - * Optional. Endpoint information to reach this member. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipEndpoint endpoint = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1\MembershipEndpoint $var - * @return $this - */ - public function setEndpoint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\MembershipEndpoint::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Output only. The full, unique name of this Membership resource in the - * format `projects/*/locations/*/memberships/{membership_id}`, set during - * creation. - * `membership_id` must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The full, unique name of this Membership resource in the - * format `projects/*/locations/*/memberships/{membership_id}`, set during - * creation. - * `membership_id` must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * 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. Labels for this membership. - * - * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels for this membership. - * - * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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; - } - - /** - * Output only. Description of this membership, limited to 63 characters. - * Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*` - * This field is present for legacy purposes. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Output only. Description of this membership, limited to 63 characters. - * Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*` - * This field is present for legacy purposes. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. State of the Membership resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeHub\V1\MembershipState|null - */ - public function getState() - { - return $this->state; - } - - public function hasState() - { - return isset($this->state); - } - - public function clearState() - { - unset($this->state); - } - - /** - * Output only. State of the Membership resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeHub\V1\MembershipState $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\MembershipState::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. When the Membership was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.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. When the Membership was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.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. When the Membership was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. When the Membership was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. When the Membership was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.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. When the Membership was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.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; - } - - /** - * Optional. An externally-generated and managed ID for this Membership. This - * ID may be modified after creation, but this is not recommended. - * The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` - * If this Membership represents a Kubernetes cluster, this value should be - * set to the UID of the `kube-system` namespace object. - * - * Generated from protobuf field string external_id = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getExternalId() - { - return $this->external_id; - } - - /** - * Optional. An externally-generated and managed ID for this Membership. This - * ID may be modified after creation, but this is not recommended. - * The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` - * If this Membership represents a Kubernetes cluster, this value should be - * set to the UID of the `kube-system` namespace object. - * - * Generated from protobuf field string external_id = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setExternalId($var) - { - GPBUtil::checkString($var, True); - $this->external_id = $var; - - return $this; - } - - /** - * Output only. For clusters using Connect, the timestamp of the most recent - * connection established with Google Cloud. This time is updated every - * several minutes, not continuously. For clusters that do not use GKE - * Connect, or that have never connected successfully, this field will be - * unset. - * - * Generated from protobuf field .google.protobuf.Timestamp last_connection_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastConnectionTime() - { - return $this->last_connection_time; - } - - public function hasLastConnectionTime() - { - return isset($this->last_connection_time); - } - - public function clearLastConnectionTime() - { - unset($this->last_connection_time); - } - - /** - * Output only. For clusters using Connect, the timestamp of the most recent - * connection established with Google Cloud. This time is updated every - * several minutes, not continuously. For clusters that do not use GKE - * Connect, or that have never connected successfully, this field will be - * unset. - * - * Generated from protobuf field .google.protobuf.Timestamp last_connection_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastConnectionTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_connection_time = $var; - - return $this; - } - - /** - * Output only. Google-generated UUID for this resource. This is unique across - * all Membership resources. If a Membership resource is deleted and another - * resource with the same name is created, it gets a different unique_id. - * - * Generated from protobuf field string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUniqueId() - { - return $this->unique_id; - } - - /** - * Output only. Google-generated UUID for this resource. This is unique across - * all Membership resources. If a Membership resource is deleted and another - * resource with the same name is created, it gets a different unique_id. - * - * Generated from protobuf field string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUniqueId($var) - { - GPBUtil::checkString($var, True); - $this->unique_id = $var; - - return $this; - } - - /** - * Optional. How to identify workloads from this Membership. - * See the documentation on Workload Identity for more details: - * https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity - * - * Generated from protobuf field .google.cloud.gkehub.v1.Authority authority = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1\Authority|null - */ - public function getAuthority() - { - return $this->authority; - } - - public function hasAuthority() - { - return isset($this->authority); - } - - public function clearAuthority() - { - unset($this->authority); - } - - /** - * Optional. How to identify workloads from this Membership. - * See the documentation on Workload Identity for more details: - * https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity - * - * Generated from protobuf field .google.cloud.gkehub.v1.Authority authority = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1\Authority $var - * @return $this - */ - public function setAuthority($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Authority::class); - $this->authority = $var; - - return $this; - } - - /** - * Optional. The monitoring config information for this membership. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MonitoringConfig monitoring_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1\MonitoringConfig|null - */ - public function getMonitoringConfig() - { - return $this->monitoring_config; - } - - public function hasMonitoringConfig() - { - return isset($this->monitoring_config); - } - - public function clearMonitoringConfig() - { - unset($this->monitoring_config); - } - - /** - * Optional. The monitoring config information for this membership. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MonitoringConfig monitoring_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1\MonitoringConfig $var - * @return $this - */ - public function setMonitoringConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\MonitoringConfig::class); - $this->monitoring_config = $var; - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipEndpoint.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipEndpoint.php deleted file mode 100644 index 6558053fe879..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipEndpoint.php +++ /dev/null @@ -1,228 +0,0 @@ -google.cloud.gkehub.v1.MembershipEndpoint - */ -class MembershipEndpoint extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. GKE-specific information. Only present if this Membership is a GKE cluster. - * - * Generated from protobuf field .google.cloud.gkehub.v1.GkeCluster gke_cluster = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $gke_cluster = null; - /** - * Output only. Useful Kubernetes-specific metadata. - * - * Generated from protobuf field .google.cloud.gkehub.v1.KubernetesMetadata kubernetes_metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $kubernetes_metadata = null; - /** - * Optional. The in-cluster Kubernetes Resources that should be applied for a - * correctly registered cluster, in the steady state. These resources: - * * Ensure that the cluster is exclusively registered to one and only one - * Hub Membership. - * * Propagate Workload Pool Information available in the Membership - * Authority field. - * * Ensure proper initial configuration of default Hub Features. - * - * Generated from protobuf field .google.cloud.gkehub.v1.KubernetesResource kubernetes_resource = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kubernetes_resource = null; - /** - * Output only. Whether the lifecycle of this membership is managed by a - * google cluster platform service. - * - * Generated from protobuf field bool google_managed = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $google_managed = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\V1\GkeCluster $gke_cluster - * Optional. GKE-specific information. Only present if this Membership is a GKE cluster. - * @type \Google\Cloud\GkeHub\V1\KubernetesMetadata $kubernetes_metadata - * Output only. Useful Kubernetes-specific metadata. - * @type \Google\Cloud\GkeHub\V1\KubernetesResource $kubernetes_resource - * Optional. The in-cluster Kubernetes Resources that should be applied for a - * correctly registered cluster, in the steady state. These resources: - * * Ensure that the cluster is exclusively registered to one and only one - * Hub Membership. - * * Propagate Workload Pool Information available in the Membership - * Authority field. - * * Ensure proper initial configuration of default Hub Features. - * @type bool $google_managed - * Output only. Whether the lifecycle of this membership is managed by a - * google cluster platform service. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Optional. GKE-specific information. Only present if this Membership is a GKE cluster. - * - * Generated from protobuf field .google.cloud.gkehub.v1.GkeCluster gke_cluster = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1\GkeCluster|null - */ - public function getGkeCluster() - { - return $this->gke_cluster; - } - - public function hasGkeCluster() - { - return isset($this->gke_cluster); - } - - public function clearGkeCluster() - { - unset($this->gke_cluster); - } - - /** - * Optional. GKE-specific information. Only present if this Membership is a GKE cluster. - * - * Generated from protobuf field .google.cloud.gkehub.v1.GkeCluster gke_cluster = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1\GkeCluster $var - * @return $this - */ - public function setGkeCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\GkeCluster::class); - $this->gke_cluster = $var; - - return $this; - } - - /** - * Output only. Useful Kubernetes-specific metadata. - * - * Generated from protobuf field .google.cloud.gkehub.v1.KubernetesMetadata kubernetes_metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeHub\V1\KubernetesMetadata|null - */ - public function getKubernetesMetadata() - { - return $this->kubernetes_metadata; - } - - public function hasKubernetesMetadata() - { - return isset($this->kubernetes_metadata); - } - - public function clearKubernetesMetadata() - { - unset($this->kubernetes_metadata); - } - - /** - * Output only. Useful Kubernetes-specific metadata. - * - * Generated from protobuf field .google.cloud.gkehub.v1.KubernetesMetadata kubernetes_metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeHub\V1\KubernetesMetadata $var - * @return $this - */ - public function setKubernetesMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\KubernetesMetadata::class); - $this->kubernetes_metadata = $var; - - return $this; - } - - /** - * Optional. The in-cluster Kubernetes Resources that should be applied for a - * correctly registered cluster, in the steady state. These resources: - * * Ensure that the cluster is exclusively registered to one and only one - * Hub Membership. - * * Propagate Workload Pool Information available in the Membership - * Authority field. - * * Ensure proper initial configuration of default Hub Features. - * - * Generated from protobuf field .google.cloud.gkehub.v1.KubernetesResource kubernetes_resource = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1\KubernetesResource|null - */ - public function getKubernetesResource() - { - return $this->kubernetes_resource; - } - - public function hasKubernetesResource() - { - return isset($this->kubernetes_resource); - } - - public function clearKubernetesResource() - { - unset($this->kubernetes_resource); - } - - /** - * Optional. The in-cluster Kubernetes Resources that should be applied for a - * correctly registered cluster, in the steady state. These resources: - * * Ensure that the cluster is exclusively registered to one and only one - * Hub Membership. - * * Propagate Workload Pool Information available in the Membership - * Authority field. - * * Ensure proper initial configuration of default Hub Features. - * - * Generated from protobuf field .google.cloud.gkehub.v1.KubernetesResource kubernetes_resource = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1\KubernetesResource $var - * @return $this - */ - public function setKubernetesResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\KubernetesResource::class); - $this->kubernetes_resource = $var; - - return $this; - } - - /** - * Output only. Whether the lifecycle of this membership is managed by a - * google cluster platform service. - * - * Generated from protobuf field bool google_managed = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getGoogleManaged() - { - return $this->google_managed; - } - - /** - * Output only. Whether the lifecycle of this membership is managed by a - * google cluster platform service. - * - * Generated from protobuf field bool google_managed = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setGoogleManaged($var) - { - GPBUtil::checkBool($var); - $this->google_managed = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipFeatureSpec.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipFeatureSpec.php deleted file mode 100644 index cbb126324b89..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipFeatureSpec.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.gkehub.v1.MembershipFeatureSpec - */ -class MembershipFeatureSpec extends \Google\Protobuf\Internal\Message -{ - protected $feature_spec; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec $configmanagement - * Config Management-specific spec. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); - parent::__construct($data); - } - - /** - * Config Management-specific spec. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec configmanagement = 106; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec|null - */ - public function getConfigmanagement() - { - return $this->readOneof(106); - } - - public function hasConfigmanagement() - { - return $this->hasOneof(106); - } - - /** - * Config Management-specific spec. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec configmanagement = 106; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec $var - * @return $this - */ - public function setConfigmanagement($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec::class); - $this->writeOneof(106, $var); - - return $this; - } - - /** - * @return string - */ - public function getFeatureSpec() - { - return $this->whichOneof("feature_spec"); - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipFeatureState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipFeatureState.php deleted file mode 100644 index cdbc23edb08a..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipFeatureState.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.gkehub.v1.MembershipFeatureState - */ -class MembershipFeatureState extends \Google\Protobuf\Internal\Message -{ - /** - * The high-level state of this Feature for a single membership. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1; - */ - protected $state = null; - protected $feature_state; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipState $configmanagement - * Config Management-specific state. - * @type \Google\Cloud\GkeHub\V1\FeatureState $state - * The high-level state of this Feature for a single membership. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); - parent::__construct($data); - } - - /** - * Config Management-specific state. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipState configmanagement = 106; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipState|null - */ - public function getConfigmanagement() - { - return $this->readOneof(106); - } - - public function hasConfigmanagement() - { - return $this->hasOneof(106); - } - - /** - * Config Management-specific state. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipState configmanagement = 106; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipState $var - * @return $this - */ - public function setConfigmanagement($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipState::class); - $this->writeOneof(106, $var); - - return $this; - } - - /** - * The high-level state of this Feature for a single membership. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1; - * @return \Google\Cloud\GkeHub\V1\FeatureState|null - */ - public function getState() - { - return $this->state; - } - - public function hasState() - { - return isset($this->state); - } - - public function clearState() - { - unset($this->state); - } - - /** - * The high-level state of this Feature for a single membership. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1; - * @param \Google\Cloud\GkeHub\V1\FeatureState $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\FeatureState::class); - $this->state = $var; - - return $this; - } - - /** - * @return string - */ - public function getFeatureState() - { - return $this->whichOneof("feature_state"); - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipState.php deleted file mode 100644 index c46968fcb0e0..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipState.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkehub.v1.MembershipState - */ -class MembershipState extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The current state of the Membership resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $code = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * Output only. The current state of the Membership resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The current state of the Membership resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Output only. The current state of the Membership resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\MembershipState\Code::class); - $this->code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipState/Code.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipState/Code.php deleted file mode 100644 index 7c40449feacd..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipState/Code.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.gkehub.v1.MembershipState.Code - */ -class Code -{ - /** - * The code is not set. - * - * Generated from protobuf enum CODE_UNSPECIFIED = 0; - */ - const CODE_UNSPECIFIED = 0; - /** - * The cluster is being registered. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The cluster is registered. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * The cluster is being unregistered. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * The Membership is being updated. - * - * Generated from protobuf enum UPDATING = 4; - */ - const UPDATING = 4; - /** - * The Membership is being updated by the Hub Service. - * - * Generated from protobuf enum SERVICE_UPDATING = 5; - */ - const SERVICE_UPDATING = 5; - - private static $valueToName = [ - self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::DELETING => 'DELETING', - self::UPDATING => 'UPDATING', - self::SERVICE_UPDATING => 'SERVICE_UPDATING', - ]; - - 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(Code::class, \Google\Cloud\GkeHub\V1\MembershipState_Code::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MonitoringConfig.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MonitoringConfig.php deleted file mode 100644 index 94b7778b1b70..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MonitoringConfig.php +++ /dev/null @@ -1,244 +0,0 @@ -google.cloud.gkehub.v1.MonitoringConfig - */ -class MonitoringConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. Project used to report Metrics - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $project_id = ''; - /** - * Immutable. Location used to report Metrics - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $location = ''; - /** - * Immutable. Cluster name used to report metrics. - * For Anthos on VMWare/Baremetal, it would be in format - * `memberClusters/cluster_name`; And for Anthos on MultiCloud, it would be in - * format - * `{azureClusters, awsClusters}/cluster_name`. - * - * Generated from protobuf field string cluster = 3 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $cluster = ''; - /** - * Kubernetes system metrics, if available, are written to this prefix. - * This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos - * eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today - * but will migration to be under kubernetes.io/anthos - * - * Generated from protobuf field string kubernetes_metrics_prefix = 4; - */ - protected $kubernetes_metrics_prefix = ''; - /** - * Immutable. Cluster hash, this is a unique string generated by google code, - * which does not contain any PII, which we can use to reference the cluster. - * This is expected to be created by the monitoring stack and persisted into - * the Cluster object as well as to GKE-Hub. - * - * Generated from protobuf field string cluster_hash = 5 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $cluster_hash = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Immutable. Project used to report Metrics - * @type string $location - * Immutable. Location used to report Metrics - * @type string $cluster - * Immutable. Cluster name used to report metrics. - * For Anthos on VMWare/Baremetal, it would be in format - * `memberClusters/cluster_name`; And for Anthos on MultiCloud, it would be in - * format - * `{azureClusters, awsClusters}/cluster_name`. - * @type string $kubernetes_metrics_prefix - * Kubernetes system metrics, if available, are written to this prefix. - * This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos - * eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today - * but will migration to be under kubernetes.io/anthos - * @type string $cluster_hash - * Immutable. Cluster hash, this is a unique string generated by google code, - * which does not contain any PII, which we can use to reference the cluster. - * This is expected to be created by the monitoring stack and persisted into - * the Cluster object as well as to GKE-Hub. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. Project used to report Metrics - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Immutable. Project used to report Metrics - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Immutable. Location used to report Metrics - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Immutable. Location used to report Metrics - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * Immutable. Cluster name used to report metrics. - * For Anthos on VMWare/Baremetal, it would be in format - * `memberClusters/cluster_name`; And for Anthos on MultiCloud, it would be in - * format - * `{azureClusters, awsClusters}/cluster_name`. - * - * Generated from protobuf field string cluster = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * Immutable. Cluster name used to report metrics. - * For Anthos on VMWare/Baremetal, it would be in format - * `memberClusters/cluster_name`; And for Anthos on MultiCloud, it would be in - * format - * `{azureClusters, awsClusters}/cluster_name`. - * - * Generated from protobuf field string cluster = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkString($var, True); - $this->cluster = $var; - - return $this; - } - - /** - * Kubernetes system metrics, if available, are written to this prefix. - * This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos - * eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today - * but will migration to be under kubernetes.io/anthos - * - * Generated from protobuf field string kubernetes_metrics_prefix = 4; - * @return string - */ - public function getKubernetesMetricsPrefix() - { - return $this->kubernetes_metrics_prefix; - } - - /** - * Kubernetes system metrics, if available, are written to this prefix. - * This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos - * eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today - * but will migration to be under kubernetes.io/anthos - * - * Generated from protobuf field string kubernetes_metrics_prefix = 4; - * @param string $var - * @return $this - */ - public function setKubernetesMetricsPrefix($var) - { - GPBUtil::checkString($var, True); - $this->kubernetes_metrics_prefix = $var; - - return $this; - } - - /** - * Immutable. Cluster hash, this is a unique string generated by google code, - * which does not contain any PII, which we can use to reference the cluster. - * This is expected to be created by the monitoring stack and persisted into - * the Cluster object as well as to GKE-Hub. - * - * Generated from protobuf field string cluster_hash = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getClusterHash() - { - return $this->cluster_hash; - } - - /** - * Immutable. Cluster hash, this is a unique string generated by google code, - * which does not contain any PII, which we can use to reference the cluster. - * This is expected to be created by the monitoring stack and persisted into - * the Cluster object as well as to GKE-Hub. - * - * Generated from protobuf field string cluster_hash = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setClusterHash($var) - { - GPBUtil::checkString($var, True); - $this->cluster_hash = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/OperationMetadata.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/OperationMetadata.php deleted file mode 100644 index cc9ce81fccd1..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/OperationMetadata.php +++ /dev/null @@ -1,303 +0,0 @@ -google.cloud.gkehub.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_detail = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cancel_requested = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_detail - * Output only. Human-readable status of the operation, if any. - * @type bool $cancel_requested - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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 the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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 the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusDetail() - { - return $this->status_detail; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusDetail($var) - { - GPBUtil::checkString($var, True); - $this->status_detail = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getCancelRequested() - { - return $this->cancel_requested; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setCancelRequested($var) - { - GPBUtil::checkBool($var); - $this->cancel_requested = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ResourceManifest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ResourceManifest.php deleted file mode 100644 index 1ae0d6196454..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ResourceManifest.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.gkehub.v1.ResourceManifest - */ -class ResourceManifest extends \Google\Protobuf\Internal\Message -{ - /** - * YAML manifest of the resource. - * - * Generated from protobuf field string manifest = 1; - */ - protected $manifest = ''; - /** - * Whether the resource provided in the manifest is `cluster_scoped`. - * If unset, the manifest is assumed to be namespace scoped. - * This field is used for REST mapping when applying the resource in a - * cluster. - * - * Generated from protobuf field bool cluster_scoped = 2; - */ - protected $cluster_scoped = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $manifest - * YAML manifest of the resource. - * @type bool $cluster_scoped - * Whether the resource provided in the manifest is `cluster_scoped`. - * If unset, the manifest is assumed to be namespace scoped. - * This field is used for REST mapping when applying the resource in a - * cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * YAML manifest of the resource. - * - * Generated from protobuf field string manifest = 1; - * @return string - */ - public function getManifest() - { - return $this->manifest; - } - - /** - * YAML manifest of the resource. - * - * Generated from protobuf field string manifest = 1; - * @param string $var - * @return $this - */ - public function setManifest($var) - { - GPBUtil::checkString($var, True); - $this->manifest = $var; - - return $this; - } - - /** - * Whether the resource provided in the manifest is `cluster_scoped`. - * If unset, the manifest is assumed to be namespace scoped. - * This field is used for REST mapping when applying the resource in a - * cluster. - * - * Generated from protobuf field bool cluster_scoped = 2; - * @return bool - */ - public function getClusterScoped() - { - return $this->cluster_scoped; - } - - /** - * Whether the resource provided in the manifest is `cluster_scoped`. - * If unset, the manifest is assumed to be namespace scoped. - * This field is used for REST mapping when applying the resource in a - * cluster. - * - * Generated from protobuf field bool cluster_scoped = 2; - * @param bool $var - * @return $this - */ - public function setClusterScoped($var) - { - GPBUtil::checkBool($var); - $this->cluster_scoped = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ResourceOptions.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ResourceOptions.php deleted file mode 100644 index 3db8b36a653b..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ResourceOptions.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.gkehub.v1.ResourceOptions - */ -class ResourceOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The Connect agent version to use for connect_resources. Defaults - * to the latest GKE Connect version. The version must be a currently - * supported version, obsolete versions will be rejected. - * - * Generated from protobuf field string connect_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $connect_version = ''; - /** - * Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for - * CustomResourceDefinition resources. - * This option should be set for clusters with Kubernetes apiserver versions - * <1.16. - * - * Generated from protobuf field bool v1beta1_crd = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $v1beta1_crd = false; - /** - * Optional. Major version of the Kubernetes cluster. This is only used to - * determine which version to use for the CustomResourceDefinition resources, - * `apiextensions/v1beta1` or`apiextensions/v1`. - * - * Generated from protobuf field string k8s_version = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $k8s_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $connect_version - * Optional. The Connect agent version to use for connect_resources. Defaults - * to the latest GKE Connect version. The version must be a currently - * supported version, obsolete versions will be rejected. - * @type bool $v1beta1_crd - * Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for - * CustomResourceDefinition resources. - * This option should be set for clusters with Kubernetes apiserver versions - * <1.16. - * @type string $k8s_version - * Optional. Major version of the Kubernetes cluster. This is only used to - * determine which version to use for the CustomResourceDefinition resources, - * `apiextensions/v1beta1` or`apiextensions/v1`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The Connect agent version to use for connect_resources. Defaults - * to the latest GKE Connect version. The version must be a currently - * supported version, obsolete versions will be rejected. - * - * Generated from protobuf field string connect_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getConnectVersion() - { - return $this->connect_version; - } - - /** - * Optional. The Connect agent version to use for connect_resources. Defaults - * to the latest GKE Connect version. The version must be a currently - * supported version, obsolete versions will be rejected. - * - * Generated from protobuf field string connect_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setConnectVersion($var) - { - GPBUtil::checkString($var, True); - $this->connect_version = $var; - - return $this; - } - - /** - * Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for - * CustomResourceDefinition resources. - * This option should be set for clusters with Kubernetes apiserver versions - * <1.16. - * - * Generated from protobuf field bool v1beta1_crd = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getV1Beta1Crd() - { - return $this->v1beta1_crd; - } - - /** - * Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for - * CustomResourceDefinition resources. - * This option should be set for clusters with Kubernetes apiserver versions - * <1.16. - * - * Generated from protobuf field bool v1beta1_crd = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setV1Beta1Crd($var) - { - GPBUtil::checkBool($var); - $this->v1beta1_crd = $var; - - return $this; - } - - /** - * Optional. Major version of the Kubernetes cluster. This is only used to - * determine which version to use for the CustomResourceDefinition resources, - * `apiextensions/v1beta1` or`apiextensions/v1`. - * - * Generated from protobuf field string k8s_version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getK8SVersion() - { - return $this->k8s_version; - } - - /** - * Optional. Major version of the Kubernetes cluster. This is only used to - * determine which version to use for the CustomResourceDefinition resources, - * `apiextensions/v1beta1` or`apiextensions/v1`. - * - * Generated from protobuf field string k8s_version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setK8SVersion($var) - { - GPBUtil::checkString($var, True); - $this->k8s_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/TypeMeta.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/TypeMeta.php deleted file mode 100644 index d04c88055885..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/TypeMeta.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.gkehub.v1.TypeMeta - */ -class TypeMeta extends \Google\Protobuf\Internal\Message -{ - /** - * Kind of the resource (e.g. Deployment). - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * APIVersion of the resource (e.g. v1). - * - * Generated from protobuf field string api_version = 2; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * Kind of the resource (e.g. Deployment). - * @type string $api_version - * APIVersion of the resource (e.g. v1). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Kind of the resource (e.g. Deployment). - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * Kind of the resource (e.g. Deployment). - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * APIVersion of the resource (e.g. v1). - * - * Generated from protobuf field string api_version = 2; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * APIVersion of the resource (e.g. v1). - * - * Generated from protobuf field string api_version = 2; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateFeatureRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateFeatureRequest.php deleted file mode 100644 index 89a7b5b28dbb..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateFeatureRequest.php +++ /dev/null @@ -1,286 +0,0 @@ -google.cloud.gkehub.v1.UpdateFeatureRequest - */ -class UpdateFeatureRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Feature resource name in the format - * `projects/*/locations/*/features/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - /** - * Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Feature resource = 3; - */ - protected $resource = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The Feature resource name in the format - * `projects/*/locations/*/features/*`. - * @param \Google\Cloud\GkeHub\V1\Feature $resource Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * @param \Google\Protobuf\FieldMask $updateMask Mask of fields to update. - * - * @return \Google\Cloud\GkeHub\V1\UpdateFeatureRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\GkeHub\V1\Feature $resource, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setName($name) - ->setResource($resource) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The Feature resource name in the format - * `projects/*/locations/*/features/*`. - * @type \Google\Protobuf\FieldMask $update_mask - * Mask of fields to update. - * @type \Google\Cloud\GkeHub\V1\Feature $resource - * Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Feature resource name in the format - * `projects/*/locations/*/features/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The Feature resource name in the format - * `projects/*/locations/*/features/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @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); - } - - /** - * Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Feature resource = 3; - * @return \Google\Cloud\GkeHub\V1\Feature|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Feature resource = 3; - * @param \Google\Cloud\GkeHub\V1\Feature $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Feature::class); - $this->resource = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipRequest.php deleted file mode 100644 index 18371b71de73..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipRequest.php +++ /dev/null @@ -1,287 +0,0 @@ -google.cloud.gkehub.v1.UpdateMembershipRequest - */ -class UpdateMembershipRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. Please see - * {@see GkeHubClient::membershipName()} for help formatting this field. - * @param \Google\Cloud\GkeHub\V1\Membership $resource Required. Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\GkeHub\V1\UpdateMembershipRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\GkeHub\V1\Membership $resource, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setName($name) - ->setResource($resource) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type \Google\Cloud\GkeHub\V1\Membership $resource - * Required. Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * 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 Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * 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. Mask of fields to update. - * - * 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. Mask of fields to update. - * - * 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; - } - - /** - * Required. Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeHub\V1\Membership|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * Required. Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeHub\V1\Membership $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Membership::class); - $this->resource = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_feature.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_feature.php deleted file mode 100644 index f8ec79e951a9..000000000000 --- a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_feature.php +++ /dev/null @@ -1,69 +0,0 @@ -createFeature($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Feature $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()); - } -} -// [END gkehub_v1_generated_GkeHub_CreateFeature_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership.php deleted file mode 100644 index 3f4e0de716d9..000000000000 --- a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership.php +++ /dev/null @@ -1,101 +0,0 @@ -setParent($formattedParent) - ->setMembershipId($membershipId) - ->setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $gkeHubClient->createMembership($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Membership $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 = GkeHubClient::locationName('[PROJECT]', '[LOCATION]'); - $membershipId = '[MEMBERSHIP_ID]'; - - create_membership_sample($formattedParent, $membershipId); -} -// [END gkehub_v1_generated_GkeHub_CreateMembership_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_feature.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_feature.php deleted file mode 100644 index 8091a501e3bd..000000000000 --- a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_feature.php +++ /dev/null @@ -1,66 +0,0 @@ -deleteFeature($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()); - } -} -// [END gkehub_v1_generated_GkeHub_DeleteFeature_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership.php deleted file mode 100644 index d1efebc9105b..000000000000 --- a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $gkeHubClient->deleteMembership($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 = GkeHubClient::membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - - delete_membership_sample($formattedName); -} -// [END gkehub_v1_generated_GkeHub_DeleteMembership_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/generate_connect_manifest.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/generate_connect_manifest.php deleted file mode 100644 index 2df823d9eb1f..000000000000 --- a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/generate_connect_manifest.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var GenerateConnectManifestResponse $response */ - $response = $gkeHubClient->generateConnectManifest($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 = GkeHubClient::membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - - generate_connect_manifest_sample($formattedName); -} -// [END gkehub_v1_generated_GkeHub_GenerateConnectManifest_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_feature.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_feature.php deleted file mode 100644 index 2ab7e8aa543b..000000000000 --- a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_feature.php +++ /dev/null @@ -1,57 +0,0 @@ -getFeature($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END gkehub_v1_generated_GkeHub_GetFeature_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership.php deleted file mode 100644 index dda06fdfe6b2..000000000000 --- a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Membership $response */ - $response = $gkeHubClient->getMembership($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 = GkeHubClient::membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - - get_membership_sample($formattedName); -} -// [END gkehub_v1_generated_GkeHub_GetMembership_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_features.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_features.php deleted file mode 100644 index a267810aec6d..000000000000 --- a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_features.php +++ /dev/null @@ -1,62 +0,0 @@ -listFeatures($request); - - /** @var Feature $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 gkehub_v1_generated_GkeHub_ListFeatures_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_memberships.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_memberships.php deleted file mode 100644 index cce7108f378c..000000000000 --- a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_memberships.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $gkeHubClient->listMemberships($request); - - /** @var Membership $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 = GkeHubClient::locationName('[PROJECT]', '[LOCATION]'); - - list_memberships_sample($formattedParent); -} -// [END gkehub_v1_generated_GkeHub_ListMemberships_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_feature.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_feature.php deleted file mode 100644 index d3f11c139900..000000000000 --- a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_feature.php +++ /dev/null @@ -1,69 +0,0 @@ -updateFeature($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Feature $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()); - } -} -// [END gkehub_v1_generated_GkeHub_UpdateFeature_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership.php deleted file mode 100644 index 09df3eb2a4fd..000000000000 --- a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership.php +++ /dev/null @@ -1,89 +0,0 @@ -setName($formattedName) - ->setUpdateMask($updateMask) - ->setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $gkeHubClient->updateMembership($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Membership $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 = GkeHubClient::membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - - update_membership_sample($formattedName); -} -// [END gkehub_v1_generated_GkeHub_UpdateMembership_sync] diff --git a/owl-bot-staging/GkeHub/v1/src/V1/Client/GkeHubClient.php b/owl-bot-staging/GkeHub/v1/src/V1/Client/GkeHubClient.php deleted file mode 100644 index 5801c8477797..000000000000 --- a/owl-bot-staging/GkeHub/v1/src/V1/Client/GkeHubClient.php +++ /dev/null @@ -1,645 +0,0 @@ - createFeatureAsync(CreateFeatureRequest $request, array $optionalArgs = []) - * @method PromiseInterface createMembershipAsync(CreateMembershipRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteFeatureAsync(DeleteFeatureRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteMembershipAsync(DeleteMembershipRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateConnectManifestAsync(GenerateConnectManifestRequest $request, array $optionalArgs = []) - * @method PromiseInterface getFeatureAsync(GetFeatureRequest $request, array $optionalArgs = []) - * @method PromiseInterface getMembershipAsync(GetMembershipRequest $request, array $optionalArgs = []) - * @method PromiseInterface listFeaturesAsync(ListFeaturesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listMembershipsAsync(ListMembershipsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateFeatureAsync(UpdateFeatureRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateMembershipAsync(UpdateMembershipRequest $request, array $optionalArgs = []) - */ -final class GkeHubClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.gkehub.v1.GkeHub'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'gkehub.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'gkehub.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', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/gke_hub_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/gke_hub_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/gke_hub_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/gke_hub_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 = isset($this->descriptors[$methodName]['longRunning']) ? $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 feature - * resource. - * - * @param string $project - * @param string $location - * @param string $feature - * - * @return string The formatted feature resource. - */ - public static function featureName(string $project, string $location, string $feature): string - { - return self::getPathTemplate('feature')->render([ - 'project' => $project, - 'location' => $location, - 'feature' => $feature, - ]); - } - - /** - * 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 membership - * resource. - * - * @param string $project - * @param string $location - * @param string $membership - * - * @return string The formatted membership resource. - */ - public static function membershipName(string $project, string $location, string $membership): string - { - return self::getPathTemplate('membership')->render([ - 'project' => $project, - 'location' => $location, - 'membership' => $membership, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - feature: projects/{project}/locations/{location}/features/{feature} - * - location: projects/{project}/locations/{location} - * - membership: projects/{project}/locations/{location}/memberships/{membership} - * - * 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 $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 'gkehub.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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); - } - - /** - * Adds a new Feature. - * - * The async variant is {@see GkeHubClient::createFeatureAsync()} . - * - * @example samples/V1/GkeHubClient/create_feature.php - * - * @param CreateFeatureRequest $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 createFeature(CreateFeatureRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateFeature', $request, $callOptions)->wait(); - } - - /** - * Creates a new Membership. - * - * **This is currently only supported for GKE clusters on Google Cloud**. - * To register other clusters, follow the instructions at - * https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster. - * - * The async variant is {@see GkeHubClient::createMembershipAsync()} . - * - * @example samples/V1/GkeHubClient/create_membership.php - * - * @param CreateMembershipRequest $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 createMembership(CreateMembershipRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateMembership', $request, $callOptions)->wait(); - } - - /** - * Removes a Feature. - * - * The async variant is {@see GkeHubClient::deleteFeatureAsync()} . - * - * @example samples/V1/GkeHubClient/delete_feature.php - * - * @param DeleteFeatureRequest $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 deleteFeature(DeleteFeatureRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteFeature', $request, $callOptions)->wait(); - } - - /** - * Removes a Membership. - * - * **This is currently only supported for GKE clusters on Google Cloud**. - * To unregister other clusters, follow the instructions at - * https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster. - * - * The async variant is {@see GkeHubClient::deleteMembershipAsync()} . - * - * @example samples/V1/GkeHubClient/delete_membership.php - * - * @param DeleteMembershipRequest $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 deleteMembership(DeleteMembershipRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteMembership', $request, $callOptions)->wait(); - } - - /** - * Generates the manifest for deployment of the GKE connect agent. - * - * **This method is used internally by Google-provided libraries.** - * Most clients should not need to call this method directly. - * - * The async variant is {@see GkeHubClient::generateConnectManifestAsync()} . - * - * @example samples/V1/GkeHubClient/generate_connect_manifest.php - * - * @param GenerateConnectManifestRequest $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 GenerateConnectManifestResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateConnectManifest(GenerateConnectManifestRequest $request, array $callOptions = []): GenerateConnectManifestResponse - { - return $this->startApiCall('GenerateConnectManifest', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Feature. - * - * The async variant is {@see GkeHubClient::getFeatureAsync()} . - * - * @example samples/V1/GkeHubClient/get_feature.php - * - * @param GetFeatureRequest $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 Feature - * - * @throws ApiException Thrown if the API call fails. - */ - public function getFeature(GetFeatureRequest $request, array $callOptions = []): Feature - { - return $this->startApiCall('GetFeature', $request, $callOptions)->wait(); - } - - /** - * Gets the details of a Membership. - * - * The async variant is {@see GkeHubClient::getMembershipAsync()} . - * - * @example samples/V1/GkeHubClient/get_membership.php - * - * @param GetMembershipRequest $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 Membership - * - * @throws ApiException Thrown if the API call fails. - */ - public function getMembership(GetMembershipRequest $request, array $callOptions = []): Membership - { - return $this->startApiCall('GetMembership', $request, $callOptions)->wait(); - } - - /** - * Lists Features in a given project and location. - * - * The async variant is {@see GkeHubClient::listFeaturesAsync()} . - * - * @example samples/V1/GkeHubClient/list_features.php - * - * @param ListFeaturesRequest $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 listFeatures(ListFeaturesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListFeatures', $request, $callOptions); - } - - /** - * Lists Memberships in a given project and location. - * - * The async variant is {@see GkeHubClient::listMembershipsAsync()} . - * - * @example samples/V1/GkeHubClient/list_memberships.php - * - * @param ListMembershipsRequest $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 listMemberships(ListMembershipsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListMemberships', $request, $callOptions); - } - - /** - * Updates an existing Feature. - * - * The async variant is {@see GkeHubClient::updateFeatureAsync()} . - * - * @example samples/V1/GkeHubClient/update_feature.php - * - * @param UpdateFeatureRequest $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 updateFeature(UpdateFeatureRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateFeature', $request, $callOptions)->wait(); - } - - /** - * Updates an existing Membership. - * - * The async variant is {@see GkeHubClient::updateMembershipAsync()} . - * - * @example samples/V1/GkeHubClient/update_membership.php - * - * @param UpdateMembershipRequest $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 updateMembership(UpdateMembershipRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateMembership', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/GkeHub/v1/src/V1/gapic_metadata.json b/owl-bot-staging/GkeHub/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 7b0047620c7f..000000000000 --- a/owl-bot-staging/GkeHub/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.gkehub.v1", - "libraryPackage": "Google\\Cloud\\GkeHub\\V1", - "services": { - "GkeHub": { - "clients": { - "grpc": { - "libraryClient": "GkeHubGapicClient", - "rpcs": { - "CreateFeature": { - "methods": [ - "createFeature" - ] - }, - "CreateMembership": { - "methods": [ - "createMembership" - ] - }, - "DeleteFeature": { - "methods": [ - "deleteFeature" - ] - }, - "DeleteMembership": { - "methods": [ - "deleteMembership" - ] - }, - "GenerateConnectManifest": { - "methods": [ - "generateConnectManifest" - ] - }, - "GetFeature": { - "methods": [ - "getFeature" - ] - }, - "GetMembership": { - "methods": [ - "getMembership" - ] - }, - "ListFeatures": { - "methods": [ - "listFeatures" - ] - }, - "ListMemberships": { - "methods": [ - "listMemberships" - ] - }, - "UpdateFeature": { - "methods": [ - "updateFeature" - ] - }, - "UpdateMembership": { - "methods": [ - "updateMembership" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_client_config.json b/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_client_config.json deleted file mode 100644 index f361405e676f..000000000000 --- a/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_client_config.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "interfaces": { - "google.cloud.gkehub.v1.GkeHub": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ] - }, - "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": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateFeature": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateMembership": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteFeature": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteMembership": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GenerateConnectManifest": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetFeature": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetMembership": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListFeatures": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListMemberships": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateFeature": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateMembership": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_descriptor_config.php b/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_descriptor_config.php deleted file mode 100644 index 490753e5428b..000000000000 --- a/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_descriptor_config.php +++ /dev/null @@ -1,223 +0,0 @@ - [ - 'google.cloud.gkehub.v1.GkeHub' => [ - 'CreateFeature' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Feature', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateMembership' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Membership', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteFeature' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteMembership' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateFeature' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Feature', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateMembership' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Membership', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GenerateConnectManifest' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\GenerateConnectManifestResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetFeature' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\Feature', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetMembership' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\Membership', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListFeatures' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getResources', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\ListFeaturesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListMemberships' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getResources', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\ListMembershipsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'feature' => 'projects/{project}/locations/{location}/features/{feature}', - 'location' => 'projects/{project}/locations/{location}', - 'membership' => 'projects/{project}/locations/{location}/memberships/{membership}', - ], - ], - ], -]; diff --git a/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_rest_client_config.php b/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_rest_client_config.php deleted file mode 100644 index 3b91c2de285d..000000000000 --- a/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_rest_client_config.php +++ /dev/null @@ -1,288 +0,0 @@ - [ - 'google.cloud.gkehub.v1.GkeHub' => [ - 'CreateFeature' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/features', - 'body' => 'resource', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateMembership' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/memberships', - 'body' => 'resource', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'membership_id', - ], - ], - 'DeleteFeature' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/features/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteMembership' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateConnectManifest' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetFeature' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/features/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetMembership' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListFeatures' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/features', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListMemberships' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/memberships', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateFeature' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/features/*}', - 'body' => 'resource', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateMembership' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*}', - 'body' => 'resource', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - '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/*/memberships/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/features/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/memberships/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/features/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/memberships/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/features/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/GkeHub/v1/tests/Unit/V1/Client/GkeHubClientTest.php b/owl-bot-staging/GkeHub/v1/tests/Unit/V1/Client/GkeHubClientTest.php deleted file mode 100644 index c1ed5a6e314c..000000000000 --- a/owl-bot-staging/GkeHub/v1/tests/Unit/V1/Client/GkeHubClientTest.php +++ /dev/null @@ -1,1213 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return GkeHubClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new GkeHubClient($options); - } - - /** @test */ - public function createFeatureTest() - { - $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/createFeatureTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new Feature(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createFeatureTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $request = new CreateFeatureRequest(); - $response = $gapicClient->createFeature($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.gkehub.v1.GkeHub/CreateFeature', $actualApiFuncCall); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createFeatureTest'); - $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 createFeatureExceptionTest() - { - $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/createFeatureTest'); - $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); - $request = new CreateFeatureRequest(); - $response = $gapicClient->createFeature($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createFeatureTest'); - 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 createMembershipTest() - { - $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/createMembershipTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $externalId = 'externalId-1153075697'; - $uniqueId = 'uniqueId-538310583'; - $expectedResponse = new Membership(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setExternalId($externalId); - $expectedResponse->setUniqueId($uniqueId); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createMembershipTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $membershipId = 'membershipId-1132211676'; - $resource = new Membership(); - $request = (new CreateMembershipRequest()) - ->setParent($formattedParent) - ->setMembershipId($membershipId) - ->setResource($resource); - $response = $gapicClient->createMembership($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.gkehub.v1.GkeHub/CreateMembership', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getMembershipId(); - $this->assertProtobufEquals($membershipId, $actualValue); - $actualValue = $actualApiRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createMembershipTest'); - $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 createMembershipExceptionTest() - { - $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/createMembershipTest'); - $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]'); - $membershipId = 'membershipId-1132211676'; - $resource = new Membership(); - $request = (new CreateMembershipRequest()) - ->setParent($formattedParent) - ->setMembershipId($membershipId) - ->setResource($resource); - $response = $gapicClient->createMembership($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createMembershipTest'); - 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 deleteFeatureTest() - { - $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/deleteFeatureTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteFeatureTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $request = new DeleteFeatureRequest(); - $response = $gapicClient->deleteFeature($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.gkehub.v1.GkeHub/DeleteFeature', $actualApiFuncCall); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteFeatureTest'); - $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 deleteFeatureExceptionTest() - { - $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/deleteFeatureTest'); - $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); - $request = new DeleteFeatureRequest(); - $response = $gapicClient->deleteFeature($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteFeatureTest'); - 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 deleteMembershipTest() - { - $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/deleteMembershipTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteMembershipTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $request = (new DeleteMembershipRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteMembership($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.gkehub.v1.GkeHub/DeleteMembership', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteMembershipTest'); - $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 deleteMembershipExceptionTest() - { - $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/deleteMembershipTest'); - $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->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $request = (new DeleteMembershipRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteMembership($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteMembershipTest'); - 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 generateConnectManifestTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GenerateConnectManifestResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $request = (new GenerateConnectManifestRequest()) - ->setName($formattedName); - $response = $gapicClient->generateConnectManifest($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.gkehub.v1.GkeHub/GenerateConnectManifest', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateConnectManifestExceptionTest() - { - $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->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $request = (new GenerateConnectManifestRequest()) - ->setName($formattedName); - try { - $gapicClient->generateConnectManifest($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 getFeatureTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Feature(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - $request = new GetFeatureRequest(); - $response = $gapicClient->getFeature($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.gkehub.v1.GkeHub/GetFeature', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFeatureExceptionTest() - { - $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 GetFeatureRequest(); - try { - $gapicClient->getFeature($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 getMembershipTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $externalId = 'externalId-1153075697'; - $uniqueId = 'uniqueId-538310583'; - $expectedResponse = new Membership(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setExternalId($externalId); - $expectedResponse->setUniqueId($uniqueId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $request = (new GetMembershipRequest()) - ->setName($formattedName); - $response = $gapicClient->getMembership($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.gkehub.v1.GkeHub/GetMembership', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMembershipExceptionTest() - { - $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->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $request = (new GetMembershipRequest()) - ->setName($formattedName); - try { - $gapicClient->getMembership($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 listFeaturesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $resourcesElement = new Feature(); - $resources = [ - $resourcesElement, - ]; - $expectedResponse = new ListFeaturesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResources($resources); - $transport->addResponse($expectedResponse); - $request = new ListFeaturesRequest(); - $response = $gapicClient->listFeatures($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResources()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListFeatures', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFeaturesExceptionTest() - { - $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 ListFeaturesRequest(); - try { - $gapicClient->listFeatures($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 listMembershipsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $resourcesElement = new Membership(); - $resources = [ - $resourcesElement, - ]; - $expectedResponse = new ListMembershipsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResources($resources); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListMembershipsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listMemberships($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResources()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListMemberships', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMembershipsExceptionTest() - { - $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 ListMembershipsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listMemberships($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 updateFeatureTest() - { - $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/updateFeatureTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $expectedResponse = new Feature(); - $expectedResponse->setName($name2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateFeatureTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $request = new UpdateFeatureRequest(); - $response = $gapicClient->updateFeature($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.gkehub.v1.GkeHub/UpdateFeature', $actualApiFuncCall); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFeatureTest'); - $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 updateFeatureExceptionTest() - { - $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/updateFeatureTest'); - $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); - $request = new UpdateFeatureRequest(); - $response = $gapicClient->updateFeature($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFeatureTest'); - 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 updateMembershipTest() - { - $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/updateMembershipTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $externalId = 'externalId-1153075697'; - $uniqueId = 'uniqueId-538310583'; - $expectedResponse = new Membership(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setExternalId($externalId); - $expectedResponse->setUniqueId($uniqueId); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateMembershipTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $updateMask = new FieldMask(); - $resource = new Membership(); - $request = (new UpdateMembershipRequest()) - ->setName($formattedName) - ->setUpdateMask($updateMask) - ->setResource($resource); - $response = $gapicClient->updateMembership($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.gkehub.v1.GkeHub/UpdateMembership', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateMembershipTest'); - $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 updateMembershipExceptionTest() - { - $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/updateMembershipTest'); - $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->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $updateMask = new FieldMask(); - $resource = new Membership(); - $request = (new UpdateMembershipRequest()) - ->setName($formattedName) - ->setUpdateMask($updateMask) - ->setResource($resource); - $response = $gapicClient->updateMembership($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateMembershipTest'); - 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 createFeatureAsyncTest() - { - $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/createFeatureTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new Feature(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createFeatureTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $request = new CreateFeatureRequest(); - $response = $gapicClient->createFeatureAsync($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.gkehub.v1.GkeHub/CreateFeature', $actualApiFuncCall); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createFeatureTest'); - $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/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AttachedResources.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AttachedResources.php deleted file mode 100644 index 343f0b990089..000000000000 Binary files a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AttachedResources.php and /dev/null differ diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AttachedService.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AttachedService.php deleted file mode 100644 index 5bbcada37da6..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AttachedService.php +++ /dev/null @@ -1,113 +0,0 @@ -internalAddGeneratedFile( - ' -º( -4google/cloud/gkemulticloud/v1/attached_service.protogoogle.cloud.gkemulticloud.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto6google/cloud/gkemulticloud/v1/attached_resources.proto4google/cloud/gkemulticloud/v1/common_resources.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"… --GenerateAttachedClusterInstallManifestRequestD -parent ( B4àAúA.,gkemulticloud.googleapis.com/AttachedCluster -attached_cluster_id ( BàA -platform_version ( BàAM - proxy_config ( 22.google.cloud.gkemulticloud.v1.AttachedProxyConfigBàA"B -.GenerateAttachedClusterInstallManifestResponse -manifest ( "ì -CreateAttachedClusterRequestD -parent ( B4àAúA.,gkemulticloud.googleapis.com/AttachedClusterM -attached_cluster ( 2..google.cloud.gkemulticloud.v1.AttachedClusterBàA -attached_cluster_id ( BàA - validate_only ("£ -ImportAttachedClusterRequestD -parent ( B4àAúA.,gkemulticloud.googleapis.com/AttachedCluster - validate_only ( -fleet_membership ( BàA -platform_version ( BàA - distribution ( BàAM - proxy_config ( 22.google.cloud.gkemulticloud.v1.AttachedProxyConfigBàA"º -UpdateAttachedClusterRequestM -attached_cluster ( 2..google.cloud.gkemulticloud.v1.AttachedClusterBàA - validate_only (4 - update_mask ( 2.google.protobuf.FieldMaskBàA"_ -GetAttachedClusterRequestB -name ( B4àAúA. -,gkemulticloud.googleapis.com/AttachedCluster"Š -ListAttachedClustersRequestD -parent ( B4àAúA.,gkemulticloud.googleapis.com/AttachedCluster - page_size ( - -page_token ( "‚ -ListAttachedClustersResponseI -attached_clusters ( 2..google.cloud.gkemulticloud.v1.AttachedCluster -next_page_token ( "µ -DeleteAttachedClusterRequestB -name ( B4àAúA. -,gkemulticloud.googleapis.com/AttachedCluster - validate_only ( - allow_missing ( - ignore_errors ( -etag ( "i -GetAttachedServerConfigRequestG -name ( B9àAúA3 -1gkemulticloud.googleapis.com/AttachedServerConfig"Ê -(GenerateAttachedClusterAgentTokenRequestN -attached_cluster ( B4àAúA. -,gkemulticloud.googleapis.com/AttachedCluster - subject_token ( BàA -subject_token_type ( BàA -version ( BàA - -grant_type ( BàA -audience ( BàA -scope ( BàA! -requested_token_type ( BàA -options - ( BàA"i -)GenerateAttachedClusterAgentTokenResponse - access_token (  - -expires_in ( - -token_type ( 2Ý -AttachedClusters™ -CreateAttachedCluster;.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest.google.longrunning.Operation"£ÊA$ -AttachedClusterOperationMetadataÚA+parent,attached_cluster,attached_cluster_id‚Óä“H"4/v1/{parent=projects/*/locations/*}/attachedClusters:attached_cluster› -UpdateAttachedCluster;.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest.google.longrunning.Operation"¥ÊA$ -AttachedClusterOperationMetadataÚAattached_cluster,update_mask‚Óä“Y2E/v1/{attached_cluster.name=projects/*/locations/*/attachedClusters/*}:attached_clusterý -ImportAttachedCluster;.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest.google.longrunning.Operation"‡ÊA$ -AttachedClusterOperationMetadataÚAparent,fleet_membership‚Óä“@";/v1/{parent=projects/*/locations/*}/attachedClusters:import:*à -GetAttachedCluster8.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest..google.cloud.gkemulticloud.v1.AttachedCluster"CÚAname‚Óä“64/v1/{name=projects/*/locations/*/attachedClusters/*}Ö -ListAttachedClusters:.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest;.google.cloud.gkemulticloud.v1.ListAttachedClustersResponse"EÚAparent‚Óä“64/v1/{parent=projects/*/locations/*}/attachedClusterså -DeleteAttachedCluster;.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest.google.longrunning.Operation"pÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“6*4/v1/{name=projects/*/locations/*/attachedClusters/*}Ô -GetAttachedServerConfig=.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest3.google.cloud.gkemulticloud.v1.AttachedServerConfig"EÚAname‚Óä“86/v1/{name=projects/*/locations/*/attachedServerConfig}¶ -&GenerateAttachedClusterInstallManifestL.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequestM.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse"oÚAparent,attached_cluster_id‚Óä“LJ/v1/{parent=projects/*/locations/*}:generateAttachedClusterInstallManifest¥ -!GenerateAttachedClusterAgentTokenG.google.cloud.gkemulticloud.v1.GenerateAttachedClusterAgentTokenRequestH.google.cloud.gkemulticloud.v1.GenerateAttachedClusterAgentTokenResponse"m‚Óä“g"b/v1/{attached_cluster=projects/*/locations/*/attachedClusters/*}:generateAttachedClusterAgentToken:*PÊAgkemulticloud.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBç -!com.google.cloud.gkemulticloud.v1BAttachedServiceProtoPZGcloud.google.com/go/gkemulticloud/apiv1/gkemulticloudpb;gkemulticloudpbªGoogle.Cloud.GkeMultiCloud.V1ÊGoogle\\Cloud\\GkeMultiCloud\\V1ê Google::Cloud::GkeMultiCloud::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AwsResources.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AwsResources.php deleted file mode 100644 index c45c3fbfda31..000000000000 Binary files a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AwsResources.php and /dev/null differ diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AwsService.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AwsService.php deleted file mode 100644 index 754f9ac6a9db..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AwsService.php +++ /dev/null @@ -1,156 +0,0 @@ -internalAddGeneratedFile( - ' -Ž9 -/google/cloud/gkemulticloud/v1/aws_service.protogoogle.cloud.gkemulticloud.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto1google/cloud/gkemulticloud/v1/aws_resources.proto4google/cloud/gkemulticloud/v1/common_resources.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"Ó -CreateAwsClusterRequest? -parent ( B/àAúA)\'gkemulticloud.googleapis.com/AwsClusterC - aws_cluster ( 2).google.cloud.gkemulticloud.v1.AwsClusterBàA -aws_cluster_id ( BàA - validate_only ("« -UpdateAwsClusterRequestC - aws_cluster ( 2).google.cloud.gkemulticloud.v1.AwsClusterBàA - validate_only (4 - update_mask ( 2.google.protobuf.FieldMaskBàA"U -GetAwsClusterRequest= -name ( B/àAúA) -\'gkemulticloud.googleapis.com/AwsCluster"€ -ListAwsClustersRequest? -parent ( B/àAúA)\'gkemulticloud.googleapis.com/AwsCluster - page_size ( - -page_token ( "s -ListAwsClustersResponse? - aws_clusters ( 2).google.cloud.gkemulticloud.v1.AwsCluster -next_page_token ( "° -DeleteAwsClusterRequest= -name ( B/àAúA) -\'gkemulticloud.googleapis.com/AwsCluster - validate_only ( - allow_missing ( - ignore_errors (BàA -etag ( "Ú -CreateAwsNodePoolRequest@ -parent ( B0àAúA*(gkemulticloud.googleapis.com/AwsNodePoolF - aws_node_pool ( 2*.google.cloud.gkemulticloud.v1.AwsNodePoolBàA -aws_node_pool_id ( BàA - validate_only ("¯ -UpdateAwsNodePoolRequestF - aws_node_pool ( 2*.google.cloud.gkemulticloud.v1.AwsNodePoolBàA - validate_only (4 - update_mask ( 2.google.protobuf.FieldMaskBàA"| - RollbackAwsNodePoolUpdateRequest> -name ( B0àAúA* -(gkemulticloud.googleapis.com/AwsNodePool - respect_pdb (BàA"W -GetAwsNodePoolRequest> -name ( B0àAúA* -(gkemulticloud.googleapis.com/AwsNodePool"‚ -ListAwsNodePoolsRequest@ -parent ( B0àAúA*(gkemulticloud.googleapis.com/AwsNodePool - page_size ( - -page_token ( "w -ListAwsNodePoolsResponseB -aws_node_pools ( 2*.google.cloud.gkemulticloud.v1.AwsNodePool -next_page_token ( "² -DeleteAwsNodePoolRequest> -name ( B0àAúA* -(gkemulticloud.googleapis.com/AwsNodePool - validate_only ( - allow_missing ( - ignore_errors (BàA -etag ( "a -GetAwsOpenIdConfigRequestD - aws_cluster ( B/àAúA) -\'gkemulticloud.googleapis.com/AwsCluster"` -GetAwsJsonWebKeysRequestD - aws_cluster ( B/àAúA) -\'gkemulticloud.googleapis.com/AwsCluster"_ -GetAwsServerConfigRequestB -name ( B4àAúA. -,gkemulticloud.googleapis.com/AwsServerConfig"e -GenerateAwsAccessTokenRequestD - aws_cluster ( B/àAúA) -\'gkemulticloud.googleapis.com/AwsCluster"u -GenerateAwsAccessTokenResponse - access_token ( BàA8 -expiration_time ( 2.google.protobuf.TimestampBàA"Ö -#GenerateAwsClusterAgentTokenRequestD - aws_cluster ( B/àAúA) -\'gkemulticloud.googleapis.com/AwsCluster - subject_token ( BàA -subject_token_type ( BàA -version ( BàA - node_pool_id ( BàA - -grant_type ( BàA -audience ( BàA -scope ( BàA! -requested_token_type ( BàA -options - ( BàA"d -$GenerateAwsClusterAgentTokenResponse - access_token (  - -expires_in ( - -token_type ( 2© - AwsClustersö -CreateAwsCluster6.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest.google.longrunning.Operation"ŠÊA - -AwsClusterOperationMetadataÚA!parent,aws_cluster,aws_cluster_id‚Óä“>"//v1/{parent=projects/*/locations/*}/awsClusters: aws_clusterø -UpdateAwsCluster6.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest.google.longrunning.Operation"ŒÊA - -AwsClusterOperationMetadataÚAaws_cluster,update_mask‚Óä“J2;/v1/{aws_cluster.name=projects/*/locations/*/awsClusters/*}: aws_cluster¯ - GetAwsCluster3.google.cloud.gkemulticloud.v1.GetAwsClusterRequest).google.cloud.gkemulticloud.v1.AwsCluster">ÚAname‚Óä“1//v1/{name=projects/*/locations/*/awsClusters/*} -ListAwsClusters5.google.cloud.gkemulticloud.v1.ListAwsClustersRequest6.google.cloud.gkemulticloud.v1.ListAwsClustersResponse"@ÚAparent‚Óä“1//v1/{parent=projects/*/locations/*}/awsClustersÖ -DeleteAwsCluster6.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest.google.longrunning.Operation"kÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“1*//v1/{name=projects/*/locations/*/awsClusters/*}‡ -GenerateAwsClusterAgentTokenB.google.cloud.gkemulticloud.v1.GenerateAwsClusterAgentTokenRequestC.google.cloud.gkemulticloud.v1.GenerateAwsClusterAgentTokenResponse"^‚Óä“X"S/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}:generateAwsClusterAgentToken:*ì -GenerateAwsAccessToken<.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest=.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse"U‚Óä“OM/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}:generateAwsAccessTokenŽ -CreateAwsNodePool7.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest.google.longrunning.Operation" ÊA - AwsNodePoolOperationMetadataÚA%parent,aws_node_pool,aws_node_pool_id‚Óä“O">/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePools: aws_node_pool -UpdateAwsNodePool7.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest.google.longrunning.Operation"¢ÊA - AwsNodePoolOperationMetadataÚAaws_node_pool,update_mask‚Óä“]2L/v1/{aws_node_pool.name=projects/*/locations/*/awsClusters/*/awsNodePools/*}: aws_node_poolù -RollbackAwsNodePoolUpdate?.google.cloud.gkemulticloud.v1.RollbackAwsNodePoolUpdateRequest.google.longrunning.Operation"|ÊA - AwsNodePoolOperationMetadataÚAname‚Óä“L"G/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}:rollback:*Á -GetAwsNodePool4.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest*.google.cloud.gkemulticloud.v1.AwsNodePool"MÚAname‚Óä“@>/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}Ô -ListAwsNodePools6.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest7.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse"OÚAparent‚Óä“@>/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePoolsç -DeleteAwsNodePool7.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest.google.longrunning.Operation"zÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“@*>/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}ß -GetAwsOpenIdConfig8.google.cloud.gkemulticloud.v1.GetAwsOpenIdConfigRequest..google.cloud.gkemulticloud.v1.AwsOpenIdConfig"_‚Óä“YW/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}/.well-known/openid-configurationÀ -GetAwsJsonWebKeys7.google.cloud.gkemulticloud.v1.GetAwsJsonWebKeysRequest-.google.cloud.gkemulticloud.v1.AwsJsonWebKeys"C‚Óä“=;/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}/jwksÀ -GetAwsServerConfig8.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest..google.cloud.gkemulticloud.v1.AwsServerConfig"@ÚAname‚Óä“31/v1/{name=projects/*/locations/*/awsServerConfig}PÊAgkemulticloud.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBâ -!com.google.cloud.gkemulticloud.v1BAwsServiceProtoPZGcloud.google.com/go/gkemulticloud/apiv1/gkemulticloudpb;gkemulticloudpbªGoogle.Cloud.GkeMultiCloud.V1ÊGoogle\\Cloud\\GkeMultiCloud\\V1ê Google::Cloud::GkeMultiCloud::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AzureResources.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AzureResources.php deleted file mode 100644 index 5666e4e33faa..000000000000 Binary files a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AzureResources.php and /dev/null differ diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AzureService.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AzureService.php deleted file mode 100644 index b6b507c9edfc..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/AzureService.php +++ /dev/null @@ -1,175 +0,0 @@ -internalAddGeneratedFile( - ' -ÙD -1google/cloud/gkemulticloud/v1/azure_service.protogoogle.cloud.gkemulticloud.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto3google/cloud/gkemulticloud/v1/azure_resources.proto4google/cloud/gkemulticloud/v1/common_resources.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"Ý -CreateAzureClusterRequestA -parent ( B1àAúA+)gkemulticloud.googleapis.com/AzureClusterG - azure_cluster ( 2+.google.cloud.gkemulticloud.v1.AzureClusterBàA -azure_cluster_id ( BàA - validate_only ("± -UpdateAzureClusterRequestG - azure_cluster ( 2+.google.cloud.gkemulticloud.v1.AzureClusterBàA - validate_only (4 - update_mask ( 2.google.protobuf.FieldMaskBàA"Y -GetAzureClusterRequest? -name ( B1àAúA+ -)gkemulticloud.googleapis.com/AzureCluster"„ -ListAzureClustersRequestA -parent ( B1àAúA+)gkemulticloud.googleapis.com/AzureCluster - page_size ( - -page_token ( "y -ListAzureClustersResponseC -azure_clusters ( 2+.google.cloud.gkemulticloud.v1.AzureCluster -next_page_token ( "´ -DeleteAzureClusterRequest? -name ( B1àAúA+ -)gkemulticloud.googleapis.com/AzureCluster - allow_missing ( - validate_only ( -etag (  - ignore_errors (BàA"ä -CreateAzureNodePoolRequestB -parent ( B2àAúA,*gkemulticloud.googleapis.com/AzureNodePoolJ -azure_node_pool ( 2,.google.cloud.gkemulticloud.v1.AzureNodePoolBàA -azure_node_pool_id ( BàA - validate_only ("µ -UpdateAzureNodePoolRequestJ -azure_node_pool ( 2,.google.cloud.gkemulticloud.v1.AzureNodePoolBàA - validate_only (4 - update_mask ( 2.google.protobuf.FieldMaskBàA"[ -GetAzureNodePoolRequest@ -name ( B2àAúA, -*gkemulticloud.googleapis.com/AzureNodePool"† -ListAzureNodePoolsRequestB -parent ( B2àAúA,*gkemulticloud.googleapis.com/AzureNodePool - page_size ( - -page_token ( "} -ListAzureNodePoolsResponseF -azure_node_pools ( 2,.google.cloud.gkemulticloud.v1.AzureNodePool -next_page_token ( "¶ -DeleteAzureNodePoolRequest@ -name ( B2àAúA, -*gkemulticloud.googleapis.com/AzureNodePool - validate_only ( - allow_missing ( -etag (  - ignore_errors (BàA"g -GetAzureOpenIdConfigRequestH - azure_cluster ( B1àAúA+ -)gkemulticloud.googleapis.com/AzureCluster"f -GetAzureJsonWebKeysRequestH - azure_cluster ( B1àAúA+ -)gkemulticloud.googleapis.com/AzureCluster"c -GetAzureServerConfigRequestD -name ( B6àAúA0 -.gkemulticloud.googleapis.com/AzureServerConfig"Ø -CreateAzureClientRequest@ -parent ( B0àAúA*(gkemulticloud.googleapis.com/AzureClientE - azure_client ( 2*.google.cloud.gkemulticloud.v1.AzureClientBàA -azure_client_id ( BàA - validate_only ("W -GetAzureClientRequest> -name ( B0àAúA* -(gkemulticloud.googleapis.com/AzureClient"‚ -ListAzureClientsRequest@ -parent ( B0àAúA*(gkemulticloud.googleapis.com/AzureClient - page_size ( - -page_token ( "v -ListAzureClientsResponseA - azure_clients ( 2*.google.cloud.gkemulticloud.v1.AzureClient -next_page_token ( "ˆ -DeleteAzureClientRequest> -name ( B0àAúA* -(gkemulticloud.googleapis.com/AzureClient - allow_missing ( - validate_only ("k -GenerateAzureAccessTokenRequestH - azure_cluster ( B1àAúA+ -)gkemulticloud.googleapis.com/AzureCluster"w - GenerateAzureAccessTokenResponse - access_token ( BàA8 -expiration_time ( 2.google.protobuf.TimestampBàA"Ü -%GenerateAzureClusterAgentTokenRequestH - azure_cluster ( B1àAúA+ -)gkemulticloud.googleapis.com/AzureCluster - subject_token ( BàA -subject_token_type ( BàA -version ( BàA - node_pool_id ( BàA - -grant_type ( BàA -audience ( BàA -scope ( BàA! -requested_token_type ( BàA -options - ( BàA"f -&GenerateAzureClusterAgentTokenResponse - access_token (  - -expires_in ( - -token_type ( 2Ì# - AzureClustersý -CreateAzureClient7.google.cloud.gkemulticloud.v1.CreateAzureClientRequest.google.longrunning.Operation"ÊA - AzureClientOperationMetadataÚA#parent,azure_client,azure_client_id‚Óä“@"0/v1/{parent=projects/*/locations/*}/azureClients: azure_client³ -GetAzureClient4.google.cloud.gkemulticloud.v1.GetAzureClientRequest*.google.cloud.gkemulticloud.v1.AzureClient"?ÚAname‚Óä“20/v1/{name=projects/*/locations/*/azureClients/*}Æ -ListAzureClients6.google.cloud.gkemulticloud.v1.ListAzureClientsRequest7.google.cloud.gkemulticloud.v1.ListAzureClientsResponse"AÚAparent‚Óä“20/v1/{parent=projects/*/locations/*}/azureClientsÙ -DeleteAzureClient7.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest.google.longrunning.Operation"lÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“2*0/v1/{name=projects/*/locations/*/azureClients/*}„ -CreateAzureCluster8.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest.google.longrunning.Operation"”ÊA! - AzureClusterOperationMetadataÚA%parent,azure_cluster,azure_cluster_id‚Óä“B"1/v1/{parent=projects/*/locations/*}/azureClusters: azure_cluster† -UpdateAzureCluster8.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest.google.longrunning.Operation"–ÊA! - AzureClusterOperationMetadataÚAazure_cluster,update_mask‚Óä“P2?/v1/{azure_cluster.name=projects/*/locations/*/azureClusters/*}: azure_cluster· -GetAzureCluster5.google.cloud.gkemulticloud.v1.GetAzureClusterRequest+.google.cloud.gkemulticloud.v1.AzureCluster"@ÚAname‚Óä“31/v1/{name=projects/*/locations/*/azureClusters/*}Ê -ListAzureClusters7.google.cloud.gkemulticloud.v1.ListAzureClustersRequest8.google.cloud.gkemulticloud.v1.ListAzureClustersResponse"BÚAparent‚Óä“31/v1/{parent=projects/*/locations/*}/azureClustersÜ -DeleteAzureCluster8.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest.google.longrunning.Operation"mÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“3*1/v1/{name=projects/*/locations/*/azureClusters/*}“ -GenerateAzureClusterAgentTokenD.google.cloud.gkemulticloud.v1.GenerateAzureClusterAgentTokenRequestE.google.cloud.gkemulticloud.v1.GenerateAzureClusterAgentTokenResponse"d‚Óä“^"Y/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}:generateAzureClusterAgentToken:*ø -GenerateAzureAccessToken>.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest?.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse"[‚Óä“US/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}:generateAzureAccessTokenž -CreateAzureNodePool9.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest.google.longrunning.Operation"¬ÊA" - AzureNodePoolOperationMetadataÚA)parent,azure_node_pool,azure_node_pool_id‚Óä“U"B/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePools:azure_node_pool  -UpdateAzureNodePool9.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest.google.longrunning.Operation"®ÊA" - AzureNodePoolOperationMetadataÚAazure_node_pool,update_mask‚Óä“e2R/v1/{azure_node_pool.name=projects/*/locations/*/azureClusters/*/azureNodePools/*}:azure_node_poolË -GetAzureNodePool6.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest,.google.cloud.gkemulticloud.v1.AzureNodePool"QÚAname‚Óä“DB/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}Þ -ListAzureNodePools8.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest9.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse"SÚAparent‚Óä“DB/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePoolsï -DeleteAzureNodePool9.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest.google.longrunning.Operation"~ÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“D*B/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}ù -GetAzureOpenIdConfig:.google.cloud.gkemulticloud.v1.GetAzureOpenIdConfigRequest0.google.cloud.gkemulticloud.v1.AzureOpenIdConfig"sÚA azure_cluster‚Óä“][/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}/.well-known/openid-configurationÚ -GetAzureJsonWebKeys9.google.cloud.gkemulticloud.v1.GetAzureJsonWebKeysRequest/.google.cloud.gkemulticloud.v1.AzureJsonWebKeys"WÚA azure_cluster‚Óä“A?/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}/jwksÈ -GetAzureServerConfig:.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest0.google.cloud.gkemulticloud.v1.AzureServerConfig"BÚAname‚Óä“53/v1/{name=projects/*/locations/*/azureServerConfig}PÊAgkemulticloud.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBä -!com.google.cloud.gkemulticloud.v1BAzureServiceProtoPZGcloud.google.com/go/gkemulticloud/apiv1/gkemulticloudpb;gkemulticloudpbªGoogle.Cloud.GkeMultiCloud.V1ÊGoogle\\Cloud\\GkeMultiCloud\\V1ê Google::Cloud::GkeMultiCloud::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/CommonResources.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/CommonResources.php deleted file mode 100644 index 97cc245d9227..000000000000 Binary files a/owl-bot-staging/GkeMultiCloud/v1/proto/src/GPBMetadata/Google/Cloud/Gkemulticloud/V1/CommonResources.php and /dev/null differ diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedCluster.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedCluster.php deleted file mode 100644 index f86ea9844efa..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedCluster.php +++ /dev/null @@ -1,1009 +0,0 @@ -google.cloud.gkemulticloud.v1.AttachedCluster - */ -class AttachedCluster extends \Google\Protobuf\Internal\Message -{ - /** - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Required. OpenID Connect (OIDC) configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedOidcConfig oidc_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $oidc_config = null; - /** - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * - * Generated from protobuf field string platform_version = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $platform_version = ''; - /** - * Required. The Kubernetes distribution of the underlying attached cluster. - * Supported values: ["eks", "aks", "generic"]. - * - * Generated from protobuf field string distribution = 16 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $distribution = ''; - /** - * Output only. The region where this cluster runs. - * For EKS clusters, this is a AWS region. For AKS clusters, - * this is an Azure region. - * - * Generated from protobuf field string cluster_region = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster_region = ''; - /** - * Required. Fleet configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $fleet = null; - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. A globally unique identifier for the cluster. - * - * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. If set, there are currently changes in flight to the cluster. - * - * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reconciling = false; - /** - * Output only. The time at which this cluster was registered. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time at which this cluster was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 11; - */ - protected $etag = ''; - /** - * Output only. The Kubernetes version of the cluster. - * - * Generated from protobuf field string kubernetes_version = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $kubernetes_version = ''; - /** - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $annotations; - /** - * Output only. Workload Identity settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $workload_identity_config = null; - /** - * Optional. Logging configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $logging_config = null; - /** - * Output only. A set of errors found in the cluster. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterError errors = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $errors; - /** - * Optional. Configuration related to the cluster RBAC settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedClustersAuthorization authorization = 21 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $authorization = null; - /** - * Optional. Monitoring configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $monitoring_config = null; - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 24 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $proxy_config = null; - /** - * Optional. Binary Authorization configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 25 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $binary_authorization = null; - /** - * Optional. Security Posture configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.SecurityPostureConfig security_posture_config = 26 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $security_posture_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @type string $description - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * @type \Google\Cloud\GkeMultiCloud\V1\AttachedOidcConfig $oidc_config - * Required. OpenID Connect (OIDC) configuration for the cluster. - * @type string $platform_version - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * @type string $distribution - * Required. The Kubernetes distribution of the underlying attached cluster. - * Supported values: ["eks", "aks", "generic"]. - * @type string $cluster_region - * Output only. The region where this cluster runs. - * For EKS clusters, this is a AWS region. For AKS clusters, - * this is an Azure region. - * @type \Google\Cloud\GkeMultiCloud\V1\Fleet $fleet - * Required. Fleet configuration. - * @type int $state - * Output only. The current state of the cluster. - * @type string $uid - * Output only. A globally unique identifier for the cluster. - * @type bool $reconciling - * Output only. If set, there are currently changes in flight to the cluster. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this cluster was registered. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which this cluster was last updated. - * @type string $etag - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @type string $kubernetes_version - * Output only. The Kubernetes version of the cluster. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * @type \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig $workload_identity_config - * Output only. Workload Identity settings. - * @type \Google\Cloud\GkeMultiCloud\V1\LoggingConfig $logging_config - * Optional. Logging configuration for this cluster. - * @type array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterError>|\Google\Protobuf\Internal\RepeatedField $errors - * Output only. A set of errors found in the cluster. - * @type \Google\Cloud\GkeMultiCloud\V1\AttachedClustersAuthorization $authorization - * Optional. Configuration related to the cluster RBAC settings. - * @type \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig $monitoring_config - * Optional. Monitoring configuration for this cluster. - * @type \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $proxy_config - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * @type \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization $binary_authorization - * Optional. Binary Authorization configuration for this cluster. - * @type \Google\Cloud\GkeMultiCloud\V1\SecurityPostureConfig $security_posture_config - * Optional. Security Posture configuration for this cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); - parent::__construct($data); - } - - /** - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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; - } - - /** - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. OpenID Connect (OIDC) configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedOidcConfig oidc_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AttachedOidcConfig|null - */ - public function getOidcConfig() - { - return $this->oidc_config; - } - - public function hasOidcConfig() - { - return isset($this->oidc_config); - } - - public function clearOidcConfig() - { - unset($this->oidc_config); - } - - /** - * Required. OpenID Connect (OIDC) configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedOidcConfig oidc_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AttachedOidcConfig $var - * @return $this - */ - public function setOidcConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedOidcConfig::class); - $this->oidc_config = $var; - - return $this; - } - - /** - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * - * Generated from protobuf field string platform_version = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPlatformVersion() - { - return $this->platform_version; - } - - /** - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * - * Generated from protobuf field string platform_version = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPlatformVersion($var) - { - GPBUtil::checkString($var, True); - $this->platform_version = $var; - - return $this; - } - - /** - * Required. The Kubernetes distribution of the underlying attached cluster. - * Supported values: ["eks", "aks", "generic"]. - * - * Generated from protobuf field string distribution = 16 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDistribution() - { - return $this->distribution; - } - - /** - * Required. The Kubernetes distribution of the underlying attached cluster. - * Supported values: ["eks", "aks", "generic"]. - * - * Generated from protobuf field string distribution = 16 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDistribution($var) - { - GPBUtil::checkString($var, True); - $this->distribution = $var; - - return $this; - } - - /** - * Output only. The region where this cluster runs. - * For EKS clusters, this is a AWS region. For AKS clusters, - * this is an Azure region. - * - * Generated from protobuf field string cluster_region = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getClusterRegion() - { - return $this->cluster_region; - } - - /** - * Output only. The region where this cluster runs. - * For EKS clusters, this is a AWS region. For AKS clusters, - * this is an Azure region. - * - * Generated from protobuf field string cluster_region = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setClusterRegion($var) - { - GPBUtil::checkString($var, True); - $this->cluster_region = $var; - - return $this; - } - - /** - * Required. Fleet configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\Fleet|null - */ - public function getFleet() - { - return $this->fleet; - } - - public function hasFleet() - { - return isset($this->fleet); - } - - public function clearFleet() - { - unset($this->fleet); - } - - /** - * Required. Fleet configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\Fleet $var - * @return $this - */ - public function setFleet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\Fleet::class); - $this->fleet = $var; - - return $this; - } - - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\AttachedCluster\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. A globally unique identifier for the cluster. - * - * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. A globally unique identifier for the cluster. - * - * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. If set, there are currently changes in flight to the cluster. - * - * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getReconciling() - { - return $this->reconciling; - } - - /** - * Output only. If set, there are currently changes in flight to the cluster. - * - * Generated from protobuf field bool reconciling = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setReconciling($var) - { - GPBUtil::checkBool($var); - $this->reconciling = $var; - - return $this; - } - - /** - * Output only. The time at which this cluster was registered. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.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 cluster was registered. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.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 at which this cluster was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time at which this cluster was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 11; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 11; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Output only. The Kubernetes version of the cluster. - * - * Generated from protobuf field string kubernetes_version = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getKubernetesVersion() - { - return $this->kubernetes_version; - } - - /** - * Output only. The Kubernetes version of the cluster. - * - * Generated from protobuf field string kubernetes_version = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setKubernetesVersion($var) - { - GPBUtil::checkString($var, True); - $this->kubernetes_version = $var; - - return $this; - } - - /** - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Output only. Workload Identity settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig|null - */ - public function getWorkloadIdentityConfig() - { - return $this->workload_identity_config; - } - - public function hasWorkloadIdentityConfig() - { - return isset($this->workload_identity_config); - } - - public function clearWorkloadIdentityConfig() - { - unset($this->workload_identity_config); - } - - /** - * Output only. Workload Identity settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig $var - * @return $this - */ - public function setWorkloadIdentityConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig::class); - $this->workload_identity_config = $var; - - return $this; - } - - /** - * Optional. Logging configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\LoggingConfig|null - */ - public function getLoggingConfig() - { - return $this->logging_config; - } - - public function hasLoggingConfig() - { - return isset($this->logging_config); - } - - public function clearLoggingConfig() - { - unset($this->logging_config); - } - - /** - * Optional. Logging configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\LoggingConfig $var - * @return $this - */ - public function setLoggingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\LoggingConfig::class); - $this->logging_config = $var; - - return $this; - } - - /** - * Output only. A set of errors found in the cluster. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterError errors = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Output only. A set of errors found in the cluster. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterError errors = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AttachedClusterError::class); - $this->errors = $arr; - - return $this; - } - - /** - * Optional. Configuration related to the cluster RBAC settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedClustersAuthorization authorization = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AttachedClustersAuthorization|null - */ - public function getAuthorization() - { - return $this->authorization; - } - - public function hasAuthorization() - { - return isset($this->authorization); - } - - public function clearAuthorization() - { - unset($this->authorization); - } - - /** - * Optional. Configuration related to the cluster RBAC settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedClustersAuthorization authorization = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AttachedClustersAuthorization $var - * @return $this - */ - public function setAuthorization($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedClustersAuthorization::class); - $this->authorization = $var; - - return $this; - } - - /** - * Optional. Monitoring configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig|null - */ - public function getMonitoringConfig() - { - return $this->monitoring_config; - } - - public function hasMonitoringConfig() - { - return isset($this->monitoring_config); - } - - public function clearMonitoringConfig() - { - unset($this->monitoring_config); - } - - /** - * Optional. Monitoring configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig $var - * @return $this - */ - public function setMonitoringConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig::class); - $this->monitoring_config = $var; - - return $this; - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 24 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig|null - */ - public function getProxyConfig() - { - return $this->proxy_config; - } - - public function hasProxyConfig() - { - return isset($this->proxy_config); - } - - public function clearProxyConfig() - { - unset($this->proxy_config); - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 24 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $var - * @return $this - */ - public function setProxyConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig::class); - $this->proxy_config = $var; - - return $this; - } - - /** - * Optional. Binary Authorization configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization|null - */ - public function getBinaryAuthorization() - { - return $this->binary_authorization; - } - - public function hasBinaryAuthorization() - { - return isset($this->binary_authorization); - } - - public function clearBinaryAuthorization() - { - unset($this->binary_authorization); - } - - /** - * Optional. Binary Authorization configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization $var - * @return $this - */ - public function setBinaryAuthorization($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization::class); - $this->binary_authorization = $var; - - return $this; - } - - /** - * Optional. Security Posture configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.SecurityPostureConfig security_posture_config = 26 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\SecurityPostureConfig|null - */ - public function getSecurityPostureConfig() - { - return $this->security_posture_config; - } - - public function hasSecurityPostureConfig() - { - return isset($this->security_posture_config); - } - - public function clearSecurityPostureConfig() - { - unset($this->security_posture_config); - } - - /** - * Optional. Security Posture configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.SecurityPostureConfig security_posture_config = 26 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\SecurityPostureConfig $var - * @return $this - */ - public function setSecurityPostureConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\SecurityPostureConfig::class); - $this->security_posture_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedCluster/State.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedCluster/State.php deleted file mode 100644 index 51a928e34a8a..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedCluster/State.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.gkemulticloud.v1.AttachedCluster.State - */ -class State -{ - /** - * Not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The PROVISIONING state indicates the cluster is being registered. - * - * Generated from protobuf enum PROVISIONING = 1; - */ - const PROVISIONING = 1; - /** - * The RUNNING state indicates the cluster has been register and is fully - * usable. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The RECONCILING state indicates that some work is actively being done on - * the cluster, such as upgrading software components. - * - * Generated from protobuf enum RECONCILING = 3; - */ - const RECONCILING = 3; - /** - * The STOPPING state indicates the cluster is being de-registered. - * - * Generated from protobuf enum STOPPING = 4; - */ - const STOPPING = 4; - /** - * The ERROR state indicates the cluster is in a broken unrecoverable - * state. - * - * Generated from protobuf enum ERROR = 5; - */ - const ERROR = 5; - /** - * The DEGRADED state indicates the cluster requires user action to - * restore full functionality. - * - * Generated from protobuf enum DEGRADED = 6; - */ - const DEGRADED = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PROVISIONING => 'PROVISIONING', - self::RUNNING => 'RUNNING', - self::RECONCILING => 'RECONCILING', - self::STOPPING => 'STOPPING', - self::ERROR => 'ERROR', - self::DEGRADED => 'DEGRADED', - ]; - - 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\GkeMultiCloud\V1\AttachedCluster_State::class); - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterError.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterError.php deleted file mode 100644 index 7e2ea588596e..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterError.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AttachedClusterError - */ -class AttachedClusterError extends \Google\Protobuf\Internal\Message -{ - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $message - * Human-friendly description of the error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); - parent::__construct($data); - } - - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterGroup.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterGroup.php deleted file mode 100644 index 74ec3910d5e6..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterGroup.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AttachedClusterGroup - */ -class AttachedClusterGroup extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the group, e.g. `my-group@domain.com`. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $group - * Required. The name of the group, e.g. `my-group@domain.com`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the group, e.g. `my-group@domain.com`. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGroup() - { - return $this->group; - } - - /** - * Required. The name of the group, e.g. `my-group@domain.com`. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkString($var, True); - $this->group = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterUser.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterUser.php deleted file mode 100644 index f020f59ff48b..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClusterUser.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AttachedClusterUser - */ -class AttachedClusterUser extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $username = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $username - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClustersAuthorization.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClustersAuthorization.php deleted file mode 100644 index ee4306f352a8..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedClustersAuthorization.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.gkemulticloud.v1.AttachedClustersAuthorization - */ -class AttachedClustersAuthorization extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $admin_users; - /** - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $admin_groups; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterUser>|\Google\Protobuf\Internal\RepeatedField $admin_users - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * @type array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterGroup>|\Google\Protobuf\Internal\RepeatedField $admin_groups - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdminUsers() - { - return $this->admin_users; - } - - /** - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterUser>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdminUsers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AttachedClusterUser::class); - $this->admin_users = $arr; - - return $this; - } - - /** - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdminGroups() - { - return $this->admin_groups; - } - - /** - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AttachedClusterGroup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdminGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AttachedClusterGroup::class); - $this->admin_groups = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedOidcConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedOidcConfig.php deleted file mode 100644 index 116db53533d8..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedOidcConfig.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.gkemulticloud.v1.AttachedOidcConfig - */ -class AttachedOidcConfig extends \Google\Protobuf\Internal\Message -{ - /** - * A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://`. - * - * Generated from protobuf field string issuer_url = 1; - */ - protected $issuer_url = ''; - /** - * Optional. OIDC verification keys in JWKS format (RFC 7517). - * It contains a list of OIDC verification keys that can be used to verify - * OIDC JWTs. - * This field is required for cluster that doesn't have a publicly available - * discovery endpoint. When provided, it will be directly used - * to verify the OIDC JWT asserted by the IDP. - * - * Generated from protobuf field bytes jwks = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $jwks = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $issuer_url - * A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://`. - * @type string $jwks - * Optional. OIDC verification keys in JWKS format (RFC 7517). - * It contains a list of OIDC verification keys that can be used to verify - * OIDC JWTs. - * This field is required for cluster that doesn't have a publicly available - * discovery endpoint. When provided, it will be directly used - * to verify the OIDC JWT asserted by the IDP. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); - parent::__construct($data); - } - - /** - * A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://`. - * - * Generated from protobuf field string issuer_url = 1; - * @return string - */ - public function getIssuerUrl() - { - return $this->issuer_url; - } - - /** - * A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://`. - * - * Generated from protobuf field string issuer_url = 1; - * @param string $var - * @return $this - */ - public function setIssuerUrl($var) - { - GPBUtil::checkString($var, True); - $this->issuer_url = $var; - - return $this; - } - - /** - * Optional. OIDC verification keys in JWKS format (RFC 7517). - * It contains a list of OIDC verification keys that can be used to verify - * OIDC JWTs. - * This field is required for cluster that doesn't have a publicly available - * discovery endpoint. When provided, it will be directly used - * to verify the OIDC JWT asserted by the IDP. - * - * Generated from protobuf field bytes jwks = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getJwks() - { - return $this->jwks; - } - - /** - * Optional. OIDC verification keys in JWKS format (RFC 7517). - * It contains a list of OIDC verification keys that can be used to verify - * OIDC JWTs. - * This field is required for cluster that doesn't have a publicly available - * discovery endpoint. When provided, it will be directly used - * to verify the OIDC JWT asserted by the IDP. - * - * Generated from protobuf field bytes jwks = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setJwks($var) - { - GPBUtil::checkString($var, False); - $this->jwks = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedPlatformVersionInfo.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedPlatformVersionInfo.php deleted file mode 100644 index a81ade67a335..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedPlatformVersionInfo.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo - */ -class AttachedPlatformVersionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Platform version name. - * - * Generated from protobuf field string version = 1; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * Platform version name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); - parent::__construct($data); - } - - /** - * Platform version name. - * - * Generated from protobuf field string version = 1; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Platform version name. - * - * Generated from protobuf field string version = 1; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedProxyConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedProxyConfig.php deleted file mode 100644 index e08ea3aba3b0..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedProxyConfig.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.gkemulticloud.v1.AttachedProxyConfig - */ -class AttachedProxyConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The Kubernetes Secret resource that contains the HTTP(S) proxy - * configuration. The secret must be a JSON encoded proxy configuration - * as described in - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.KubernetesSecret kubernetes_secret = 1; - */ - protected $kubernetes_secret = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeMultiCloud\V1\KubernetesSecret $kubernetes_secret - * The Kubernetes Secret resource that contains the HTTP(S) proxy - * configuration. The secret must be a JSON encoded proxy configuration - * as described in - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); - parent::__construct($data); - } - - /** - * The Kubernetes Secret resource that contains the HTTP(S) proxy - * configuration. The secret must be a JSON encoded proxy configuration - * as described in - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.KubernetesSecret kubernetes_secret = 1; - * @return \Google\Cloud\GkeMultiCloud\V1\KubernetesSecret|null - */ - public function getKubernetesSecret() - { - return $this->kubernetes_secret; - } - - public function hasKubernetesSecret() - { - return isset($this->kubernetes_secret); - } - - public function clearKubernetesSecret() - { - unset($this->kubernetes_secret); - } - - /** - * The Kubernetes Secret resource that contains the HTTP(S) proxy - * configuration. The secret must be a JSON encoded proxy configuration - * as described in - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.KubernetesSecret kubernetes_secret = 1; - * @param \Google\Cloud\GkeMultiCloud\V1\KubernetesSecret $var - * @return $this - */ - public function setKubernetesSecret($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\KubernetesSecret::class); - $this->kubernetes_secret = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedServerConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedServerConfig.php deleted file mode 100644 index 3257fd12cab9..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AttachedServerConfig.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.gkemulticloud.v1.AttachedServerConfig - */ -class AttachedServerConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the config. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * List of valid platform versions. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo valid_versions = 2; - */ - private $valid_versions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the config. - * @type array<\Google\Cloud\GkeMultiCloud\V1\AttachedPlatformVersionInfo>|\Google\Protobuf\Internal\RepeatedField $valid_versions - * List of valid platform versions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the config. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the config. - * - * 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; - } - - /** - * List of valid platform versions. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo valid_versions = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValidVersions() - { - return $this->valid_versions; - } - - /** - * List of valid platform versions. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo valid_versions = 2; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AttachedPlatformVersionInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValidVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AttachedPlatformVersionInfo::class); - $this->valid_versions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsAuthorization.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsAuthorization.php deleted file mode 100644 index 25f25a6866ee..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsAuthorization.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsAuthorization - */ -class AwsAuthorization extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $admin_users; - /** - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $admin_groups; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsClusterUser>|\Google\Protobuf\Internal\RepeatedField $admin_users - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsClusterGroup>|\Google\Protobuf\Internal\RepeatedField $admin_groups - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdminUsers() - { - return $this->admin_users; - } - - /** - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsClusterUser>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdminUsers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsClusterUser::class); - $this->admin_users = $arr; - - return $this; - } - - /** - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdminGroups() - { - return $this->admin_groups; - } - - /** - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsClusterGroup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdminGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsClusterGroup::class); - $this->admin_groups = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsAutoscalingGroupMetricsCollection.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsAutoscalingGroupMetricsCollection.php deleted file mode 100644 index dddb1fd5dc97..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsAutoscalingGroupMetricsCollection.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection - */ -class AwsAutoscalingGroupMetricsCollection extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The frequency at which EC2 Auto Scaling sends aggregated data to - * AWS CloudWatch. The only valid value is "1Minute". - * - * Generated from protobuf field string granularity = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $granularity = ''; - /** - * Optional. The metrics to enable. For a list of valid metrics, see - * https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html. - * If you specify Granularity and don't specify any metrics, all metrics are - * enabled. - * - * Generated from protobuf field repeated string metrics = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $metrics; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $granularity - * Required. The frequency at which EC2 Auto Scaling sends aggregated data to - * AWS CloudWatch. The only valid value is "1Minute". - * @type array|\Google\Protobuf\Internal\RepeatedField $metrics - * Optional. The metrics to enable. For a list of valid metrics, see - * https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html. - * If you specify Granularity and don't specify any metrics, all metrics are - * enabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The frequency at which EC2 Auto Scaling sends aggregated data to - * AWS CloudWatch. The only valid value is "1Minute". - * - * Generated from protobuf field string granularity = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGranularity() - { - return $this->granularity; - } - - /** - * Required. The frequency at which EC2 Auto Scaling sends aggregated data to - * AWS CloudWatch. The only valid value is "1Minute". - * - * Generated from protobuf field string granularity = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setGranularity($var) - { - GPBUtil::checkString($var, True); - $this->granularity = $var; - - return $this; - } - - /** - * Optional. The metrics to enable. For a list of valid metrics, see - * https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html. - * If you specify Granularity and don't specify any metrics, all metrics are - * enabled. - * - * Generated from protobuf field repeated string metrics = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMetrics() - { - return $this->metrics; - } - - /** - * Optional. The metrics to enable. For a list of valid metrics, see - * https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html. - * If you specify Granularity and don't specify any metrics, all metrics are - * enabled. - * - * Generated from protobuf field repeated string metrics = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMetrics($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->metrics = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsCluster.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsCluster.php deleted file mode 100644 index 68baa291c95b..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsCluster.php +++ /dev/null @@ -1,923 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsCluster - */ -class AwsCluster extends \Google\Protobuf\Internal\Message -{ - /** - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Required. Cluster-wide networking configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $networking = null; - /** - * Required. The AWS region where the cluster runs. - * Each Google Cloud region supports a subset of nearby AWS regions. - * You can call - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig] - * to list all supported AWS regions within a given Google Cloud region. - * - * Generated from protobuf field string aws_region = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $aws_region = ''; - /** - * Required. Configuration related to the cluster control plane. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $control_plane = null; - /** - * Required. Configuration related to the cluster RBAC settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $authorization = null; - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The endpoint of the cluster's API server. - * - * Generated from protobuf field string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $endpoint = ''; - /** - * Output only. A globally unique identifier for the cluster. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. If set, there are currently changes in flight to the cluster. - * - * Generated from protobuf field bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reconciling = false; - /** - * Output only. The time at which this cluster was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time at which this cluster was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 13; - */ - protected $etag = ''; - /** - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $annotations; - /** - * Output only. Workload Identity settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $workload_identity_config = null; - /** - * Output only. PEM encoded x509 certificate of the cluster root of trust. - * - * Generated from protobuf field string cluster_ca_certificate = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster_ca_certificate = ''; - /** - * Required. Fleet configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $fleet = null; - /** - * Optional. Logging configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $logging_config = null; - /** - * Output only. A set of errors found in the cluster. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterError errors = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $errors; - /** - * Optional. Monitoring configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $monitoring_config = null; - /** - * Optional. Binary Authorization configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 22 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $binary_authorization = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @type string $description - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsClusterNetworking $networking - * Required. Cluster-wide networking configuration. - * @type string $aws_region - * Required. The AWS region where the cluster runs. - * Each Google Cloud region supports a subset of nearby AWS regions. - * You can call - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig] - * to list all supported AWS regions within a given Google Cloud region. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsControlPlane $control_plane - * Required. Configuration related to the cluster control plane. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsAuthorization $authorization - * Required. Configuration related to the cluster RBAC settings. - * @type int $state - * Output only. The current state of the cluster. - * @type string $endpoint - * Output only. The endpoint of the cluster's API server. - * @type string $uid - * Output only. A globally unique identifier for the cluster. - * @type bool $reconciling - * Output only. If set, there are currently changes in flight to the cluster. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this cluster was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which this cluster was last updated. - * @type string $etag - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * @type \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig $workload_identity_config - * Output only. Workload Identity settings. - * @type string $cluster_ca_certificate - * Output only. PEM encoded x509 certificate of the cluster root of trust. - * @type \Google\Cloud\GkeMultiCloud\V1\Fleet $fleet - * Required. Fleet configuration. - * @type \Google\Cloud\GkeMultiCloud\V1\LoggingConfig $logging_config - * Optional. Logging configuration for this cluster. - * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsClusterError>|\Google\Protobuf\Internal\RepeatedField $errors - * Output only. A set of errors found in the cluster. - * @type \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig $monitoring_config - * Optional. Monitoring configuration for this cluster. - * @type \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization $binary_authorization - * Optional. Binary Authorization configuration for this cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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; - } - - /** - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. Cluster-wide networking configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsClusterNetworking|null - */ - public function getNetworking() - { - return $this->networking; - } - - public function hasNetworking() - { - return isset($this->networking); - } - - public function clearNetworking() - { - unset($this->networking); - } - - /** - * Required. Cluster-wide networking configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsClusterNetworking networking = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsClusterNetworking $var - * @return $this - */ - public function setNetworking($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsClusterNetworking::class); - $this->networking = $var; - - return $this; - } - - /** - * Required. The AWS region where the cluster runs. - * Each Google Cloud region supports a subset of nearby AWS regions. - * You can call - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig] - * to list all supported AWS regions within a given Google Cloud region. - * - * Generated from protobuf field string aws_region = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAwsRegion() - { - return $this->aws_region; - } - - /** - * Required. The AWS region where the cluster runs. - * Each Google Cloud region supports a subset of nearby AWS regions. - * You can call - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig] - * to list all supported AWS regions within a given Google Cloud region. - * - * Generated from protobuf field string aws_region = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAwsRegion($var) - { - GPBUtil::checkString($var, True); - $this->aws_region = $var; - - return $this; - } - - /** - * Required. Configuration related to the cluster control plane. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsControlPlane|null - */ - public function getControlPlane() - { - return $this->control_plane; - } - - public function hasControlPlane() - { - return isset($this->control_plane); - } - - public function clearControlPlane() - { - unset($this->control_plane); - } - - /** - * Required. Configuration related to the cluster control plane. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsControlPlane $var - * @return $this - */ - public function setControlPlane($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsControlPlane::class); - $this->control_plane = $var; - - return $this; - } - - /** - * Required. Configuration related to the cluster RBAC settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsAuthorization|null - */ - public function getAuthorization() - { - return $this->authorization; - } - - public function hasAuthorization() - { - return isset($this->authorization); - } - - public function clearAuthorization() - { - unset($this->authorization); - } - - /** - * Required. Configuration related to the cluster RBAC settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsAuthorization authorization = 15 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsAuthorization $var - * @return $this - */ - public function setAuthorization($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsAuthorization::class); - $this->authorization = $var; - - return $this; - } - - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\AwsCluster\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The endpoint of the cluster's API server. - * - * Generated from protobuf field string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEndpoint() - { - return $this->endpoint; - } - - /** - * Output only. The endpoint of the cluster's API server. - * - * Generated from protobuf field string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->endpoint = $var; - - return $this; - } - - /** - * Output only. A globally unique identifier for the cluster. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. A globally unique identifier for the cluster. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. If set, there are currently changes in flight to the cluster. - * - * Generated from protobuf field bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getReconciling() - { - return $this->reconciling; - } - - /** - * Output only. If set, there are currently changes in flight to the cluster. - * - * Generated from protobuf field bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setReconciling($var) - { - GPBUtil::checkBool($var); - $this->reconciling = $var; - - return $this; - } - - /** - * Output only. The time at which this cluster was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.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 cluster was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.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 at which this cluster was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time at which this cluster was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 13; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 13; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Output only. Workload Identity settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig|null - */ - public function getWorkloadIdentityConfig() - { - return $this->workload_identity_config; - } - - public function hasWorkloadIdentityConfig() - { - return isset($this->workload_identity_config); - } - - public function clearWorkloadIdentityConfig() - { - unset($this->workload_identity_config); - } - - /** - * Output only. Workload Identity settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig $var - * @return $this - */ - public function setWorkloadIdentityConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig::class); - $this->workload_identity_config = $var; - - return $this; - } - - /** - * Output only. PEM encoded x509 certificate of the cluster root of trust. - * - * Generated from protobuf field string cluster_ca_certificate = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getClusterCaCertificate() - { - return $this->cluster_ca_certificate; - } - - /** - * Output only. PEM encoded x509 certificate of the cluster root of trust. - * - * Generated from protobuf field string cluster_ca_certificate = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setClusterCaCertificate($var) - { - GPBUtil::checkString($var, True); - $this->cluster_ca_certificate = $var; - - return $this; - } - - /** - * Required. Fleet configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\Fleet|null - */ - public function getFleet() - { - return $this->fleet; - } - - public function hasFleet() - { - return isset($this->fleet); - } - - public function clearFleet() - { - unset($this->fleet); - } - - /** - * Required. Fleet configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 18 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\Fleet $var - * @return $this - */ - public function setFleet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\Fleet::class); - $this->fleet = $var; - - return $this; - } - - /** - * Optional. Logging configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\LoggingConfig|null - */ - public function getLoggingConfig() - { - return $this->logging_config; - } - - public function hasLoggingConfig() - { - return isset($this->logging_config); - } - - public function clearLoggingConfig() - { - unset($this->logging_config); - } - - /** - * Optional. Logging configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\LoggingConfig $var - * @return $this - */ - public function setLoggingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\LoggingConfig::class); - $this->logging_config = $var; - - return $this; - } - - /** - * Output only. A set of errors found in the cluster. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterError errors = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Output only. A set of errors found in the cluster. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsClusterError errors = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsClusterError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsClusterError::class); - $this->errors = $arr; - - return $this; - } - - /** - * Optional. Monitoring configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig|null - */ - public function getMonitoringConfig() - { - return $this->monitoring_config; - } - - public function hasMonitoringConfig() - { - return isset($this->monitoring_config); - } - - public function clearMonitoringConfig() - { - unset($this->monitoring_config); - } - - /** - * Optional. Monitoring configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig $var - * @return $this - */ - public function setMonitoringConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig::class); - $this->monitoring_config = $var; - - return $this; - } - - /** - * Optional. Binary Authorization configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization|null - */ - public function getBinaryAuthorization() - { - return $this->binary_authorization; - } - - public function hasBinaryAuthorization() - { - return isset($this->binary_authorization); - } - - public function clearBinaryAuthorization() - { - unset($this->binary_authorization); - } - - /** - * Optional. Binary Authorization configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization binary_authorization = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization $var - * @return $this - */ - public function setBinaryAuthorization($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization::class); - $this->binary_authorization = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsCluster/State.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsCluster/State.php deleted file mode 100644 index 59e416b25a7b..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsCluster/State.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsCluster.State - */ -class State -{ - /** - * Not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The PROVISIONING state indicates the cluster is being created. - * - * Generated from protobuf enum PROVISIONING = 1; - */ - const PROVISIONING = 1; - /** - * The RUNNING state indicates the cluster has been created and is fully - * usable. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The RECONCILING state indicates that some work is actively being done on - * the cluster, such as upgrading the control plane replicas. - * - * Generated from protobuf enum RECONCILING = 3; - */ - const RECONCILING = 3; - /** - * The STOPPING state indicates the cluster is being deleted. - * - * Generated from protobuf enum STOPPING = 4; - */ - const STOPPING = 4; - /** - * The ERROR state indicates the cluster is in a broken unrecoverable - * state. - * - * Generated from protobuf enum ERROR = 5; - */ - const ERROR = 5; - /** - * The DEGRADED state indicates the cluster requires user action to - * restore full functionality. - * - * Generated from protobuf enum DEGRADED = 6; - */ - const DEGRADED = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PROVISIONING => 'PROVISIONING', - self::RUNNING => 'RUNNING', - self::RECONCILING => 'RECONCILING', - self::STOPPING => 'STOPPING', - self::ERROR => 'ERROR', - self::DEGRADED => 'DEGRADED', - ]; - - 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\GkeMultiCloud\V1\AwsCluster_State::class); - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterError.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterError.php deleted file mode 100644 index f40a291a78f8..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterError.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsClusterError - */ -class AwsClusterError extends \Google\Protobuf\Internal\Message -{ - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $message - * Human-friendly description of the error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterGroup.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterGroup.php deleted file mode 100644 index 6c954b94c1b2..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterGroup.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsClusterGroup - */ -class AwsClusterGroup extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the group, e.g. `my-group@domain.com`. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $group - * Required. The name of the group, e.g. `my-group@domain.com`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the group, e.g. `my-group@domain.com`. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGroup() - { - return $this->group; - } - - /** - * Required. The name of the group, e.g. `my-group@domain.com`. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkString($var, True); - $this->group = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterNetworking.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterNetworking.php deleted file mode 100644 index 9301c3f5e52d..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterNetworking.php +++ /dev/null @@ -1,211 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsClusterNetworking - */ -class AwsClusterNetworking extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The VPC associated with the cluster. All component clusters - * (i.e. control plane and node pools) run on a single VPC. - * This field cannot be changed after creation. - * - * Generated from protobuf field string vpc_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $vpc_id = ''; - /** - * Required. All pods in the cluster are assigned an IPv4 address from these - * ranges. Only a single range is supported. This field cannot be changed - * after creation. - * - * Generated from protobuf field repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $pod_address_cidr_blocks; - /** - * Required. All services in the cluster are assigned an IPv4 address from - * these ranges. Only a single range is supported. This field cannot be - * changed after creation. - * - * Generated from protobuf field repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $service_address_cidr_blocks; - /** - * Optional. Disable the per node pool subnet security group rules on the - * control plane security group. When set to true, you must also provide one - * or more security groups that ensure node pools are able to send requests to - * the control plane on TCP/443 and TCP/8132. Failure to do so may result in - * unavailable node pools. - * - * Generated from protobuf field bool per_node_pool_sg_rules_disabled = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $per_node_pool_sg_rules_disabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $vpc_id - * Required. The VPC associated with the cluster. All component clusters - * (i.e. control plane and node pools) run on a single VPC. - * This field cannot be changed after creation. - * @type array|\Google\Protobuf\Internal\RepeatedField $pod_address_cidr_blocks - * Required. All pods in the cluster are assigned an IPv4 address from these - * ranges. Only a single range is supported. This field cannot be changed - * after creation. - * @type array|\Google\Protobuf\Internal\RepeatedField $service_address_cidr_blocks - * Required. All services in the cluster are assigned an IPv4 address from - * these ranges. Only a single range is supported. This field cannot be - * changed after creation. - * @type bool $per_node_pool_sg_rules_disabled - * Optional. Disable the per node pool subnet security group rules on the - * control plane security group. When set to true, you must also provide one - * or more security groups that ensure node pools are able to send requests to - * the control plane on TCP/443 and TCP/8132. Failure to do so may result in - * unavailable node pools. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The VPC associated with the cluster. All component clusters - * (i.e. control plane and node pools) run on a single VPC. - * This field cannot be changed after creation. - * - * Generated from protobuf field string vpc_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVpcId() - { - return $this->vpc_id; - } - - /** - * Required. The VPC associated with the cluster. All component clusters - * (i.e. control plane and node pools) run on a single VPC. - * This field cannot be changed after creation. - * - * Generated from protobuf field string vpc_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVpcId($var) - { - GPBUtil::checkString($var, True); - $this->vpc_id = $var; - - return $this; - } - - /** - * Required. All pods in the cluster are assigned an IPv4 address from these - * ranges. Only a single range is supported. This field cannot be changed - * after creation. - * - * Generated from protobuf field repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPodAddressCidrBlocks() - { - return $this->pod_address_cidr_blocks; - } - - /** - * Required. All pods in the cluster are assigned an IPv4 address from these - * ranges. Only a single range is supported. This field cannot be changed - * after creation. - * - * Generated from protobuf field repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPodAddressCidrBlocks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->pod_address_cidr_blocks = $arr; - - return $this; - } - - /** - * Required. All services in the cluster are assigned an IPv4 address from - * these ranges. Only a single range is supported. This field cannot be - * changed after creation. - * - * Generated from protobuf field repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServiceAddressCidrBlocks() - { - return $this->service_address_cidr_blocks; - } - - /** - * Required. All services in the cluster are assigned an IPv4 address from - * these ranges. Only a single range is supported. This field cannot be - * changed after creation. - * - * Generated from protobuf field repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServiceAddressCidrBlocks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->service_address_cidr_blocks = $arr; - - return $this; - } - - /** - * Optional. Disable the per node pool subnet security group rules on the - * control plane security group. When set to true, you must also provide one - * or more security groups that ensure node pools are able to send requests to - * the control plane on TCP/443 and TCP/8132. Failure to do so may result in - * unavailable node pools. - * - * Generated from protobuf field bool per_node_pool_sg_rules_disabled = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getPerNodePoolSgRulesDisabled() - { - return $this->per_node_pool_sg_rules_disabled; - } - - /** - * Optional. Disable the per node pool subnet security group rules on the - * control plane security group. When set to true, you must also provide one - * or more security groups that ensure node pools are able to send requests to - * the control plane on TCP/443 and TCP/8132. Failure to do so may result in - * unavailable node pools. - * - * Generated from protobuf field bool per_node_pool_sg_rules_disabled = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setPerNodePoolSgRulesDisabled($var) - { - GPBUtil::checkBool($var); - $this->per_node_pool_sg_rules_disabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterUser.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterUser.php deleted file mode 100644 index 005bd094c801..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsClusterUser.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsClusterUser - */ -class AwsClusterUser extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $username = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $username - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsConfigEncryption.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsConfigEncryption.php deleted file mode 100644 index ed4be8aef12a..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsConfigEncryption.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsConfigEncryption - */ -class AwsConfigEncryption extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ARN of the AWS KMS key used to encrypt user data. - * - * Generated from protobuf field string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $kms_key_arn = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kms_key_arn - * Required. The ARN of the AWS KMS key used to encrypt user data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ARN of the AWS KMS key used to encrypt user data. - * - * Generated from protobuf field string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKmsKeyArn() - { - return $this->kms_key_arn; - } - - /** - * Required. The ARN of the AWS KMS key used to encrypt user data. - * - * Generated from protobuf field string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKmsKeyArn($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_arn = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsControlPlane.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsControlPlane.php deleted file mode 100644 index 826ee8af1a67..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsControlPlane.php +++ /dev/null @@ -1,693 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsControlPlane - */ -class AwsControlPlane extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Kubernetes version to run on control plane replicas - * (e.g. `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - * - * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $version = ''; - /** - * Optional. The AWS instance type. - * When unspecified, it uses a default based on the cluster's version. - * - * Generated from protobuf field string instance_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $instance_type = ''; - /** - * Optional. SSH configuration for how to access the underlying control plane - * machines. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ssh_config = null; - /** - * Required. The list of subnets where control plane replicas will run. - * A replica will be provisioned on each subnet and up to three values - * can be provided. - * Each subnet must be in a different AWS Availability Zone (AZ). - * - * Generated from protobuf field repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private $subnet_ids; - /** - * Optional. The IDs of additional security groups to add to control plane - * replicas. The Anthos Multi-Cloud API will automatically create and manage - * security groups with the minimum rules needed for a functioning cluster. - * - * Generated from protobuf field repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $security_group_ids; - /** - * Required. The name or ARN of the AWS IAM instance profile to assign to each - * control plane replica. - * - * Generated from protobuf field string iam_instance_profile = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $iam_instance_profile = ''; - /** - * Optional. Configuration related to the root volume provisioned for each - * control plane replica. - * Volumes will be provisioned in the availability zone associated - * with the corresponding subnet. - * When unspecified, it defaults to 32 GiB with the GP2 volume type. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $root_volume = null; - /** - * Optional. Configuration related to the main volume provisioned for each - * control plane replica. - * The main volume is in charge of storing all of the cluster's etcd state. - * Volumes will be provisioned in the availability zone associated - * with the corresponding subnet. - * When unspecified, it defaults to 8 GiB with the GP2 volume type. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $main_volume = null; - /** - * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database_encryption = null; - /** - * Optional. A set of AWS resource tags to propagate to all underlying managed - * AWS resources. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * - * Generated from protobuf field map tags = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $tags; - /** - * Required. Authentication configuration for management of AWS resources. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $aws_services_authentication = null; - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $proxy_config = null; - /** - * Required. Config encryption for user data. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $config_encryption = null; - /** - * Optional. The placement to use on control plane instances. - * When unspecified, the VPC's default tenancy will be used. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $instance_placement = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * Required. The Kubernetes version to run on control plane replicas - * (e.g. `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - * @type string $instance_type - * Optional. The AWS instance type. - * When unspecified, it uses a default based on the cluster's version. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig $ssh_config - * Optional. SSH configuration for how to access the underlying control plane - * machines. - * @type array|\Google\Protobuf\Internal\RepeatedField $subnet_ids - * Required. The list of subnets where control plane replicas will run. - * A replica will be provisioned on each subnet and up to three values - * can be provided. - * Each subnet must be in a different AWS Availability Zone (AZ). - * @type array|\Google\Protobuf\Internal\RepeatedField $security_group_ids - * Optional. The IDs of additional security groups to add to control plane - * replicas. The Anthos Multi-Cloud API will automatically create and manage - * security groups with the minimum rules needed for a functioning cluster. - * @type string $iam_instance_profile - * Required. The name or ARN of the AWS IAM instance profile to assign to each - * control plane replica. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate $root_volume - * Optional. Configuration related to the root volume provisioned for each - * control plane replica. - * Volumes will be provisioned in the availability zone associated - * with the corresponding subnet. - * When unspecified, it defaults to 32 GiB with the GP2 volume type. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate $main_volume - * Optional. Configuration related to the main volume provisioned for each - * control plane replica. - * The main volume is in charge of storing all of the cluster's etcd state. - * Volumes will be provisioned in the availability zone associated - * with the corresponding subnet. - * When unspecified, it defaults to 8 GiB with the GP2 volume type. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsDatabaseEncryption $database_encryption - * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. - * @type array|\Google\Protobuf\Internal\MapField $tags - * Optional. A set of AWS resource tags to propagate to all underlying managed - * AWS resources. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsServicesAuthentication $aws_services_authentication - * Required. Authentication configuration for management of AWS resources. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig $proxy_config - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption $config_encryption - * Required. Config encryption for user data. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement $instance_placement - * Optional. The placement to use on control plane instances. - * When unspecified, the VPC's default tenancy will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Kubernetes version to run on control plane replicas - * (e.g. `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - * - * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Required. The Kubernetes version to run on control plane replicas - * (e.g. `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - * - * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Optional. The AWS instance type. - * When unspecified, it uses a default based on the cluster's version. - * - * Generated from protobuf field string instance_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getInstanceType() - { - return $this->instance_type; - } - - /** - * Optional. The AWS instance type. - * When unspecified, it uses a default based on the cluster's version. - * - * Generated from protobuf field string instance_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setInstanceType($var) - { - GPBUtil::checkString($var, True); - $this->instance_type = $var; - - return $this; - } - - /** - * Optional. SSH configuration for how to access the underlying control plane - * machines. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig|null - */ - public function getSshConfig() - { - return $this->ssh_config; - } - - public function hasSshConfig() - { - return isset($this->ssh_config); - } - - public function clearSshConfig() - { - unset($this->ssh_config); - } - - /** - * Optional. SSH configuration for how to access the underlying control plane - * machines. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig $var - * @return $this - */ - public function setSshConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig::class); - $this->ssh_config = $var; - - return $this; - } - - /** - * Required. The list of subnets where control plane replicas will run. - * A replica will be provisioned on each subnet and up to three values - * can be provided. - * Each subnet must be in a different AWS Availability Zone (AZ). - * - * Generated from protobuf field repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSubnetIds() - { - return $this->subnet_ids; - } - - /** - * Required. The list of subnets where control plane replicas will run. - * A replica will be provisioned on each subnet and up to three values - * can be provided. - * Each subnet must be in a different AWS Availability Zone (AZ). - * - * Generated from protobuf field repeated string subnet_ids = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSubnetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->subnet_ids = $arr; - - return $this; - } - - /** - * Optional. The IDs of additional security groups to add to control plane - * replicas. The Anthos Multi-Cloud API will automatically create and manage - * security groups with the minimum rules needed for a functioning cluster. - * - * Generated from protobuf field repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSecurityGroupIds() - { - return $this->security_group_ids; - } - - /** - * Optional. The IDs of additional security groups to add to control plane - * replicas. The Anthos Multi-Cloud API will automatically create and manage - * security groups with the minimum rules needed for a functioning cluster. - * - * Generated from protobuf field repeated string security_group_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSecurityGroupIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->security_group_ids = $arr; - - return $this; - } - - /** - * Required. The name or ARN of the AWS IAM instance profile to assign to each - * control plane replica. - * - * Generated from protobuf field string iam_instance_profile = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getIamInstanceProfile() - { - return $this->iam_instance_profile; - } - - /** - * Required. The name or ARN of the AWS IAM instance profile to assign to each - * control plane replica. - * - * Generated from protobuf field string iam_instance_profile = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setIamInstanceProfile($var) - { - GPBUtil::checkString($var, True); - $this->iam_instance_profile = $var; - - return $this; - } - - /** - * Optional. Configuration related to the root volume provisioned for each - * control plane replica. - * Volumes will be provisioned in the availability zone associated - * with the corresponding subnet. - * When unspecified, it defaults to 32 GiB with the GP2 volume type. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate|null - */ - public function getRootVolume() - { - return $this->root_volume; - } - - public function hasRootVolume() - { - return isset($this->root_volume); - } - - public function clearRootVolume() - { - unset($this->root_volume); - } - - /** - * Optional. Configuration related to the root volume provisioned for each - * control plane replica. - * Volumes will be provisioned in the availability zone associated - * with the corresponding subnet. - * When unspecified, it defaults to 32 GiB with the GP2 volume type. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate $var - * @return $this - */ - public function setRootVolume($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate::class); - $this->root_volume = $var; - - return $this; - } - - /** - * Optional. Configuration related to the main volume provisioned for each - * control plane replica. - * The main volume is in charge of storing all of the cluster's etcd state. - * Volumes will be provisioned in the availability zone associated - * with the corresponding subnet. - * When unspecified, it defaults to 8 GiB with the GP2 volume type. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate|null - */ - public function getMainVolume() - { - return $this->main_volume; - } - - public function hasMainVolume() - { - return isset($this->main_volume); - } - - public function clearMainVolume() - { - unset($this->main_volume); - } - - /** - * Optional. Configuration related to the main volume provisioned for each - * control plane replica. - * The main volume is in charge of storing all of the cluster's etcd state. - * Volumes will be provisioned in the availability zone associated - * with the corresponding subnet. - * When unspecified, it defaults to 8 GiB with the GP2 volume type. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate main_volume = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate $var - * @return $this - */ - public function setMainVolume($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate::class); - $this->main_volume = $var; - - return $this; - } - - /** - * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsDatabaseEncryption|null - */ - public function getDatabaseEncryption() - { - return $this->database_encryption; - } - - public function hasDatabaseEncryption() - { - return isset($this->database_encryption); - } - - public function clearDatabaseEncryption() - { - unset($this->database_encryption); - } - - /** - * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsDatabaseEncryption $var - * @return $this - */ - public function setDatabaseEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsDatabaseEncryption::class); - $this->database_encryption = $var; - - return $this; - } - - /** - * Optional. A set of AWS resource tags to propagate to all underlying managed - * AWS resources. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * - * Generated from protobuf field map tags = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. A set of AWS resource tags to propagate to all underlying managed - * AWS resources. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * - * Generated from protobuf field map tags = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - - /** - * Required. Authentication configuration for management of AWS resources. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsServicesAuthentication|null - */ - public function getAwsServicesAuthentication() - { - return $this->aws_services_authentication; - } - - public function hasAwsServicesAuthentication() - { - return isset($this->aws_services_authentication); - } - - public function clearAwsServicesAuthentication() - { - unset($this->aws_services_authentication); - } - - /** - * Required. Authentication configuration for management of AWS resources. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsServicesAuthentication aws_services_authentication = 12 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsServicesAuthentication $var - * @return $this - */ - public function setAwsServicesAuthentication($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsServicesAuthentication::class); - $this->aws_services_authentication = $var; - - return $this; - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig|null - */ - public function getProxyConfig() - { - return $this->proxy_config; - } - - public function hasProxyConfig() - { - return isset($this->proxy_config); - } - - public function clearProxyConfig() - { - unset($this->proxy_config); - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig $var - * @return $this - */ - public function setProxyConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig::class); - $this->proxy_config = $var; - - return $this; - } - - /** - * Required. Config encryption for user data. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption|null - */ - public function getConfigEncryption() - { - return $this->config_encryption; - } - - public function hasConfigEncryption() - { - return isset($this->config_encryption); - } - - public function clearConfigEncryption() - { - unset($this->config_encryption); - } - - /** - * Required. Config encryption for user data. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 17 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption $var - * @return $this - */ - public function setConfigEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption::class); - $this->config_encryption = $var; - - return $this; - } - - /** - * Optional. The placement to use on control plane instances. - * When unspecified, the VPC's default tenancy will be used. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement|null - */ - public function getInstancePlacement() - { - return $this->instance_placement; - } - - public function hasInstancePlacement() - { - return isset($this->instance_placement); - } - - public function clearInstancePlacement() - { - unset($this->instance_placement); - } - - /** - * Optional. The placement to use on control plane instances. - * When unspecified, the VPC's default tenancy will be used. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement $var - * @return $this - */ - public function setInstancePlacement($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement::class); - $this->instance_placement = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsDatabaseEncryption.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsDatabaseEncryption.php deleted file mode 100644 index e7e0ce60bd12..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsDatabaseEncryption.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsDatabaseEncryption - */ -class AwsDatabaseEncryption extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. - * - * Generated from protobuf field string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $kms_key_arn = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kms_key_arn - * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. - * - * Generated from protobuf field string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKmsKeyArn() - { - return $this->kms_key_arn; - } - - /** - * Required. The ARN of the AWS KMS key used to encrypt cluster secrets. - * - * Generated from protobuf field string kms_key_arn = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKmsKeyArn($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_arn = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsInstancePlacement.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsInstancePlacement.php deleted file mode 100644 index e2eccd85ae67..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsInstancePlacement.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsInstancePlacement - */ -class AwsInstancePlacement extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The tenancy for instance. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy tenancy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tenancy = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $tenancy - * Required. The tenancy for instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The tenancy for instance. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy tenancy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getTenancy() - { - return $this->tenancy; - } - - /** - * Required. The tenancy for instance. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy tenancy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setTenancy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement\Tenancy::class); - $this->tenancy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsInstancePlacement/Tenancy.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsInstancePlacement/Tenancy.php deleted file mode 100644 index 7c147a1fef41..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsInstancePlacement/Tenancy.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy - */ -class Tenancy -{ - /** - * Not set. - * - * Generated from protobuf enum TENANCY_UNSPECIFIED = 0; - */ - const TENANCY_UNSPECIFIED = 0; - /** - * Use default VPC tenancy. - * - * Generated from protobuf enum DEFAULT = 1; - */ - const PBDEFAULT = 1; - /** - * Run a dedicated instance. - * - * Generated from protobuf enum DEDICATED = 2; - */ - const DEDICATED = 2; - /** - * Launch this instance to a dedicated host. - * - * Generated from protobuf enum HOST = 3; - */ - const HOST = 3; - - private static $valueToName = [ - self::TENANCY_UNSPECIFIED => 'TENANCY_UNSPECIFIED', - self::PBDEFAULT => 'DEFAULT', - self::DEDICATED => 'DEDICATED', - self::HOST => 'HOST', - ]; - - 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)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Tenancy::class, \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement_Tenancy::class); - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsJsonWebKeys.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsJsonWebKeys.php deleted file mode 100644 index 507b3ad8de02..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsJsonWebKeys.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsJsonWebKeys - */ -class AwsJsonWebKeys extends \Google\Protobuf\Internal\Message -{ - /** - * The public component of the keys used by the cluster to sign token - * requests. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.Jwk keys = 1; - */ - private $keys; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeMultiCloud\V1\Jwk>|\Google\Protobuf\Internal\RepeatedField $keys - * The public component of the keys used by the cluster to sign token - * requests. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * The public component of the keys used by the cluster to sign token - * requests. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.Jwk keys = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getKeys() - { - return $this->keys; - } - - /** - * The public component of the keys used by the cluster to sign token - * requests. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.Jwk keys = 1; - * @param array<\Google\Cloud\GkeMultiCloud\V1\Jwk>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setKeys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\Jwk::class); - $this->keys = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsK8sVersionInfo.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsK8sVersionInfo.php deleted file mode 100644 index 9e560d4e09ec..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsK8sVersionInfo.php +++ /dev/null @@ -1,255 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsK8sVersionInfo - */ -class AwsK8sVersionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Kubernetes version name. - * - * Generated from protobuf field string version = 1; - */ - protected $version = ''; - /** - * Optional. True if the version is available for cluster creation. If a - * version is enabled for creation, it can be used to create new clusters. - * Otherwise, cluster creation will fail. However, cluster upgrade operations - * may succeed, even if the version is not enabled. - * - * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enabled = false; - /** - * Optional. True if this cluster version belongs to a minor version that has - * reached its end of life and is no longer in scope to receive security and - * bug fixes. - * - * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $end_of_life = false; - /** - * Optional. The estimated date (in Pacific Time) when this cluster version - * will reach its end of life. Or if this version is no longer supported (the - * `end_of_life` field is true), this is the actual date (in Pacific time) - * when the version reached its end of life. - * - * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $end_of_life_date = null; - /** - * Optional. The date (in Pacific Time) when the cluster version was released. - * - * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $release_date = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * Kubernetes version name. - * @type bool $enabled - * Optional. True if the version is available for cluster creation. If a - * version is enabled for creation, it can be used to create new clusters. - * Otherwise, cluster creation will fail. However, cluster upgrade operations - * may succeed, even if the version is not enabled. - * @type bool $end_of_life - * Optional. True if this cluster version belongs to a minor version that has - * reached its end of life and is no longer in scope to receive security and - * bug fixes. - * @type \Google\Type\Date $end_of_life_date - * Optional. The estimated date (in Pacific Time) when this cluster version - * will reach its end of life. Or if this version is no longer supported (the - * `end_of_life` field is true), this is the actual date (in Pacific time) - * when the version reached its end of life. - * @type \Google\Type\Date $release_date - * Optional. The date (in Pacific Time) when the cluster version was released. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Kubernetes version name. - * - * Generated from protobuf field string version = 1; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Kubernetes version name. - * - * Generated from protobuf field string version = 1; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Optional. True if the version is available for cluster creation. If a - * version is enabled for creation, it can be used to create new clusters. - * Otherwise, cluster creation will fail. However, cluster upgrade operations - * may succeed, even if the version is not enabled. - * - * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Optional. True if the version is available for cluster creation. If a - * version is enabled for creation, it can be used to create new clusters. - * Otherwise, cluster creation will fail. However, cluster upgrade operations - * may succeed, even if the version is not enabled. - * - * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Optional. True if this cluster version belongs to a minor version that has - * reached its end of life and is no longer in scope to receive security and - * bug fixes. - * - * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEndOfLife() - { - return $this->end_of_life; - } - - /** - * Optional. True if this cluster version belongs to a minor version that has - * reached its end of life and is no longer in scope to receive security and - * bug fixes. - * - * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEndOfLife($var) - { - GPBUtil::checkBool($var); - $this->end_of_life = $var; - - return $this; - } - - /** - * Optional. The estimated date (in Pacific Time) when this cluster version - * will reach its end of life. Or if this version is no longer supported (the - * `end_of_life` field is true), this is the actual date (in Pacific time) - * when the version reached its end of life. - * - * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Type\Date|null - */ - public function getEndOfLifeDate() - { - return $this->end_of_life_date; - } - - public function hasEndOfLifeDate() - { - return isset($this->end_of_life_date); - } - - public function clearEndOfLifeDate() - { - unset($this->end_of_life_date); - } - - /** - * Optional. The estimated date (in Pacific Time) when this cluster version - * will reach its end of life. Or if this version is no longer supported (the - * `end_of_life` field is true), this is the actual date (in Pacific time) - * when the version reached its end of life. - * - * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Type\Date $var - * @return $this - */ - public function setEndOfLifeDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->end_of_life_date = $var; - - return $this; - } - - /** - * Optional. The date (in Pacific Time) when the cluster version was released. - * - * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Type\Date|null - */ - public function getReleaseDate() - { - return $this->release_date; - } - - public function hasReleaseDate() - { - return isset($this->release_date); - } - - public function clearReleaseDate() - { - unset($this->release_date); - } - - /** - * Optional. The date (in Pacific Time) when the cluster version was released. - * - * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Type\Date $var - * @return $this - */ - public function setReleaseDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->release_date = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodeConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodeConfig.php deleted file mode 100644 index 9b48cad7dd0b..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodeConfig.php +++ /dev/null @@ -1,663 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsNodeConfig - */ -class AwsNodeConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The EC2 instance type when creating on-Demand instances. - * If unspecified during node pool creation, a default will be chosen based on - * the node pool version, and assigned to this field. - * - * Generated from protobuf field string instance_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $instance_type = ''; - /** - * Optional. Template for the root volume provisioned for node pool nodes. - * Volumes will be provisioned in the availability zone assigned - * to the node pool subnet. - * When unspecified, it defaults to 32 GiB with the GP2 volume type. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $root_volume = null; - /** - * Optional. The initial taints assigned to nodes of this node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $taints; - /** - * Optional. The initial labels assigned to nodes of this node pool. An object - * containing a list of "key": value pairs. Example: { "name": "wrench", - * "mass": "1.3kg", "count": "3" }. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Key/value metadata to assign to each underlying AWS resource. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * - * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $tags; - /** - * Required. The name or ARN of the AWS IAM instance profile to assign to - * nodes in the pool. - * - * Generated from protobuf field string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $iam_instance_profile = ''; - /** - * Optional. The OS image type to use on node pool instances. - * Can be unspecified, or have a value of `ubuntu`. - * When unspecified, it defaults to `ubuntu`. - * - * Generated from protobuf field string image_type = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $image_type = ''; - /** - * Optional. The SSH configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ssh_config = null; - /** - * Optional. The IDs of additional security groups to add to nodes in this - * pool. The manager will automatically create security groups with minimum - * rules needed for a functioning cluster. - * - * Generated from protobuf field repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $security_group_ids; - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $proxy_config = null; - /** - * Required. Config encryption for user data. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $config_encryption = null; - /** - * Optional. Placement related info for this node. - * When unspecified, the VPC's default tenancy will be used. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $instance_placement = null; - /** - * Optional. Configuration related to CloudWatch metrics collection on the - * Auto Scaling group of the node pool. - * When unspecified, metrics collection is disabled. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection autoscaling_metrics_collection = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $autoscaling_metrics_collection = null; - /** - * Optional. Configuration for provisioning EC2 Spot instances - * When specified, the node pool will provision Spot instances from the set - * of spot_config.instance_types. - * This field is mutually exclusive with `instance_type`. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.SpotConfig spot_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $spot_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance_type - * Optional. The EC2 instance type when creating on-Demand instances. - * If unspecified during node pool creation, a default will be chosen based on - * the node pool version, and assigned to this field. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate $root_volume - * Optional. Template for the root volume provisioned for node pool nodes. - * Volumes will be provisioned in the availability zone assigned - * to the node pool subnet. - * When unspecified, it defaults to 32 GiB with the GP2 volume type. - * @type array<\Google\Cloud\GkeMultiCloud\V1\NodeTaint>|\Google\Protobuf\Internal\RepeatedField $taints - * Optional. The initial taints assigned to nodes of this node pool. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The initial labels assigned to nodes of this node pool. An object - * containing a list of "key": value pairs. Example: { "name": "wrench", - * "mass": "1.3kg", "count": "3" }. - * @type array|\Google\Protobuf\Internal\MapField $tags - * Optional. Key/value metadata to assign to each underlying AWS resource. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * @type string $iam_instance_profile - * Required. The name or ARN of the AWS IAM instance profile to assign to - * nodes in the pool. - * @type string $image_type - * Optional. The OS image type to use on node pool instances. - * Can be unspecified, or have a value of `ubuntu`. - * When unspecified, it defaults to `ubuntu`. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig $ssh_config - * Optional. The SSH configuration. - * @type array|\Google\Protobuf\Internal\RepeatedField $security_group_ids - * Optional. The IDs of additional security groups to add to nodes in this - * pool. The manager will automatically create security groups with minimum - * rules needed for a functioning cluster. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig $proxy_config - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption $config_encryption - * Required. Config encryption for user data. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement $instance_placement - * Optional. Placement related info for this node. - * When unspecified, the VPC's default tenancy will be used. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsAutoscalingGroupMetricsCollection $autoscaling_metrics_collection - * Optional. Configuration related to CloudWatch metrics collection on the - * Auto Scaling group of the node pool. - * When unspecified, metrics collection is disabled. - * @type \Google\Cloud\GkeMultiCloud\V1\SpotConfig $spot_config - * Optional. Configuration for provisioning EC2 Spot instances - * When specified, the node pool will provision Spot instances from the set - * of spot_config.instance_types. - * This field is mutually exclusive with `instance_type`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The EC2 instance type when creating on-Demand instances. - * If unspecified during node pool creation, a default will be chosen based on - * the node pool version, and assigned to this field. - * - * Generated from protobuf field string instance_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getInstanceType() - { - return $this->instance_type; - } - - /** - * Optional. The EC2 instance type when creating on-Demand instances. - * If unspecified during node pool creation, a default will be chosen based on - * the node pool version, and assigned to this field. - * - * Generated from protobuf field string instance_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setInstanceType($var) - { - GPBUtil::checkString($var, True); - $this->instance_type = $var; - - return $this; - } - - /** - * Optional. Template for the root volume provisioned for node pool nodes. - * Volumes will be provisioned in the availability zone assigned - * to the node pool subnet. - * When unspecified, it defaults to 32 GiB with the GP2 volume type. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate|null - */ - public function getRootVolume() - { - return $this->root_volume; - } - - public function hasRootVolume() - { - return isset($this->root_volume); - } - - public function clearRootVolume() - { - unset($this->root_volume); - } - - /** - * Optional. Template for the root volume provisioned for node pool nodes. - * Volumes will be provisioned in the availability zone assigned - * to the node pool subnet. - * When unspecified, it defaults to 32 GiB with the GP2 volume type. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate $var - * @return $this - */ - public function setRootVolume($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate::class); - $this->root_volume = $var; - - return $this; - } - - /** - * Optional. The initial taints assigned to nodes of this node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTaints() - { - return $this->taints; - } - - /** - * Optional. The initial taints assigned to nodes of this node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\NodeTaint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTaints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\NodeTaint::class); - $this->taints = $arr; - - return $this; - } - - /** - * Optional. The initial labels assigned to nodes of this node pool. An object - * containing a list of "key": value pairs. Example: { "name": "wrench", - * "mass": "1.3kg", "count": "3" }. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The initial labels assigned to nodes of this node pool. An object - * containing a list of "key": value pairs. Example: { "name": "wrench", - * "mass": "1.3kg", "count": "3" }. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @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; - } - - /** - * Optional. Key/value metadata to assign to each underlying AWS resource. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * - * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. Key/value metadata to assign to each underlying AWS resource. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * - * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - - /** - * Required. The name or ARN of the AWS IAM instance profile to assign to - * nodes in the pool. - * - * Generated from protobuf field string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getIamInstanceProfile() - { - return $this->iam_instance_profile; - } - - /** - * Required. The name or ARN of the AWS IAM instance profile to assign to - * nodes in the pool. - * - * Generated from protobuf field string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setIamInstanceProfile($var) - { - GPBUtil::checkString($var, True); - $this->iam_instance_profile = $var; - - return $this; - } - - /** - * Optional. The OS image type to use on node pool instances. - * Can be unspecified, or have a value of `ubuntu`. - * When unspecified, it defaults to `ubuntu`. - * - * Generated from protobuf field string image_type = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getImageType() - { - return $this->image_type; - } - - /** - * Optional. The OS image type to use on node pool instances. - * Can be unspecified, or have a value of `ubuntu`. - * When unspecified, it defaults to `ubuntu`. - * - * Generated from protobuf field string image_type = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setImageType($var) - { - GPBUtil::checkString($var, True); - $this->image_type = $var; - - return $this; - } - - /** - * Optional. The SSH configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig|null - */ - public function getSshConfig() - { - return $this->ssh_config; - } - - public function hasSshConfig() - { - return isset($this->ssh_config); - } - - public function clearSshConfig() - { - unset($this->ssh_config); - } - - /** - * Optional. The SSH configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsSshConfig ssh_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig $var - * @return $this - */ - public function setSshConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsSshConfig::class); - $this->ssh_config = $var; - - return $this; - } - - /** - * Optional. The IDs of additional security groups to add to nodes in this - * pool. The manager will automatically create security groups with minimum - * rules needed for a functioning cluster. - * - * Generated from protobuf field repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSecurityGroupIds() - { - return $this->security_group_ids; - } - - /** - * Optional. The IDs of additional security groups to add to nodes in this - * pool. The manager will automatically create security groups with minimum - * rules needed for a functioning cluster. - * - * Generated from protobuf field repeated string security_group_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSecurityGroupIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->security_group_ids = $arr; - - return $this; - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig|null - */ - public function getProxyConfig() - { - return $this->proxy_config; - } - - public function hasProxyConfig() - { - return isset($this->proxy_config); - } - - public function clearProxyConfig() - { - unset($this->proxy_config); - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig $var - * @return $this - */ - public function setProxyConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsProxyConfig::class); - $this->proxy_config = $var; - - return $this; - } - - /** - * Required. Config encryption for user data. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption|null - */ - public function getConfigEncryption() - { - return $this->config_encryption; - } - - public function hasConfigEncryption() - { - return isset($this->config_encryption); - } - - public function clearConfigEncryption() - { - unset($this->config_encryption); - } - - /** - * Required. Config encryption for user data. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsConfigEncryption config_encryption = 13 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption $var - * @return $this - */ - public function setConfigEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsConfigEncryption::class); - $this->config_encryption = $var; - - return $this; - } - - /** - * Optional. Placement related info for this node. - * When unspecified, the VPC's default tenancy will be used. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement|null - */ - public function getInstancePlacement() - { - return $this->instance_placement; - } - - public function hasInstancePlacement() - { - return isset($this->instance_placement); - } - - public function clearInstancePlacement() - { - unset($this->instance_placement); - } - - /** - * Optional. Placement related info for this node. - * When unspecified, the VPC's default tenancy will be used. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsInstancePlacement instance_placement = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement $var - * @return $this - */ - public function setInstancePlacement($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsInstancePlacement::class); - $this->instance_placement = $var; - - return $this; - } - - /** - * Optional. Configuration related to CloudWatch metrics collection on the - * Auto Scaling group of the node pool. - * When unspecified, metrics collection is disabled. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection autoscaling_metrics_collection = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsAutoscalingGroupMetricsCollection|null - */ - public function getAutoscalingMetricsCollection() - { - return $this->autoscaling_metrics_collection; - } - - public function hasAutoscalingMetricsCollection() - { - return isset($this->autoscaling_metrics_collection); - } - - public function clearAutoscalingMetricsCollection() - { - unset($this->autoscaling_metrics_collection); - } - - /** - * Optional. Configuration related to CloudWatch metrics collection on the - * Auto Scaling group of the node pool. - * When unspecified, metrics collection is disabled. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection autoscaling_metrics_collection = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsAutoscalingGroupMetricsCollection $var - * @return $this - */ - public function setAutoscalingMetricsCollection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsAutoscalingGroupMetricsCollection::class); - $this->autoscaling_metrics_collection = $var; - - return $this; - } - - /** - * Optional. Configuration for provisioning EC2 Spot instances - * When specified, the node pool will provision Spot instances from the set - * of spot_config.instance_types. - * This field is mutually exclusive with `instance_type`. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.SpotConfig spot_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\SpotConfig|null - */ - public function getSpotConfig() - { - return $this->spot_config; - } - - public function hasSpotConfig() - { - return isset($this->spot_config); - } - - public function clearSpotConfig() - { - unset($this->spot_config); - } - - /** - * Optional. Configuration for provisioning EC2 Spot instances - * When specified, the node pool will provision Spot instances from the set - * of spot_config.instance_types. - * This field is mutually exclusive with `instance_type`. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.SpotConfig spot_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\SpotConfig $var - * @return $this - */ - public function setSpotConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\SpotConfig::class); - $this->spot_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodeManagement.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodeManagement.php deleted file mode 100644 index 881f7bcf2ef8..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodeManagement.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsNodeManagement - */ -class AwsNodeManagement extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Whether or not the nodes will be automatically repaired. When set - * to true, the nodes in this node pool will be monitored and if they fail - * health checks consistently over a period of time, an automatic repair - * action will be triggered to replace them with new nodes. - * - * Generated from protobuf field bool auto_repair = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $auto_repair = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $auto_repair - * Optional. Whether or not the nodes will be automatically repaired. When set - * to true, the nodes in this node pool will be monitored and if they fail - * health checks consistently over a period of time, an automatic repair - * action will be triggered to replace them with new nodes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Whether or not the nodes will be automatically repaired. When set - * to true, the nodes in this node pool will be monitored and if they fail - * health checks consistently over a period of time, an automatic repair - * action will be triggered to replace them with new nodes. - * - * Generated from protobuf field bool auto_repair = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAutoRepair() - { - return $this->auto_repair; - } - - /** - * Optional. Whether or not the nodes will be automatically repaired. When set - * to true, the nodes in this node pool will be monitored and if they fail - * health checks consistently over a period of time, an automatic repair - * action will be triggered to replace them with new nodes. - * - * Generated from protobuf field bool auto_repair = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAutoRepair($var) - { - GPBUtil::checkBool($var); - $this->auto_repair = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool.php deleted file mode 100644 index 7ece9f98386a..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool.php +++ /dev/null @@ -1,771 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsNodePool - */ -class AwsNodePool extends \Google\Protobuf\Internal\Message -{ - /** - * The name of this resource. - * Node pool names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * For more details on Google Cloud resource names, - * see [Resource Names](https://cloud.google.com/apis/design/resource_names) - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The Kubernetes version to run on this node pool (e.g. - * `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $version = ''; - /** - * Required. The configuration of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $config = null; - /** - * Required. Autoscaler configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $autoscaling = null; - /** - * Required. The subnet where the node pool node run. - * - * Generated from protobuf field string subnet_id = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $subnet_id = ''; - /** - * Output only. The lifecycle state of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool.State state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. A globally unique identifier for the node pool. - * - * Generated from protobuf field string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. If set, there are currently changes in flight to the node - * pool. - * - * Generated from protobuf field bool reconciling = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reconciling = false; - /** - * Output only. The time at which this node pool was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time at which this node pool was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 21; - */ - protected $etag = ''; - /** - * Optional. Annotations on the node pool. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $annotations; - /** - * Required. The constraint on the maximum number of pods that can be run - * simultaneously on a node in the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $max_pods_constraint = null; - /** - * Output only. A set of errors found in the node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $errors; - /** - * Optional. The Management configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $management = null; - /** - * Optional. Node kubelet configs. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.NodeKubeletConfig kubelet_config = 31 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kubelet_config = null; - /** - * Optional. Update settings control the speed and disruption of the update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.UpdateSettings update_settings = 32 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_settings = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of this resource. - * Node pool names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * For more details on Google Cloud resource names, - * see [Resource Names](https://cloud.google.com/apis/design/resource_names) - * @type string $version - * Required. The Kubernetes version to run on this node pool (e.g. - * `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsNodeConfig $config - * Required. The configuration of the node pool. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsNodePoolAutoscaling $autoscaling - * Required. Autoscaler configuration for this node pool. - * @type string $subnet_id - * Required. The subnet where the node pool node run. - * @type int $state - * Output only. The lifecycle state of the node pool. - * @type string $uid - * Output only. A globally unique identifier for the node pool. - * @type bool $reconciling - * Output only. If set, there are currently changes in flight to the node - * pool. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this node pool was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which this node pool was last updated. - * @type string $etag - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Optional. Annotations on the node pool. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * @type \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint $max_pods_constraint - * Required. The constraint on the maximum number of pods that can be run - * simultaneously on a node in the node pool. - * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsNodePoolError>|\Google\Protobuf\Internal\RepeatedField $errors - * Output only. A set of errors found in the node pool. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsNodeManagement $management - * Optional. The Management configuration for this node pool. - * @type \Google\Cloud\GkeMultiCloud\V1\NodeKubeletConfig $kubelet_config - * Optional. Node kubelet configs. - * @type \Google\Cloud\GkeMultiCloud\V1\UpdateSettings $update_settings - * Optional. Update settings control the speed and disruption of the update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * The name of this resource. - * Node pool names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * For more details on Google Cloud resource names, - * see [Resource Names](https://cloud.google.com/apis/design/resource_names) - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of this resource. - * Node pool names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * For more details on Google Cloud resource names, - * see [Resource Names](https://cloud.google.com/apis/design/resource_names) - * - * 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; - } - - /** - * Required. The Kubernetes version to run on this node pool (e.g. - * `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Required. The Kubernetes version to run on this node pool (e.g. - * `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Required. The configuration of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsNodeConfig|null - */ - public function getConfig() - { - return $this->config; - } - - public function hasConfig() - { - return isset($this->config); - } - - public function clearConfig() - { - unset($this->config); - } - - /** - * Required. The configuration of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodeConfig $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsNodeConfig::class); - $this->config = $var; - - return $this; - } - - /** - * Required. Autoscaler configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsNodePoolAutoscaling|null - */ - public function getAutoscaling() - { - return $this->autoscaling; - } - - public function hasAutoscaling() - { - return isset($this->autoscaling); - } - - public function clearAutoscaling() - { - unset($this->autoscaling); - } - - /** - * Required. Autoscaler configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodePoolAutoscaling $var - * @return $this - */ - public function setAutoscaling($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsNodePoolAutoscaling::class); - $this->autoscaling = $var; - - return $this; - } - - /** - * Required. The subnet where the node pool node run. - * - * Generated from protobuf field string subnet_id = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSubnetId() - { - return $this->subnet_id; - } - - /** - * Required. The subnet where the node pool node run. - * - * Generated from protobuf field string subnet_id = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSubnetId($var) - { - GPBUtil::checkString($var, True); - $this->subnet_id = $var; - - return $this; - } - - /** - * Output only. The lifecycle state of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool.State state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The lifecycle state of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool.State state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\AwsNodePool\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. A globally unique identifier for the node pool. - * - * Generated from protobuf field string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. A globally unique identifier for the node pool. - * - * Generated from protobuf field string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. If set, there are currently changes in flight to the node - * pool. - * - * Generated from protobuf field bool reconciling = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getReconciling() - { - return $this->reconciling; - } - - /** - * Output only. If set, there are currently changes in flight to the node - * pool. - * - * Generated from protobuf field bool reconciling = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setReconciling($var) - { - GPBUtil::checkBool($var); - $this->reconciling = $var; - - return $this; - } - - /** - * Output only. The time at which this node pool was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 19 [(.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 node pool was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 19 [(.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 at which this node pool was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time at which this node pool was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 21; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 21; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. Annotations on the node pool. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Optional. Annotations on the node pool. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Required. The constraint on the maximum number of pods that can be run - * simultaneously on a node in the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint|null - */ - public function getMaxPodsConstraint() - { - return $this->max_pods_constraint; - } - - public function hasMaxPodsConstraint() - { - return isset($this->max_pods_constraint); - } - - public function clearMaxPodsConstraint() - { - unset($this->max_pods_constraint); - } - - /** - * Required. The constraint on the maximum number of pods that can be run - * simultaneously on a node in the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint $var - * @return $this - */ - public function setMaxPodsConstraint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint::class); - $this->max_pods_constraint = $var; - - return $this; - } - - /** - * Output only. A set of errors found in the node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Output only. A set of errors found in the node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsNodePoolError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsNodePoolError::class); - $this->errors = $arr; - - return $this; - } - - /** - * Optional. The Management configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsNodeManagement|null - */ - public function getManagement() - { - return $this->management; - } - - public function hasManagement() - { - return isset($this->management); - } - - public function clearManagement() - { - unset($this->management); - } - - /** - * Optional. The Management configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodeManagement $var - * @return $this - */ - public function setManagement($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsNodeManagement::class); - $this->management = $var; - - return $this; - } - - /** - * Optional. Node kubelet configs. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.NodeKubeletConfig kubelet_config = 31 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\NodeKubeletConfig|null - */ - public function getKubeletConfig() - { - return $this->kubelet_config; - } - - public function hasKubeletConfig() - { - return isset($this->kubelet_config); - } - - public function clearKubeletConfig() - { - unset($this->kubelet_config); - } - - /** - * Optional. Node kubelet configs. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.NodeKubeletConfig kubelet_config = 31 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\NodeKubeletConfig $var - * @return $this - */ - public function setKubeletConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\NodeKubeletConfig::class); - $this->kubelet_config = $var; - - return $this; - } - - /** - * Optional. Update settings control the speed and disruption of the update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.UpdateSettings update_settings = 32 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\UpdateSettings|null - */ - public function getUpdateSettings() - { - return $this->update_settings; - } - - public function hasUpdateSettings() - { - return isset($this->update_settings); - } - - public function clearUpdateSettings() - { - unset($this->update_settings); - } - - /** - * Optional. Update settings control the speed and disruption of the update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.UpdateSettings update_settings = 32 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\UpdateSettings $var - * @return $this - */ - public function setUpdateSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\UpdateSettings::class); - $this->update_settings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool/State.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool/State.php deleted file mode 100644 index 6c57e22b0028..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePool/State.php +++ /dev/null @@ -1,95 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsNodePool.State - */ -class State -{ - /** - * Not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The PROVISIONING state indicates the node pool is being created. - * - * Generated from protobuf enum PROVISIONING = 1; - */ - const PROVISIONING = 1; - /** - * The RUNNING state indicates the node pool has been created - * and is fully usable. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The RECONCILING state indicates that the node pool is being reconciled. - * - * Generated from protobuf enum RECONCILING = 3; - */ - const RECONCILING = 3; - /** - * The STOPPING state indicates the node pool is being deleted. - * - * Generated from protobuf enum STOPPING = 4; - */ - const STOPPING = 4; - /** - * The ERROR state indicates the node pool is in a broken unrecoverable - * state. - * - * Generated from protobuf enum ERROR = 5; - */ - const ERROR = 5; - /** - * The DEGRADED state indicates the node pool requires user action to - * restore full functionality. - * - * Generated from protobuf enum DEGRADED = 6; - */ - const DEGRADED = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PROVISIONING => 'PROVISIONING', - self::RUNNING => 'RUNNING', - self::RECONCILING => 'RECONCILING', - self::STOPPING => 'STOPPING', - self::ERROR => 'ERROR', - self::DEGRADED => 'DEGRADED', - ]; - - 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\GkeMultiCloud\V1\AwsNodePool_State::class); - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePoolAutoscaling.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePoolAutoscaling.php deleted file mode 100644 index fa2cda6ccf53..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePoolAutoscaling.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling - */ -class AwsNodePoolAutoscaling extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Minimum number of nodes in the node pool. Must be greater than or - * equal to 1 and less than or equal to max_node_count. - * - * Generated from protobuf field int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $min_node_count = 0; - /** - * Required. Maximum number of nodes in the node pool. Must be greater than or - * equal to min_node_count and less than or equal to 50. - * - * Generated from protobuf field int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $max_node_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $min_node_count - * Required. Minimum number of nodes in the node pool. Must be greater than or - * equal to 1 and less than or equal to max_node_count. - * @type int $max_node_count - * Required. Maximum number of nodes in the node pool. Must be greater than or - * equal to min_node_count and less than or equal to 50. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Minimum number of nodes in the node pool. Must be greater than or - * equal to 1 and less than or equal to max_node_count. - * - * Generated from protobuf field int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMinNodeCount() - { - return $this->min_node_count; - } - - /** - * Required. Minimum number of nodes in the node pool. Must be greater than or - * equal to 1 and less than or equal to max_node_count. - * - * Generated from protobuf field int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMinNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->min_node_count = $var; - - return $this; - } - - /** - * Required. Maximum number of nodes in the node pool. Must be greater than or - * equal to min_node_count and less than or equal to 50. - * - * Generated from protobuf field int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMaxNodeCount() - { - return $this->max_node_count; - } - - /** - * Required. Maximum number of nodes in the node pool. Must be greater than or - * equal to min_node_count and less than or equal to 50. - * - * Generated from protobuf field int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMaxNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->max_node_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePoolError.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePoolError.php deleted file mode 100644 index c5a04b7d3934..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsNodePoolError.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsNodePoolError - */ -class AwsNodePoolError extends \Google\Protobuf\Internal\Message -{ - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $message - * Human-friendly description of the error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsOpenIdConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsOpenIdConfig.php deleted file mode 100644 index 01857611cf0f..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsOpenIdConfig.php +++ /dev/null @@ -1,272 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsOpenIdConfig - */ -class AwsOpenIdConfig extends \Google\Protobuf\Internal\Message -{ - /** - * OIDC Issuer. - * - * Generated from protobuf field string issuer = 1; - */ - protected $issuer = ''; - /** - * JSON Web Key uri. - * - * Generated from protobuf field string jwks_uri = 2; - */ - protected $jwks_uri = ''; - /** - * Supported response types. - * - * Generated from protobuf field repeated string response_types_supported = 3; - */ - private $response_types_supported; - /** - * Supported subject types. - * - * Generated from protobuf field repeated string subject_types_supported = 4; - */ - private $subject_types_supported; - /** - * supported ID Token signing Algorithms. - * - * Generated from protobuf field repeated string id_token_signing_alg_values_supported = 5; - */ - private $id_token_signing_alg_values_supported; - /** - * Supported claims. - * - * Generated from protobuf field repeated string claims_supported = 6; - */ - private $claims_supported; - /** - * Supported grant types. - * - * Generated from protobuf field repeated string grant_types = 7; - */ - private $grant_types; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $issuer - * OIDC Issuer. - * @type string $jwks_uri - * JSON Web Key uri. - * @type array|\Google\Protobuf\Internal\RepeatedField $response_types_supported - * Supported response types. - * @type array|\Google\Protobuf\Internal\RepeatedField $subject_types_supported - * Supported subject types. - * @type array|\Google\Protobuf\Internal\RepeatedField $id_token_signing_alg_values_supported - * supported ID Token signing Algorithms. - * @type array|\Google\Protobuf\Internal\RepeatedField $claims_supported - * Supported claims. - * @type array|\Google\Protobuf\Internal\RepeatedField $grant_types - * Supported grant types. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * OIDC Issuer. - * - * Generated from protobuf field string issuer = 1; - * @return string - */ - public function getIssuer() - { - return $this->issuer; - } - - /** - * OIDC Issuer. - * - * Generated from protobuf field string issuer = 1; - * @param string $var - * @return $this - */ - public function setIssuer($var) - { - GPBUtil::checkString($var, True); - $this->issuer = $var; - - return $this; - } - - /** - * JSON Web Key uri. - * - * Generated from protobuf field string jwks_uri = 2; - * @return string - */ - public function getJwksUri() - { - return $this->jwks_uri; - } - - /** - * JSON Web Key uri. - * - * Generated from protobuf field string jwks_uri = 2; - * @param string $var - * @return $this - */ - public function setJwksUri($var) - { - GPBUtil::checkString($var, True); - $this->jwks_uri = $var; - - return $this; - } - - /** - * Supported response types. - * - * Generated from protobuf field repeated string response_types_supported = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResponseTypesSupported() - { - return $this->response_types_supported; - } - - /** - * Supported response types. - * - * Generated from protobuf field repeated string response_types_supported = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResponseTypesSupported($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->response_types_supported = $arr; - - return $this; - } - - /** - * Supported subject types. - * - * Generated from protobuf field repeated string subject_types_supported = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSubjectTypesSupported() - { - return $this->subject_types_supported; - } - - /** - * Supported subject types. - * - * Generated from protobuf field repeated string subject_types_supported = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSubjectTypesSupported($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->subject_types_supported = $arr; - - return $this; - } - - /** - * supported ID Token signing Algorithms. - * - * Generated from protobuf field repeated string id_token_signing_alg_values_supported = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIdTokenSigningAlgValuesSupported() - { - return $this->id_token_signing_alg_values_supported; - } - - /** - * supported ID Token signing Algorithms. - * - * Generated from protobuf field repeated string id_token_signing_alg_values_supported = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIdTokenSigningAlgValuesSupported($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->id_token_signing_alg_values_supported = $arr; - - return $this; - } - - /** - * Supported claims. - * - * Generated from protobuf field repeated string claims_supported = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getClaimsSupported() - { - return $this->claims_supported; - } - - /** - * Supported claims. - * - * Generated from protobuf field repeated string claims_supported = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setClaimsSupported($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->claims_supported = $arr; - - return $this; - } - - /** - * Supported grant types. - * - * Generated from protobuf field repeated string grant_types = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGrantTypes() - { - return $this->grant_types; - } - - /** - * Supported grant types. - * - * Generated from protobuf field repeated string grant_types = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGrantTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->grant_types = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsProxyConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsProxyConfig.php deleted file mode 100644 index 25712e08c4ae..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsProxyConfig.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsProxyConfig - */ -class AwsProxyConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy - * configuration. - * The secret must be a JSON encoded proxy configuration - * as described in - * https://cloud.google.com/kubernetes-engine/multi-cloud/docs/aws/how-to/use-a-proxy#create_a_proxy_configuration_file - * - * Generated from protobuf field string secret_arn = 1; - */ - protected $secret_arn = ''; - /** - * The version string of the AWS Secret Manager secret that contains the - * HTTP(S) proxy configuration. - * - * Generated from protobuf field string secret_version = 2; - */ - protected $secret_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $secret_arn - * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy - * configuration. - * The secret must be a JSON encoded proxy configuration - * as described in - * https://cloud.google.com/kubernetes-engine/multi-cloud/docs/aws/how-to/use-a-proxy#create_a_proxy_configuration_file - * @type string $secret_version - * The version string of the AWS Secret Manager secret that contains the - * HTTP(S) proxy configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy - * configuration. - * The secret must be a JSON encoded proxy configuration - * as described in - * https://cloud.google.com/kubernetes-engine/multi-cloud/docs/aws/how-to/use-a-proxy#create_a_proxy_configuration_file - * - * Generated from protobuf field string secret_arn = 1; - * @return string - */ - public function getSecretArn() - { - return $this->secret_arn; - } - - /** - * The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy - * configuration. - * The secret must be a JSON encoded proxy configuration - * as described in - * https://cloud.google.com/kubernetes-engine/multi-cloud/docs/aws/how-to/use-a-proxy#create_a_proxy_configuration_file - * - * Generated from protobuf field string secret_arn = 1; - * @param string $var - * @return $this - */ - public function setSecretArn($var) - { - GPBUtil::checkString($var, True); - $this->secret_arn = $var; - - return $this; - } - - /** - * The version string of the AWS Secret Manager secret that contains the - * HTTP(S) proxy configuration. - * - * Generated from protobuf field string secret_version = 2; - * @return string - */ - public function getSecretVersion() - { - return $this->secret_version; - } - - /** - * The version string of the AWS Secret Manager secret that contains the - * HTTP(S) proxy configuration. - * - * Generated from protobuf field string secret_version = 2; - * @param string $var - * @return $this - */ - public function setSecretVersion($var) - { - GPBUtil::checkString($var, True); - $this->secret_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsServerConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsServerConfig.php deleted file mode 100644 index 04d329be8dfa..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsServerConfig.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsServerConfig - */ -class AwsServerConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the config. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * List of all released Kubernetes versions, including ones which are end of - * life and can no longer be used. Filter by the `enabled` - * property to limit to currently available versions. - * Valid versions supported for both create and update operations - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; - */ - private $valid_versions; - /** - * The list of supported AWS regions. - * - * Generated from protobuf field repeated string supported_aws_regions = 3; - */ - private $supported_aws_regions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the config. - * @type array<\Google\Cloud\GkeMultiCloud\V1\AwsK8sVersionInfo>|\Google\Protobuf\Internal\RepeatedField $valid_versions - * List of all released Kubernetes versions, including ones which are end of - * life and can no longer be used. Filter by the `enabled` - * property to limit to currently available versions. - * Valid versions supported for both create and update operations - * @type array|\Google\Protobuf\Internal\RepeatedField $supported_aws_regions - * The list of supported AWS regions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the config. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the config. - * - * 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; - } - - /** - * List of all released Kubernetes versions, including ones which are end of - * life and can no longer be used. Filter by the `enabled` - * property to limit to currently available versions. - * Valid versions supported for both create and update operations - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValidVersions() - { - return $this->valid_versions; - } - - /** - * List of all released Kubernetes versions, including ones which are end of - * life and can no longer be used. Filter by the `enabled` - * property to limit to currently available versions. - * Valid versions supported for both create and update operations - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsK8sVersionInfo valid_versions = 2; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsK8sVersionInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValidVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsK8sVersionInfo::class); - $this->valid_versions = $arr; - - return $this; - } - - /** - * The list of supported AWS regions. - * - * Generated from protobuf field repeated string supported_aws_regions = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSupportedAwsRegions() - { - return $this->supported_aws_regions; - } - - /** - * The list of supported AWS regions. - * - * Generated from protobuf field repeated string supported_aws_regions = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSupportedAwsRegions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->supported_aws_regions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsServicesAuthentication.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsServicesAuthentication.php deleted file mode 100644 index cef249ad091f..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsServicesAuthentication.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsServicesAuthentication - */ -class AwsServicesAuthentication extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Amazon Resource Name (ARN) of the role that the Anthos - * Multi-Cloud API will assume when managing AWS resources on your account. - * - * Generated from protobuf field string role_arn = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $role_arn = ''; - /** - * Optional. An identifier for the assumed role session. - * When unspecified, it defaults to `multicloud-service-agent`. - * - * Generated from protobuf field string role_session_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $role_session_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $role_arn - * Required. The Amazon Resource Name (ARN) of the role that the Anthos - * Multi-Cloud API will assume when managing AWS resources on your account. - * @type string $role_session_name - * Optional. An identifier for the assumed role session. - * When unspecified, it defaults to `multicloud-service-agent`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Amazon Resource Name (ARN) of the role that the Anthos - * Multi-Cloud API will assume when managing AWS resources on your account. - * - * Generated from protobuf field string role_arn = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRoleArn() - { - return $this->role_arn; - } - - /** - * Required. The Amazon Resource Name (ARN) of the role that the Anthos - * Multi-Cloud API will assume when managing AWS resources on your account. - * - * Generated from protobuf field string role_arn = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRoleArn($var) - { - GPBUtil::checkString($var, True); - $this->role_arn = $var; - - return $this; - } - - /** - * Optional. An identifier for the assumed role session. - * When unspecified, it defaults to `multicloud-service-agent`. - * - * Generated from protobuf field string role_session_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRoleSessionName() - { - return $this->role_session_name; - } - - /** - * Optional. An identifier for the assumed role session. - * When unspecified, it defaults to `multicloud-service-agent`. - * - * Generated from protobuf field string role_session_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRoleSessionName($var) - { - GPBUtil::checkString($var, True); - $this->role_session_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsSshConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsSshConfig.php deleted file mode 100644 index a3e356328b16..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsSshConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsSshConfig - */ -class AwsSshConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the EC2 key pair used to login into cluster machines. - * - * Generated from protobuf field string ec2_key_pair = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ec2_key_pair = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ec2_key_pair - * Required. The name of the EC2 key pair used to login into cluster machines. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the EC2 key pair used to login into cluster machines. - * - * Generated from protobuf field string ec2_key_pair = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEc2KeyPair() - { - return $this->ec2_key_pair; - } - - /** - * Required. The name of the EC2 key pair used to login into cluster machines. - * - * Generated from protobuf field string ec2_key_pair = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEc2KeyPair($var) - { - GPBUtil::checkString($var, True); - $this->ec2_key_pair = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsVolumeTemplate.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsVolumeTemplate.php deleted file mode 100644 index 4a6ca5810edc..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsVolumeTemplate.php +++ /dev/null @@ -1,239 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsVolumeTemplate - */ -class AwsVolumeTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The size of the volume, in GiBs. - * When unspecified, a default value is provided. See the specific reference - * in the parent resource. - * - * Generated from protobuf field int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $size_gib = 0; - /** - * Optional. Type of the EBS volume. - * When unspecified, it defaults to GP2 volume. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType volume_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $volume_type = 0; - /** - * Optional. The number of I/O operations per second (IOPS) to provision for - * GP3 volume. - * - * Generated from protobuf field int32 iops = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $iops = 0; - /** - * Optional. The throughput that the volume supports, in MiB/s. Only valid if - * volume_type is GP3. - * If the volume_type is GP3 and this is not speficied, it defaults to 125. - * - * Generated from protobuf field int32 throughput = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $throughput = 0; - /** - * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) - * used to encrypt AWS EBS volumes. - * If not specified, the default Amazon managed key associated to - * the AWS region where this cluster runs will be used. - * - * Generated from protobuf field string kms_key_arn = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kms_key_arn = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $size_gib - * Optional. The size of the volume, in GiBs. - * When unspecified, a default value is provided. See the specific reference - * in the parent resource. - * @type int $volume_type - * Optional. Type of the EBS volume. - * When unspecified, it defaults to GP2 volume. - * @type int $iops - * Optional. The number of I/O operations per second (IOPS) to provision for - * GP3 volume. - * @type int $throughput - * Optional. The throughput that the volume supports, in MiB/s. Only valid if - * volume_type is GP3. - * If the volume_type is GP3 and this is not speficied, it defaults to 125. - * @type string $kms_key_arn - * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) - * used to encrypt AWS EBS volumes. - * If not specified, the default Amazon managed key associated to - * the AWS region where this cluster runs will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The size of the volume, in GiBs. - * When unspecified, a default value is provided. See the specific reference - * in the parent resource. - * - * Generated from protobuf field int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getSizeGib() - { - return $this->size_gib; - } - - /** - * Optional. The size of the volume, in GiBs. - * When unspecified, a default value is provided. See the specific reference - * in the parent resource. - * - * Generated from protobuf field int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setSizeGib($var) - { - GPBUtil::checkInt32($var); - $this->size_gib = $var; - - return $this; - } - - /** - * Optional. Type of the EBS volume. - * When unspecified, it defaults to GP2 volume. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType volume_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getVolumeType() - { - return $this->volume_type; - } - - /** - * Optional. Type of the EBS volume. - * When unspecified, it defaults to GP2 volume. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType volume_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setVolumeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate\VolumeType::class); - $this->volume_type = $var; - - return $this; - } - - /** - * Optional. The number of I/O operations per second (IOPS) to provision for - * GP3 volume. - * - * Generated from protobuf field int32 iops = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getIops() - { - return $this->iops; - } - - /** - * Optional. The number of I/O operations per second (IOPS) to provision for - * GP3 volume. - * - * Generated from protobuf field int32 iops = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setIops($var) - { - GPBUtil::checkInt32($var); - $this->iops = $var; - - return $this; - } - - /** - * Optional. The throughput that the volume supports, in MiB/s. Only valid if - * volume_type is GP3. - * If the volume_type is GP3 and this is not speficied, it defaults to 125. - * - * Generated from protobuf field int32 throughput = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getThroughput() - { - return $this->throughput; - } - - /** - * Optional. The throughput that the volume supports, in MiB/s. Only valid if - * volume_type is GP3. - * If the volume_type is GP3 and this is not speficied, it defaults to 125. - * - * Generated from protobuf field int32 throughput = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setThroughput($var) - { - GPBUtil::checkInt32($var); - $this->throughput = $var; - - return $this; - } - - /** - * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) - * used to encrypt AWS EBS volumes. - * If not specified, the default Amazon managed key associated to - * the AWS region where this cluster runs will be used. - * - * Generated from protobuf field string kms_key_arn = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKmsKeyArn() - { - return $this->kms_key_arn; - } - - /** - * Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) - * used to encrypt AWS EBS volumes. - * If not specified, the default Amazon managed key associated to - * the AWS region where this cluster runs will be used. - * - * Generated from protobuf field string kms_key_arn = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKmsKeyArn($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_arn = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsVolumeTemplate/VolumeType.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsVolumeTemplate/VolumeType.php deleted file mode 100644 index 8a88654de373..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AwsVolumeTemplate/VolumeType.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType - */ -class VolumeType -{ - /** - * Not set. - * - * Generated from protobuf enum VOLUME_TYPE_UNSPECIFIED = 0; - */ - const VOLUME_TYPE_UNSPECIFIED = 0; - /** - * GP2 (General Purpose SSD volume type). - * - * Generated from protobuf enum GP2 = 1; - */ - const GP2 = 1; - /** - * GP3 (General Purpose SSD volume type). - * - * Generated from protobuf enum GP3 = 2; - */ - const GP3 = 2; - - private static $valueToName = [ - self::VOLUME_TYPE_UNSPECIFIED => 'VOLUME_TYPE_UNSPECIFIED', - self::GP2 => 'GP2', - self::GP3 => 'GP3', - ]; - - 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(VolumeType::class, \Google\Cloud\GkeMultiCloud\V1\AwsVolumeTemplate_VolumeType::class); - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureAuthorization.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureAuthorization.php deleted file mode 100644 index 25a4862f0652..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureAuthorization.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureAuthorization - */ -class AzureAuthorization extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $admin_users; - /** - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $admin_groups; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureClusterUser>|\Google\Protobuf\Internal\RepeatedField $admin_users - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureClusterGroup>|\Google\Protobuf\Internal\RepeatedField $admin_groups - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdminUsers() - { - return $this->admin_users; - } - - /** - * Optional. Users that can perform operations as a cluster admin. A managed - * ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - * to the users. Up to ten admin users can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterUser admin_users = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureClusterUser>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdminUsers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureClusterUser::class); - $this->admin_users = $arr; - - return $this; - } - - /** - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdminGroups() - { - return $this->admin_groups; - } - - /** - * Optional. Groups of users that can perform operations as a cluster admin. A - * managed ClusterRoleBinding will be created to grant the `cluster-admin` - * ClusterRole to the groups. Up to ten admin groups can be provided. - * For more info on RBAC, see - * https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterGroup admin_groups = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureClusterGroup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdminGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureClusterGroup::class); - $this->admin_groups = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClient.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClient.php deleted file mode 100644 index 002830ccfddd..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClient.php +++ /dev/null @@ -1,411 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureClient - */ -class AzureClient extends \Google\Protobuf\Internal\Message -{ - /** - * The name of this resource. - * `AzureClient` resource names are formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The Azure Active Directory Tenant ID. - * - * Generated from protobuf field string tenant_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tenant_id = ''; - /** - * Required. The Azure Active Directory Application ID. - * - * Generated from protobuf field string application_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $application_id = ''; - /** - * Output only. If set, there are currently pending changes to the client. - * - * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reconciling = false; - /** - * Optional. Annotations on the resource. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $annotations; - /** - * Output only. The PEM encoded x509 certificate. - * - * Generated from protobuf field string pem_certificate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $pem_certificate = ''; - /** - * Output only. A globally unique identifier for the client. - * - * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time at which this resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time at which this client was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of this resource. - * `AzureClient` resource names are formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type string $tenant_id - * Required. The Azure Active Directory Tenant ID. - * @type string $application_id - * Required. The Azure Active Directory Application ID. - * @type bool $reconciling - * Output only. If set, there are currently pending changes to the client. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Optional. Annotations on the resource. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * @type string $pem_certificate - * Output only. The PEM encoded x509 certificate. - * @type string $uid - * Output only. A globally unique identifier for the client. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which this client was last updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * The name of this resource. - * `AzureClient` resource names are formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of this resource. - * `AzureClient` resource names are formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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; - } - - /** - * Required. The Azure Active Directory Tenant ID. - * - * Generated from protobuf field string tenant_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTenantId() - { - return $this->tenant_id; - } - - /** - * Required. The Azure Active Directory Tenant ID. - * - * Generated from protobuf field string tenant_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTenantId($var) - { - GPBUtil::checkString($var, True); - $this->tenant_id = $var; - - return $this; - } - - /** - * Required. The Azure Active Directory Application ID. - * - * Generated from protobuf field string application_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getApplicationId() - { - return $this->application_id; - } - - /** - * Required. The Azure Active Directory Application ID. - * - * Generated from protobuf field string application_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setApplicationId($var) - { - GPBUtil::checkString($var, True); - $this->application_id = $var; - - return $this; - } - - /** - * Output only. If set, there are currently pending changes to the client. - * - * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getReconciling() - { - return $this->reconciling; - } - - /** - * Output only. If set, there are currently pending changes to the client. - * - * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setReconciling($var) - { - GPBUtil::checkBool($var); - $this->reconciling = $var; - - return $this; - } - - /** - * Optional. Annotations on the resource. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Optional. Annotations on the resource. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Output only. The PEM encoded x509 certificate. - * - * Generated from protobuf field string pem_certificate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPemCertificate() - { - return $this->pem_certificate; - } - - /** - * Output only. The PEM encoded x509 certificate. - * - * Generated from protobuf field string pem_certificate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPemCertificate($var) - { - GPBUtil::checkString($var, True); - $this->pem_certificate = $var; - - return $this; - } - - /** - * Output only. A globally unique identifier for the client. - * - * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. A globally unique identifier for the client. - * - * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time at which this resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.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 resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.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 at which this client was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time at which this client was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureCluster.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureCluster.php deleted file mode 100644 index fb3117ed00b6..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureCluster.php +++ /dev/null @@ -1,1087 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureCluster - */ -class AzureCluster extends \Google\Protobuf\Internal\Message -{ - /** - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Required. The Azure region where the cluster runs. - * Each Google Cloud region supports a subset of nearby Azure regions. - * You can call - * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig] - * to list all supported Azure regions within a given Google Cloud region. - * - * Generated from protobuf field string azure_region = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $azure_region = ''; - /** - * Required. The ARM ID of the resource group where the cluster resources are - * deployed. For example: - * `/subscriptions//resourceGroups/` - * - * Generated from protobuf field string resource_group_id = 17 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource_group_id = ''; - /** - * Optional. Name of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains - * authentication configuration for how the Anthos Multi-Cloud API connects to - * Azure APIs. - * Either azure_client or azure_services_authentication should be provided. - * The `AzureClient` resource must reside on the same Google Cloud Platform - * project and region as the `AzureCluster`. - * `AzureClient` names are formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string azure_client = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $azure_client = ''; - /** - * Required. Cluster-wide networking configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $networking = null; - /** - * Required. Configuration related to the cluster control plane. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $control_plane = null; - /** - * Required. Configuration related to the cluster RBAC settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $authorization = null; - /** - * Optional. Authentication configuration for management of Azure resources. - * Either azure_client or azure_services_authentication should be provided. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureServicesAuthentication azure_services_authentication = 22 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $azure_services_authentication = null; - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The endpoint of the cluster's API server. - * - * Generated from protobuf field string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $endpoint = ''; - /** - * Output only. A globally unique identifier for the cluster. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. If set, there are currently changes in flight to the cluster. - * - * Generated from protobuf field bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reconciling = false; - /** - * Output only. The time at which this cluster was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time at which this cluster was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 13; - */ - protected $etag = ''; - /** - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $annotations; - /** - * Output only. Workload Identity settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $workload_identity_config = null; - /** - * Output only. PEM encoded x509 certificate of the cluster root of trust. - * - * Generated from protobuf field string cluster_ca_certificate = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster_ca_certificate = ''; - /** - * Required. Fleet configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $fleet = null; - /** - * Output only. Managed Azure resources for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $managed_resources = null; - /** - * Optional. Logging configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $logging_config = null; - /** - * Output only. A set of errors found in the cluster. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterError errors = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $errors; - /** - * Optional. Monitoring configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 25 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $monitoring_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @type string $description - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * @type string $azure_region - * Required. The Azure region where the cluster runs. - * Each Google Cloud region supports a subset of nearby Azure regions. - * You can call - * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig] - * to list all supported Azure regions within a given Google Cloud region. - * @type string $resource_group_id - * Required. The ARM ID of the resource group where the cluster resources are - * deployed. For example: - * `/subscriptions//resourceGroups/` - * @type string $azure_client - * Optional. Name of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains - * authentication configuration for how the Anthos Multi-Cloud API connects to - * Azure APIs. - * Either azure_client or azure_services_authentication should be provided. - * The `AzureClient` resource must reside on the same Google Cloud Platform - * project and region as the `AzureCluster`. - * `AzureClient` names are formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureClusterNetworking $networking - * Required. Cluster-wide networking configuration. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureControlPlane $control_plane - * Required. Configuration related to the cluster control plane. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureAuthorization $authorization - * Required. Configuration related to the cluster RBAC settings. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureServicesAuthentication $azure_services_authentication - * Optional. Authentication configuration for management of Azure resources. - * Either azure_client or azure_services_authentication should be provided. - * @type int $state - * Output only. The current state of the cluster. - * @type string $endpoint - * Output only. The endpoint of the cluster's API server. - * @type string $uid - * Output only. A globally unique identifier for the cluster. - * @type bool $reconciling - * Output only. If set, there are currently changes in flight to the cluster. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this cluster was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which this cluster was last updated. - * @type string $etag - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * @type \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig $workload_identity_config - * Output only. Workload Identity settings. - * @type string $cluster_ca_certificate - * Output only. PEM encoded x509 certificate of the cluster root of trust. - * @type \Google\Cloud\GkeMultiCloud\V1\Fleet $fleet - * Required. Fleet configuration. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureClusterResources $managed_resources - * Output only. Managed Azure resources for this cluster. - * @type \Google\Cloud\GkeMultiCloud\V1\LoggingConfig $logging_config - * Optional. Logging configuration for this cluster. - * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureClusterError>|\Google\Protobuf\Internal\RepeatedField $errors - * Output only. A set of errors found in the cluster. - * @type \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig $monitoring_config - * Optional. Monitoring configuration for this cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of this resource. - * Cluster names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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; - } - - /** - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A human readable description of this cluster. - * Cannot be longer than 255 UTF-8 encoded bytes. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. The Azure region where the cluster runs. - * Each Google Cloud region supports a subset of nearby Azure regions. - * You can call - * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig] - * to list all supported Azure regions within a given Google Cloud region. - * - * Generated from protobuf field string azure_region = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAzureRegion() - { - return $this->azure_region; - } - - /** - * Required. The Azure region where the cluster runs. - * Each Google Cloud region supports a subset of nearby Azure regions. - * You can call - * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig] - * to list all supported Azure regions within a given Google Cloud region. - * - * Generated from protobuf field string azure_region = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAzureRegion($var) - { - GPBUtil::checkString($var, True); - $this->azure_region = $var; - - return $this; - } - - /** - * Required. The ARM ID of the resource group where the cluster resources are - * deployed. For example: - * `/subscriptions//resourceGroups/` - * - * Generated from protobuf field string resource_group_id = 17 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getResourceGroupId() - { - return $this->resource_group_id; - } - - /** - * Required. The ARM ID of the resource group where the cluster resources are - * deployed. For example: - * `/subscriptions//resourceGroups/` - * - * Generated from protobuf field string resource_group_id = 17 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setResourceGroupId($var) - { - GPBUtil::checkString($var, True); - $this->resource_group_id = $var; - - return $this; - } - - /** - * Optional. Name of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains - * authentication configuration for how the Anthos Multi-Cloud API connects to - * Azure APIs. - * Either azure_client or azure_services_authentication should be provided. - * The `AzureClient` resource must reside on the same Google Cloud Platform - * project and region as the `AzureCluster`. - * `AzureClient` names are formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string azure_client = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAzureClient() - { - return $this->azure_client; - } - - /** - * Optional. Name of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains - * authentication configuration for how the Anthos Multi-Cloud API connects to - * Azure APIs. - * Either azure_client or azure_services_authentication should be provided. - * The `AzureClient` resource must reside on the same Google Cloud Platform - * project and region as the `AzureCluster`. - * `AzureClient` names are formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string azure_client = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAzureClient($var) - { - GPBUtil::checkString($var, True); - $this->azure_client = $var; - - return $this; - } - - /** - * Required. Cluster-wide networking configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureClusterNetworking|null - */ - public function getNetworking() - { - return $this->networking; - } - - public function hasNetworking() - { - return isset($this->networking); - } - - public function clearNetworking() - { - unset($this->networking); - } - - /** - * Required. Cluster-wide networking configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClusterNetworking networking = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureClusterNetworking $var - * @return $this - */ - public function setNetworking($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureClusterNetworking::class); - $this->networking = $var; - - return $this; - } - - /** - * Required. Configuration related to the cluster control plane. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureControlPlane|null - */ - public function getControlPlane() - { - return $this->control_plane; - } - - public function hasControlPlane() - { - return isset($this->control_plane); - } - - public function clearControlPlane() - { - unset($this->control_plane); - } - - /** - * Required. Configuration related to the cluster control plane. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureControlPlane control_plane = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureControlPlane $var - * @return $this - */ - public function setControlPlane($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureControlPlane::class); - $this->control_plane = $var; - - return $this; - } - - /** - * Required. Configuration related to the cluster RBAC settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureAuthorization|null - */ - public function getAuthorization() - { - return $this->authorization; - } - - public function hasAuthorization() - { - return isset($this->authorization); - } - - public function clearAuthorization() - { - unset($this->authorization); - } - - /** - * Required. Configuration related to the cluster RBAC settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureAuthorization authorization = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureAuthorization $var - * @return $this - */ - public function setAuthorization($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureAuthorization::class); - $this->authorization = $var; - - return $this; - } - - /** - * Optional. Authentication configuration for management of Azure resources. - * Either azure_client or azure_services_authentication should be provided. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureServicesAuthentication azure_services_authentication = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureServicesAuthentication|null - */ - public function getAzureServicesAuthentication() - { - return $this->azure_services_authentication; - } - - public function hasAzureServicesAuthentication() - { - return isset($this->azure_services_authentication); - } - - public function clearAzureServicesAuthentication() - { - unset($this->azure_services_authentication); - } - - /** - * Optional. Authentication configuration for management of Azure resources. - * Either azure_client or azure_services_authentication should be provided. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureServicesAuthentication azure_services_authentication = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureServicesAuthentication $var - * @return $this - */ - public function setAzureServicesAuthentication($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureServicesAuthentication::class); - $this->azure_services_authentication = $var; - - return $this; - } - - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\AzureCluster\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The endpoint of the cluster's API server. - * - * Generated from protobuf field string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEndpoint() - { - return $this->endpoint; - } - - /** - * Output only. The endpoint of the cluster's API server. - * - * Generated from protobuf field string endpoint = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->endpoint = $var; - - return $this; - } - - /** - * Output only. A globally unique identifier for the cluster. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. A globally unique identifier for the cluster. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. If set, there are currently changes in flight to the cluster. - * - * Generated from protobuf field bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getReconciling() - { - return $this->reconciling; - } - - /** - * Output only. If set, there are currently changes in flight to the cluster. - * - * Generated from protobuf field bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setReconciling($var) - { - GPBUtil::checkBool($var); - $this->reconciling = $var; - - return $this; - } - - /** - * Output only. The time at which this cluster was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.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 cluster was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.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 at which this cluster was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time at which this cluster was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 13; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 13; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Optional. Annotations on the cluster. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Output only. Workload Identity settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig|null - */ - public function getWorkloadIdentityConfig() - { - return $this->workload_identity_config; - } - - public function hasWorkloadIdentityConfig() - { - return isset($this->workload_identity_config); - } - - public function clearWorkloadIdentityConfig() - { - unset($this->workload_identity_config); - } - - /** - * Output only. Workload Identity settings. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.WorkloadIdentityConfig workload_identity_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig $var - * @return $this - */ - public function setWorkloadIdentityConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\WorkloadIdentityConfig::class); - $this->workload_identity_config = $var; - - return $this; - } - - /** - * Output only. PEM encoded x509 certificate of the cluster root of trust. - * - * Generated from protobuf field string cluster_ca_certificate = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getClusterCaCertificate() - { - return $this->cluster_ca_certificate; - } - - /** - * Output only. PEM encoded x509 certificate of the cluster root of trust. - * - * Generated from protobuf field string cluster_ca_certificate = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setClusterCaCertificate($var) - { - GPBUtil::checkString($var, True); - $this->cluster_ca_certificate = $var; - - return $this; - } - - /** - * Required. Fleet configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\Fleet|null - */ - public function getFleet() - { - return $this->fleet; - } - - public function hasFleet() - { - return isset($this->fleet); - } - - public function clearFleet() - { - unset($this->fleet); - } - - /** - * Required. Fleet configuration. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.Fleet fleet = 20 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\Fleet $var - * @return $this - */ - public function setFleet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\Fleet::class); - $this->fleet = $var; - - return $this; - } - - /** - * Output only. Managed Azure resources for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureClusterResources|null - */ - public function getManagedResources() - { - return $this->managed_resources; - } - - public function hasManagedResources() - { - return isset($this->managed_resources); - } - - public function clearManagedResources() - { - unset($this->managed_resources); - } - - /** - * Output only. Managed Azure resources for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClusterResources managed_resources = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureClusterResources $var - * @return $this - */ - public function setManagedResources($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureClusterResources::class); - $this->managed_resources = $var; - - return $this; - } - - /** - * Optional. Logging configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\LoggingConfig|null - */ - public function getLoggingConfig() - { - return $this->logging_config; - } - - public function hasLoggingConfig() - { - return isset($this->logging_config); - } - - public function clearLoggingConfig() - { - unset($this->logging_config); - } - - /** - * Optional. Logging configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingConfig logging_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\LoggingConfig $var - * @return $this - */ - public function setLoggingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\LoggingConfig::class); - $this->logging_config = $var; - - return $this; - } - - /** - * Output only. A set of errors found in the cluster. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterError errors = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Output only. A set of errors found in the cluster. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClusterError errors = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureClusterError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureClusterError::class); - $this->errors = $arr; - - return $this; - } - - /** - * Optional. Monitoring configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig|null - */ - public function getMonitoringConfig() - { - return $this->monitoring_config; - } - - public function hasMonitoringConfig() - { - return isset($this->monitoring_config); - } - - public function clearMonitoringConfig() - { - unset($this->monitoring_config); - } - - /** - * Optional. Monitoring configuration for this cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MonitoringConfig monitoring_config = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig $var - * @return $this - */ - public function setMonitoringConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\MonitoringConfig::class); - $this->monitoring_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureCluster/State.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureCluster/State.php deleted file mode 100644 index e62a7b58f248..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureCluster/State.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureCluster.State - */ -class State -{ - /** - * Not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The PROVISIONING state indicates the cluster is being created. - * - * Generated from protobuf enum PROVISIONING = 1; - */ - const PROVISIONING = 1; - /** - * The RUNNING state indicates the cluster has been created and is fully - * usable. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The RECONCILING state indicates that some work is actively being done on - * the cluster, such as upgrading the control plane replicas. - * - * Generated from protobuf enum RECONCILING = 3; - */ - const RECONCILING = 3; - /** - * The STOPPING state indicates the cluster is being deleted. - * - * Generated from protobuf enum STOPPING = 4; - */ - const STOPPING = 4; - /** - * The ERROR state indicates the cluster is in a broken unrecoverable - * state. - * - * Generated from protobuf enum ERROR = 5; - */ - const ERROR = 5; - /** - * The DEGRADED state indicates the cluster requires user action to - * restore full functionality. - * - * Generated from protobuf enum DEGRADED = 6; - */ - const DEGRADED = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PROVISIONING => 'PROVISIONING', - self::RUNNING => 'RUNNING', - self::RECONCILING => 'RECONCILING', - self::STOPPING => 'STOPPING', - self::ERROR => 'ERROR', - self::DEGRADED => 'DEGRADED', - ]; - - 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\GkeMultiCloud\V1\AzureCluster_State::class); - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterError.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterError.php deleted file mode 100644 index cf9a9b6b2e5d..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterError.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureClusterError - */ -class AzureClusterError extends \Google\Protobuf\Internal\Message -{ - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $message - * Human-friendly description of the error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterGroup.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterGroup.php deleted file mode 100644 index dee74b296f31..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterGroup.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureClusterGroup - */ -class AzureClusterGroup extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the group, e.g. `my-group@domain.com`. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $group - * Required. The name of the group, e.g. `my-group@domain.com`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the group, e.g. `my-group@domain.com`. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGroup() - { - return $this->group; - } - - /** - * Required. The name of the group, e.g. `my-group@domain.com`. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkString($var, True); - $this->group = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterNetworking.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterNetworking.php deleted file mode 100644 index c4425dee6e7c..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterNetworking.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureClusterNetworking - */ -class AzureClusterNetworking extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Azure Resource Manager (ARM) ID of the VNet associated with - * your cluster. - * All components in the cluster (i.e. control plane and node pools) run on a - * single VNet. - * Example: - * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/` - * This field cannot be changed after creation. - * - * Generated from protobuf field string virtual_network_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $virtual_network_id = ''; - /** - * Required. The IP address range of the pods in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * All pods in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * This field cannot be changed after creation. - * - * Generated from protobuf field repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $pod_address_cidr_blocks; - /** - * Required. The IP address range for services in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * All services in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * This field cannot be changed after creating a cluster. - * - * Generated from protobuf field repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $service_address_cidr_blocks; - /** - * Optional. The ARM ID of the subnet where Kubernetes private service type - * load balancers are deployed. When unspecified, it defaults to - * AzureControlPlane.subnet_id. - * Example: - * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456" - * - * Generated from protobuf field string service_load_balancer_subnet_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_load_balancer_subnet_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $virtual_network_id - * Required. The Azure Resource Manager (ARM) ID of the VNet associated with - * your cluster. - * All components in the cluster (i.e. control plane and node pools) run on a - * single VNet. - * Example: - * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/` - * This field cannot be changed after creation. - * @type array|\Google\Protobuf\Internal\RepeatedField $pod_address_cidr_blocks - * Required. The IP address range of the pods in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * All pods in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * This field cannot be changed after creation. - * @type array|\Google\Protobuf\Internal\RepeatedField $service_address_cidr_blocks - * Required. The IP address range for services in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * All services in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * This field cannot be changed after creating a cluster. - * @type string $service_load_balancer_subnet_id - * Optional. The ARM ID of the subnet where Kubernetes private service type - * load balancers are deployed. When unspecified, it defaults to - * AzureControlPlane.subnet_id. - * Example: - * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Azure Resource Manager (ARM) ID of the VNet associated with - * your cluster. - * All components in the cluster (i.e. control plane and node pools) run on a - * single VNet. - * Example: - * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/` - * This field cannot be changed after creation. - * - * Generated from protobuf field string virtual_network_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVirtualNetworkId() - { - return $this->virtual_network_id; - } - - /** - * Required. The Azure Resource Manager (ARM) ID of the VNet associated with - * your cluster. - * All components in the cluster (i.e. control plane and node pools) run on a - * single VNet. - * Example: - * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/` - * This field cannot be changed after creation. - * - * Generated from protobuf field string virtual_network_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVirtualNetworkId($var) - { - GPBUtil::checkString($var, True); - $this->virtual_network_id = $var; - - return $this; - } - - /** - * Required. The IP address range of the pods in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * All pods in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * This field cannot be changed after creation. - * - * Generated from protobuf field repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPodAddressCidrBlocks() - { - return $this->pod_address_cidr_blocks; - } - - /** - * Required. The IP address range of the pods in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * All pods in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * This field cannot be changed after creation. - * - * Generated from protobuf field repeated string pod_address_cidr_blocks = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPodAddressCidrBlocks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->pod_address_cidr_blocks = $arr; - - return $this; - } - - /** - * Required. The IP address range for services in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * All services in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * This field cannot be changed after creating a cluster. - * - * Generated from protobuf field repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServiceAddressCidrBlocks() - { - return $this->service_address_cidr_blocks; - } - - /** - * Required. The IP address range for services in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * All services in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * This field cannot be changed after creating a cluster. - * - * Generated from protobuf field repeated string service_address_cidr_blocks = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServiceAddressCidrBlocks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->service_address_cidr_blocks = $arr; - - return $this; - } - - /** - * Optional. The ARM ID of the subnet where Kubernetes private service type - * load balancers are deployed. When unspecified, it defaults to - * AzureControlPlane.subnet_id. - * Example: - * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456" - * - * Generated from protobuf field string service_load_balancer_subnet_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getServiceLoadBalancerSubnetId() - { - return $this->service_load_balancer_subnet_id; - } - - /** - * Optional. The ARM ID of the subnet where Kubernetes private service type - * load balancers are deployed. When unspecified, it defaults to - * AzureControlPlane.subnet_id. - * Example: - * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456" - * - * Generated from protobuf field string service_load_balancer_subnet_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setServiceLoadBalancerSubnetId($var) - { - GPBUtil::checkString($var, True); - $this->service_load_balancer_subnet_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterResources.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterResources.php deleted file mode 100644 index ca301cadedac..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterResources.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureClusterResources - */ -class AzureClusterResources extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The ARM ID of the cluster network security group. - * - * Generated from protobuf field string network_security_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $network_security_group_id = ''; - /** - * Output only. The ARM ID of the control plane application security group. - * - * Generated from protobuf field string control_plane_application_security_group_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $control_plane_application_security_group_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network_security_group_id - * Output only. The ARM ID of the cluster network security group. - * @type string $control_plane_application_security_group_id - * Output only. The ARM ID of the control plane application security group. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The ARM ID of the cluster network security group. - * - * Generated from protobuf field string network_security_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNetworkSecurityGroupId() - { - return $this->network_security_group_id; - } - - /** - * Output only. The ARM ID of the cluster network security group. - * - * Generated from protobuf field string network_security_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNetworkSecurityGroupId($var) - { - GPBUtil::checkString($var, True); - $this->network_security_group_id = $var; - - return $this; - } - - /** - * Output only. The ARM ID of the control plane application security group. - * - * Generated from protobuf field string control_plane_application_security_group_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getControlPlaneApplicationSecurityGroupId() - { - return $this->control_plane_application_security_group_id; - } - - /** - * Output only. The ARM ID of the control plane application security group. - * - * Generated from protobuf field string control_plane_application_security_group_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setControlPlaneApplicationSecurityGroupId($var) - { - GPBUtil::checkString($var, True); - $this->control_plane_application_security_group_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterUser.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterUser.php deleted file mode 100644 index 3aecd59fbf61..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureClusterUser.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureClusterUser - */ -class AzureClusterUser extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $username = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $username - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureConfigEncryption.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureConfigEncryption.php deleted file mode 100644 index f90fcdd501a4..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureConfigEncryption.php +++ /dev/null @@ -1,131 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureConfigEncryption - */ -class AzureConfigEncryption extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config - * data. - * For example: - * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` - * - * Generated from protobuf field string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $key_id = ''; - /** - * Optional. RSA key of the Azure Key Vault public key to use for encrypting - * the data. - * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280) - * in ASN.1 DER form. The string must be comprised of a single PEM block of - * type "PUBLIC KEY". - * - * Generated from protobuf field string public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $public_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key_id - * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config - * data. - * For example: - * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` - * @type string $public_key - * Optional. RSA key of the Azure Key Vault public key to use for encrypting - * the data. - * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280) - * in ASN.1 DER form. The string must be comprised of a single PEM block of - * type "PUBLIC KEY". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config - * data. - * For example: - * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` - * - * Generated from protobuf field string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKeyId() - { - return $this->key_id; - } - - /** - * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config - * data. - * For example: - * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` - * - * Generated from protobuf field string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKeyId($var) - { - GPBUtil::checkString($var, True); - $this->key_id = $var; - - return $this; - } - - /** - * Optional. RSA key of the Azure Key Vault public key to use for encrypting - * the data. - * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280) - * in ASN.1 DER form. The string must be comprised of a single PEM block of - * type "PUBLIC KEY". - * - * Generated from protobuf field string public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPublicKey() - { - return $this->public_key; - } - - /** - * Optional. RSA key of the Azure Key Vault public key to use for encrypting - * the data. - * This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280) - * in ASN.1 DER form. The string must be comprised of a single PEM block of - * type "PUBLIC KEY". - * - * Generated from protobuf field string public_key = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPublicKey($var) - { - GPBUtil::checkString($var, True); - $this->public_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureControlPlane.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureControlPlane.php deleted file mode 100644 index 92f3fed0095f..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureControlPlane.php +++ /dev/null @@ -1,613 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureControlPlane - */ -class AzureControlPlane extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Kubernetes version to run on control plane replicas - * (e.g. `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]. - * - * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $version = ''; - /** - * Optional. The ARM ID of the default subnet for the control plane. The - * control plane VMs are deployed in this subnet, unless - * `AzureControlPlane.replica_placements` is specified. This subnet will also - * be used as default for `AzureControlPlane.endpoint_subnet_id` if - * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will - * be used as default for - * `AzureClusterNetworking.service_load_balancer_subnet_id`. - * Example: - * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/default`. - * - * Generated from protobuf field string subnet_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $subnet_id = ''; - /** - * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. - * For available VM sizes, see - * https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions. - * When unspecified, it defaults to `Standard_DS2_v2`. - * - * Generated from protobuf field string vm_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $vm_size = ''; - /** - * Required. SSH configuration for how to access the underlying control plane - * machines. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ssh_config = null; - /** - * Optional. Configuration related to the root volume provisioned for each - * control plane replica. - * When unspecified, it defaults to 32-GiB Azure Disk. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $root_volume = null; - /** - * Optional. Configuration related to the main volume provisioned for each - * control plane replica. - * The main volume is in charge of storing all of the cluster's etcd state. - * When unspecified, it defaults to a 8-GiB Azure Disk. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $main_volume = null; - /** - * Optional. Configuration related to application-layer secrets encryption. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $database_encryption = null; - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $proxy_config = null; - /** - * Optional. Configuration related to vm config encryption. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $config_encryption = null; - /** - * Optional. A set of tags to apply to all underlying control plane Azure - * resources. - * - * Generated from protobuf field map tags = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $tags; - /** - * Optional. Configuration for where to place the control plane replicas. - * Up to three replica placement instances can be specified. If - * replica_placements is set, the replica placement instances will be applied - * to the three control plane replicas as evenly as possible. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $replica_placements; - /** - * Optional. The ARM ID of the subnet where the control plane load balancer is - * deployed. When unspecified, it defaults to AzureControlPlane.subnet_id. - * Example: - * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123" - * - * Generated from protobuf field string endpoint_subnet_id = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $endpoint_subnet_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * Required. The Kubernetes version to run on control plane replicas - * (e.g. `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]. - * @type string $subnet_id - * Optional. The ARM ID of the default subnet for the control plane. The - * control plane VMs are deployed in this subnet, unless - * `AzureControlPlane.replica_placements` is specified. This subnet will also - * be used as default for `AzureControlPlane.endpoint_subnet_id` if - * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will - * be used as default for - * `AzureClusterNetworking.service_load_balancer_subnet_id`. - * Example: - * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/default`. - * @type string $vm_size - * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. - * For available VM sizes, see - * https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions. - * When unspecified, it defaults to `Standard_DS2_v2`. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig $ssh_config - * Required. SSH configuration for how to access the underlying control plane - * machines. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate $root_volume - * Optional. Configuration related to the root volume provisioned for each - * control plane replica. - * When unspecified, it defaults to 32-GiB Azure Disk. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate $main_volume - * Optional. Configuration related to the main volume provisioned for each - * control plane replica. - * The main volume is in charge of storing all of the cluster's etcd state. - * When unspecified, it defaults to a 8-GiB Azure Disk. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureDatabaseEncryption $database_encryption - * Optional. Configuration related to application-layer secrets encryption. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig $proxy_config - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption $config_encryption - * Optional. Configuration related to vm config encryption. - * @type array|\Google\Protobuf\Internal\MapField $tags - * Optional. A set of tags to apply to all underlying control plane Azure - * resources. - * @type array<\Google\Cloud\GkeMultiCloud\V1\ReplicaPlacement>|\Google\Protobuf\Internal\RepeatedField $replica_placements - * Optional. Configuration for where to place the control plane replicas. - * Up to three replica placement instances can be specified. If - * replica_placements is set, the replica placement instances will be applied - * to the three control plane replicas as evenly as possible. - * @type string $endpoint_subnet_id - * Optional. The ARM ID of the subnet where the control plane load balancer is - * deployed. When unspecified, it defaults to AzureControlPlane.subnet_id. - * Example: - * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Kubernetes version to run on control plane replicas - * (e.g. `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]. - * - * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Required. The Kubernetes version to run on control plane replicas - * (e.g. `1.19.10-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]. - * - * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Optional. The ARM ID of the default subnet for the control plane. The - * control plane VMs are deployed in this subnet, unless - * `AzureControlPlane.replica_placements` is specified. This subnet will also - * be used as default for `AzureControlPlane.endpoint_subnet_id` if - * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will - * be used as default for - * `AzureClusterNetworking.service_load_balancer_subnet_id`. - * Example: - * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/default`. - * - * Generated from protobuf field string subnet_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSubnetId() - { - return $this->subnet_id; - } - - /** - * Optional. The ARM ID of the default subnet for the control plane. The - * control plane VMs are deployed in this subnet, unless - * `AzureControlPlane.replica_placements` is specified. This subnet will also - * be used as default for `AzureControlPlane.endpoint_subnet_id` if - * `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will - * be used as default for - * `AzureClusterNetworking.service_load_balancer_subnet_id`. - * Example: - * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/default`. - * - * Generated from protobuf field string subnet_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSubnetId($var) - { - GPBUtil::checkString($var, True); - $this->subnet_id = $var; - - return $this; - } - - /** - * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. - * For available VM sizes, see - * https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions. - * When unspecified, it defaults to `Standard_DS2_v2`. - * - * Generated from protobuf field string vm_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getVmSize() - { - return $this->vm_size; - } - - /** - * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. - * For available VM sizes, see - * https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions. - * When unspecified, it defaults to `Standard_DS2_v2`. - * - * Generated from protobuf field string vm_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setVmSize($var) - { - GPBUtil::checkString($var, True); - $this->vm_size = $var; - - return $this; - } - - /** - * Required. SSH configuration for how to access the underlying control plane - * machines. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig|null - */ - public function getSshConfig() - { - return $this->ssh_config; - } - - public function hasSshConfig() - { - return isset($this->ssh_config); - } - - public function clearSshConfig() - { - unset($this->ssh_config); - } - - /** - * Required. SSH configuration for how to access the underlying control plane - * machines. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 11 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig $var - * @return $this - */ - public function setSshConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig::class); - $this->ssh_config = $var; - - return $this; - } - - /** - * Optional. Configuration related to the root volume provisioned for each - * control plane replica. - * When unspecified, it defaults to 32-GiB Azure Disk. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate|null - */ - public function getRootVolume() - { - return $this->root_volume; - } - - public function hasRootVolume() - { - return isset($this->root_volume); - } - - public function clearRootVolume() - { - unset($this->root_volume); - } - - /** - * Optional. Configuration related to the root volume provisioned for each - * control plane replica. - * When unspecified, it defaults to 32-GiB Azure Disk. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate $var - * @return $this - */ - public function setRootVolume($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate::class); - $this->root_volume = $var; - - return $this; - } - - /** - * Optional. Configuration related to the main volume provisioned for each - * control plane replica. - * The main volume is in charge of storing all of the cluster's etcd state. - * When unspecified, it defaults to a 8-GiB Azure Disk. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate|null - */ - public function getMainVolume() - { - return $this->main_volume; - } - - public function hasMainVolume() - { - return isset($this->main_volume); - } - - public function clearMainVolume() - { - unset($this->main_volume); - } - - /** - * Optional. Configuration related to the main volume provisioned for each - * control plane replica. - * The main volume is in charge of storing all of the cluster's etcd state. - * When unspecified, it defaults to a 8-GiB Azure Disk. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate main_volume = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate $var - * @return $this - */ - public function setMainVolume($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate::class); - $this->main_volume = $var; - - return $this; - } - - /** - * Optional. Configuration related to application-layer secrets encryption. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureDatabaseEncryption|null - */ - public function getDatabaseEncryption() - { - return $this->database_encryption; - } - - public function hasDatabaseEncryption() - { - return isset($this->database_encryption); - } - - public function clearDatabaseEncryption() - { - unset($this->database_encryption); - } - - /** - * Optional. Configuration related to application-layer secrets encryption. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDatabaseEncryption database_encryption = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureDatabaseEncryption $var - * @return $this - */ - public function setDatabaseEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureDatabaseEncryption::class); - $this->database_encryption = $var; - - return $this; - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig|null - */ - public function getProxyConfig() - { - return $this->proxy_config; - } - - public function hasProxyConfig() - { - return isset($this->proxy_config); - } - - public function clearProxyConfig() - { - unset($this->proxy_config); - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig $var - * @return $this - */ - public function setProxyConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig::class); - $this->proxy_config = $var; - - return $this; - } - - /** - * Optional. Configuration related to vm config encryption. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption|null - */ - public function getConfigEncryption() - { - return $this->config_encryption; - } - - public function hasConfigEncryption() - { - return isset($this->config_encryption); - } - - public function clearConfigEncryption() - { - unset($this->config_encryption); - } - - /** - * Optional. Configuration related to vm config encryption. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption $var - * @return $this - */ - public function setConfigEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption::class); - $this->config_encryption = $var; - - return $this; - } - - /** - * Optional. A set of tags to apply to all underlying control plane Azure - * resources. - * - * Generated from protobuf field map tags = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. A set of tags to apply to all underlying control plane Azure - * resources. - * - * Generated from protobuf field map tags = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - - /** - * Optional. Configuration for where to place the control plane replicas. - * Up to three replica placement instances can be specified. If - * replica_placements is set, the replica placement instances will be applied - * to the three control plane replicas as evenly as possible. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReplicaPlacements() - { - return $this->replica_placements; - } - - /** - * Optional. Configuration for where to place the control plane replicas. - * Up to three replica placement instances can be specified. If - * replica_placements is set, the replica placement instances will be applied - * to the three control plane replicas as evenly as possible. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.ReplicaPlacement replica_placements = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\ReplicaPlacement>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReplicaPlacements($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\ReplicaPlacement::class); - $this->replica_placements = $arr; - - return $this; - } - - /** - * Optional. The ARM ID of the subnet where the control plane load balancer is - * deployed. When unspecified, it defaults to AzureControlPlane.subnet_id. - * Example: - * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123" - * - * Generated from protobuf field string endpoint_subnet_id = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEndpointSubnetId() - { - return $this->endpoint_subnet_id; - } - - /** - * Optional. The ARM ID of the subnet where the control plane load balancer is - * deployed. When unspecified, it defaults to AzureControlPlane.subnet_id. - * Example: - * "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123" - * - * Generated from protobuf field string endpoint_subnet_id = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEndpointSubnetId($var) - { - GPBUtil::checkString($var, True); - $this->endpoint_subnet_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureDatabaseEncryption.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureDatabaseEncryption.php deleted file mode 100644 index 21c7b8009267..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureDatabaseEncryption.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureDatabaseEncryption - */ -class AzureDatabaseEncryption extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data. - * For example: - * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` - * Encryption will always take the latest version of the key and hence - * specific version is not supported. - * - * Generated from protobuf field string key_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $key_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key_id - * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data. - * For example: - * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` - * Encryption will always take the latest version of the key and hence - * specific version is not supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data. - * For example: - * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` - * Encryption will always take the latest version of the key and hence - * specific version is not supported. - * - * Generated from protobuf field string key_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKeyId() - { - return $this->key_id; - } - - /** - * Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data. - * For example: - * `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` - * Encryption will always take the latest version of the key and hence - * specific version is not supported. - * - * Generated from protobuf field string key_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKeyId($var) - { - GPBUtil::checkString($var, True); - $this->key_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureDiskTemplate.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureDiskTemplate.php deleted file mode 100644 index f3c1a39446b7..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureDiskTemplate.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureDiskTemplate - */ -class AzureDiskTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The size of the disk, in GiBs. - * When unspecified, a default value is provided. See the specific reference - * in the parent resource. - * - * Generated from protobuf field int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $size_gib = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $size_gib - * Optional. The size of the disk, in GiBs. - * When unspecified, a default value is provided. See the specific reference - * in the parent resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The size of the disk, in GiBs. - * When unspecified, a default value is provided. See the specific reference - * in the parent resource. - * - * Generated from protobuf field int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getSizeGib() - { - return $this->size_gib; - } - - /** - * Optional. The size of the disk, in GiBs. - * When unspecified, a default value is provided. See the specific reference - * in the parent resource. - * - * Generated from protobuf field int32 size_gib = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setSizeGib($var) - { - GPBUtil::checkInt32($var); - $this->size_gib = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureJsonWebKeys.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureJsonWebKeys.php deleted file mode 100644 index bc3324265977..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureJsonWebKeys.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureJsonWebKeys - */ -class AzureJsonWebKeys extends \Google\Protobuf\Internal\Message -{ - /** - * The public component of the keys used by the cluster to sign token - * requests. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.Jwk keys = 1; - */ - private $keys; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeMultiCloud\V1\Jwk>|\Google\Protobuf\Internal\RepeatedField $keys - * The public component of the keys used by the cluster to sign token - * requests. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * The public component of the keys used by the cluster to sign token - * requests. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.Jwk keys = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getKeys() - { - return $this->keys; - } - - /** - * The public component of the keys used by the cluster to sign token - * requests. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.Jwk keys = 1; - * @param array<\Google\Cloud\GkeMultiCloud\V1\Jwk>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setKeys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\Jwk::class); - $this->keys = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureK8sVersionInfo.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureK8sVersionInfo.php deleted file mode 100644 index c454dce8f80f..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureK8sVersionInfo.php +++ /dev/null @@ -1,255 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureK8sVersionInfo - */ -class AzureK8sVersionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Kubernetes version name (for example, `1.19.10-gke.1000`) - * - * Generated from protobuf field string version = 1; - */ - protected $version = ''; - /** - * Optional. True if the version is available for cluster creation. If a - * version is enabled for creation, it can be used to create new clusters. - * Otherwise, cluster creation will fail. However, cluster upgrade operations - * may succeed, even if the version is not enabled. - * - * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enabled = false; - /** - * Optional. True if this cluster version belongs to a minor version that has - * reached its end of life and is no longer in scope to receive security and - * bug fixes. - * - * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $end_of_life = false; - /** - * Optional. The estimated date (in Pacific Time) when this cluster version - * will reach its end of life. Or if this version is no longer supported (the - * `end_of_life` field is true), this is the actual date (in Pacific time) - * when the version reached its end of life. - * - * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $end_of_life_date = null; - /** - * Optional. The date (in Pacific Time) when the cluster version was released. - * - * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $release_date = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * Kubernetes version name (for example, `1.19.10-gke.1000`) - * @type bool $enabled - * Optional. True if the version is available for cluster creation. If a - * version is enabled for creation, it can be used to create new clusters. - * Otherwise, cluster creation will fail. However, cluster upgrade operations - * may succeed, even if the version is not enabled. - * @type bool $end_of_life - * Optional. True if this cluster version belongs to a minor version that has - * reached its end of life and is no longer in scope to receive security and - * bug fixes. - * @type \Google\Type\Date $end_of_life_date - * Optional. The estimated date (in Pacific Time) when this cluster version - * will reach its end of life. Or if this version is no longer supported (the - * `end_of_life` field is true), this is the actual date (in Pacific time) - * when the version reached its end of life. - * @type \Google\Type\Date $release_date - * Optional. The date (in Pacific Time) when the cluster version was released. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Kubernetes version name (for example, `1.19.10-gke.1000`) - * - * Generated from protobuf field string version = 1; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Kubernetes version name (for example, `1.19.10-gke.1000`) - * - * Generated from protobuf field string version = 1; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Optional. True if the version is available for cluster creation. If a - * version is enabled for creation, it can be used to create new clusters. - * Otherwise, cluster creation will fail. However, cluster upgrade operations - * may succeed, even if the version is not enabled. - * - * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Optional. True if the version is available for cluster creation. If a - * version is enabled for creation, it can be used to create new clusters. - * Otherwise, cluster creation will fail. However, cluster upgrade operations - * may succeed, even if the version is not enabled. - * - * Generated from protobuf field bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Optional. True if this cluster version belongs to a minor version that has - * reached its end of life and is no longer in scope to receive security and - * bug fixes. - * - * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEndOfLife() - { - return $this->end_of_life; - } - - /** - * Optional. True if this cluster version belongs to a minor version that has - * reached its end of life and is no longer in scope to receive security and - * bug fixes. - * - * Generated from protobuf field bool end_of_life = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEndOfLife($var) - { - GPBUtil::checkBool($var); - $this->end_of_life = $var; - - return $this; - } - - /** - * Optional. The estimated date (in Pacific Time) when this cluster version - * will reach its end of life. Or if this version is no longer supported (the - * `end_of_life` field is true), this is the actual date (in Pacific time) - * when the version reached its end of life. - * - * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Type\Date|null - */ - public function getEndOfLifeDate() - { - return $this->end_of_life_date; - } - - public function hasEndOfLifeDate() - { - return isset($this->end_of_life_date); - } - - public function clearEndOfLifeDate() - { - unset($this->end_of_life_date); - } - - /** - * Optional. The estimated date (in Pacific Time) when this cluster version - * will reach its end of life. Or if this version is no longer supported (the - * `end_of_life` field is true), this is the actual date (in Pacific time) - * when the version reached its end of life. - * - * Generated from protobuf field .google.type.Date end_of_life_date = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Type\Date $var - * @return $this - */ - public function setEndOfLifeDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->end_of_life_date = $var; - - return $this; - } - - /** - * Optional. The date (in Pacific Time) when the cluster version was released. - * - * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Type\Date|null - */ - public function getReleaseDate() - { - return $this->release_date; - } - - public function hasReleaseDate() - { - return isset($this->release_date); - } - - public function clearReleaseDate() - { - unset($this->release_date); - } - - /** - * Optional. The date (in Pacific Time) when the cluster version was released. - * - * Generated from protobuf field .google.type.Date release_date = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Type\Date $var - * @return $this - */ - public function setReleaseDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->release_date = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodeConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodeConfig.php deleted file mode 100644 index 8167a17060ad..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodeConfig.php +++ /dev/null @@ -1,432 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureNodeConfig - */ -class AzureNodeConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. - * See [Supported VM - * sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options. - * When unspecified, it defaults to `Standard_DS2_v2`. - * - * Generated from protobuf field string vm_size = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $vm_size = ''; - /** - * Optional. Configuration related to the root volume provisioned for each - * node pool machine. - * When unspecified, it defaults to a 32-GiB Azure Disk. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $root_volume = null; - /** - * Optional. A set of tags to apply to all underlying Azure resources for this - * node pool. This currently only includes Virtual Machine Scale Sets. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * - * Generated from protobuf field map tags = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $tags; - /** - * Optional. The OS image type to use on node pool instances. - * Can be unspecified, or have a value of `ubuntu`. - * When unspecified, it defaults to `ubuntu`. - * - * Generated from protobuf field string image_type = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $image_type = ''; - /** - * Required. SSH configuration for how to access the node pool machines. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ssh_config = null; - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $proxy_config = null; - /** - * Optional. Configuration related to vm config encryption. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $config_encryption = null; - /** - * Optional. The initial taints assigned to nodes of this node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $taints; - /** - * Optional. The initial labels assigned to nodes of this node pool. An object - * containing a list of "key": value pairs. Example: { "name": "wrench", - * "mass": "1.3kg", "count": "3" }. - * - * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $vm_size - * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. - * See [Supported VM - * sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options. - * When unspecified, it defaults to `Standard_DS2_v2`. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate $root_volume - * Optional. Configuration related to the root volume provisioned for each - * node pool machine. - * When unspecified, it defaults to a 32-GiB Azure Disk. - * @type array|\Google\Protobuf\Internal\MapField $tags - * Optional. A set of tags to apply to all underlying Azure resources for this - * node pool. This currently only includes Virtual Machine Scale Sets. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * @type string $image_type - * Optional. The OS image type to use on node pool instances. - * Can be unspecified, or have a value of `ubuntu`. - * When unspecified, it defaults to `ubuntu`. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig $ssh_config - * Required. SSH configuration for how to access the node pool machines. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig $proxy_config - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption $config_encryption - * Optional. Configuration related to vm config encryption. - * @type array<\Google\Cloud\GkeMultiCloud\V1\NodeTaint>|\Google\Protobuf\Internal\RepeatedField $taints - * Optional. The initial taints assigned to nodes of this node pool. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The initial labels assigned to nodes of this node pool. An object - * containing a list of "key": value pairs. Example: { "name": "wrench", - * "mass": "1.3kg", "count": "3" }. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. - * See [Supported VM - * sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options. - * When unspecified, it defaults to `Standard_DS2_v2`. - * - * Generated from protobuf field string vm_size = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getVmSize() - { - return $this->vm_size; - } - - /** - * Optional. The Azure VM size name. Example: `Standard_DS2_v2`. - * See [Supported VM - * sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options. - * When unspecified, it defaults to `Standard_DS2_v2`. - * - * Generated from protobuf field string vm_size = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setVmSize($var) - { - GPBUtil::checkString($var, True); - $this->vm_size = $var; - - return $this; - } - - /** - * Optional. Configuration related to the root volume provisioned for each - * node pool machine. - * When unspecified, it defaults to a 32-GiB Azure Disk. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate|null - */ - public function getRootVolume() - { - return $this->root_volume; - } - - public function hasRootVolume() - { - return isset($this->root_volume); - } - - public function clearRootVolume() - { - unset($this->root_volume); - } - - /** - * Optional. Configuration related to the root volume provisioned for each - * node pool machine. - * When unspecified, it defaults to a 32-GiB Azure Disk. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureDiskTemplate root_volume = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate $var - * @return $this - */ - public function setRootVolume($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureDiskTemplate::class); - $this->root_volume = $var; - - return $this; - } - - /** - * Optional. A set of tags to apply to all underlying Azure resources for this - * node pool. This currently only includes Virtual Machine Scale Sets. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * - * Generated from protobuf field map tags = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. A set of tags to apply to all underlying Azure resources for this - * node pool. This currently only includes Virtual Machine Scale Sets. - * Specify at most 50 pairs containing alphanumerics, spaces, and symbols - * (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - * 255 Unicode characters. - * - * Generated from protobuf field map tags = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - - /** - * Optional. The OS image type to use on node pool instances. - * Can be unspecified, or have a value of `ubuntu`. - * When unspecified, it defaults to `ubuntu`. - * - * Generated from protobuf field string image_type = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getImageType() - { - return $this->image_type; - } - - /** - * Optional. The OS image type to use on node pool instances. - * Can be unspecified, or have a value of `ubuntu`. - * When unspecified, it defaults to `ubuntu`. - * - * Generated from protobuf field string image_type = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setImageType($var) - { - GPBUtil::checkString($var, True); - $this->image_type = $var; - - return $this; - } - - /** - * Required. SSH configuration for how to access the node pool machines. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig|null - */ - public function getSshConfig() - { - return $this->ssh_config; - } - - public function hasSshConfig() - { - return isset($this->ssh_config); - } - - public function clearSshConfig() - { - unset($this->ssh_config); - } - - /** - * Required. SSH configuration for how to access the node pool machines. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureSshConfig ssh_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig $var - * @return $this - */ - public function setSshConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureSshConfig::class); - $this->ssh_config = $var; - - return $this; - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig|null - */ - public function getProxyConfig() - { - return $this->proxy_config; - } - - public function hasProxyConfig() - { - return isset($this->proxy_config); - } - - public function clearProxyConfig() - { - unset($this->proxy_config); - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureProxyConfig proxy_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig $var - * @return $this - */ - public function setProxyConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureProxyConfig::class); - $this->proxy_config = $var; - - return $this; - } - - /** - * Optional. Configuration related to vm config encryption. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption|null - */ - public function getConfigEncryption() - { - return $this->config_encryption; - } - - public function hasConfigEncryption() - { - return isset($this->config_encryption); - } - - public function clearConfigEncryption() - { - unset($this->config_encryption); - } - - /** - * Optional. Configuration related to vm config encryption. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureConfigEncryption config_encryption = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption $var - * @return $this - */ - public function setConfigEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureConfigEncryption::class); - $this->config_encryption = $var; - - return $this; - } - - /** - * Optional. The initial taints assigned to nodes of this node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTaints() - { - return $this->taints; - } - - /** - * Optional. The initial taints assigned to nodes of this node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.NodeTaint taints = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\NodeTaint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTaints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\NodeTaint::class); - $this->taints = $arr; - - return $this; - } - - /** - * Optional. The initial labels assigned to nodes of this node pool. An object - * containing a list of "key": value pairs. Example: { "name": "wrench", - * "mass": "1.3kg", "count": "3" }. - * - * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The initial labels assigned to nodes of this node pool. An object - * containing a list of "key": value pairs. Example: { "name": "wrench", - * "mass": "1.3kg", "count": "3" }. - * - * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @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; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodeManagement.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodeManagement.php deleted file mode 100644 index fafb582d67b4..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodeManagement.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureNodeManagement - */ -class AzureNodeManagement extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Whether or not the nodes will be automatically repaired. When set - * to true, the nodes in this node pool will be monitored and if they fail - * health checks consistently over a period of time, an automatic repair - * action will be triggered to replace them with new nodes. - * - * Generated from protobuf field bool auto_repair = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $auto_repair = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $auto_repair - * Optional. Whether or not the nodes will be automatically repaired. When set - * to true, the nodes in this node pool will be monitored and if they fail - * health checks consistently over a period of time, an automatic repair - * action will be triggered to replace them with new nodes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Whether or not the nodes will be automatically repaired. When set - * to true, the nodes in this node pool will be monitored and if they fail - * health checks consistently over a period of time, an automatic repair - * action will be triggered to replace them with new nodes. - * - * Generated from protobuf field bool auto_repair = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAutoRepair() - { - return $this->auto_repair; - } - - /** - * Optional. Whether or not the nodes will be automatically repaired. When set - * to true, the nodes in this node pool will be monitored and if they fail - * health checks consistently over a period of time, an automatic repair - * action will be triggered to replace them with new nodes. - * - * Generated from protobuf field bool auto_repair = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAutoRepair($var) - { - GPBUtil::checkBool($var); - $this->auto_repair = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePool.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePool.php deleted file mode 100644 index d2fd28ceca6e..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePool.php +++ /dev/null @@ -1,713 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureNodePool - */ -class AzureNodePool extends \Google\Protobuf\Internal\Message -{ - /** - * The name of this resource. - * Node pool names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * For more details on Google Cloud resource names, - * see [Resource Names](https://cloud.google.com/apis/design/resource_names) - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this - * node pool. - * - * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $version = ''; - /** - * Required. The node configuration of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $config = null; - /** - * Required. The ARM ID of the subnet where the node pool VMs run. Make sure - * it's a subnet under the virtual network in the cluster configuration. - * - * Generated from protobuf field string subnet_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $subnet_id = ''; - /** - * Required. Autoscaler configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $autoscaling = null; - /** - * Output only. The current state of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. A globally unique identifier for the node pool. - * - * Generated from protobuf field string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. If set, there are currently pending changes to the node - * pool. - * - * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reconciling = false; - /** - * Output only. The time at which this node pool was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time at which this node pool was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 12; - */ - protected $etag = ''; - /** - * Optional. Annotations on the node pool. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $annotations; - /** - * Required. The constraint on the maximum number of pods that can be run - * simultaneously on a node in the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $max_pods_constraint = null; - /** - * Optional. The Azure availability zone of the nodes in this nodepool. - * When unspecified, it defaults to `1`. - * - * Generated from protobuf field string azure_availability_zone = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $azure_availability_zone = ''; - /** - * Output only. A set of errors found in the node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $errors; - /** - * Optional. The Management configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $management = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of this resource. - * Node pool names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * For more details on Google Cloud resource names, - * see [Resource Names](https://cloud.google.com/apis/design/resource_names) - * @type string $version - * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this - * node pool. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureNodeConfig $config - * Required. The node configuration of the node pool. - * @type string $subnet_id - * Required. The ARM ID of the subnet where the node pool VMs run. Make sure - * it's a subnet under the virtual network in the cluster configuration. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureNodePoolAutoscaling $autoscaling - * Required. Autoscaler configuration for this node pool. - * @type int $state - * Output only. The current state of the node pool. - * @type string $uid - * Output only. A globally unique identifier for the node pool. - * @type bool $reconciling - * Output only. If set, there are currently pending changes to the node - * pool. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this node pool was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which this node pool was last updated. - * @type string $etag - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Optional. Annotations on the node pool. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * @type \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint $max_pods_constraint - * Required. The constraint on the maximum number of pods that can be run - * simultaneously on a node in the node pool. - * @type string $azure_availability_zone - * Optional. The Azure availability zone of the nodes in this nodepool. - * When unspecified, it defaults to `1`. - * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureNodePoolError>|\Google\Protobuf\Internal\RepeatedField $errors - * Output only. A set of errors found in the node pool. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureNodeManagement $management - * Optional. The Management configuration for this node pool. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * The name of this resource. - * Node pool names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * For more details on Google Cloud resource names, - * see [Resource Names](https://cloud.google.com/apis/design/resource_names) - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of this resource. - * Node pool names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * For more details on Google Cloud resource names, - * see [Resource Names](https://cloud.google.com/apis/design/resource_names) - * - * 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; - } - - /** - * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this - * node pool. - * - * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this - * node pool. - * - * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Required. The node configuration of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureNodeConfig|null - */ - public function getConfig() - { - return $this->config; - } - - public function hasConfig() - { - return isset($this->config); - } - - public function clearConfig() - { - unset($this->config); - } - - /** - * Required. The node configuration of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodeConfig config = 22 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureNodeConfig $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureNodeConfig::class); - $this->config = $var; - - return $this; - } - - /** - * Required. The ARM ID of the subnet where the node pool VMs run. Make sure - * it's a subnet under the virtual network in the cluster configuration. - * - * Generated from protobuf field string subnet_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSubnetId() - { - return $this->subnet_id; - } - - /** - * Required. The ARM ID of the subnet where the node pool VMs run. Make sure - * it's a subnet under the virtual network in the cluster configuration. - * - * Generated from protobuf field string subnet_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSubnetId($var) - { - GPBUtil::checkString($var, True); - $this->subnet_id = $var; - - return $this; - } - - /** - * Required. Autoscaler configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureNodePoolAutoscaling|null - */ - public function getAutoscaling() - { - return $this->autoscaling; - } - - public function hasAutoscaling() - { - return isset($this->autoscaling); - } - - public function clearAutoscaling() - { - unset($this->autoscaling); - } - - /** - * Required. Autoscaler configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling autoscaling = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureNodePoolAutoscaling $var - * @return $this - */ - public function setAutoscaling($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureNodePoolAutoscaling::class); - $this->autoscaling = $var; - - return $this; - } - - /** - * Output only. The current state of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\AzureNodePool\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. A globally unique identifier for the node pool. - * - * Generated from protobuf field string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. A globally unique identifier for the node pool. - * - * Generated from protobuf field string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. If set, there are currently pending changes to the node - * pool. - * - * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getReconciling() - { - return $this->reconciling; - } - - /** - * Output only. If set, there are currently pending changes to the node - * pool. - * - * Generated from protobuf field bool reconciling = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setReconciling($var) - { - GPBUtil::checkBool($var); - $this->reconciling = $var; - - return $this; - } - - /** - * Output only. The time at which this node pool was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.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 node pool was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.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 at which this node pool was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time at which this node pool was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 12; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Allows clients to perform consistent read-modify-writes - * through optimistic concurrency control. - * Can be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 12; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. Annotations on the node pool. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Optional. Annotations on the node pool. - * This field has the same restrictions as Kubernetes annotations. - * The total size of all keys and values combined is limited to 256k. - * Keys can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Required. The constraint on the maximum number of pods that can be run - * simultaneously on a node in the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint|null - */ - public function getMaxPodsConstraint() - { - return $this->max_pods_constraint; - } - - public function hasMaxPodsConstraint() - { - return isset($this->max_pods_constraint); - } - - public function clearMaxPodsConstraint() - { - unset($this->max_pods_constraint); - } - - /** - * Required. The constraint on the maximum number of pods that can be run - * simultaneously on a node in the node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 21 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint $var - * @return $this - */ - public function setMaxPodsConstraint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint::class); - $this->max_pods_constraint = $var; - - return $this; - } - - /** - * Optional. The Azure availability zone of the nodes in this nodepool. - * When unspecified, it defaults to `1`. - * - * Generated from protobuf field string azure_availability_zone = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAzureAvailabilityZone() - { - return $this->azure_availability_zone; - } - - /** - * Optional. The Azure availability zone of the nodes in this nodepool. - * When unspecified, it defaults to `1`. - * - * Generated from protobuf field string azure_availability_zone = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAzureAvailabilityZone($var) - { - GPBUtil::checkString($var, True); - $this->azure_availability_zone = $var; - - return $this; - } - - /** - * Output only. A set of errors found in the node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Output only. A set of errors found in the node pool. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureNodePoolError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureNodePoolError::class); - $this->errors = $arr; - - return $this; - } - - /** - * Optional. The Management configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureNodeManagement|null - */ - public function getManagement() - { - return $this->management; - } - - public function hasManagement() - { - return isset($this->management); - } - - public function clearManagement() - { - unset($this->management); - } - - /** - * Optional. The Management configuration for this node pool. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodeManagement management = 30 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureNodeManagement $var - * @return $this - */ - public function setManagement($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureNodeManagement::class); - $this->management = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePool/State.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePool/State.php deleted file mode 100644 index 1d994d640f61..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePool/State.php +++ /dev/null @@ -1,95 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureNodePool.State - */ -class State -{ - /** - * Not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The PROVISIONING state indicates the node pool is being created. - * - * Generated from protobuf enum PROVISIONING = 1; - */ - const PROVISIONING = 1; - /** - * The RUNNING state indicates the node pool has been created and is fully - * usable. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The RECONCILING state indicates that the node pool is being reconciled. - * - * Generated from protobuf enum RECONCILING = 3; - */ - const RECONCILING = 3; - /** - * The STOPPING state indicates the node pool is being deleted. - * - * Generated from protobuf enum STOPPING = 4; - */ - const STOPPING = 4; - /** - * The ERROR state indicates the node pool is in a broken unrecoverable - * state. - * - * Generated from protobuf enum ERROR = 5; - */ - const ERROR = 5; - /** - * The DEGRADED state indicates the node pool requires user action to - * restore full functionality. - * - * Generated from protobuf enum DEGRADED = 6; - */ - const DEGRADED = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PROVISIONING => 'PROVISIONING', - self::RUNNING => 'RUNNING', - self::RECONCILING => 'RECONCILING', - self::STOPPING => 'STOPPING', - self::ERROR => 'ERROR', - self::DEGRADED => 'DEGRADED', - ]; - - 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\GkeMultiCloud\V1\AzureNodePool_State::class); - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePoolAutoscaling.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePoolAutoscaling.php deleted file mode 100644 index 2688e11da544..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePoolAutoscaling.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling - */ -class AzureNodePoolAutoscaling extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Minimum number of nodes in the node pool. Must be greater than or - * equal to 1 and less than or equal to max_node_count. - * - * Generated from protobuf field int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $min_node_count = 0; - /** - * Required. Maximum number of nodes in the node pool. Must be greater than or - * equal to min_node_count and less than or equal to 50. - * - * Generated from protobuf field int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $max_node_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $min_node_count - * Required. Minimum number of nodes in the node pool. Must be greater than or - * equal to 1 and less than or equal to max_node_count. - * @type int $max_node_count - * Required. Maximum number of nodes in the node pool. Must be greater than or - * equal to min_node_count and less than or equal to 50. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Minimum number of nodes in the node pool. Must be greater than or - * equal to 1 and less than or equal to max_node_count. - * - * Generated from protobuf field int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMinNodeCount() - { - return $this->min_node_count; - } - - /** - * Required. Minimum number of nodes in the node pool. Must be greater than or - * equal to 1 and less than or equal to max_node_count. - * - * Generated from protobuf field int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMinNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->min_node_count = $var; - - return $this; - } - - /** - * Required. Maximum number of nodes in the node pool. Must be greater than or - * equal to min_node_count and less than or equal to 50. - * - * Generated from protobuf field int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMaxNodeCount() - { - return $this->max_node_count; - } - - /** - * Required. Maximum number of nodes in the node pool. Must be greater than or - * equal to min_node_count and less than or equal to 50. - * - * Generated from protobuf field int32 max_node_count = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMaxNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->max_node_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePoolError.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePoolError.php deleted file mode 100644 index 854ce75b671a..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureNodePoolError.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureNodePoolError - */ -class AzureNodePoolError extends \Google\Protobuf\Internal\Message -{ - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $message - * Human-friendly description of the error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Human-friendly description of the error. - * - * Generated from protobuf field string message = 1; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureOpenIdConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureOpenIdConfig.php deleted file mode 100644 index cad099ee30e3..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureOpenIdConfig.php +++ /dev/null @@ -1,272 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureOpenIdConfig - */ -class AzureOpenIdConfig extends \Google\Protobuf\Internal\Message -{ - /** - * OIDC Issuer. - * - * Generated from protobuf field string issuer = 1; - */ - protected $issuer = ''; - /** - * JSON Web Key uri. - * - * Generated from protobuf field string jwks_uri = 2; - */ - protected $jwks_uri = ''; - /** - * Supported response types. - * - * Generated from protobuf field repeated string response_types_supported = 3; - */ - private $response_types_supported; - /** - * Supported subject types. - * - * Generated from protobuf field repeated string subject_types_supported = 4; - */ - private $subject_types_supported; - /** - * supported ID Token signing Algorithms. - * - * Generated from protobuf field repeated string id_token_signing_alg_values_supported = 5; - */ - private $id_token_signing_alg_values_supported; - /** - * Supported claims. - * - * Generated from protobuf field repeated string claims_supported = 6; - */ - private $claims_supported; - /** - * Supported grant types. - * - * Generated from protobuf field repeated string grant_types = 7; - */ - private $grant_types; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $issuer - * OIDC Issuer. - * @type string $jwks_uri - * JSON Web Key uri. - * @type array|\Google\Protobuf\Internal\RepeatedField $response_types_supported - * Supported response types. - * @type array|\Google\Protobuf\Internal\RepeatedField $subject_types_supported - * Supported subject types. - * @type array|\Google\Protobuf\Internal\RepeatedField $id_token_signing_alg_values_supported - * supported ID Token signing Algorithms. - * @type array|\Google\Protobuf\Internal\RepeatedField $claims_supported - * Supported claims. - * @type array|\Google\Protobuf\Internal\RepeatedField $grant_types - * Supported grant types. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * OIDC Issuer. - * - * Generated from protobuf field string issuer = 1; - * @return string - */ - public function getIssuer() - { - return $this->issuer; - } - - /** - * OIDC Issuer. - * - * Generated from protobuf field string issuer = 1; - * @param string $var - * @return $this - */ - public function setIssuer($var) - { - GPBUtil::checkString($var, True); - $this->issuer = $var; - - return $this; - } - - /** - * JSON Web Key uri. - * - * Generated from protobuf field string jwks_uri = 2; - * @return string - */ - public function getJwksUri() - { - return $this->jwks_uri; - } - - /** - * JSON Web Key uri. - * - * Generated from protobuf field string jwks_uri = 2; - * @param string $var - * @return $this - */ - public function setJwksUri($var) - { - GPBUtil::checkString($var, True); - $this->jwks_uri = $var; - - return $this; - } - - /** - * Supported response types. - * - * Generated from protobuf field repeated string response_types_supported = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResponseTypesSupported() - { - return $this->response_types_supported; - } - - /** - * Supported response types. - * - * Generated from protobuf field repeated string response_types_supported = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResponseTypesSupported($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->response_types_supported = $arr; - - return $this; - } - - /** - * Supported subject types. - * - * Generated from protobuf field repeated string subject_types_supported = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSubjectTypesSupported() - { - return $this->subject_types_supported; - } - - /** - * Supported subject types. - * - * Generated from protobuf field repeated string subject_types_supported = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSubjectTypesSupported($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->subject_types_supported = $arr; - - return $this; - } - - /** - * supported ID Token signing Algorithms. - * - * Generated from protobuf field repeated string id_token_signing_alg_values_supported = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIdTokenSigningAlgValuesSupported() - { - return $this->id_token_signing_alg_values_supported; - } - - /** - * supported ID Token signing Algorithms. - * - * Generated from protobuf field repeated string id_token_signing_alg_values_supported = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIdTokenSigningAlgValuesSupported($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->id_token_signing_alg_values_supported = $arr; - - return $this; - } - - /** - * Supported claims. - * - * Generated from protobuf field repeated string claims_supported = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getClaimsSupported() - { - return $this->claims_supported; - } - - /** - * Supported claims. - * - * Generated from protobuf field repeated string claims_supported = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setClaimsSupported($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->claims_supported = $arr; - - return $this; - } - - /** - * Supported grant types. - * - * Generated from protobuf field repeated string grant_types = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGrantTypes() - { - return $this->grant_types; - } - - /** - * Supported grant types. - * - * Generated from protobuf field repeated string grant_types = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGrantTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->grant_types = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureProxyConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureProxyConfig.php deleted file mode 100644 index 18b6b84acf57..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureProxyConfig.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureProxyConfig - */ -class AzureProxyConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The ARM ID the of the resource group containing proxy keyvault. - * Resource group ids are formatted as - * `/subscriptions//resourceGroups/`. - * - * Generated from protobuf field string resource_group_id = 1; - */ - protected $resource_group_id = ''; - /** - * The URL the of the proxy setting secret with its version. - * The secret must be a JSON encoded proxy configuration - * as described in - * https://cloud.google.com/kubernetes-engine/multi-cloud/docs/azure/how-to/use-a-proxy#create_a_proxy_configuration_file - * Secret ids are formatted as - * `https://.vault.azure.net/secrets//`. - * - * Generated from protobuf field string secret_id = 2; - */ - protected $secret_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource_group_id - * The ARM ID the of the resource group containing proxy keyvault. - * Resource group ids are formatted as - * `/subscriptions//resourceGroups/`. - * @type string $secret_id - * The URL the of the proxy setting secret with its version. - * The secret must be a JSON encoded proxy configuration - * as described in - * https://cloud.google.com/kubernetes-engine/multi-cloud/docs/azure/how-to/use-a-proxy#create_a_proxy_configuration_file - * Secret ids are formatted as - * `https://.vault.azure.net/secrets//`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * The ARM ID the of the resource group containing proxy keyvault. - * Resource group ids are formatted as - * `/subscriptions//resourceGroups/`. - * - * Generated from protobuf field string resource_group_id = 1; - * @return string - */ - public function getResourceGroupId() - { - return $this->resource_group_id; - } - - /** - * The ARM ID the of the resource group containing proxy keyvault. - * Resource group ids are formatted as - * `/subscriptions//resourceGroups/`. - * - * Generated from protobuf field string resource_group_id = 1; - * @param string $var - * @return $this - */ - public function setResourceGroupId($var) - { - GPBUtil::checkString($var, True); - $this->resource_group_id = $var; - - return $this; - } - - /** - * The URL the of the proxy setting secret with its version. - * The secret must be a JSON encoded proxy configuration - * as described in - * https://cloud.google.com/kubernetes-engine/multi-cloud/docs/azure/how-to/use-a-proxy#create_a_proxy_configuration_file - * Secret ids are formatted as - * `https://.vault.azure.net/secrets//`. - * - * Generated from protobuf field string secret_id = 2; - * @return string - */ - public function getSecretId() - { - return $this->secret_id; - } - - /** - * The URL the of the proxy setting secret with its version. - * The secret must be a JSON encoded proxy configuration - * as described in - * https://cloud.google.com/kubernetes-engine/multi-cloud/docs/azure/how-to/use-a-proxy#create_a_proxy_configuration_file - * Secret ids are formatted as - * `https://.vault.azure.net/secrets//`. - * - * Generated from protobuf field string secret_id = 2; - * @param string $var - * @return $this - */ - public function setSecretId($var) - { - GPBUtil::checkString($var, True); - $this->secret_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureServerConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureServerConfig.php deleted file mode 100644 index b16a42166e59..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureServerConfig.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureServerConfig - */ -class AzureServerConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The `AzureServerConfig` resource name. - * `AzureServerConfig` names are formatted as - * `projects//locations//azureServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * List of all released Kubernetes versions, including ones which are end of - * life and can no longer be used. Filter by the `enabled` - * property to limit to currently available versions. - * Valid versions supported for both create and update operations - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; - */ - private $valid_versions; - /** - * The list of supported Azure regions. - * - * Generated from protobuf field repeated string supported_azure_regions = 3; - */ - private $supported_azure_regions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The `AzureServerConfig` resource name. - * `AzureServerConfig` names are formatted as - * `projects//locations//azureServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @type array<\Google\Cloud\GkeMultiCloud\V1\AzureK8sVersionInfo>|\Google\Protobuf\Internal\RepeatedField $valid_versions - * List of all released Kubernetes versions, including ones which are end of - * life and can no longer be used. Filter by the `enabled` - * property to limit to currently available versions. - * Valid versions supported for both create and update operations - * @type array|\Google\Protobuf\Internal\RepeatedField $supported_azure_regions - * The list of supported Azure regions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * The `AzureServerConfig` resource name. - * `AzureServerConfig` names are formatted as - * `projects//locations//azureServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The `AzureServerConfig` resource name. - * `AzureServerConfig` names are formatted as - * `projects//locations//azureServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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; - } - - /** - * List of all released Kubernetes versions, including ones which are end of - * life and can no longer be used. Filter by the `enabled` - * property to limit to currently available versions. - * Valid versions supported for both create and update operations - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValidVersions() - { - return $this->valid_versions; - } - - /** - * List of all released Kubernetes versions, including ones which are end of - * life and can no longer be used. Filter by the `enabled` - * property to limit to currently available versions. - * Valid versions supported for both create and update operations - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureK8sVersionInfo valid_versions = 2; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureK8sVersionInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValidVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureK8sVersionInfo::class); - $this->valid_versions = $arr; - - return $this; - } - - /** - * The list of supported Azure regions. - * - * Generated from protobuf field repeated string supported_azure_regions = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSupportedAzureRegions() - { - return $this->supported_azure_regions; - } - - /** - * The list of supported Azure regions. - * - * Generated from protobuf field repeated string supported_azure_regions = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSupportedAzureRegions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->supported_azure_regions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureServicesAuthentication.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureServicesAuthentication.php deleted file mode 100644 index b5a17552ed8f..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureServicesAuthentication.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureServicesAuthentication - */ -class AzureServicesAuthentication extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Azure Active Directory Tenant ID. - * - * Generated from protobuf field string tenant_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tenant_id = ''; - /** - * Required. The Azure Active Directory Application ID. - * - * Generated from protobuf field string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $application_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $tenant_id - * Required. The Azure Active Directory Tenant ID. - * @type string $application_id - * Required. The Azure Active Directory Application ID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Azure Active Directory Tenant ID. - * - * Generated from protobuf field string tenant_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTenantId() - { - return $this->tenant_id; - } - - /** - * Required. The Azure Active Directory Tenant ID. - * - * Generated from protobuf field string tenant_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTenantId($var) - { - GPBUtil::checkString($var, True); - $this->tenant_id = $var; - - return $this; - } - - /** - * Required. The Azure Active Directory Application ID. - * - * Generated from protobuf field string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getApplicationId() - { - return $this->application_id; - } - - /** - * Required. The Azure Active Directory Application ID. - * - * Generated from protobuf field string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setApplicationId($var) - { - GPBUtil::checkString($var, True); - $this->application_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureSshConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureSshConfig.php deleted file mode 100644 index 1327e9f14c97..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/AzureSshConfig.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.gkemulticloud.v1.AzureSshConfig - */ -class AzureSshConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The SSH public key data for VMs managed by Anthos. This accepts - * the authorized_keys file format used in OpenSSH according to the sshd(8) - * manual page. - * - * Generated from protobuf field string authorized_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $authorized_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $authorized_key - * Required. The SSH public key data for VMs managed by Anthos. This accepts - * the authorized_keys file format used in OpenSSH according to the sshd(8) - * manual page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The SSH public key data for VMs managed by Anthos. This accepts - * the authorized_keys file format used in OpenSSH according to the sshd(8) - * manual page. - * - * Generated from protobuf field string authorized_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAuthorizedKey() - { - return $this->authorized_key; - } - - /** - * Required. The SSH public key data for VMs managed by Anthos. This accepts - * the authorized_keys file format used in OpenSSH according to the sshd(8) - * manual page. - * - * Generated from protobuf field string authorized_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAuthorizedKey($var) - { - GPBUtil::checkString($var, True); - $this->authorized_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/BinaryAuthorization.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/BinaryAuthorization.php deleted file mode 100644 index 9272bbf1053d..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/BinaryAuthorization.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gkemulticloud.v1.BinaryAuthorization - */ -class BinaryAuthorization extends \Google\Protobuf\Internal\Message -{ - /** - * Mode of operation for binauthz policy evaluation. If unspecified, defaults - * to DISABLED. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization.EvaluationMode evaluation_mode = 1; - */ - protected $evaluation_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $evaluation_mode - * Mode of operation for binauthz policy evaluation. If unspecified, defaults - * to DISABLED. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); - parent::__construct($data); - } - - /** - * Mode of operation for binauthz policy evaluation. If unspecified, defaults - * to DISABLED. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization.EvaluationMode evaluation_mode = 1; - * @return int - */ - public function getEvaluationMode() - { - return $this->evaluation_mode; - } - - /** - * Mode of operation for binauthz policy evaluation. If unspecified, defaults - * to DISABLED. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.BinaryAuthorization.EvaluationMode evaluation_mode = 1; - * @param int $var - * @return $this - */ - public function setEvaluationMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization\EvaluationMode::class); - $this->evaluation_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/BinaryAuthorization/EvaluationMode.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/BinaryAuthorization/EvaluationMode.php deleted file mode 100644 index 72c8aa9234c5..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/BinaryAuthorization/EvaluationMode.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.gkemulticloud.v1.BinaryAuthorization.EvaluationMode - */ -class EvaluationMode -{ - /** - * Default value - * - * Generated from protobuf enum EVALUATION_MODE_UNSPECIFIED = 0; - */ - const EVALUATION_MODE_UNSPECIFIED = 0; - /** - * Disable BinaryAuthorization - * - * Generated from protobuf enum DISABLED = 1; - */ - const DISABLED = 1; - /** - * Enforce Kubernetes admission requests with BinaryAuthorization using the - * project's singleton policy. - * - * Generated from protobuf enum PROJECT_SINGLETON_POLICY_ENFORCE = 2; - */ - const PROJECT_SINGLETON_POLICY_ENFORCE = 2; - - private static $valueToName = [ - self::EVALUATION_MODE_UNSPECIFIED => 'EVALUATION_MODE_UNSPECIFIED', - self::DISABLED => 'DISABLED', - self::PROJECT_SINGLETON_POLICY_ENFORCE => 'PROJECT_SINGLETON_POLICY_ENFORCE', - ]; - - 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(EvaluationMode::class, \Google\Cloud\GkeMultiCloud\V1\BinaryAuthorization_EvaluationMode::class); - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAttachedClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAttachedClusterRequest.php deleted file mode 100644 index 80fed129c9ca..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAttachedClusterRequest.php +++ /dev/null @@ -1,261 +0,0 @@ -google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest - */ -class CreateAttachedClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The specification of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster attached_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $attached_cluster = null; - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string attached_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $attached_cluster_id = ''; - /** - * If set, only validate the request, but do not actually create the cluster. - * - * Generated from protobuf field bool validate_only = 4; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AttachedClustersClient::locationName()} for help formatting this field. - * @param \Google\Cloud\GkeMultiCloud\V1\AttachedCluster $attachedCluster Required. The specification of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to create. - * @param string $attachedClusterId Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * @return \Google\Cloud\GkeMultiCloud\V1\CreateAttachedClusterRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeMultiCloud\V1\AttachedCluster $attachedCluster, string $attachedClusterId): self - { - return (new self()) - ->setParent($parent) - ->setAttachedCluster($attachedCluster) - ->setAttachedClusterId($attachedClusterId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type \Google\Cloud\GkeMultiCloud\V1\AttachedCluster $attached_cluster - * Required. The specification of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to create. - * @type string $attached_cluster_id - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * @type bool $validate_only - * If set, only validate the request, but do not actually create the cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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 parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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. The specification of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster attached_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AttachedCluster|null - */ - public function getAttachedCluster() - { - return $this->attached_cluster; - } - - public function hasAttachedCluster() - { - return isset($this->attached_cluster); - } - - public function clearAttachedCluster() - { - unset($this->attached_cluster); - } - - /** - * Required. The specification of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster attached_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AttachedCluster $var - * @return $this - */ - public function setAttachedCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedCluster::class); - $this->attached_cluster = $var; - - return $this; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string attached_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAttachedClusterId() - { - return $this->attached_cluster_id; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string attached_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAttachedClusterId($var) - { - GPBUtil::checkString($var, True); - $this->attached_cluster_id = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually create the cluster. - * - * Generated from protobuf field bool validate_only = 4; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually create the cluster. - * - * Generated from protobuf field bool validate_only = 4; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAwsClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAwsClusterRequest.php deleted file mode 100644 index 2421c4f73fba..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAwsClusterRequest.php +++ /dev/null @@ -1,261 +0,0 @@ -google.cloud.gkemulticloud.v1.CreateAwsClusterRequest - */ -class CreateAwsClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location where this - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The specification of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $aws_cluster = null; - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name - * formatted as - * `projects//locations//awsClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string aws_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $aws_cluster_id = ''; - /** - * If set, only validate the request, but do not actually create the cluster. - * - * Generated from protobuf field bool validate_only = 4; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The parent location where this - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be - * created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::locationName()} for help formatting this field. - * @param \Google\Cloud\GkeMultiCloud\V1\AwsCluster $awsCluster Required. The specification of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. - * @param string $awsClusterId Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name - * formatted as - * `projects//locations//awsClusters/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * @return \Google\Cloud\GkeMultiCloud\V1\CreateAwsClusterRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeMultiCloud\V1\AwsCluster $awsCluster, string $awsClusterId): self - { - return (new self()) - ->setParent($parent) - ->setAwsCluster($awsCluster) - ->setAwsClusterId($awsClusterId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location where this - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsCluster $aws_cluster - * Required. The specification of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. - * @type string $aws_cluster_id - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name - * formatted as - * `projects//locations//awsClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * @type bool $validate_only - * If set, only validate the request, but do not actually create the cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location where this - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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 parent location where this - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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. The specification of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsCluster|null - */ - public function getAwsCluster() - { - return $this->aws_cluster; - } - - public function hasAwsCluster() - { - return isset($this->aws_cluster); - } - - public function clearAwsCluster() - { - unset($this->aws_cluster); - } - - /** - * Required. The specification of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsCluster $var - * @return $this - */ - public function setAwsCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsCluster::class); - $this->aws_cluster = $var; - - return $this; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name - * formatted as - * `projects//locations//awsClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string aws_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAwsClusterId() - { - return $this->aws_cluster_id; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name - * formatted as - * `projects//locations//awsClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string aws_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAwsClusterId($var) - { - GPBUtil::checkString($var, True); - $this->aws_cluster_id = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually create the cluster. - * - * Generated from protobuf field bool validate_only = 4; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually create the cluster. - * - * Generated from protobuf field bool validate_only = 4; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAwsNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAwsNodePoolRequest.php deleted file mode 100644 index 0a50ccd7b646..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAwsNodePoolRequest.php +++ /dev/null @@ -1,265 +0,0 @@ -google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest - */ -class CreateAwsNodePoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource where this node pool will be created. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The specification of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $aws_node_pool = null; - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name - * formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string aws_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $aws_node_pool_id = ''; - /** - * If set, only validate the request, but do not actually create the node - * pool. - * - * Generated from protobuf field bool validate_only = 4; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource where this node pool will be created. - * - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsClusterName()} for help formatting this field. - * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodePool $awsNodePool Required. The specification of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. - * @param string $awsNodePoolId Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name - * formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * @return \Google\Cloud\GkeMultiCloud\V1\CreateAwsNodePoolRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeMultiCloud\V1\AwsNodePool $awsNodePool, string $awsNodePoolId): self - { - return (new self()) - ->setParent($parent) - ->setAwsNodePool($awsNodePool) - ->setAwsNodePoolId($awsNodePoolId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource where this node pool will be created. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type \Google\Cloud\GkeMultiCloud\V1\AwsNodePool $aws_node_pool - * Required. The specification of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. - * @type string $aws_node_pool_id - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name - * formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * @type bool $validate_only - * If set, only validate the request, but do not actually create the node - * pool. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource where this node pool will be created. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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 [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource where this node pool will be created. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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. The specification of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsNodePool|null - */ - public function getAwsNodePool() - { - return $this->aws_node_pool; - } - - public function hasAwsNodePool() - { - return isset($this->aws_node_pool); - } - - public function clearAwsNodePool() - { - unset($this->aws_node_pool); - } - - /** - * Required. The specification of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodePool $var - * @return $this - */ - public function setAwsNodePool($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsNodePool::class); - $this->aws_node_pool = $var; - - return $this; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name - * formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string aws_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAwsNodePoolId() - { - return $this->aws_node_pool_id; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name - * formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string aws_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAwsNodePoolId($var) - { - GPBUtil::checkString($var, True); - $this->aws_node_pool_id = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually create the node - * pool. - * - * Generated from protobuf field bool validate_only = 4; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually create the node - * pool. - * - * Generated from protobuf field bool validate_only = 4; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureClientRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureClientRequest.php deleted file mode 100644 index 79ffc0e05dc3..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureClientRequest.php +++ /dev/null @@ -1,261 +0,0 @@ -google.cloud.gkemulticloud.v1.CreateAzureClientRequest - */ -class CreateAzureClientRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location where this - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The specification of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $azure_client = null; - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name - * formatted as - * `projects//locations//azureClients/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string azure_client_id = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $azure_client_id = ''; - /** - * If set, only validate the request, but do not actually create the client. - * - * Generated from protobuf field bool validate_only = 3; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The parent location where this - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be - * created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::locationName()} for help formatting this field. - * @param \Google\Cloud\GkeMultiCloud\V1\AzureClient $azureClient Required. The specification of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. - * @param string $azureClientId Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name - * formatted as - * `projects//locations//azureClients/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * @return \Google\Cloud\GkeMultiCloud\V1\CreateAzureClientRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeMultiCloud\V1\AzureClient $azureClient, string $azureClientId): self - { - return (new self()) - ->setParent($parent) - ->setAzureClient($azureClient) - ->setAzureClientId($azureClientId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location where this - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureClient $azure_client - * Required. The specification of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. - * @type string $azure_client_id - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name - * formatted as - * `projects//locations//azureClients/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * @type bool $validate_only - * If set, only validate the request, but do not actually create the client. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location where this - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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 parent location where this - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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. The specification of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureClient|null - */ - public function getAzureClient() - { - return $this->azure_client; - } - - public function hasAzureClient() - { - return isset($this->azure_client); - } - - public function clearAzureClient() - { - unset($this->azure_client); - } - - /** - * Required. The specification of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureClient azure_client = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureClient $var - * @return $this - */ - public function setAzureClient($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureClient::class); - $this->azure_client = $var; - - return $this; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name - * formatted as - * `projects//locations//azureClients/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string azure_client_id = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAzureClientId() - { - return $this->azure_client_id; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name - * formatted as - * `projects//locations//azureClients/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string azure_client_id = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAzureClientId($var) - { - GPBUtil::checkString($var, True); - $this->azure_client_id = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually create the client. - * - * Generated from protobuf field bool validate_only = 3; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually create the client. - * - * Generated from protobuf field bool validate_only = 3; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureClusterRequest.php deleted file mode 100644 index 4a91100acf58..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureClusterRequest.php +++ /dev/null @@ -1,261 +0,0 @@ -google.cloud.gkemulticloud.v1.CreateAzureClusterRequest - */ -class CreateAzureClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location where this - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The specification of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $azure_cluster = null; - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name - * formatted as - * `projects//locations//azureClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string azure_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $azure_cluster_id = ''; - /** - * If set, only validate the request, but do not actually create the cluster. - * - * Generated from protobuf field bool validate_only = 4; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The parent location where this - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be - * created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::locationName()} for help formatting this field. - * @param \Google\Cloud\GkeMultiCloud\V1\AzureCluster $azureCluster Required. The specification of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. - * @param string $azureClusterId Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name - * formatted as - * `projects//locations//azureClusters/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * @return \Google\Cloud\GkeMultiCloud\V1\CreateAzureClusterRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeMultiCloud\V1\AzureCluster $azureCluster, string $azureClusterId): self - { - return (new self()) - ->setParent($parent) - ->setAzureCluster($azureCluster) - ->setAzureClusterId($azureClusterId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location where this - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureCluster $azure_cluster - * Required. The specification of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. - * @type string $azure_cluster_id - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name - * formatted as - * `projects//locations//azureClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * @type bool $validate_only - * If set, only validate the request, but do not actually create the cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location where this - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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 parent location where this - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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. The specification of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureCluster|null - */ - public function getAzureCluster() - { - return $this->azure_cluster; - } - - public function hasAzureCluster() - { - return isset($this->azure_cluster); - } - - public function clearAzureCluster() - { - unset($this->azure_cluster); - } - - /** - * Required. The specification of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureCluster $var - * @return $this - */ - public function setAzureCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureCluster::class); - $this->azure_cluster = $var; - - return $this; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name - * formatted as - * `projects//locations//azureClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string azure_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAzureClusterId() - { - return $this->azure_cluster_id; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name - * formatted as - * `projects//locations//azureClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string azure_cluster_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAzureClusterId($var) - { - GPBUtil::checkString($var, True); - $this->azure_cluster_id = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually create the cluster. - * - * Generated from protobuf field bool validate_only = 4; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually create the cluster. - * - * Generated from protobuf field bool validate_only = 4; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureNodePoolRequest.php deleted file mode 100644 index 916c7caa6c2a..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/CreateAzureNodePoolRequest.php +++ /dev/null @@ -1,265 +0,0 @@ -google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest - */ -class CreateAzureNodePoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource where this node pool will be created. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The specification of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $azure_node_pool = null; - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name - * formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string azure_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $azure_node_pool_id = ''; - /** - * If set, only validate the request, but do not actually create the node - * pool. - * - * Generated from protobuf field bool validate_only = 4; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource where this node pool will be created. - * - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureClusterName()} for help formatting this field. - * @param \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $azureNodePool Required. The specification of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. - * @param string $azureNodePoolId Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name - * formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * @return \Google\Cloud\GkeMultiCloud\V1\CreateAzureNodePoolRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $azureNodePool, string $azureNodePoolId): self - { - return (new self()) - ->setParent($parent) - ->setAzureNodePool($azureNodePool) - ->setAzureNodePoolId($azureNodePoolId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource where this node pool will be created. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $azure_node_pool - * Required. The specification of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. - * @type string $azure_node_pool_id - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name - * formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * @type bool $validate_only - * If set, only validate the request, but do not actually create the node - * pool. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource where this node pool will be created. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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 [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource where this node pool will be created. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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. The specification of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureNodePool|null - */ - public function getAzureNodePool() - { - return $this->azure_node_pool; - } - - public function hasAzureNodePool() - { - return isset($this->azure_node_pool); - } - - public function clearAzureNodePool() - { - unset($this->azure_node_pool); - } - - /** - * Required. The specification of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $var - * @return $this - */ - public function setAzureNodePool($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureNodePool::class); - $this->azure_node_pool = $var; - - return $this; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name - * formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string azure_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAzureNodePoolId() - { - return $this->azure_node_pool_id; - } - - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name - * formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * Generated from protobuf field string azure_node_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAzureNodePoolId($var) - { - GPBUtil::checkString($var, True); - $this->azure_node_pool_id = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually create the node - * pool. - * - * Generated from protobuf field bool validate_only = 4; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually create the node - * pool. - * - * Generated from protobuf field bool validate_only = 4; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAttachedClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAttachedClusterRequest.php deleted file mode 100644 index 0d3c5f6c7d10..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAttachedClusterRequest.php +++ /dev/null @@ -1,292 +0,0 @@ -google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest - */ -class DeleteAttachedClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete. - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * If set to true, and the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * is not found, the request will succeed but no action will be taken on the - * server and a completed [Operation][google.longrunning.Operation] will be - * returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - */ - protected $allow_missing = false; - /** - * If set to true, the deletion of - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will succeed even if errors occur during deleting in cluster resources. - * Using this parameter may result in orphaned resources in the cluster. - * - * Generated from protobuf field bool ignore_errors = 5; - */ - protected $ignore_errors = false; - /** - * The current etag of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete. - * - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AttachedClustersClient::attachedClusterName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\DeleteAttachedClusterRequest - * - * @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 the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete. - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @type bool $validate_only - * If set, only validate the request, but do not actually delete the resource. - * @type bool $allow_missing - * If set to true, and the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * is not found, the request will succeed but no action will be taken on the - * server and a completed [Operation][google.longrunning.Operation] will be - * returned. - * Useful for idempotent deletion. - * @type bool $ignore_errors - * If set to true, the deletion of - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will succeed even if errors occur during deleting in cluster resources. - * Using this parameter may result in orphaned resources in the cluster. - * @type string $etag - * The current etag of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete. - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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 the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete. - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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; - } - - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * If set to true, and the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * is not found, the request will succeed but no action will be taken on the - * server and a completed [Operation][google.longrunning.Operation] will be - * returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If set to true, and the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * is not found, the request will succeed but no action will be taken on the - * server and a completed [Operation][google.longrunning.Operation] will be - * returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - - /** - * If set to true, the deletion of - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will succeed even if errors occur during deleting in cluster resources. - * Using this parameter may result in orphaned resources in the cluster. - * - * Generated from protobuf field bool ignore_errors = 5; - * @return bool - */ - public function getIgnoreErrors() - { - return $this->ignore_errors; - } - - /** - * If set to true, the deletion of - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will succeed even if errors occur during deleting in cluster resources. - * Using this parameter may result in orphaned resources in the cluster. - * - * Generated from protobuf field bool ignore_errors = 5; - * @param bool $var - * @return $this - */ - public function setIgnoreErrors($var) - { - GPBUtil::checkBool($var); - $this->ignore_errors = $var; - - return $this; - } - - /** - * The current etag of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * The current etag of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAwsClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAwsClusterRequest.php deleted file mode 100644 index af66bc8b136a..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAwsClusterRequest.php +++ /dev/null @@ -1,288 +0,0 @@ -google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest - */ -class DeleteAwsClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * If set to true, and the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - */ - protected $allow_missing = false; - /** - * Optional. If set to true, the deletion of - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will - * succeed even if errors occur during deleting in cluster resources. Using - * this parameter may result in orphaned resources in the cluster. - * - * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ignore_errors = false; - /** - * The current etag of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. - * - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AwsClustersClient::awsClusterName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\DeleteAwsClusterRequest - * - * @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 the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @type bool $validate_only - * If set, only validate the request, but do not actually delete the resource. - * @type bool $allow_missing - * If set to true, and the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * @type bool $ignore_errors - * Optional. If set to true, the deletion of - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will - * succeed even if errors occur during deleting in cluster resources. Using - * this parameter may result in orphaned resources in the cluster. - * @type string $etag - * The current etag of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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 the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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; - } - - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * If set to true, and the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If set to true, and the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - - /** - * Optional. If set to true, the deletion of - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will - * succeed even if errors occur during deleting in cluster resources. Using - * this parameter may result in orphaned resources in the cluster. - * - * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIgnoreErrors() - { - return $this->ignore_errors; - } - - /** - * Optional. If set to true, the deletion of - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will - * succeed even if errors occur during deleting in cluster resources. Using - * this parameter may result in orphaned resources in the cluster. - * - * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIgnoreErrors($var) - { - GPBUtil::checkBool($var); - $this->ignore_errors = $var; - - return $this; - } - - /** - * The current etag of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * The current etag of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAwsNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAwsNodePoolRequest.php deleted file mode 100644 index c4c621f59cdc..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAwsNodePoolRequest.php +++ /dev/null @@ -1,292 +0,0 @@ -google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest - */ -class DeleteAwsNodePoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If set, only validate the request, but do not actually delete the node - * pool. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * If set to true, and the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - */ - protected $allow_missing = false; - /** - * Optional. If set to true, the deletion of - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource will - * succeed even if errors occur during deleting in node pool resources. Using - * this parameter may result in orphaned resources in the node pool. - * - * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ignore_errors = false; - /** - * The current ETag of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided ETag does not match the current etag of the node pool, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. - * - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsNodePoolName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\DeleteAwsNodePoolRequest - * - * @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 the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type bool $validate_only - * If set, only validate the request, but do not actually delete the node - * pool. - * @type bool $allow_missing - * If set to true, and the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * @type bool $ignore_errors - * Optional. If set to true, the deletion of - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource will - * succeed even if errors occur during deleting in node pool resources. Using - * this parameter may result in orphaned resources in the node pool. - * @type string $etag - * The current ETag of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided ETag does not match the current etag of the node pool, - * the request will fail and an ABORTED error will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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 the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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; - } - - /** - * If set, only validate the request, but do not actually delete the node - * pool. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually delete the node - * pool. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * If set to true, and the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If set to true, and the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - - /** - * Optional. If set to true, the deletion of - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource will - * succeed even if errors occur during deleting in node pool resources. Using - * this parameter may result in orphaned resources in the node pool. - * - * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIgnoreErrors() - { - return $this->ignore_errors; - } - - /** - * Optional. If set to true, the deletion of - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource will - * succeed even if errors occur during deleting in node pool resources. Using - * this parameter may result in orphaned resources in the node pool. - * - * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIgnoreErrors($var) - { - GPBUtil::checkBool($var); - $this->ignore_errors = $var; - - return $this; - } - - /** - * The current ETag of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided ETag does not match the current etag of the node pool, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * The current ETag of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided ETag does not match the current etag of the node pool, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClientRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClientRequest.php deleted file mode 100644 index 37807fa3dee7..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClientRequest.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.gkemulticloud.v1.DeleteAzureClientRequest - */ -class DeleteAzureClientRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - * formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If set to true, and the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 2; - */ - protected $allow_missing = false; - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 3; - */ - protected $validate_only = false; - - /** - * @param string $name Required. The resource name the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. - * - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - * formatted as - * `projects//locations//azureClients/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureClientName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\DeleteAzureClientRequest - * - * @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 the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - * formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type bool $allow_missing - * If set to true, and the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * @type bool $validate_only - * If set, only validate the request, but do not actually delete the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - * formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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 the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - * formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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; - } - - /** - * If set to true, and the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 2; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If set to true, and the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 2; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 3; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 3; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClusterRequest.php deleted file mode 100644 index 4d3907269d12..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureClusterRequest.php +++ /dev/null @@ -1,288 +0,0 @@ -google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest - */ -class DeleteAzureClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If set to true, and the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 2; - */ - protected $allow_missing = false; - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 3; - */ - protected $validate_only = false; - /** - * The current etag of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - */ - protected $etag = ''; - /** - * Optional. If set to true, the deletion of - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will - * succeed even if errors occur during deleting in cluster resources. Using - * this parameter may result in orphaned resources in the cluster. - * - * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ignore_errors = false; - - /** - * @param string $name Required. The resource name the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. - * - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AzureClustersClient::azureClusterName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\DeleteAzureClusterRequest - * - * @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 the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @type bool $allow_missing - * If set to true, and the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * @type bool $validate_only - * If set, only validate the request, but do not actually delete the resource. - * @type string $etag - * The current etag of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * @type bool $ignore_errors - * Optional. If set to true, the deletion of - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will - * succeed even if errors occur during deleting in cluster resources. Using - * this parameter may result in orphaned resources in the cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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 the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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; - } - - /** - * If set to true, and the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 2; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If set to true, and the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed [Operation][google.longrunning.Operation] will be returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 2; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 3; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually delete the resource. - * - * Generated from protobuf field bool validate_only = 3; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * The current etag of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * The current etag of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. If set to true, the deletion of - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will - * succeed even if errors occur during deleting in cluster resources. Using - * this parameter may result in orphaned resources in the cluster. - * - * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIgnoreErrors() - { - return $this->ignore_errors; - } - - /** - * Optional. If set to true, the deletion of - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will - * succeed even if errors occur during deleting in cluster resources. Using - * this parameter may result in orphaned resources in the cluster. - * - * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIgnoreErrors($var) - { - GPBUtil::checkBool($var); - $this->ignore_errors = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureNodePoolRequest.php deleted file mode 100644 index a27b26f73fd0..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/DeleteAzureNodePoolRequest.php +++ /dev/null @@ -1,296 +0,0 @@ -google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest - */ -class DeleteAzureNodePoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If set, only validate the request, but do not actually delete the node - * pool. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * If set to true, and the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is - * not found, the request will succeed but no action will be taken on the - * server and a completed [Operation][google.longrunning.Operation] will be - * returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - */ - protected $allow_missing = false; - /** - * The current ETag of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided ETag does not match the current etag of the node pool, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - */ - protected $etag = ''; - /** - * Optional. If set to true, the deletion of - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource will - * succeed even if errors occur during deleting in node pool resources. Using - * this parameter may result in orphaned resources in the node pool. - * - * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ignore_errors = false; - - /** - * @param string $name Required. The resource name the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. - * - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureNodePoolName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\DeleteAzureNodePoolRequest - * - * @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 the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type bool $validate_only - * If set, only validate the request, but do not actually delete the node - * pool. - * @type bool $allow_missing - * If set to true, and the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is - * not found, the request will succeed but no action will be taken on the - * server and a completed [Operation][google.longrunning.Operation] will be - * returned. - * Useful for idempotent deletion. - * @type string $etag - * The current ETag of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided ETag does not match the current etag of the node pool, - * the request will fail and an ABORTED error will be returned. - * @type bool $ignore_errors - * Optional. If set to true, the deletion of - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource will - * succeed even if errors occur during deleting in node pool resources. Using - * this parameter may result in orphaned resources in the node pool. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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 the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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; - } - - /** - * If set, only validate the request, but do not actually delete the node - * pool. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually delete the node - * pool. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * If set to true, and the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is - * not found, the request will succeed but no action will be taken on the - * server and a completed [Operation][google.longrunning.Operation] will be - * returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If set to true, and the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is - * not found, the request will succeed but no action will be taken on the - * server and a completed [Operation][google.longrunning.Operation] will be - * returned. - * Useful for idempotent deletion. - * - * Generated from protobuf field bool allow_missing = 3; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - - /** - * The current ETag of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided ETag does not match the current etag of the node pool, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * The current ETag of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided ETag does not match the current etag of the node pool, - * the request will fail and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 4; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. If set to true, the deletion of - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource will - * succeed even if errors occur during deleting in node pool resources. Using - * this parameter may result in orphaned resources in the node pool. - * - * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIgnoreErrors() - { - return $this->ignore_errors; - } - - /** - * Optional. If set to true, the deletion of - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource will - * succeed even if errors occur during deleting in node pool resources. Using - * this parameter may result in orphaned resources in the node pool. - * - * Generated from protobuf field bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIgnoreErrors($var) - { - GPBUtil::checkBool($var); - $this->ignore_errors = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/Fleet.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/Fleet.php deleted file mode 100644 index ddc8d53d7ae1..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/Fleet.php +++ /dev/null @@ -1,131 +0,0 @@ -google.cloud.gkemulticloud.v1.Fleet - */ -class Fleet extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Fleet host project where this cluster will be - * registered. - * Project names are formatted as - * `projects/`. - * - * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project = ''; - /** - * Output only. The name of the managed Hub Membership resource associated to - * this cluster. - * Membership names are formatted as - * `projects//locations/global/membership/`. - * - * Generated from protobuf field string membership = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $membership = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project - * Required. The name of the Fleet host project where this cluster will be - * registered. - * Project names are formatted as - * `projects/`. - * @type string $membership - * Output only. The name of the managed Hub Membership resource associated to - * this cluster. - * Membership names are formatted as - * `projects//locations/global/membership/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Fleet host project where this cluster will be - * registered. - * Project names are formatted as - * `projects/`. - * - * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Required. The name of the Fleet host project where this cluster will be - * registered. - * Project names are formatted as - * `projects/`. - * - * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Output only. The name of the managed Hub Membership resource associated to - * this cluster. - * Membership names are formatted as - * `projects//locations/global/membership/`. - * - * Generated from protobuf field string membership = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMembership() - { - return $this->membership; - } - - /** - * Output only. The name of the managed Hub Membership resource associated to - * this cluster. - * Membership names are formatted as - * `projects//locations/global/membership/`. - * - * Generated from protobuf field string membership = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMembership($var) - { - GPBUtil::checkString($var, True); - $this->membership = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterAgentTokenRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterAgentTokenRequest.php deleted file mode 100644 index 121afc3898f2..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterAgentTokenRequest.php +++ /dev/null @@ -1,337 +0,0 @@ -google.cloud.gkemulticloud.v1.GenerateAttachedClusterAgentTokenRequest - */ -class GenerateAttachedClusterAgentTokenRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. - * - * Generated from protobuf field string attached_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $attached_cluster = ''; - /** - * Required. - * - * Generated from protobuf field string subject_token = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $subject_token = ''; - /** - * Required. - * - * Generated from protobuf field string subject_token_type = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $subject_token_type = ''; - /** - * Required. - * - * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $version = ''; - /** - * Optional. - * - * Generated from protobuf field string grant_type = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $grant_type = ''; - /** - * Optional. - * - * Generated from protobuf field string audience = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $audience = ''; - /** - * Optional. - * - * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $scope = ''; - /** - * Optional. - * - * Generated from protobuf field string requested_token_type = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $requested_token_type = ''; - /** - * Optional. - * - * Generated from protobuf field string options = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $options = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $attached_cluster - * Required. - * @type string $subject_token - * Required. - * @type string $subject_token_type - * Required. - * @type string $version - * Required. - * @type string $grant_type - * Optional. - * @type string $audience - * Optional. - * @type string $scope - * Optional. - * @type string $requested_token_type - * Optional. - * @type string $options - * Optional. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. - * - * Generated from protobuf field string attached_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAttachedCluster() - { - return $this->attached_cluster; - } - - /** - * Required. - * - * Generated from protobuf field string attached_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAttachedCluster($var) - { - GPBUtil::checkString($var, True); - $this->attached_cluster = $var; - - return $this; - } - - /** - * Required. - * - * Generated from protobuf field string subject_token = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSubjectToken() - { - return $this->subject_token; - } - - /** - * Required. - * - * Generated from protobuf field string subject_token = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSubjectToken($var) - { - GPBUtil::checkString($var, True); - $this->subject_token = $var; - - return $this; - } - - /** - * Required. - * - * Generated from protobuf field string subject_token_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSubjectTokenType() - { - return $this->subject_token_type; - } - - /** - * Required. - * - * Generated from protobuf field string subject_token_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSubjectTokenType($var) - { - GPBUtil::checkString($var, True); - $this->subject_token_type = $var; - - return $this; - } - - /** - * Required. - * - * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Required. - * - * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Optional. - * - * Generated from protobuf field string grant_type = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getGrantType() - { - return $this->grant_type; - } - - /** - * Optional. - * - * Generated from protobuf field string grant_type = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setGrantType($var) - { - GPBUtil::checkString($var, True); - $this->grant_type = $var; - - return $this; - } - - /** - * Optional. - * - * Generated from protobuf field string audience = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAudience() - { - return $this->audience; - } - - /** - * Optional. - * - * Generated from protobuf field string audience = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAudience($var) - { - GPBUtil::checkString($var, True); - $this->audience = $var; - - return $this; - } - - /** - * Optional. - * - * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * Optional. - * - * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - - /** - * Optional. - * - * Generated from protobuf field string requested_token_type = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestedTokenType() - { - return $this->requested_token_type; - } - - /** - * Optional. - * - * Generated from protobuf field string requested_token_type = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestedTokenType($var) - { - GPBUtil::checkString($var, True); - $this->requested_token_type = $var; - - return $this; - } - - /** - * Optional. - * - * Generated from protobuf field string options = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOptions() - { - return $this->options; - } - - /** - * Optional. - * - * Generated from protobuf field string options = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOptions($var) - { - GPBUtil::checkString($var, True); - $this->options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterAgentTokenResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterAgentTokenResponse.php deleted file mode 100644 index 913a5f2ab892..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterAgentTokenResponse.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.gkemulticloud.v1.GenerateAttachedClusterAgentTokenResponse - */ -class GenerateAttachedClusterAgentTokenResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string access_token = 1; - */ - protected $access_token = ''; - /** - * Generated from protobuf field int32 expires_in = 2; - */ - protected $expires_in = 0; - /** - * Generated from protobuf field string token_type = 3; - */ - protected $token_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $access_token - * @type int $expires_in - * @type string $token_type - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string access_token = 1; - * @return string - */ - public function getAccessToken() - { - return $this->access_token; - } - - /** - * Generated from protobuf field string access_token = 1; - * @param string $var - * @return $this - */ - public function setAccessToken($var) - { - GPBUtil::checkString($var, True); - $this->access_token = $var; - - return $this; - } - - /** - * Generated from protobuf field int32 expires_in = 2; - * @return int - */ - public function getExpiresIn() - { - return $this->expires_in; - } - - /** - * Generated from protobuf field int32 expires_in = 2; - * @param int $var - * @return $this - */ - public function setExpiresIn($var) - { - GPBUtil::checkInt32($var); - $this->expires_in = $var; - - return $this; - } - - /** - * Generated from protobuf field string token_type = 3; - * @return string - */ - public function getTokenType() - { - return $this->token_type; - } - - /** - * Generated from protobuf field string token_type = 3; - * @param string $var - * @return $this - */ - public function setTokenType($var) - { - GPBUtil::checkString($var, True); - $this->token_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterInstallManifestRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterInstallManifestRequest.php deleted file mode 100644 index b3000ce01b1b..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterInstallManifestRequest.php +++ /dev/null @@ -1,289 +0,0 @@ -google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest - */ -class GenerateAttachedClusterInstallManifestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. A client provided ID of the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * When generating an install manifest for importing an existing Membership - * resource, the attached_cluster_id field must be the Membership id. - * Membership names are formatted as - * `projects//locations//memberships/`. - * - * Generated from protobuf field string attached_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $attached_cluster_id = ''; - /** - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * - * Generated from protobuf field string platform_version = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $platform_version = ''; - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $proxy_config = null; - - /** - * @param string $parent Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AttachedClustersClient::locationName()} for help formatting this field. - * @param string $attachedClusterId Required. A client provided ID of the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * When generating an install manifest for importing an existing Membership - * resource, the attached_cluster_id field must be the Membership id. - * - * Membership names are formatted as - * `projects//locations//memberships/`. - * - * @return \Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterInstallManifestRequest - * - * @experimental - */ - public static function build(string $parent, string $attachedClusterId): self - { - return (new self()) - ->setParent($parent) - ->setAttachedClusterId($attachedClusterId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type string $attached_cluster_id - * Required. A client provided ID of the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * When generating an install manifest for importing an existing Membership - * resource, the attached_cluster_id field must be the Membership id. - * Membership names are formatted as - * `projects//locations//memberships/`. - * @type string $platform_version - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * @type \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $proxy_config - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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 parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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 client provided ID of the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * When generating an install manifest for importing an existing Membership - * resource, the attached_cluster_id field must be the Membership id. - * Membership names are formatted as - * `projects//locations//memberships/`. - * - * Generated from protobuf field string attached_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAttachedClusterId() - { - return $this->attached_cluster_id; - } - - /** - * Required. A client provided ID of the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * When generating an install manifest for importing an existing Membership - * resource, the attached_cluster_id field must be the Membership id. - * Membership names are formatted as - * `projects//locations//memberships/`. - * - * Generated from protobuf field string attached_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAttachedClusterId($var) - { - GPBUtil::checkString($var, True); - $this->attached_cluster_id = $var; - - return $this; - } - - /** - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * - * Generated from protobuf field string platform_version = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPlatformVersion() - { - return $this->platform_version; - } - - /** - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * - * Generated from protobuf field string platform_version = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPlatformVersion($var) - { - GPBUtil::checkString($var, True); - $this->platform_version = $var; - - return $this; - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig|null - */ - public function getProxyConfig() - { - return $this->proxy_config; - } - - public function hasProxyConfig() - { - return isset($this->proxy_config); - } - - public function clearProxyConfig() - { - unset($this->proxy_config); - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $var - * @return $this - */ - public function setProxyConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig::class); - $this->proxy_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterInstallManifestResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterInstallManifestResponse.php deleted file mode 100644 index 558f3fe1e5d2..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAttachedClusterInstallManifestResponse.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse - */ -class GenerateAttachedClusterInstallManifestResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A set of Kubernetes resources (in YAML format) to be applied - * to the cluster to be attached. - * - * Generated from protobuf field string manifest = 1; - */ - protected $manifest = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $manifest - * A set of Kubernetes resources (in YAML format) to be applied - * to the cluster to be attached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); - parent::__construct($data); - } - - /** - * A set of Kubernetes resources (in YAML format) to be applied - * to the cluster to be attached. - * - * Generated from protobuf field string manifest = 1; - * @return string - */ - public function getManifest() - { - return $this->manifest; - } - - /** - * A set of Kubernetes resources (in YAML format) to be applied - * to the cluster to be attached. - * - * Generated from protobuf field string manifest = 1; - * @param string $var - * @return $this - */ - public function setManifest($var) - { - GPBUtil::checkString($var, True); - $this->manifest = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsAccessTokenRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsAccessTokenRequest.php deleted file mode 100644 index d3d109e81257..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsAccessTokenRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest - */ -class GenerateAwsAccessTokenRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to - * authenticate to. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $aws_cluster = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $aws_cluster - * Required. The name of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to - * authenticate to. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to - * authenticate to. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAwsCluster() - { - return $this->aws_cluster; - } - - /** - * Required. The name of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to - * authenticate to. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAwsCluster($var) - { - GPBUtil::checkString($var, True); - $this->aws_cluster = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsAccessTokenResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsAccessTokenResponse.php deleted file mode 100644 index 35f1695ffc34..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsAccessTokenResponse.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse - */ -class GenerateAwsAccessTokenResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Access token to authenticate to k8s api-server. - * - * Generated from protobuf field string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $access_token = ''; - /** - * Output only. Timestamp at which the token will expire. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expiration_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $access_token - * Output only. Access token to authenticate to k8s api-server. - * @type \Google\Protobuf\Timestamp $expiration_time - * Output only. Timestamp at which the token will expire. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Access token to authenticate to k8s api-server. - * - * Generated from protobuf field string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAccessToken() - { - return $this->access_token; - } - - /** - * Output only. Access token to authenticate to k8s api-server. - * - * Generated from protobuf field string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAccessToken($var) - { - GPBUtil::checkString($var, True); - $this->access_token = $var; - - return $this; - } - - /** - * Output only. Timestamp at which the token will expire. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpirationTime() - { - return $this->expiration_time; - } - - public function hasExpirationTime() - { - return isset($this->expiration_time); - } - - public function clearExpirationTime() - { - unset($this->expiration_time); - } - - /** - * Output only. Timestamp at which the token will expire. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpirationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expiration_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsClusterAgentTokenRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsClusterAgentTokenRequest.php deleted file mode 100644 index 16461659a451..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsClusterAgentTokenRequest.php +++ /dev/null @@ -1,371 +0,0 @@ -google.cloud.gkemulticloud.v1.GenerateAwsClusterAgentTokenRequest - */ -class GenerateAwsClusterAgentTokenRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. - * - * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $aws_cluster = ''; - /** - * Required. - * - * Generated from protobuf field string subject_token = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $subject_token = ''; - /** - * Required. - * - * Generated from protobuf field string subject_token_type = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $subject_token_type = ''; - /** - * Required. - * - * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $version = ''; - /** - * Optional. - * - * Generated from protobuf field string node_pool_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $node_pool_id = ''; - /** - * Optional. - * - * Generated from protobuf field string grant_type = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $grant_type = ''; - /** - * Optional. - * - * Generated from protobuf field string audience = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $audience = ''; - /** - * Optional. - * - * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $scope = ''; - /** - * Optional. - * - * Generated from protobuf field string requested_token_type = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $requested_token_type = ''; - /** - * Optional. - * - * Generated from protobuf field string options = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $options = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $aws_cluster - * Required. - * @type string $subject_token - * Required. - * @type string $subject_token_type - * Required. - * @type string $version - * Required. - * @type string $node_pool_id - * Optional. - * @type string $grant_type - * Optional. - * @type string $audience - * Optional. - * @type string $scope - * Optional. - * @type string $requested_token_type - * Optional. - * @type string $options - * Optional. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. - * - * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAwsCluster() - { - return $this->aws_cluster; - } - - /** - * Required. - * - * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAwsCluster($var) - { - GPBUtil::checkString($var, True); - $this->aws_cluster = $var; - - return $this; - } - - /** - * Required. - * - * Generated from protobuf field string subject_token = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSubjectToken() - { - return $this->subject_token; - } - - /** - * Required. - * - * Generated from protobuf field string subject_token = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSubjectToken($var) - { - GPBUtil::checkString($var, True); - $this->subject_token = $var; - - return $this; - } - - /** - * Required. - * - * Generated from protobuf field string subject_token_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSubjectTokenType() - { - return $this->subject_token_type; - } - - /** - * Required. - * - * Generated from protobuf field string subject_token_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSubjectTokenType($var) - { - GPBUtil::checkString($var, True); - $this->subject_token_type = $var; - - return $this; - } - - /** - * Required. - * - * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Required. - * - * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Optional. - * - * Generated from protobuf field string node_pool_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNodePoolId() - { - return $this->node_pool_id; - } - - /** - * Optional. - * - * Generated from protobuf field string node_pool_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setNodePoolId($var) - { - GPBUtil::checkString($var, True); - $this->node_pool_id = $var; - - return $this; - } - - /** - * Optional. - * - * Generated from protobuf field string grant_type = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getGrantType() - { - return $this->grant_type; - } - - /** - * Optional. - * - * Generated from protobuf field string grant_type = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setGrantType($var) - { - GPBUtil::checkString($var, True); - $this->grant_type = $var; - - return $this; - } - - /** - * Optional. - * - * Generated from protobuf field string audience = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAudience() - { - return $this->audience; - } - - /** - * Optional. - * - * Generated from protobuf field string audience = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAudience($var) - { - GPBUtil::checkString($var, True); - $this->audience = $var; - - return $this; - } - - /** - * Optional. - * - * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * Optional. - * - * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - - /** - * Optional. - * - * Generated from protobuf field string requested_token_type = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestedTokenType() - { - return $this->requested_token_type; - } - - /** - * Optional. - * - * Generated from protobuf field string requested_token_type = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestedTokenType($var) - { - GPBUtil::checkString($var, True); - $this->requested_token_type = $var; - - return $this; - } - - /** - * Optional. - * - * Generated from protobuf field string options = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOptions() - { - return $this->options; - } - - /** - * Optional. - * - * Generated from protobuf field string options = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOptions($var) - { - GPBUtil::checkString($var, True); - $this->options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsClusterAgentTokenResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsClusterAgentTokenResponse.php deleted file mode 100644 index 0a5d0bafb1b3..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAwsClusterAgentTokenResponse.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.gkemulticloud.v1.GenerateAwsClusterAgentTokenResponse - */ -class GenerateAwsClusterAgentTokenResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string access_token = 1; - */ - protected $access_token = ''; - /** - * Generated from protobuf field int32 expires_in = 2; - */ - protected $expires_in = 0; - /** - * Generated from protobuf field string token_type = 3; - */ - protected $token_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $access_token - * @type int $expires_in - * @type string $token_type - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string access_token = 1; - * @return string - */ - public function getAccessToken() - { - return $this->access_token; - } - - /** - * Generated from protobuf field string access_token = 1; - * @param string $var - * @return $this - */ - public function setAccessToken($var) - { - GPBUtil::checkString($var, True); - $this->access_token = $var; - - return $this; - } - - /** - * Generated from protobuf field int32 expires_in = 2; - * @return int - */ - public function getExpiresIn() - { - return $this->expires_in; - } - - /** - * Generated from protobuf field int32 expires_in = 2; - * @param int $var - * @return $this - */ - public function setExpiresIn($var) - { - GPBUtil::checkInt32($var); - $this->expires_in = $var; - - return $this; - } - - /** - * Generated from protobuf field string token_type = 3; - * @return string - */ - public function getTokenType() - { - return $this->token_type; - } - - /** - * Generated from protobuf field string token_type = 3; - * @param string $var - * @return $this - */ - public function setTokenType($var) - { - GPBUtil::checkString($var, True); - $this->token_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureAccessTokenRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureAccessTokenRequest.php deleted file mode 100644 index f189dbc3a504..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureAccessTokenRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest - */ -class GenerateAzureAccessTokenRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to - * authenticate to. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $azure_cluster = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $azure_cluster - * Required. The name of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to - * authenticate to. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to - * authenticate to. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAzureCluster() - { - return $this->azure_cluster; - } - - /** - * Required. The name of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to - * authenticate to. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAzureCluster($var) - { - GPBUtil::checkString($var, True); - $this->azure_cluster = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureAccessTokenResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureAccessTokenResponse.php deleted file mode 100644 index 4371394919c5..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureAccessTokenResponse.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse - */ -class GenerateAzureAccessTokenResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Access token to authenticate to k8s api-server. - * - * Generated from protobuf field string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $access_token = ''; - /** - * Output only. Timestamp at which the token will expire. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expiration_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $access_token - * Output only. Access token to authenticate to k8s api-server. - * @type \Google\Protobuf\Timestamp $expiration_time - * Output only. Timestamp at which the token will expire. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Access token to authenticate to k8s api-server. - * - * Generated from protobuf field string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAccessToken() - { - return $this->access_token; - } - - /** - * Output only. Access token to authenticate to k8s api-server. - * - * Generated from protobuf field string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAccessToken($var) - { - GPBUtil::checkString($var, True); - $this->access_token = $var; - - return $this; - } - - /** - * Output only. Timestamp at which the token will expire. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpirationTime() - { - return $this->expiration_time; - } - - public function hasExpirationTime() - { - return isset($this->expiration_time); - } - - public function clearExpirationTime() - { - unset($this->expiration_time); - } - - /** - * Output only. Timestamp at which the token will expire. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpirationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expiration_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureClusterAgentTokenRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureClusterAgentTokenRequest.php deleted file mode 100644 index d19114785203..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureClusterAgentTokenRequest.php +++ /dev/null @@ -1,371 +0,0 @@ -google.cloud.gkemulticloud.v1.GenerateAzureClusterAgentTokenRequest - */ -class GenerateAzureClusterAgentTokenRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. - * - * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $azure_cluster = ''; - /** - * Required. - * - * Generated from protobuf field string subject_token = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $subject_token = ''; - /** - * Required. - * - * Generated from protobuf field string subject_token_type = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $subject_token_type = ''; - /** - * Required. - * - * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $version = ''; - /** - * Optional. - * - * Generated from protobuf field string node_pool_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $node_pool_id = ''; - /** - * Optional. - * - * Generated from protobuf field string grant_type = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $grant_type = ''; - /** - * Optional. - * - * Generated from protobuf field string audience = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $audience = ''; - /** - * Optional. - * - * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $scope = ''; - /** - * Optional. - * - * Generated from protobuf field string requested_token_type = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $requested_token_type = ''; - /** - * Optional. - * - * Generated from protobuf field string options = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $options = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $azure_cluster - * Required. - * @type string $subject_token - * Required. - * @type string $subject_token_type - * Required. - * @type string $version - * Required. - * @type string $node_pool_id - * Optional. - * @type string $grant_type - * Optional. - * @type string $audience - * Optional. - * @type string $scope - * Optional. - * @type string $requested_token_type - * Optional. - * @type string $options - * Optional. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. - * - * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAzureCluster() - { - return $this->azure_cluster; - } - - /** - * Required. - * - * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAzureCluster($var) - { - GPBUtil::checkString($var, True); - $this->azure_cluster = $var; - - return $this; - } - - /** - * Required. - * - * Generated from protobuf field string subject_token = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSubjectToken() - { - return $this->subject_token; - } - - /** - * Required. - * - * Generated from protobuf field string subject_token = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSubjectToken($var) - { - GPBUtil::checkString($var, True); - $this->subject_token = $var; - - return $this; - } - - /** - * Required. - * - * Generated from protobuf field string subject_token_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSubjectTokenType() - { - return $this->subject_token_type; - } - - /** - * Required. - * - * Generated from protobuf field string subject_token_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSubjectTokenType($var) - { - GPBUtil::checkString($var, True); - $this->subject_token_type = $var; - - return $this; - } - - /** - * Required. - * - * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Required. - * - * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Optional. - * - * Generated from protobuf field string node_pool_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNodePoolId() - { - return $this->node_pool_id; - } - - /** - * Optional. - * - * Generated from protobuf field string node_pool_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setNodePoolId($var) - { - GPBUtil::checkString($var, True); - $this->node_pool_id = $var; - - return $this; - } - - /** - * Optional. - * - * Generated from protobuf field string grant_type = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getGrantType() - { - return $this->grant_type; - } - - /** - * Optional. - * - * Generated from protobuf field string grant_type = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setGrantType($var) - { - GPBUtil::checkString($var, True); - $this->grant_type = $var; - - return $this; - } - - /** - * Optional. - * - * Generated from protobuf field string audience = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAudience() - { - return $this->audience; - } - - /** - * Optional. - * - * Generated from protobuf field string audience = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAudience($var) - { - GPBUtil::checkString($var, True); - $this->audience = $var; - - return $this; - } - - /** - * Optional. - * - * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * Optional. - * - * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - - /** - * Optional. - * - * Generated from protobuf field string requested_token_type = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestedTokenType() - { - return $this->requested_token_type; - } - - /** - * Optional. - * - * Generated from protobuf field string requested_token_type = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestedTokenType($var) - { - GPBUtil::checkString($var, True); - $this->requested_token_type = $var; - - return $this; - } - - /** - * Optional. - * - * Generated from protobuf field string options = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOptions() - { - return $this->options; - } - - /** - * Optional. - * - * Generated from protobuf field string options = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOptions($var) - { - GPBUtil::checkString($var, True); - $this->options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureClusterAgentTokenResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureClusterAgentTokenResponse.php deleted file mode 100644 index beb176c6239a..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GenerateAzureClusterAgentTokenResponse.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.gkemulticloud.v1.GenerateAzureClusterAgentTokenResponse - */ -class GenerateAzureClusterAgentTokenResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string access_token = 1; - */ - protected $access_token = ''; - /** - * Generated from protobuf field int32 expires_in = 2; - */ - protected $expires_in = 0; - /** - * Generated from protobuf field string token_type = 3; - */ - protected $token_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $access_token - * @type int $expires_in - * @type string $token_type - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string access_token = 1; - * @return string - */ - public function getAccessToken() - { - return $this->access_token; - } - - /** - * Generated from protobuf field string access_token = 1; - * @param string $var - * @return $this - */ - public function setAccessToken($var) - { - GPBUtil::checkString($var, True); - $this->access_token = $var; - - return $this; - } - - /** - * Generated from protobuf field int32 expires_in = 2; - * @return int - */ - public function getExpiresIn() - { - return $this->expires_in; - } - - /** - * Generated from protobuf field int32 expires_in = 2; - * @param int $var - * @return $this - */ - public function setExpiresIn($var) - { - GPBUtil::checkInt32($var); - $this->expires_in = $var; - - return $this; - } - - /** - * Generated from protobuf field string token_type = 3; - * @return string - */ - public function getTokenType() - { - return $this->token_type; - } - - /** - * Generated from protobuf field string token_type = 3; - * @param string $var - * @return $this - */ - public function setTokenType($var) - { - GPBUtil::checkString($var, True); - $this->token_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAttachedClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAttachedClusterRequest.php deleted file mode 100644 index b5da37d6fa0a..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAttachedClusterRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.gkemulticloud.v1.GetAttachedClusterRequest - */ -class GetAttachedClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * to describe. - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * to describe. - * - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AttachedClustersClient::attachedClusterName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\GetAttachedClusterRequest - * - * @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 of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * to describe. - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * to describe. - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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 of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * to describe. - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAttachedServerConfigRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAttachedServerConfigRequest.php deleted file mode 100644 index f2ed61ae77c5..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAttachedServerConfigRequest.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest - */ -class GetAttachedServerConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedServerConfig] - * resource to describe. - * `AttachedServerConfig` names are formatted as - * `projects//locations//attachedServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [AttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedServerConfig] - * resource to describe. - * - * `AttachedServerConfig` names are formatted as - * `projects//locations//attachedServerConfig`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AttachedClustersClient::attachedServerConfigName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\GetAttachedServerConfigRequest - * - * @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 of the - * [AttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedServerConfig] - * resource to describe. - * `AttachedServerConfig` names are formatted as - * `projects//locations//attachedServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedServerConfig] - * resource to describe. - * `AttachedServerConfig` names are formatted as - * `projects//locations//attachedServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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 of the - * [AttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedServerConfig] - * resource to describe. - * `AttachedServerConfig` names are formatted as - * `projects//locations//attachedServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsClusterRequest.php deleted file mode 100644 index 1a522d11bbb5..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsClusterRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.gkemulticloud.v1.GetAwsClusterRequest - */ -class GetAwsClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to - * describe. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to - * describe. - * - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AwsClustersClient::awsClusterName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\GetAwsClusterRequest - * - * @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 of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to - * describe. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to - * describe. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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 of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to - * describe. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsJsonWebKeysRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsJsonWebKeysRequest.php deleted file mode 100644 index 7e334e021db1..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsJsonWebKeysRequest.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.gkemulticloud.v1.GetAwsJsonWebKeysRequest - */ -class GetAwsJsonWebKeysRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The AwsCluster, which owns the JsonWebKeys. - * Format: - * projects/{project}/locations/{location}/awsClusters/{cluster} - * - * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $aws_cluster = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $aws_cluster - * Required. The AwsCluster, which owns the JsonWebKeys. - * Format: - * projects/{project}/locations/{location}/awsClusters/{cluster} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The AwsCluster, which owns the JsonWebKeys. - * Format: - * projects/{project}/locations/{location}/awsClusters/{cluster} - * - * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAwsCluster() - { - return $this->aws_cluster; - } - - /** - * Required. The AwsCluster, which owns the JsonWebKeys. - * Format: - * projects/{project}/locations/{location}/awsClusters/{cluster} - * - * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAwsCluster($var) - { - GPBUtil::checkString($var, True); - $this->aws_cluster = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsNodePoolRequest.php deleted file mode 100644 index 549d270d9f3e..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsNodePoolRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest - */ -class GetAwsNodePoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to - * describe. - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to - * describe. - * - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsNodePoolName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\GetAwsNodePoolRequest - * - * @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 of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to - * describe. - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to - * describe. - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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 of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to - * describe. - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsOpenIdConfigRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsOpenIdConfigRequest.php deleted file mode 100644 index e1e5b395ff9f..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsOpenIdConfigRequest.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.gkemulticloud.v1.GetAwsOpenIdConfigRequest - */ -class GetAwsOpenIdConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The AwsCluster, which owns the OIDC discovery document. - * Format: - * projects/{project}/locations/{location}/awsClusters/{cluster} - * - * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $aws_cluster = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $aws_cluster - * Required. The AwsCluster, which owns the OIDC discovery document. - * Format: - * projects/{project}/locations/{location}/awsClusters/{cluster} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The AwsCluster, which owns the OIDC discovery document. - * Format: - * projects/{project}/locations/{location}/awsClusters/{cluster} - * - * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAwsCluster() - { - return $this->aws_cluster; - } - - /** - * Required. The AwsCluster, which owns the OIDC discovery document. - * Format: - * projects/{project}/locations/{location}/awsClusters/{cluster} - * - * Generated from protobuf field string aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAwsCluster($var) - { - GPBUtil::checkString($var, True); - $this->aws_cluster = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsServerConfigRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsServerConfigRequest.php deleted file mode 100644 index fe925dd0cc05..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAwsServerConfigRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest - */ -class GetAwsServerConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource - * to describe. - * `AwsServerConfig` names are formatted as - * `projects//locations//awsServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource - * to describe. - * - * `AwsServerConfig` names are formatted as - * `projects//locations//awsServerConfig`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsServerConfigName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\GetAwsServerConfigRequest - * - * @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 of the - * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource - * to describe. - * `AwsServerConfig` names are formatted as - * `projects//locations//awsServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource - * to describe. - * `AwsServerConfig` names are formatted as - * `projects//locations//awsServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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 of the - * [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource - * to describe. - * `AwsServerConfig` names are formatted as - * `projects//locations//awsServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureClientRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureClientRequest.php deleted file mode 100644 index ce520b46f6bd..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureClientRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.gkemulticloud.v1.GetAzureClientRequest - */ -class GetAzureClientRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to - * describe. - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - * formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to - * describe. - * - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - * formatted as - * `projects//locations//azureClients/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureClientName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\GetAzureClientRequest - * - * @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 of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to - * describe. - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - * formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to - * describe. - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - * formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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 of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to - * describe. - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - * formatted as - * `projects//locations//azureClients/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureClusterRequest.php deleted file mode 100644 index c0403c71bf54..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureClusterRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.gkemulticloud.v1.GetAzureClusterRequest - */ -class GetAzureClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to - * describe. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to - * describe. - * - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AzureClustersClient::azureClusterName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\GetAzureClusterRequest - * - * @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 of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to - * describe. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to - * describe. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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 of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to - * describe. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureJsonWebKeysRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureJsonWebKeysRequest.php deleted file mode 100644 index 75a740ad73d9..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureJsonWebKeysRequest.php +++ /dev/null @@ -1,94 +0,0 @@ -google.cloud.gkemulticloud.v1.GetAzureJsonWebKeysRequest - */ -class GetAzureJsonWebKeysRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The AzureCluster, which owns the JsonWebKeys. - * Format: - * `projects//locations//azureClusters/` - * - * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $azure_cluster = ''; - - /** - * @param string $azureCluster Required. The AzureCluster, which owns the JsonWebKeys. - * Format: - * `projects//locations//azureClusters/` - * Please see {@see AzureClustersClient::azureClusterName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\GetAzureJsonWebKeysRequest - * - * @experimental - */ - public static function build(string $azureCluster): self - { - return (new self()) - ->setAzureCluster($azureCluster); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $azure_cluster - * Required. The AzureCluster, which owns the JsonWebKeys. - * Format: - * `projects//locations//azureClusters/` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The AzureCluster, which owns the JsonWebKeys. - * Format: - * `projects//locations//azureClusters/` - * - * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAzureCluster() - { - return $this->azure_cluster; - } - - /** - * Required. The AzureCluster, which owns the JsonWebKeys. - * Format: - * `projects//locations//azureClusters/` - * - * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAzureCluster($var) - { - GPBUtil::checkString($var, True); - $this->azure_cluster = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureNodePoolRequest.php deleted file mode 100644 index d491eade7bca..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureNodePoolRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest - */ -class GetAzureNodePoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to - * describe. - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to - * describe. - * - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureNodePoolName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\GetAzureNodePoolRequest - * - * @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 of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to - * describe. - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to - * describe. - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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 of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to - * describe. - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureOpenIdConfigRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureOpenIdConfigRequest.php deleted file mode 100644 index bb7336cfb5ff..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureOpenIdConfigRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.gkemulticloud.v1.GetAzureOpenIdConfigRequest - */ -class GetAzureOpenIdConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The AzureCluster, which owns the OIDC discovery document. - * Format: - * projects//locations//azureClusters/ - * - * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $azure_cluster = ''; - - /** - * @param string $azureCluster Required. The AzureCluster, which owns the OIDC discovery document. - * Format: - * projects//locations//azureClusters/ - * Please see {@see AzureClustersClient::azureClusterName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\GetAzureOpenIdConfigRequest - * - * @experimental - */ - public static function build(string $azureCluster): self - { - return (new self()) - ->setAzureCluster($azureCluster); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $azure_cluster - * Required. The AzureCluster, which owns the OIDC discovery document. - * Format: - * projects//locations//azureClusters/ - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The AzureCluster, which owns the OIDC discovery document. - * Format: - * projects//locations//azureClusters/ - * - * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAzureCluster() - { - return $this->azure_cluster; - } - - /** - * Required. The AzureCluster, which owns the OIDC discovery document. - * Format: - * projects//locations//azureClusters/ - * - * Generated from protobuf field string azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAzureCluster($var) - { - GPBUtil::checkString($var, True); - $this->azure_cluster = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureServerConfigRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureServerConfigRequest.php deleted file mode 100644 index 933aca070c01..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/GetAzureServerConfigRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest - */ -class GetAzureServerConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] - * resource to describe. - * `AzureServerConfig` names are formatted as - * `projects//locations//azureServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the - * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] - * resource to describe. - * - * `AzureServerConfig` names are formatted as - * `projects//locations//azureServerConfig`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureServerConfigName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\GetAzureServerConfigRequest - * - * @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 of the - * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] - * resource to describe. - * `AzureServerConfig` names are formatted as - * `projects//locations//azureServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] - * resource to describe. - * `AzureServerConfig` names are formatted as - * `projects//locations//azureServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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 of the - * [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] - * resource to describe. - * `AzureServerConfig` names are formatted as - * `projects//locations//azureServerConfig`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ImportAttachedClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ImportAttachedClusterRequest.php deleted file mode 100644 index 58f15ee6285f..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ImportAttachedClusterRequest.php +++ /dev/null @@ -1,306 +0,0 @@ -google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest - */ -class ImportAttachedClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * If set, only validate the request, but do not actually import the cluster. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * Required. The name of the fleet membership resource to import. - * - * Generated from protobuf field string fleet_membership = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $fleet_membership = ''; - /** - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * - * Generated from protobuf field string platform_version = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $platform_version = ''; - /** - * Required. The Kubernetes distribution of the underlying attached cluster. - * Supported values: ["eks", "aks", "generic"]. - * - * Generated from protobuf field string distribution = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $distribution = ''; - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $proxy_config = null; - - /** - * @param string $parent Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AttachedClustersClient::locationName()} for help formatting this field. - * @param string $fleetMembership Required. The name of the fleet membership resource to import. - * - * @return \Google\Cloud\GkeMultiCloud\V1\ImportAttachedClusterRequest - * - * @experimental - */ - public static function build(string $parent, string $fleetMembership): self - { - return (new self()) - ->setParent($parent) - ->setFleetMembership($fleetMembership); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type bool $validate_only - * If set, only validate the request, but do not actually import the cluster. - * @type string $fleet_membership - * Required. The name of the fleet membership resource to import. - * @type string $platform_version - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * @type string $distribution - * Required. The Kubernetes distribution of the underlying attached cluster. - * Supported values: ["eks", "aks", "generic"]. - * @type \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $proxy_config - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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 parent location where this - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * will be created. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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; - } - - /** - * If set, only validate the request, but do not actually import the cluster. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually import the cluster. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * Required. The name of the fleet membership resource to import. - * - * Generated from protobuf field string fleet_membership = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFleetMembership() - { - return $this->fleet_membership; - } - - /** - * Required. The name of the fleet membership resource to import. - * - * Generated from protobuf field string fleet_membership = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFleetMembership($var) - { - GPBUtil::checkString($var, True); - $this->fleet_membership = $var; - - return $this; - } - - /** - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * - * Generated from protobuf field string platform_version = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPlatformVersion() - { - return $this->platform_version; - } - - /** - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * - * Generated from protobuf field string platform_version = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPlatformVersion($var) - { - GPBUtil::checkString($var, True); - $this->platform_version = $var; - - return $this; - } - - /** - * Required. The Kubernetes distribution of the underlying attached cluster. - * Supported values: ["eks", "aks", "generic"]. - * - * Generated from protobuf field string distribution = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDistribution() - { - return $this->distribution; - } - - /** - * Required. The Kubernetes distribution of the underlying attached cluster. - * Supported values: ["eks", "aks", "generic"]. - * - * Generated from protobuf field string distribution = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDistribution($var) - { - GPBUtil::checkString($var, True); - $this->distribution = $var; - - return $this; - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig|null - */ - public function getProxyConfig() - { - return $this->proxy_config; - } - - public function hasProxyConfig() - { - return isset($this->proxy_config); - } - - public function clearProxyConfig() - { - unset($this->proxy_config); - } - - /** - * Optional. Proxy configuration for outbound HTTP(S) traffic. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedProxyConfig proxy_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig $var - * @return $this - */ - public function setProxyConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedProxyConfig::class); - $this->proxy_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/Jwk.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/Jwk.php deleted file mode 100644 index b1c701bfc4c4..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/Jwk.php +++ /dev/null @@ -1,339 +0,0 @@ -google.cloud.gkemulticloud.v1.Jwk - */ -class Jwk extends \Google\Protobuf\Internal\Message -{ - /** - * Key Type. - * - * Generated from protobuf field string kty = 1; - */ - protected $kty = ''; - /** - * Algorithm. - * - * Generated from protobuf field string alg = 2; - */ - protected $alg = ''; - /** - * Permitted uses for the public keys. - * - * Generated from protobuf field string use = 3; - */ - protected $use = ''; - /** - * Key ID. - * - * Generated from protobuf field string kid = 4; - */ - protected $kid = ''; - /** - * Used for RSA keys. - * - * Generated from protobuf field string n = 5; - */ - protected $n = ''; - /** - * Used for RSA keys. - * - * Generated from protobuf field string e = 6; - */ - protected $e = ''; - /** - * Used for ECDSA keys. - * - * Generated from protobuf field string x = 7; - */ - protected $x = ''; - /** - * Used for ECDSA keys. - * - * Generated from protobuf field string y = 8; - */ - protected $y = ''; - /** - * Used for ECDSA keys. - * - * Generated from protobuf field string crv = 9; - */ - protected $crv = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kty - * Key Type. - * @type string $alg - * Algorithm. - * @type string $use - * Permitted uses for the public keys. - * @type string $kid - * Key ID. - * @type string $n - * Used for RSA keys. - * @type string $e - * Used for RSA keys. - * @type string $x - * Used for ECDSA keys. - * @type string $y - * Used for ECDSA keys. - * @type string $crv - * Used for ECDSA keys. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); - parent::__construct($data); - } - - /** - * Key Type. - * - * Generated from protobuf field string kty = 1; - * @return string - */ - public function getKty() - { - return $this->kty; - } - - /** - * Key Type. - * - * Generated from protobuf field string kty = 1; - * @param string $var - * @return $this - */ - public function setKty($var) - { - GPBUtil::checkString($var, True); - $this->kty = $var; - - return $this; - } - - /** - * Algorithm. - * - * Generated from protobuf field string alg = 2; - * @return string - */ - public function getAlg() - { - return $this->alg; - } - - /** - * Algorithm. - * - * Generated from protobuf field string alg = 2; - * @param string $var - * @return $this - */ - public function setAlg($var) - { - GPBUtil::checkString($var, True); - $this->alg = $var; - - return $this; - } - - /** - * Permitted uses for the public keys. - * - * Generated from protobuf field string use = 3; - * @return string - */ - public function getUse() - { - return $this->use; - } - - /** - * Permitted uses for the public keys. - * - * Generated from protobuf field string use = 3; - * @param string $var - * @return $this - */ - public function setUse($var) - { - GPBUtil::checkString($var, True); - $this->use = $var; - - return $this; - } - - /** - * Key ID. - * - * Generated from protobuf field string kid = 4; - * @return string - */ - public function getKid() - { - return $this->kid; - } - - /** - * Key ID. - * - * Generated from protobuf field string kid = 4; - * @param string $var - * @return $this - */ - public function setKid($var) - { - GPBUtil::checkString($var, True); - $this->kid = $var; - - return $this; - } - - /** - * Used for RSA keys. - * - * Generated from protobuf field string n = 5; - * @return string - */ - public function getN() - { - return $this->n; - } - - /** - * Used for RSA keys. - * - * Generated from protobuf field string n = 5; - * @param string $var - * @return $this - */ - public function setN($var) - { - GPBUtil::checkString($var, True); - $this->n = $var; - - return $this; - } - - /** - * Used for RSA keys. - * - * Generated from protobuf field string e = 6; - * @return string - */ - public function getE() - { - return $this->e; - } - - /** - * Used for RSA keys. - * - * Generated from protobuf field string e = 6; - * @param string $var - * @return $this - */ - public function setE($var) - { - GPBUtil::checkString($var, True); - $this->e = $var; - - return $this; - } - - /** - * Used for ECDSA keys. - * - * Generated from protobuf field string x = 7; - * @return string - */ - public function getX() - { - return $this->x; - } - - /** - * Used for ECDSA keys. - * - * Generated from protobuf field string x = 7; - * @param string $var - * @return $this - */ - public function setX($var) - { - GPBUtil::checkString($var, True); - $this->x = $var; - - return $this; - } - - /** - * Used for ECDSA keys. - * - * Generated from protobuf field string y = 8; - * @return string - */ - public function getY() - { - return $this->y; - } - - /** - * Used for ECDSA keys. - * - * Generated from protobuf field string y = 8; - * @param string $var - * @return $this - */ - public function setY($var) - { - GPBUtil::checkString($var, True); - $this->y = $var; - - return $this; - } - - /** - * Used for ECDSA keys. - * - * Generated from protobuf field string crv = 9; - * @return string - */ - public function getCrv() - { - return $this->crv; - } - - /** - * Used for ECDSA keys. - * - * Generated from protobuf field string crv = 9; - * @param string $var - * @return $this - */ - public function setCrv($var) - { - GPBUtil::checkString($var, True); - $this->crv = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/KubernetesSecret.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/KubernetesSecret.php deleted file mode 100644 index 48dc2a01caff..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/KubernetesSecret.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.gkemulticloud.v1.KubernetesSecret - */ -class KubernetesSecret extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the kubernetes secret. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Namespace in which the kubernetes secret is stored. - * - * Generated from protobuf field string namespace = 2; - */ - protected $namespace = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the kubernetes secret. - * @type string $namespace - * Namespace in which the kubernetes secret is stored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce(); - parent::__construct($data); - } - - /** - * Name of the kubernetes secret. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the kubernetes secret. - * - * 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; - } - - /** - * Namespace in which the kubernetes secret is stored. - * - * Generated from protobuf field string namespace = 2; - * @return string - */ - public function getNamespace() - { - return $this->namespace; - } - - /** - * Namespace in which the kubernetes secret is stored. - * - * Generated from protobuf field string namespace = 2; - * @param string $var - * @return $this - */ - public function setNamespace($var) - { - GPBUtil::checkString($var, True); - $this->namespace = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAttachedClustersRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAttachedClustersRequest.php deleted file mode 100644 index dbf9477b5b25..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAttachedClustersRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAttachedClustersRequest - */ -class ListAttachedClustersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location which owns this collection of - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The `nextPageToken` value returned from a previous - * [attachedClusters.list][google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent location which owns this collection of - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AttachedClustersClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\ListAttachedClustersRequest - * - * @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 parent location which owns this collection of - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @type int $page_size - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * The `nextPageToken` value returned from a previous - * [attachedClusters.list][google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters] - * request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location which owns this collection of - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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 parent location which owns this collection of - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The `nextPageToken` value returned from a previous - * [attachedClusters.list][google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `nextPageToken` value returned from a previous - * [attachedClusters.list][google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAttachedClustersResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAttachedClustersResponse.php deleted file mode 100644 index 1252498f6346..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAttachedClustersResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAttachedClustersResponse - */ -class ListAttachedClustersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] - * resources in the specified Google Cloud Platform project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedCluster attached_clusters = 1; - */ - private $attached_clusters; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * 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\GkeMultiCloud\V1\AttachedCluster>|\Google\Protobuf\Internal\RepeatedField $attached_clusters - * A list of [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] - * resources in the specified Google Cloud Platform project and region region. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); - parent::__construct($data); - } - - /** - * A list of [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] - * resources in the specified Google Cloud Platform project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedCluster attached_clusters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAttachedClusters() - { - return $this->attached_clusters; - } - - /** - * A list of [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] - * resources in the specified Google Cloud Platform project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AttachedCluster attached_clusters = 1; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AttachedCluster>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAttachedClusters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AttachedCluster::class); - $this->attached_clusters = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * 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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsClustersRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsClustersRequest.php deleted file mode 100644 index cabd399a840b..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsClustersRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAwsClustersRequest - */ -class ListAwsClustersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location which owns this collection of - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The `nextPageToken` value returned from a previous - * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent location which owns this collection of - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AwsClustersClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\ListAwsClustersRequest - * - * @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 parent location which owns this collection of - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @type int $page_size - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * The `nextPageToken` value returned from a previous - * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] - * request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location which owns this collection of - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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 parent location which owns this collection of - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The `nextPageToken` value returned from a previous - * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `nextPageToken` value returned from a previous - * [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsClustersResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsClustersResponse.php deleted file mode 100644 index cf2c1a17dca9..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsClustersResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAwsClustersResponse - */ -class ListAwsClustersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources - * in the specified Google Cloud Platform project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; - */ - private $aws_clusters; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * 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\GkeMultiCloud\V1\AwsCluster>|\Google\Protobuf\Internal\RepeatedField $aws_clusters - * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources - * in the specified Google Cloud Platform project and region region. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources - * in the specified Google Cloud Platform project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAwsClusters() - { - return $this->aws_clusters; - } - - /** - * A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources - * in the specified Google Cloud Platform project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsCluster aws_clusters = 1; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsCluster>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAwsClusters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsCluster::class); - $this->aws_clusters = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * 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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsNodePoolsRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsNodePoolsRequest.php deleted file mode 100644 index ec512d71b6af..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsNodePoolsRequest.php +++ /dev/null @@ -1,204 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest - */ -class ListAwsNodePoolsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent `AwsCluster` which owns this collection of - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The `nextPageToken` value returned from a previous - * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent `AwsCluster` which owns this collection of - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. - * - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsClusterName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\ListAwsNodePoolsRequest - * - * @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 parent `AwsCluster` which owns this collection of - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type int $page_size - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * The `nextPageToken` value returned from a previous - * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] - * request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent `AwsCluster` which owns this collection of - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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 parent `AwsCluster` which owns this collection of - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The `nextPageToken` value returned from a previous - * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `nextPageToken` value returned from a previous - * [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsNodePoolsResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsNodePoolsResponse.php deleted file mode 100644 index e6a681467d5a..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAwsNodePoolsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse - */ -class ListAwsNodePoolsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resources in the specified `AwsCluster`. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; - */ - private $aws_node_pools; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * 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\GkeMultiCloud\V1\AwsNodePool>|\Google\Protobuf\Internal\RepeatedField $aws_node_pools - * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resources in the specified `AwsCluster`. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resources in the specified `AwsCluster`. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAwsNodePools() - { - return $this->aws_node_pools; - } - - /** - * A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resources in the specified `AwsCluster`. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pools = 1; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsNodePool>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAwsNodePools($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsNodePool::class); - $this->aws_node_pools = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * 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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClientsRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClientsRequest.php deleted file mode 100644 index 721195797caf..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClientsRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAzureClientsRequest - */ -class ListAzureClientsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location which owns this collection of - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The `nextPageToken` value returned from a previous - * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent location which owns this collection of - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AzureClustersClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\ListAzureClientsRequest - * - * @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 parent location which owns this collection of - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @type int $page_size - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * The `nextPageToken` value returned from a previous - * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] - * request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location which owns this collection of - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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 parent location which owns this collection of - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The `nextPageToken` value returned from a previous - * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `nextPageToken` value returned from a previous - * [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClientsResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClientsResponse.php deleted file mode 100644 index 6ec3fccc2c48..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClientsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAzureClientsResponse - */ -class ListAzureClientsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - * resources in the specified Google Cloud project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; - */ - private $azure_clients; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * 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\GkeMultiCloud\V1\AzureClient>|\Google\Protobuf\Internal\RepeatedField $azure_clients - * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - * resources in the specified Google Cloud project and region region. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - * resources in the specified Google Cloud project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAzureClients() - { - return $this->azure_clients; - } - - /** - * A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - * resources in the specified Google Cloud project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureClient azure_clients = 1; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureClient>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAzureClients($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureClient::class); - $this->azure_clients = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * 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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClustersRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClustersRequest.php deleted file mode 100644 index c8d3b2bc6110..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClustersRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAzureClustersRequest - */ -class ListAzureClustersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location which owns this collection of - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The `nextPageToken` value returned from a previous - * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent location which owns this collection of - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AzureClustersClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\ListAzureClustersRequest - * - * @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 parent location which owns this collection of - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * @type int $page_size - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * The `nextPageToken` value returned from a previous - * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] - * request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location which owns this collection of - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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 parent location which owns this collection of - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. - * Location names are formatted as `projects//locations/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. - * - * 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; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The `nextPageToken` value returned from a previous - * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `nextPageToken` value returned from a previous - * [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClustersResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClustersResponse.php deleted file mode 100644 index ed2af0dfa8b5..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureClustersResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAzureClustersResponse - */ -class ListAzureClustersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resources in the specified Google Cloud Platform project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; - */ - private $azure_clusters; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * 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\GkeMultiCloud\V1\AzureCluster>|\Google\Protobuf\Internal\RepeatedField $azure_clusters - * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resources in the specified Google Cloud Platform project and region region. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resources in the specified Google Cloud Platform project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAzureClusters() - { - return $this->azure_clusters; - } - - /** - * A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resources in the specified Google Cloud Platform project and region region. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureCluster azure_clusters = 1; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureCluster>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAzureClusters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureCluster::class); - $this->azure_clusters = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * 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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureNodePoolsRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureNodePoolsRequest.php deleted file mode 100644 index 4a48b8d5a27d..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureNodePoolsRequest.php +++ /dev/null @@ -1,204 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest - */ -class ListAzureNodePoolsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent `AzureCluster` which owns this collection of - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The `nextPageToken` value returned from a previous - * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent `AzureCluster` which owns this collection of - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. - * - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureClusterName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\ListAzureNodePoolsRequest - * - * @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 parent `AzureCluster` which owns this collection of - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type int $page_size - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * The `nextPageToken` value returned from a previous - * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] - * request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent `AzureCluster` which owns this collection of - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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 parent `AzureCluster` which owns this collection of - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The `nextPageToken` value returned from a previous - * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `nextPageToken` value returned from a previous - * [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] - * request, if any. - * - * Generated from protobuf field string page_token = 3; - * @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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureNodePoolsResponse.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureNodePoolsResponse.php deleted file mode 100644 index dba3b96d705d..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ListAzureNodePoolsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse - */ -class ListAzureNodePoolsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resources in the specified `AzureCluster`. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; - */ - private $azure_node_pools; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * 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\GkeMultiCloud\V1\AzureNodePool>|\Google\Protobuf\Internal\RepeatedField $azure_node_pools - * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resources in the specified `AzureCluster`. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resources in the specified `AzureCluster`. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAzureNodePools() - { - return $this->azure_node_pools; - } - - /** - * A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resources in the specified `AzureCluster`. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pools = 1; - * @param array<\Google\Cloud\GkeMultiCloud\V1\AzureNodePool>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAzureNodePools($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AzureNodePool::class); - $this->azure_node_pools = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * 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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingComponentConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingComponentConfig.php deleted file mode 100644 index 422fc56a7d5e..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingComponentConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.LoggingComponentConfig - */ -class LoggingComponentConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The components to be enabled. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; - */ - private $enable_components; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $enable_components - * The components to be enabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); - parent::__construct($data); - } - - /** - * The components to be enabled. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEnableComponents() - { - return $this->enable_components; - } - - /** - * The components to be enabled. - * - * Generated from protobuf field repeated .google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component enable_components = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEnableComponents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\GkeMultiCloud\V1\LoggingComponentConfig\Component::class); - $this->enable_components = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingComponentConfig/Component.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingComponentConfig/Component.php deleted file mode 100644 index 7bbb2b8b88ac..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingComponentConfig/Component.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component - */ -class Component -{ - /** - * No component is specified - * - * Generated from protobuf enum COMPONENT_UNSPECIFIED = 0; - */ - const COMPONENT_UNSPECIFIED = 0; - /** - * This indicates that system logging components is enabled. - * - * Generated from protobuf enum SYSTEM_COMPONENTS = 1; - */ - const SYSTEM_COMPONENTS = 1; - /** - * This indicates that user workload logging component is enabled. - * - * Generated from protobuf enum WORKLOADS = 2; - */ - const WORKLOADS = 2; - - private static $valueToName = [ - self::COMPONENT_UNSPECIFIED => 'COMPONENT_UNSPECIFIED', - self::SYSTEM_COMPONENTS => 'SYSTEM_COMPONENTS', - self::WORKLOADS => 'WORKLOADS', - ]; - - 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(Component::class, \Google\Cloud\GkeMultiCloud\V1\LoggingComponentConfig_Component::class); - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingConfig.php deleted file mode 100644 index 85b0a7595ebf..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/LoggingConfig.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.gkemulticloud.v1.LoggingConfig - */ -class LoggingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The configuration of the logging components; - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; - */ - protected $component_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeMultiCloud\V1\LoggingComponentConfig $component_config - * The configuration of the logging components; - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); - parent::__construct($data); - } - - /** - * The configuration of the logging components; - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; - * @return \Google\Cloud\GkeMultiCloud\V1\LoggingComponentConfig|null - */ - public function getComponentConfig() - { - return $this->component_config; - } - - public function hasComponentConfig() - { - return isset($this->component_config); - } - - public function clearComponentConfig() - { - unset($this->component_config); - } - - /** - * The configuration of the logging components; - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.LoggingComponentConfig component_config = 1; - * @param \Google\Cloud\GkeMultiCloud\V1\LoggingComponentConfig $var - * @return $this - */ - public function setComponentConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\LoggingComponentConfig::class); - $this->component_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ManagedPrometheusConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ManagedPrometheusConfig.php deleted file mode 100644 index c3f7e469972b..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ManagedPrometheusConfig.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.gkemulticloud.v1.ManagedPrometheusConfig - */ -class ManagedPrometheusConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Enable Managed Collection. - * - * Generated from protobuf field bool enabled = 1; - */ - protected $enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * Enable Managed Collection. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); - parent::__construct($data); - } - - /** - * Enable Managed Collection. - * - * Generated from protobuf field bool enabled = 1; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Enable Managed Collection. - * - * Generated from protobuf field bool enabled = 1; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MaxPodsConstraint.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MaxPodsConstraint.php deleted file mode 100644 index abbd020c984a..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MaxPodsConstraint.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.MaxPodsConstraint - */ -class MaxPodsConstraint extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The maximum number of pods to schedule on a single node. - * - * Generated from protobuf field int64 max_pods_per_node = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $max_pods_per_node = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $max_pods_per_node - * Required. The maximum number of pods to schedule on a single node. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The maximum number of pods to schedule on a single node. - * - * Generated from protobuf field int64 max_pods_per_node = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int|string - */ - public function getMaxPodsPerNode() - { - return $this->max_pods_per_node; - } - - /** - * Required. The maximum number of pods to schedule on a single node. - * - * Generated from protobuf field int64 max_pods_per_node = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int|string $var - * @return $this - */ - public function setMaxPodsPerNode($var) - { - GPBUtil::checkInt64($var); - $this->max_pods_per_node = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MonitoringConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MonitoringConfig.php deleted file mode 100644 index a6b9a2e0a799..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/MonitoringConfig.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.gkemulticloud.v1.MonitoringConfig - */ -class MonitoringConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Enable Google Cloud Managed Service for Prometheus in the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.ManagedPrometheusConfig managed_prometheus_config = 2; - */ - protected $managed_prometheus_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeMultiCloud\V1\ManagedPrometheusConfig $managed_prometheus_config - * Enable Google Cloud Managed Service for Prometheus in the cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); - parent::__construct($data); - } - - /** - * Enable Google Cloud Managed Service for Prometheus in the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.ManagedPrometheusConfig managed_prometheus_config = 2; - * @return \Google\Cloud\GkeMultiCloud\V1\ManagedPrometheusConfig|null - */ - public function getManagedPrometheusConfig() - { - return $this->managed_prometheus_config; - } - - public function hasManagedPrometheusConfig() - { - return isset($this->managed_prometheus_config); - } - - public function clearManagedPrometheusConfig() - { - unset($this->managed_prometheus_config); - } - - /** - * Enable Google Cloud Managed Service for Prometheus in the cluster. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.ManagedPrometheusConfig managed_prometheus_config = 2; - * @param \Google\Cloud\GkeMultiCloud\V1\ManagedPrometheusConfig $var - * @return $this - */ - public function setManagedPrometheusConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\ManagedPrometheusConfig::class); - $this->managed_prometheus_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeKubeletConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeKubeletConfig.php deleted file mode 100644 index 12e9c4b56475..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeKubeletConfig.php +++ /dev/null @@ -1,335 +0,0 @@ -google.cloud.gkemulticloud.v1.NodeKubeletConfig - */ -class NodeKubeletConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Enable the insecure kubelet read only port. - * - * Generated from protobuf field bool insecure_kubelet_readonly_port_enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $insecure_kubelet_readonly_port_enabled = false; - /** - * Optional. Control the CPU management policy on the node. - * See - * https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/ - * The following values are allowed. - * * "none": the default, which represents the existing scheduling behavior. - * * "static": allows pods with certain resource characteristics to be granted - * increased CPU affinity and exclusivity on the node. - * The default value is 'none' if unspecified. - * - * Generated from protobuf field optional string cpu_manager_policy = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cpu_manager_policy = null; - /** - * Optional. Enable CPU CFS quota enforcement for containers that specify CPU - * limits. - * This option is enabled by default which makes kubelet use CFS quota - * (https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt) to - * enforce container CPU limits. Otherwise, CPU limits will not be enforced at - * all. - * Disable this option to mitigate CPU throttling problems while still having - * your pods to be in Guaranteed QoS class by specifying the CPU limits. - * The default value is 'true' if unspecified. - * - * Generated from protobuf field optional bool cpu_cfs_quota = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cpu_cfs_quota = null; - /** - * Optional. Set the CPU CFS quota period value 'cpu.cfs_period_us'. - * The string must be a sequence of decimal numbers, each with optional - * fraction and a unit suffix, such as "300ms". - * Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". - * The value must be a positive duration. - * The default value is '100ms' if unspecified. - * - * Generated from protobuf field optional string cpu_cfs_quota_period = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cpu_cfs_quota_period = null; - /** - * Optional. Set the Pod PID limits. See - * https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits - * Controls the maximum number of processes allowed to run in a pod. The value - * must be greater than or equal to 1024 and less than 4194304. - * - * Generated from protobuf field optional int64 pod_pids_limit = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $pod_pids_limit = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $insecure_kubelet_readonly_port_enabled - * Optional. Enable the insecure kubelet read only port. - * @type string $cpu_manager_policy - * Optional. Control the CPU management policy on the node. - * See - * https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/ - * The following values are allowed. - * * "none": the default, which represents the existing scheduling behavior. - * * "static": allows pods with certain resource characteristics to be granted - * increased CPU affinity and exclusivity on the node. - * The default value is 'none' if unspecified. - * @type bool $cpu_cfs_quota - * Optional. Enable CPU CFS quota enforcement for containers that specify CPU - * limits. - * This option is enabled by default which makes kubelet use CFS quota - * (https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt) to - * enforce container CPU limits. Otherwise, CPU limits will not be enforced at - * all. - * Disable this option to mitigate CPU throttling problems while still having - * your pods to be in Guaranteed QoS class by specifying the CPU limits. - * The default value is 'true' if unspecified. - * @type string $cpu_cfs_quota_period - * Optional. Set the CPU CFS quota period value 'cpu.cfs_period_us'. - * The string must be a sequence of decimal numbers, each with optional - * fraction and a unit suffix, such as "300ms". - * Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". - * The value must be a positive duration. - * The default value is '100ms' if unspecified. - * @type int|string $pod_pids_limit - * Optional. Set the Pod PID limits. See - * https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits - * Controls the maximum number of processes allowed to run in a pod. The value - * must be greater than or equal to 1024 and less than 4194304. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Enable the insecure kubelet read only port. - * - * Generated from protobuf field bool insecure_kubelet_readonly_port_enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getInsecureKubeletReadonlyPortEnabled() - { - return $this->insecure_kubelet_readonly_port_enabled; - } - - /** - * Optional. Enable the insecure kubelet read only port. - * - * Generated from protobuf field bool insecure_kubelet_readonly_port_enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setInsecureKubeletReadonlyPortEnabled($var) - { - GPBUtil::checkBool($var); - $this->insecure_kubelet_readonly_port_enabled = $var; - - return $this; - } - - /** - * Optional. Control the CPU management policy on the node. - * See - * https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/ - * The following values are allowed. - * * "none": the default, which represents the existing scheduling behavior. - * * "static": allows pods with certain resource characteristics to be granted - * increased CPU affinity and exclusivity on the node. - * The default value is 'none' if unspecified. - * - * Generated from protobuf field optional string cpu_manager_policy = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCpuManagerPolicy() - { - return isset($this->cpu_manager_policy) ? $this->cpu_manager_policy : ''; - } - - public function hasCpuManagerPolicy() - { - return isset($this->cpu_manager_policy); - } - - public function clearCpuManagerPolicy() - { - unset($this->cpu_manager_policy); - } - - /** - * Optional. Control the CPU management policy on the node. - * See - * https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/ - * The following values are allowed. - * * "none": the default, which represents the existing scheduling behavior. - * * "static": allows pods with certain resource characteristics to be granted - * increased CPU affinity and exclusivity on the node. - * The default value is 'none' if unspecified. - * - * Generated from protobuf field optional string cpu_manager_policy = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCpuManagerPolicy($var) - { - GPBUtil::checkString($var, True); - $this->cpu_manager_policy = $var; - - return $this; - } - - /** - * Optional. Enable CPU CFS quota enforcement for containers that specify CPU - * limits. - * This option is enabled by default which makes kubelet use CFS quota - * (https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt) to - * enforce container CPU limits. Otherwise, CPU limits will not be enforced at - * all. - * Disable this option to mitigate CPU throttling problems while still having - * your pods to be in Guaranteed QoS class by specifying the CPU limits. - * The default value is 'true' if unspecified. - * - * Generated from protobuf field optional bool cpu_cfs_quota = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getCpuCfsQuota() - { - return isset($this->cpu_cfs_quota) ? $this->cpu_cfs_quota : false; - } - - public function hasCpuCfsQuota() - { - return isset($this->cpu_cfs_quota); - } - - public function clearCpuCfsQuota() - { - unset($this->cpu_cfs_quota); - } - - /** - * Optional. Enable CPU CFS quota enforcement for containers that specify CPU - * limits. - * This option is enabled by default which makes kubelet use CFS quota - * (https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt) to - * enforce container CPU limits. Otherwise, CPU limits will not be enforced at - * all. - * Disable this option to mitigate CPU throttling problems while still having - * your pods to be in Guaranteed QoS class by specifying the CPU limits. - * The default value is 'true' if unspecified. - * - * Generated from protobuf field optional bool cpu_cfs_quota = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setCpuCfsQuota($var) - { - GPBUtil::checkBool($var); - $this->cpu_cfs_quota = $var; - - return $this; - } - - /** - * Optional. Set the CPU CFS quota period value 'cpu.cfs_period_us'. - * The string must be a sequence of decimal numbers, each with optional - * fraction and a unit suffix, such as "300ms". - * Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". - * The value must be a positive duration. - * The default value is '100ms' if unspecified. - * - * Generated from protobuf field optional string cpu_cfs_quota_period = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCpuCfsQuotaPeriod() - { - return isset($this->cpu_cfs_quota_period) ? $this->cpu_cfs_quota_period : ''; - } - - public function hasCpuCfsQuotaPeriod() - { - return isset($this->cpu_cfs_quota_period); - } - - public function clearCpuCfsQuotaPeriod() - { - unset($this->cpu_cfs_quota_period); - } - - /** - * Optional. Set the CPU CFS quota period value 'cpu.cfs_period_us'. - * The string must be a sequence of decimal numbers, each with optional - * fraction and a unit suffix, such as "300ms". - * Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". - * The value must be a positive duration. - * The default value is '100ms' if unspecified. - * - * Generated from protobuf field optional string cpu_cfs_quota_period = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCpuCfsQuotaPeriod($var) - { - GPBUtil::checkString($var, True); - $this->cpu_cfs_quota_period = $var; - - return $this; - } - - /** - * Optional. Set the Pod PID limits. See - * https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits - * Controls the maximum number of processes allowed to run in a pod. The value - * must be greater than or equal to 1024 and less than 4194304. - * - * Generated from protobuf field optional int64 pod_pids_limit = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getPodPidsLimit() - { - return isset($this->pod_pids_limit) ? $this->pod_pids_limit : 0; - } - - public function hasPodPidsLimit() - { - return isset($this->pod_pids_limit); - } - - public function clearPodPidsLimit() - { - unset($this->pod_pids_limit); - } - - /** - * Optional. Set the Pod PID limits. See - * https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits - * Controls the maximum number of processes allowed to run in a pod. The value - * must be greater than or equal to 1024 and less than 4194304. - * - * Generated from protobuf field optional int64 pod_pids_limit = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setPodPidsLimit($var) - { - GPBUtil::checkInt64($var); - $this->pod_pids_limit = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeTaint.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeTaint.php deleted file mode 100644 index 3008c9dd75ef..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeTaint.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.gkemulticloud.v1.NodeTaint - */ -class NodeTaint extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Key for the taint. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $key = ''; - /** - * Required. Value for the taint. - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $value = ''; - /** - * Required. The taint effect. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.NodeTaint.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $effect = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * Required. Key for the taint. - * @type string $value - * Required. Value for the taint. - * @type int $effect - * Required. The taint effect. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Key for the taint. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * Required. Key for the taint. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * Required. Value for the taint. - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Required. Value for the taint. - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - - /** - * Required. The taint effect. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.NodeTaint.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getEffect() - { - return $this->effect; - } - - /** - * Required. The taint effect. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.NodeTaint.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setEffect($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\NodeTaint\Effect::class); - $this->effect = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeTaint/Effect.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeTaint/Effect.php deleted file mode 100644 index e91ecf54c3c1..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/NodeTaint/Effect.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.gkemulticloud.v1.NodeTaint.Effect - */ -class Effect -{ - /** - * Not set. - * - * Generated from protobuf enum EFFECT_UNSPECIFIED = 0; - */ - const EFFECT_UNSPECIFIED = 0; - /** - * Do not allow new pods to schedule onto the node unless they tolerate the - * taint, but allow all pods submitted to Kubelet without going through the - * scheduler to start, and allow all already-running pods to continue - * running. Enforced by the scheduler. - * - * Generated from protobuf enum NO_SCHEDULE = 1; - */ - const NO_SCHEDULE = 1; - /** - * Like TaintEffectNoSchedule, but the scheduler tries not to schedule - * new pods onto the node, rather than prohibiting new pods from scheduling - * onto the node entirely. Enforced by the scheduler. - * - * Generated from protobuf enum PREFER_NO_SCHEDULE = 2; - */ - const PREFER_NO_SCHEDULE = 2; - /** - * Evict any already-running pods that do not tolerate the taint. - * Currently enforced by NodeController. - * - * Generated from protobuf enum NO_EXECUTE = 3; - */ - const NO_EXECUTE = 3; - - private static $valueToName = [ - self::EFFECT_UNSPECIFIED => 'EFFECT_UNSPECIFIED', - self::NO_SCHEDULE => 'NO_SCHEDULE', - self::PREFER_NO_SCHEDULE => 'PREFER_NO_SCHEDULE', - self::NO_EXECUTE => 'NO_EXECUTE', - ]; - - 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(Effect::class, \Google\Cloud\GkeMultiCloud\V1\NodeTaint_Effect::class); - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/OperationMetadata.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/OperationMetadata.php deleted file mode 100644 index da707c71cf06..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/OperationMetadata.php +++ /dev/null @@ -1,315 +0,0 @@ -google.cloud.gkemulticloud.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time at which this operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time at which this operation was completed. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. The name of the resource associated to this operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_detail = ''; - /** - * Output only. Human-readable status of any error that occurred during the - * operation. - * - * Generated from protobuf field string error_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error_detail = ''; - /** - * Output only. The verb associated with the API method which triggered this - * operation. Possible values are "create", "delete", "update" and "import". - * - * Generated from protobuf field string verb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Identifies whether it has been requested cancellation - * for the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time at which this operation was completed. - * @type string $target - * Output only. The name of the resource associated to this operation. - * @type string $status_detail - * Output only. Human-readable status of the operation, if any. - * @type string $error_detail - * Output only. Human-readable status of any error that occurred during the - * operation. - * @type string $verb - * Output only. The verb associated with the API method which triggered this - * operation. Possible values are "create", "delete", "update" and "import". - * @type bool $requested_cancellation - * Output only. Identifies whether it has been requested cancellation - * for the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time at which this operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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 operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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 at which this operation was completed. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time at which this operation was completed. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. The name of the resource associated to this operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. The name of the resource associated to this operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusDetail() - { - return $this->status_detail; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusDetail($var) - { - GPBUtil::checkString($var, True); - $this->status_detail = $var; - - return $this; - } - - /** - * Output only. Human-readable status of any error that occurred during the - * operation. - * - * Generated from protobuf field string error_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getErrorDetail() - { - return $this->error_detail; - } - - /** - * Output only. Human-readable status of any error that occurred during the - * operation. - * - * Generated from protobuf field string error_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setErrorDetail($var) - { - GPBUtil::checkString($var, True); - $this->error_detail = $var; - - return $this; - } - - /** - * Output only. The verb associated with the API method which triggered this - * operation. Possible values are "create", "delete", "update" and "import". - * - * Generated from protobuf field string verb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. The verb associated with the API method which triggered this - * operation. Possible values are "create", "delete", "update" and "import". - * - * Generated from protobuf field string verb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Identifies whether it has been requested cancellation - * for the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether it has been requested cancellation - * for the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ReplicaPlacement.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ReplicaPlacement.php deleted file mode 100644 index c78be2466d12..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/ReplicaPlacement.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.gkemulticloud.v1.ReplicaPlacement - */ -class ReplicaPlacement extends \Google\Protobuf\Internal\Message -{ - /** - * Required. For a given replica, the ARM ID of the subnet where the control - * plane VM is deployed. Make sure it's a subnet under the virtual network in - * the cluster configuration. - * - * Generated from protobuf field string subnet_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $subnet_id = ''; - /** - * Required. For a given replica, the Azure availability zone where to - * provision the control plane VM and the ETCD disk. - * - * Generated from protobuf field string azure_availability_zone = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $azure_availability_zone = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $subnet_id - * Required. For a given replica, the ARM ID of the subnet where the control - * plane VM is deployed. Make sure it's a subnet under the virtual network in - * the cluster configuration. - * @type string $azure_availability_zone - * Required. For a given replica, the Azure availability zone where to - * provision the control plane VM and the ETCD disk. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. For a given replica, the ARM ID of the subnet where the control - * plane VM is deployed. Make sure it's a subnet under the virtual network in - * the cluster configuration. - * - * Generated from protobuf field string subnet_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSubnetId() - { - return $this->subnet_id; - } - - /** - * Required. For a given replica, the ARM ID of the subnet where the control - * plane VM is deployed. Make sure it's a subnet under the virtual network in - * the cluster configuration. - * - * Generated from protobuf field string subnet_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSubnetId($var) - { - GPBUtil::checkString($var, True); - $this->subnet_id = $var; - - return $this; - } - - /** - * Required. For a given replica, the Azure availability zone where to - * provision the control plane VM and the ETCD disk. - * - * Generated from protobuf field string azure_availability_zone = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAzureAvailabilityZone() - { - return $this->azure_availability_zone; - } - - /** - * Required. For a given replica, the Azure availability zone where to - * provision the control plane VM and the ETCD disk. - * - * Generated from protobuf field string azure_availability_zone = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAzureAvailabilityZone($var) - { - GPBUtil::checkString($var, True); - $this->azure_availability_zone = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/RollbackAwsNodePoolUpdateRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/RollbackAwsNodePoolUpdateRequest.php deleted file mode 100644 index 6d5b8a8bbc0d..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/RollbackAwsNodePoolUpdateRequest.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.gkemulticloud.v1.RollbackAwsNodePoolUpdateRequest - */ -class RollbackAwsNodePoolUpdateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to - * rollback. - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Option for rollback to ignore the PodDisruptionBudget when - * draining the node pool nodes. Default value is false. - * - * Generated from protobuf field bool respect_pdb = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $respect_pdb = false; - - /** - * @param string $name Required. The name of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to - * rollback. - * - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsNodePoolName()} for help formatting this field. - * - * @return \Google\Cloud\GkeMultiCloud\V1\RollbackAwsNodePoolUpdateRequest - * - * @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 of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to - * rollback. - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @type bool $respect_pdb - * Optional. Option for rollback to ignore the PodDisruptionBudget when - * draining the node pool nodes. Default value is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to - * rollback. - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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 of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to - * rollback. - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * - * 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. Option for rollback to ignore the PodDisruptionBudget when - * draining the node pool nodes. Default value is false. - * - * Generated from protobuf field bool respect_pdb = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getRespectPdb() - { - return $this->respect_pdb; - } - - /** - * Optional. Option for rollback to ignore the PodDisruptionBudget when - * draining the node pool nodes. Default value is false. - * - * Generated from protobuf field bool respect_pdb = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setRespectPdb($var) - { - GPBUtil::checkBool($var); - $this->respect_pdb = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SecurityPostureConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SecurityPostureConfig.php deleted file mode 100644 index 58591f498820..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SecurityPostureConfig.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.gkemulticloud.v1.SecurityPostureConfig - */ -class SecurityPostureConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Sets which mode to use for vulnerability scanning. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.SecurityPostureConfig.VulnerabilityMode vulnerability_mode = 1; - */ - protected $vulnerability_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $vulnerability_mode - * Sets which mode to use for vulnerability scanning. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); - parent::__construct($data); - } - - /** - * Sets which mode to use for vulnerability scanning. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.SecurityPostureConfig.VulnerabilityMode vulnerability_mode = 1; - * @return int - */ - public function getVulnerabilityMode() - { - return $this->vulnerability_mode; - } - - /** - * Sets which mode to use for vulnerability scanning. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.SecurityPostureConfig.VulnerabilityMode vulnerability_mode = 1; - * @param int $var - * @return $this - */ - public function setVulnerabilityMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\SecurityPostureConfig\VulnerabilityMode::class); - $this->vulnerability_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SecurityPostureConfig/VulnerabilityMode.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SecurityPostureConfig/VulnerabilityMode.php deleted file mode 100644 index d9277afa64f1..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SecurityPostureConfig/VulnerabilityMode.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.gkemulticloud.v1.SecurityPostureConfig.VulnerabilityMode - */ -class VulnerabilityMode -{ - /** - * Default value not specified. - * - * Generated from protobuf enum VULNERABILITY_MODE_UNSPECIFIED = 0; - */ - const VULNERABILITY_MODE_UNSPECIFIED = 0; - /** - * Disables vulnerability scanning on the cluster. - * - * Generated from protobuf enum VULNERABILITY_DISABLED = 1; - */ - const VULNERABILITY_DISABLED = 1; - /** - * Applies the Security Posture's vulnerability on cluster Enterprise level - * features. - * - * Generated from protobuf enum VULNERABILITY_ENTERPRISE = 2; - */ - const VULNERABILITY_ENTERPRISE = 2; - - private static $valueToName = [ - self::VULNERABILITY_MODE_UNSPECIFIED => 'VULNERABILITY_MODE_UNSPECIFIED', - self::VULNERABILITY_DISABLED => 'VULNERABILITY_DISABLED', - self::VULNERABILITY_ENTERPRISE => 'VULNERABILITY_ENTERPRISE', - ]; - - 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(VulnerabilityMode::class, \Google\Cloud\GkeMultiCloud\V1\SecurityPostureConfig_VulnerabilityMode::class); - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SpotConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SpotConfig.php deleted file mode 100644 index b618a0428969..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SpotConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkemulticloud.v1.SpotConfig - */ -class SpotConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A list of instance types for creating spot node pool. - * - * Generated from protobuf field repeated string instance_types = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $instance_types; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $instance_types - * Required. A list of instance types for creating spot node pool. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. A list of instance types for creating spot node pool. - * - * Generated from protobuf field repeated string instance_types = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstanceTypes() - { - return $this->instance_types; - } - - /** - * Required. A list of instance types for creating spot node pool. - * - * Generated from protobuf field repeated string instance_types = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstanceTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->instance_types = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SurgeSettings.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SurgeSettings.php deleted file mode 100644 index 80494e596f75..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/SurgeSettings.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.gkemulticloud.v1.SurgeSettings - */ -class SurgeSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The maximum number of nodes that can be created beyond the - * current size of the node pool during the update process. - * - * Generated from protobuf field int32 max_surge = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_surge = 0; - /** - * Optional. The maximum number of nodes that can be simultaneously - * unavailable during the update process. A node is considered unavailable if - * its status is not Ready. - * - * Generated from protobuf field int32 max_unavailable = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_unavailable = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $max_surge - * Optional. The maximum number of nodes that can be created beyond the - * current size of the node pool during the update process. - * @type int $max_unavailable - * Optional. The maximum number of nodes that can be simultaneously - * unavailable during the update process. A node is considered unavailable if - * its status is not Ready. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The maximum number of nodes that can be created beyond the - * current size of the node pool during the update process. - * - * Generated from protobuf field int32 max_surge = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxSurge() - { - return $this->max_surge; - } - - /** - * Optional. The maximum number of nodes that can be created beyond the - * current size of the node pool during the update process. - * - * Generated from protobuf field int32 max_surge = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxSurge($var) - { - GPBUtil::checkInt32($var); - $this->max_surge = $var; - - return $this; - } - - /** - * Optional. The maximum number of nodes that can be simultaneously - * unavailable during the update process. A node is considered unavailable if - * its status is not Ready. - * - * Generated from protobuf field int32 max_unavailable = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxUnavailable() - { - return $this->max_unavailable; - } - - /** - * Optional. The maximum number of nodes that can be simultaneously - * unavailable during the update process. A node is considered unavailable if - * its status is not Ready. - * - * Generated from protobuf field int32 max_unavailable = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxUnavailable($var) - { - GPBUtil::checkInt32($var); - $this->max_unavailable = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAttachedClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAttachedClusterRequest.php deleted file mode 100644 index 8464aba0b296..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAttachedClusterRequest.php +++ /dev/null @@ -1,251 +0,0 @@ -google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest - */ -class UpdateAttachedClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster attached_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $attached_cluster = null; - /** - * If set, only validate the request, but do not actually update the cluster. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: - * * `annotations`. - * * `authorization.admin_groups`. - * * `authorization.admin_users`. - * * `binary_authorization.evaluation_mode`. - * * `description`. - * * `logging_config.component_config.enable_components`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * * `platform_version`. - * * `proxy_config.kubernetes_secret.name`. - * * `proxy_config.kubernetes_secret.namespace`. - * * `security_posture_config.vulnerability_mode` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\GkeMultiCloud\V1\AttachedCluster $attachedCluster Required. The - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: - * - * * `annotations`. - * * `authorization.admin_groups`. - * * `authorization.admin_users`. - * * `binary_authorization.evaluation_mode`. - * * `description`. - * * `logging_config.component_config.enable_components`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * * `platform_version`. - * * `proxy_config.kubernetes_secret.name`. - * * `proxy_config.kubernetes_secret.namespace`. - * * `security_posture_config.vulnerability_mode` - * - * @return \Google\Cloud\GkeMultiCloud\V1\UpdateAttachedClusterRequest - * - * @experimental - */ - public static function build(\Google\Cloud\GkeMultiCloud\V1\AttachedCluster $attachedCluster, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAttachedCluster($attachedCluster) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeMultiCloud\V1\AttachedCluster $attached_cluster - * Required. The - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * to update. - * @type bool $validate_only - * If set, only validate the request, but do not actually update the cluster. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: - * * `annotations`. - * * `authorization.admin_groups`. - * * `authorization.admin_users`. - * * `binary_authorization.evaluation_mode`. - * * `description`. - * * `logging_config.component_config.enable_components`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * * `platform_version`. - * * `proxy_config.kubernetes_secret.name`. - * * `proxy_config.kubernetes_secret.namespace`. - * * `security_posture_config.vulnerability_mode` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster attached_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AttachedCluster|null - */ - public function getAttachedCluster() - { - return $this->attached_cluster; - } - - public function hasAttachedCluster() - { - return isset($this->attached_cluster); - } - - public function clearAttachedCluster() - { - unset($this->attached_cluster); - } - - /** - * Required. The - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AttachedCluster attached_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AttachedCluster $var - * @return $this - */ - public function setAttachedCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AttachedCluster::class); - $this->attached_cluster = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually update the cluster. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually update the cluster. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: - * * `annotations`. - * * `authorization.admin_groups`. - * * `authorization.admin_users`. - * * `binary_authorization.evaluation_mode`. - * * `description`. - * * `logging_config.component_config.enable_components`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * * `platform_version`. - * * `proxy_config.kubernetes_secret.name`. - * * `proxy_config.kubernetes_secret.namespace`. - * * `security_posture_config.vulnerability_mode` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: - * * `annotations`. - * * `authorization.admin_groups`. - * * `authorization.admin_users`. - * * `binary_authorization.evaluation_mode`. - * * `description`. - * * `logging_config.component_config.enable_components`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * * `platform_version`. - * * `proxy_config.kubernetes_secret.name`. - * * `proxy_config.kubernetes_secret.namespace`. - * * `security_posture_config.vulnerability_mode` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAwsClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAwsClusterRequest.php deleted file mode 100644 index 401b27d1d3e5..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAwsClusterRequest.php +++ /dev/null @@ -1,321 +0,0 @@ -google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest - */ -class UpdateAwsClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $aws_cluster = null; - /** - * If set, only validate the request, but do not actually update the cluster. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]: - * * `description`. - * * `annotations`. - * * `control_plane.version`. - * * `authorization.admin_users`. - * * `authorization.admin_groups`. - * * `binary_authorization.evaluation_mode`. - * * `control_plane.aws_services_authentication.role_arn`. - * * `control_plane.aws_services_authentication.role_session_name`. - * * `control_plane.config_encryption.kms_key_arn`. - * * `control_plane.instance_type`. - * * `control_plane.security_group_ids`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.secret_arn`. - * * `control_plane.proxy_config.secret_version`. - * * `control_plane.root_volume.size_gib`. - * * `control_plane.root_volume.volume_type`. - * * `control_plane.root_volume.iops`. - * * `control_plane.root_volume.throughput`. - * * `control_plane.root_volume.kms_key_arn`. - * * `control_plane.ssh_config`. - * * `control_plane.ssh_config.ec2_key_pair`. - * * `control_plane.instance_placement.tenancy`. - * * `control_plane.iam_instance_profile`. - * * `logging_config.component_config.enable_components`. - * * `control_plane.tags`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * * `networking.per_node_pool_sg_rules_disabled`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\GkeMultiCloud\V1\AwsCluster $awsCluster Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]: - * - * * `description`. - * * `annotations`. - * * `control_plane.version`. - * * `authorization.admin_users`. - * * `authorization.admin_groups`. - * * `binary_authorization.evaluation_mode`. - * * `control_plane.aws_services_authentication.role_arn`. - * * `control_plane.aws_services_authentication.role_session_name`. - * * `control_plane.config_encryption.kms_key_arn`. - * * `control_plane.instance_type`. - * * `control_plane.security_group_ids`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.secret_arn`. - * * `control_plane.proxy_config.secret_version`. - * * `control_plane.root_volume.size_gib`. - * * `control_plane.root_volume.volume_type`. - * * `control_plane.root_volume.iops`. - * * `control_plane.root_volume.throughput`. - * * `control_plane.root_volume.kms_key_arn`. - * * `control_plane.ssh_config`. - * * `control_plane.ssh_config.ec2_key_pair`. - * * `control_plane.instance_placement.tenancy`. - * * `control_plane.iam_instance_profile`. - * * `logging_config.component_config.enable_components`. - * * `control_plane.tags`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * * `networking.per_node_pool_sg_rules_disabled`. - * - * @return \Google\Cloud\GkeMultiCloud\V1\UpdateAwsClusterRequest - * - * @experimental - */ - public static function build(\Google\Cloud\GkeMultiCloud\V1\AwsCluster $awsCluster, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAwsCluster($awsCluster) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeMultiCloud\V1\AwsCluster $aws_cluster - * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource to update. - * @type bool $validate_only - * If set, only validate the request, but do not actually update the cluster. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]: - * * `description`. - * * `annotations`. - * * `control_plane.version`. - * * `authorization.admin_users`. - * * `authorization.admin_groups`. - * * `binary_authorization.evaluation_mode`. - * * `control_plane.aws_services_authentication.role_arn`. - * * `control_plane.aws_services_authentication.role_session_name`. - * * `control_plane.config_encryption.kms_key_arn`. - * * `control_plane.instance_type`. - * * `control_plane.security_group_ids`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.secret_arn`. - * * `control_plane.proxy_config.secret_version`. - * * `control_plane.root_volume.size_gib`. - * * `control_plane.root_volume.volume_type`. - * * `control_plane.root_volume.iops`. - * * `control_plane.root_volume.throughput`. - * * `control_plane.root_volume.kms_key_arn`. - * * `control_plane.ssh_config`. - * * `control_plane.ssh_config.ec2_key_pair`. - * * `control_plane.instance_placement.tenancy`. - * * `control_plane.iam_instance_profile`. - * * `logging_config.component_config.enable_components`. - * * `control_plane.tags`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * * `networking.per_node_pool_sg_rules_disabled`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsCluster|null - */ - public function getAwsCluster() - { - return $this->aws_cluster; - } - - public function hasAwsCluster() - { - return isset($this->aws_cluster); - } - - public function clearAwsCluster() - { - unset($this->aws_cluster); - } - - /** - * Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsCluster aws_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsCluster $var - * @return $this - */ - public function setAwsCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsCluster::class); - $this->aws_cluster = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually update the cluster. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually update the cluster. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]: - * * `description`. - * * `annotations`. - * * `control_plane.version`. - * * `authorization.admin_users`. - * * `authorization.admin_groups`. - * * `binary_authorization.evaluation_mode`. - * * `control_plane.aws_services_authentication.role_arn`. - * * `control_plane.aws_services_authentication.role_session_name`. - * * `control_plane.config_encryption.kms_key_arn`. - * * `control_plane.instance_type`. - * * `control_plane.security_group_ids`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.secret_arn`. - * * `control_plane.proxy_config.secret_version`. - * * `control_plane.root_volume.size_gib`. - * * `control_plane.root_volume.volume_type`. - * * `control_plane.root_volume.iops`. - * * `control_plane.root_volume.throughput`. - * * `control_plane.root_volume.kms_key_arn`. - * * `control_plane.ssh_config`. - * * `control_plane.ssh_config.ec2_key_pair`. - * * `control_plane.instance_placement.tenancy`. - * * `control_plane.iam_instance_profile`. - * * `logging_config.component_config.enable_components`. - * * `control_plane.tags`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * * `networking.per_node_pool_sg_rules_disabled`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.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. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]: - * * `description`. - * * `annotations`. - * * `control_plane.version`. - * * `authorization.admin_users`. - * * `authorization.admin_groups`. - * * `binary_authorization.evaluation_mode`. - * * `control_plane.aws_services_authentication.role_arn`. - * * `control_plane.aws_services_authentication.role_session_name`. - * * `control_plane.config_encryption.kms_key_arn`. - * * `control_plane.instance_type`. - * * `control_plane.security_group_ids`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.secret_arn`. - * * `control_plane.proxy_config.secret_version`. - * * `control_plane.root_volume.size_gib`. - * * `control_plane.root_volume.volume_type`. - * * `control_plane.root_volume.iops`. - * * `control_plane.root_volume.throughput`. - * * `control_plane.root_volume.kms_key_arn`. - * * `control_plane.ssh_config`. - * * `control_plane.ssh_config.ec2_key_pair`. - * * `control_plane.instance_placement.tenancy`. - * * `control_plane.iam_instance_profile`. - * * `logging_config.component_config.enable_components`. - * * `control_plane.tags`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * * `networking.per_node_pool_sg_rules_disabled`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAwsNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAwsNodePoolRequest.php deleted file mode 100644 index e118a1b99de6..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAwsNodePoolRequest.php +++ /dev/null @@ -1,336 +0,0 @@ -google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest - */ -class UpdateAwsNodePoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $aws_node_pool = null; - /** - * If set, only validate the request, but don't actually update the node pool. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]: - * * `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.config_encryption.kms_key_arn`. - * * `config.security_group_ids`. - * * `config.root_volume.iops`. - * * `config.root_volume.throughput`. - * * `config.root_volume.kms_key_arn`. - * * `config.root_volume.volume_type`. - * * `config.root_volume.size_gib`. - * * `config.proxy_config`. - * * `config.proxy_config.secret_arn`. - * * `config.proxy_config.secret_version`. - * * `config.ssh_config`. - * * `config.ssh_config.ec2_key_pair`. - * * `config.instance_placement.tenancy`. - * * `config.iam_instance_profile`. - * * `config.labels`. - * * `config.tags`. - * * `config.autoscaling_metrics_collection`. - * * `config.autoscaling_metrics_collection.granularity`. - * * `config.autoscaling_metrics_collection.metrics`. - * * `config.instance_type`. - * * `management.auto_repair`. - * * `management`. - * * `update_settings`. - * * `update_settings.surge_settings`. - * * `update_settings.surge_settings.max_surge`. - * * `update_settings.surge_settings.max_unavailable`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodePool $awsNodePool Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resource to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]: - * - * * `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.config_encryption.kms_key_arn`. - * * `config.security_group_ids`. - * * `config.root_volume.iops`. - * * `config.root_volume.throughput`. - * * `config.root_volume.kms_key_arn`. - * * `config.root_volume.volume_type`. - * * `config.root_volume.size_gib`. - * * `config.proxy_config`. - * * `config.proxy_config.secret_arn`. - * * `config.proxy_config.secret_version`. - * * `config.ssh_config`. - * * `config.ssh_config.ec2_key_pair`. - * * `config.instance_placement.tenancy`. - * * `config.iam_instance_profile`. - * * `config.labels`. - * * `config.tags`. - * * `config.autoscaling_metrics_collection`. - * * `config.autoscaling_metrics_collection.granularity`. - * * `config.autoscaling_metrics_collection.metrics`. - * * `config.instance_type`. - * * `management.auto_repair`. - * * `management`. - * * `update_settings`. - * * `update_settings.surge_settings`. - * * `update_settings.surge_settings.max_surge`. - * * `update_settings.surge_settings.max_unavailable`. - * - * @return \Google\Cloud\GkeMultiCloud\V1\UpdateAwsNodePoolRequest - * - * @experimental - */ - public static function build(\Google\Cloud\GkeMultiCloud\V1\AwsNodePool $awsNodePool, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAwsNodePool($awsNodePool) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeMultiCloud\V1\AwsNodePool $aws_node_pool - * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resource to update. - * @type bool $validate_only - * If set, only validate the request, but don't actually update the node pool. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]: - * * `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.config_encryption.kms_key_arn`. - * * `config.security_group_ids`. - * * `config.root_volume.iops`. - * * `config.root_volume.throughput`. - * * `config.root_volume.kms_key_arn`. - * * `config.root_volume.volume_type`. - * * `config.root_volume.size_gib`. - * * `config.proxy_config`. - * * `config.proxy_config.secret_arn`. - * * `config.proxy_config.secret_version`. - * * `config.ssh_config`. - * * `config.ssh_config.ec2_key_pair`. - * * `config.instance_placement.tenancy`. - * * `config.iam_instance_profile`. - * * `config.labels`. - * * `config.tags`. - * * `config.autoscaling_metrics_collection`. - * * `config.autoscaling_metrics_collection.granularity`. - * * `config.autoscaling_metrics_collection.metrics`. - * * `config.instance_type`. - * * `management.auto_repair`. - * * `management`. - * * `update_settings`. - * * `update_settings.surge_settings`. - * * `update_settings.surge_settings.max_surge`. - * * `update_settings.surge_settings.max_unavailable`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AwsNodePool|null - */ - public function getAwsNodePool() - { - return $this->aws_node_pool; - } - - public function hasAwsNodePool() - { - return isset($this->aws_node_pool); - } - - public function clearAwsNodePool() - { - unset($this->aws_node_pool); - } - - /** - * Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AwsNodePool aws_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodePool $var - * @return $this - */ - public function setAwsNodePool($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsNodePool::class); - $this->aws_node_pool = $var; - - return $this; - } - - /** - * If set, only validate the request, but don't actually update the node pool. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but don't actually update the node pool. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]: - * * `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.config_encryption.kms_key_arn`. - * * `config.security_group_ids`. - * * `config.root_volume.iops`. - * * `config.root_volume.throughput`. - * * `config.root_volume.kms_key_arn`. - * * `config.root_volume.volume_type`. - * * `config.root_volume.size_gib`. - * * `config.proxy_config`. - * * `config.proxy_config.secret_arn`. - * * `config.proxy_config.secret_version`. - * * `config.ssh_config`. - * * `config.ssh_config.ec2_key_pair`. - * * `config.instance_placement.tenancy`. - * * `config.iam_instance_profile`. - * * `config.labels`. - * * `config.tags`. - * * `config.autoscaling_metrics_collection`. - * * `config.autoscaling_metrics_collection.granularity`. - * * `config.autoscaling_metrics_collection.metrics`. - * * `config.instance_type`. - * * `management.auto_repair`. - * * `management`. - * * `update_settings`. - * * `update_settings.surge_settings`. - * * `update_settings.surge_settings.max_surge`. - * * `update_settings.surge_settings.max_unavailable`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]: - * * `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.config_encryption.kms_key_arn`. - * * `config.security_group_ids`. - * * `config.root_volume.iops`. - * * `config.root_volume.throughput`. - * * `config.root_volume.kms_key_arn`. - * * `config.root_volume.volume_type`. - * * `config.root_volume.size_gib`. - * * `config.proxy_config`. - * * `config.proxy_config.secret_arn`. - * * `config.proxy_config.secret_version`. - * * `config.ssh_config`. - * * `config.ssh_config.ec2_key_pair`. - * * `config.instance_placement.tenancy`. - * * `config.iam_instance_profile`. - * * `config.labels`. - * * `config.tags`. - * * `config.autoscaling_metrics_collection`. - * * `config.autoscaling_metrics_collection.granularity`. - * * `config.autoscaling_metrics_collection.metrics`. - * * `config.instance_type`. - * * `management.auto_repair`. - * * `management`. - * * `update_settings`. - * * `update_settings.surge_settings`. - * * `update_settings.surge_settings.max_surge`. - * * `update_settings.surge_settings.max_unavailable`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAzureClusterRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAzureClusterRequest.php deleted file mode 100644 index 19ebd29cfa43..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAzureClusterRequest.php +++ /dev/null @@ -1,271 +0,0 @@ -google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest - */ -class UpdateAzureClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $azure_cluster = null; - /** - * If set, only validate the request, but do not actually update the cluster. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: - * * `description`. - * * `azureClient`. - * * `control_plane.version`. - * * `control_plane.vm_size`. - * * `annotations`. - * * `authorization.admin_users`. - * * `authorization.admin_groups`. - * * `control_plane.root_volume.size_gib`. - * * `azure_services_authentication`. - * * `azure_services_authentication.tenant_id`. - * * `azure_services_authentication.application_id`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.resource_group_id`. - * * `control_plane.proxy_config.secret_id`. - * * `control_plane.ssh_config.authorized_key`. - * * `logging_config.component_config.enable_components` - * * `monitoring_config.managed_prometheus_config.enabled`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\GkeMultiCloud\V1\AzureCluster $azureCluster Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: - * - * * `description`. - * * `azureClient`. - * * `control_plane.version`. - * * `control_plane.vm_size`. - * * `annotations`. - * * `authorization.admin_users`. - * * `authorization.admin_groups`. - * * `control_plane.root_volume.size_gib`. - * * `azure_services_authentication`. - * * `azure_services_authentication.tenant_id`. - * * `azure_services_authentication.application_id`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.resource_group_id`. - * * `control_plane.proxy_config.secret_id`. - * * `control_plane.ssh_config.authorized_key`. - * * `logging_config.component_config.enable_components` - * * `monitoring_config.managed_prometheus_config.enabled`. - * - * @return \Google\Cloud\GkeMultiCloud\V1\UpdateAzureClusterRequest - * - * @experimental - */ - public static function build(\Google\Cloud\GkeMultiCloud\V1\AzureCluster $azureCluster, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAzureCluster($azureCluster) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeMultiCloud\V1\AzureCluster $azure_cluster - * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource to update. - * @type bool $validate_only - * If set, only validate the request, but do not actually update the cluster. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: - * * `description`. - * * `azureClient`. - * * `control_plane.version`. - * * `control_plane.vm_size`. - * * `annotations`. - * * `authorization.admin_users`. - * * `authorization.admin_groups`. - * * `control_plane.root_volume.size_gib`. - * * `azure_services_authentication`. - * * `azure_services_authentication.tenant_id`. - * * `azure_services_authentication.application_id`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.resource_group_id`. - * * `control_plane.proxy_config.secret_id`. - * * `control_plane.ssh_config.authorized_key`. - * * `logging_config.component_config.enable_components` - * * `monitoring_config.managed_prometheus_config.enabled`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureCluster|null - */ - public function getAzureCluster() - { - return $this->azure_cluster; - } - - public function hasAzureCluster() - { - return isset($this->azure_cluster); - } - - public function clearAzureCluster() - { - unset($this->azure_cluster); - } - - /** - * Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureCluster azure_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureCluster $var - * @return $this - */ - public function setAzureCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureCluster::class); - $this->azure_cluster = $var; - - return $this; - } - - /** - * If set, only validate the request, but do not actually update the cluster. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but do not actually update the cluster. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: - * * `description`. - * * `azureClient`. - * * `control_plane.version`. - * * `control_plane.vm_size`. - * * `annotations`. - * * `authorization.admin_users`. - * * `authorization.admin_groups`. - * * `control_plane.root_volume.size_gib`. - * * `azure_services_authentication`. - * * `azure_services_authentication.tenant_id`. - * * `azure_services_authentication.application_id`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.resource_group_id`. - * * `control_plane.proxy_config.secret_id`. - * * `control_plane.ssh_config.authorized_key`. - * * `logging_config.component_config.enable_components` - * * `monitoring_config.managed_prometheus_config.enabled`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.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. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: - * * `description`. - * * `azureClient`. - * * `control_plane.version`. - * * `control_plane.vm_size`. - * * `annotations`. - * * `authorization.admin_users`. - * * `authorization.admin_groups`. - * * `control_plane.root_volume.size_gib`. - * * `azure_services_authentication`. - * * `azure_services_authentication.tenant_id`. - * * `azure_services_authentication.application_id`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.resource_group_id`. - * * `control_plane.proxy_config.secret_id`. - * * `control_plane.ssh_config.authorized_key`. - * * `logging_config.component_config.enable_components` - * * `monitoring_config.managed_prometheus_config.enabled`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAzureNodePoolRequest.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAzureNodePoolRequest.php deleted file mode 100644 index bb297a85b6dd..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateAzureNodePoolRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest - */ -class UpdateAzureNodePoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $azure_node_pool = null; - /** - * If set, only validate the request, but don't actually update the node pool. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]: - * *. `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.ssh_config.authorized_key`. - * * `management.auto_repair`. - * * `management`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $azureNodePool Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resource to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]: - * - * *. `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.ssh_config.authorized_key`. - * * `management.auto_repair`. - * * `management`. - * - * @return \Google\Cloud\GkeMultiCloud\V1\UpdateAzureNodePoolRequest - * - * @experimental - */ - public static function build(\Google\Cloud\GkeMultiCloud\V1\AzureNodePool $azureNodePool, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAzureNodePool($azureNodePool) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $azure_node_pool - * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resource to update. - * @type bool $validate_only - * If set, only validate the request, but don't actually update the node pool. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]: - * *. `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.ssh_config.authorized_key`. - * * `management.auto_repair`. - * * `management`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AzureService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeMultiCloud\V1\AzureNodePool|null - */ - public function getAzureNodePool() - { - return $this->azure_node_pool; - } - - public function hasAzureNodePool() - { - return isset($this->azure_node_pool); - } - - public function clearAzureNodePool() - { - unset($this->azure_node_pool); - } - - /** - * Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resource to update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.AzureNodePool azure_node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeMultiCloud\V1\AzureNodePool $var - * @return $this - */ - public function setAzureNodePool($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AzureNodePool::class); - $this->azure_node_pool = $var; - - return $this; - } - - /** - * If set, only validate the request, but don't actually update the node pool. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, only validate the request, but don't actually update the node pool. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]: - * *. `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.ssh_config.authorized_key`. - * * `management.auto_repair`. - * * `management`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]: - * *. `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.ssh_config.authorized_key`. - * * `management.auto_repair`. - * * `management`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateSettings.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateSettings.php deleted file mode 100644 index 69dd63b604e0..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/UpdateSettings.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.gkemulticloud.v1.UpdateSettings - */ -class UpdateSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Settings for surge update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.SurgeSettings surge_settings = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $surge_settings = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeMultiCloud\V1\SurgeSettings $surge_settings - * Optional. Settings for surge update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Settings for surge update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.SurgeSettings surge_settings = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeMultiCloud\V1\SurgeSettings|null - */ - public function getSurgeSettings() - { - return $this->surge_settings; - } - - public function hasSurgeSettings() - { - return isset($this->surge_settings); - } - - public function clearSurgeSettings() - { - unset($this->surge_settings); - } - - /** - * Optional. Settings for surge update. - * - * Generated from protobuf field .google.cloud.gkemulticloud.v1.SurgeSettings surge_settings = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeMultiCloud\V1\SurgeSettings $var - * @return $this - */ - public function setSurgeSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\SurgeSettings::class); - $this->surge_settings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/WorkloadIdentityConfig.php b/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/WorkloadIdentityConfig.php deleted file mode 100644 index 261f7d8542a3..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/proto/src/Google/Cloud/GkeMultiCloud/V1/WorkloadIdentityConfig.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.gkemulticloud.v1.WorkloadIdentityConfig - */ -class WorkloadIdentityConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The OIDC issuer URL for this cluster. - * - * Generated from protobuf field string issuer_uri = 1; - */ - protected $issuer_uri = ''; - /** - * The Workload Identity Pool associated to the cluster. - * - * Generated from protobuf field string workload_pool = 2; - */ - protected $workload_pool = ''; - /** - * The ID of the OIDC Identity Provider (IdP) associated to the Workload - * Identity Pool. - * - * Generated from protobuf field string identity_provider = 3; - */ - protected $identity_provider = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $issuer_uri - * The OIDC issuer URL for this cluster. - * @type string $workload_pool - * The Workload Identity Pool associated to the cluster. - * @type string $identity_provider - * The ID of the OIDC Identity Provider (IdP) associated to the Workload - * Identity Pool. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkemulticloud\V1\CommonResources::initOnce(); - parent::__construct($data); - } - - /** - * The OIDC issuer URL for this cluster. - * - * Generated from protobuf field string issuer_uri = 1; - * @return string - */ - public function getIssuerUri() - { - return $this->issuer_uri; - } - - /** - * The OIDC issuer URL for this cluster. - * - * Generated from protobuf field string issuer_uri = 1; - * @param string $var - * @return $this - */ - public function setIssuerUri($var) - { - GPBUtil::checkString($var, True); - $this->issuer_uri = $var; - - return $this; - } - - /** - * The Workload Identity Pool associated to the cluster. - * - * Generated from protobuf field string workload_pool = 2; - * @return string - */ - public function getWorkloadPool() - { - return $this->workload_pool; - } - - /** - * The Workload Identity Pool associated to the cluster. - * - * Generated from protobuf field string workload_pool = 2; - * @param string $var - * @return $this - */ - public function setWorkloadPool($var) - { - GPBUtil::checkString($var, True); - $this->workload_pool = $var; - - return $this; - } - - /** - * The ID of the OIDC Identity Provider (IdP) associated to the Workload - * Identity Pool. - * - * Generated from protobuf field string identity_provider = 3; - * @return string - */ - public function getIdentityProvider() - { - return $this->identity_provider; - } - - /** - * The ID of the OIDC Identity Provider (IdP) associated to the Workload - * Identity Pool. - * - * Generated from protobuf field string identity_provider = 3; - * @param string $var - * @return $this - */ - public function setIdentityProvider($var) - { - GPBUtil::checkString($var, True); - $this->identity_provider = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/create_attached_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/create_attached_cluster.php deleted file mode 100644 index b5f876b41d72..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/create_attached_cluster.php +++ /dev/null @@ -1,145 +0,0 @@ -/locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AttachedClustersClient::locationName()} for help formatting this field. - * @param string $attachedClusterPlatformVersion The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * @param string $attachedClusterDistribution The Kubernetes distribution of the underlying attached cluster. - * - * Supported values: ["eks", "aks", "generic"]. - * @param string $attachedClusterFleetProject The name of the Fleet host project where this cluster will be - * registered. - * - * Project names are formatted as - * `projects/`. - * @param string $attachedClusterId A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - */ -function create_attached_cluster_sample( - string $formattedParent, - string $attachedClusterPlatformVersion, - string $attachedClusterDistribution, - string $attachedClusterFleetProject, - string $attachedClusterId -): void { - // Create a client. - $attachedClustersClient = new AttachedClustersClient(); - - // Prepare the request message. - $attachedClusterOidcConfig = new AttachedOidcConfig(); - $attachedClusterFleet = (new Fleet()) - ->setProject($attachedClusterFleetProject); - $attachedCluster = (new AttachedCluster()) - ->setOidcConfig($attachedClusterOidcConfig) - ->setPlatformVersion($attachedClusterPlatformVersion) - ->setDistribution($attachedClusterDistribution) - ->setFleet($attachedClusterFleet); - $request = (new CreateAttachedClusterRequest()) - ->setParent($formattedParent) - ->setAttachedCluster($attachedCluster) - ->setAttachedClusterId($attachedClusterId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $attachedClustersClient->createAttachedCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AttachedCluster $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 = AttachedClustersClient::locationName('[PROJECT]', '[LOCATION]'); - $attachedClusterPlatformVersion = '[PLATFORM_VERSION]'; - $attachedClusterDistribution = '[DISTRIBUTION]'; - $attachedClusterFleetProject = '[PROJECT]'; - $attachedClusterId = '[ATTACHED_CLUSTER_ID]'; - - create_attached_cluster_sample( - $formattedParent, - $attachedClusterPlatformVersion, - $attachedClusterDistribution, - $attachedClusterFleetProject, - $attachedClusterId - ); -} -// [END gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/delete_attached_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/delete_attached_cluster.php deleted file mode 100644 index 3cb93cf8653f..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/delete_attached_cluster.php +++ /dev/null @@ -1,96 +0,0 @@ -/locations//attachedClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AttachedClustersClient::attachedClusterName()} for help formatting this field. - */ -function delete_attached_cluster_sample(string $formattedName): void -{ - // Create a client. - $attachedClustersClient = new AttachedClustersClient(); - - // Prepare the request message. - $request = (new DeleteAttachedClusterRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $attachedClustersClient->deleteAttachedCluster($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 = AttachedClustersClient::attachedClusterName( - '[PROJECT]', - '[LOCATION]', - '[ATTACHED_CLUSTER]' - ); - - delete_attached_cluster_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AttachedClusters_DeleteAttachedCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/generate_attached_cluster_agent_token.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/generate_attached_cluster_agent_token.php deleted file mode 100644 index c251ebfce06f..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/generate_attached_cluster_agent_token.php +++ /dev/null @@ -1,93 +0,0 @@ -setAttachedCluster($formattedAttachedCluster) - ->setSubjectToken($subjectToken) - ->setSubjectTokenType($subjectTokenType) - ->setVersion($version); - - // Call the API and handle any network failures. - try { - /** @var GenerateAttachedClusterAgentTokenResponse $response */ - $response = $attachedClustersClient->generateAttachedClusterAgentToken($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 -{ - $formattedAttachedCluster = AttachedClustersClient::attachedClusterName( - '[PROJECT]', - '[LOCATION]', - '[ATTACHED_CLUSTER]' - ); - $subjectToken = '[SUBJECT_TOKEN]'; - $subjectTokenType = '[SUBJECT_TOKEN_TYPE]'; - $version = '[VERSION]'; - - generate_attached_cluster_agent_token_sample( - $formattedAttachedCluster, - $subjectToken, - $subjectTokenType, - $version - ); -} -// [END gkemulticloud_v1_generated_AttachedClusters_GenerateAttachedClusterAgentToken_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/generate_attached_cluster_install_manifest.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/generate_attached_cluster_install_manifest.php deleted file mode 100644 index 2f31c2868d34..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/generate_attached_cluster_install_manifest.php +++ /dev/null @@ -1,109 +0,0 @@ -/locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AttachedClustersClient::locationName()} for help formatting this field. - * @param string $attachedClusterId A client provided ID of the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * name formatted as - * `projects//locations//attachedClusters/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - * - * When generating an install manifest for importing an existing Membership - * resource, the attached_cluster_id field must be the Membership id. - * - * Membership names are formatted as - * `projects//locations//memberships/`. - * @param string $platformVersion The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - */ -function generate_attached_cluster_install_manifest_sample( - string $formattedParent, - string $attachedClusterId, - string $platformVersion -): void { - // Create a client. - $attachedClustersClient = new AttachedClustersClient(); - - // Prepare the request message. - $request = (new GenerateAttachedClusterInstallManifestRequest()) - ->setParent($formattedParent) - ->setAttachedClusterId($attachedClusterId) - ->setPlatformVersion($platformVersion); - - // Call the API and handle any network failures. - try { - /** @var GenerateAttachedClusterInstallManifestResponse $response */ - $response = $attachedClustersClient->generateAttachedClusterInstallManifest($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 = AttachedClustersClient::locationName('[PROJECT]', '[LOCATION]'); - $attachedClusterId = '[ATTACHED_CLUSTER_ID]'; - $platformVersion = '[PLATFORM_VERSION]'; - - generate_attached_cluster_install_manifest_sample( - $formattedParent, - $attachedClusterId, - $platformVersion - ); -} -// [END gkemulticloud_v1_generated_AttachedClusters_GenerateAttachedClusterInstallManifest_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/get_attached_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/get_attached_cluster.php deleted file mode 100644 index 4adb2ef4e049..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/get_attached_cluster.php +++ /dev/null @@ -1,84 +0,0 @@ -/locations//attachedClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AttachedClustersClient::attachedClusterName()} for help formatting this field. - */ -function get_attached_cluster_sample(string $formattedName): void -{ - // Create a client. - $attachedClustersClient = new AttachedClustersClient(); - - // Prepare the request message. - $request = (new GetAttachedClusterRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AttachedCluster $response */ - $response = $attachedClustersClient->getAttachedCluster($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 = AttachedClustersClient::attachedClusterName( - '[PROJECT]', - '[LOCATION]', - '[ATTACHED_CLUSTER]' - ); - - get_attached_cluster_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AttachedClusters_GetAttachedCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/get_attached_server_config.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/get_attached_server_config.php deleted file mode 100644 index edb51426de49..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/get_attached_server_config.php +++ /dev/null @@ -1,80 +0,0 @@ -/locations//attachedServerConfig`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AttachedClustersClient::attachedServerConfigName()} for help formatting this field. - */ -function get_attached_server_config_sample(string $formattedName): void -{ - // Create a client. - $attachedClustersClient = new AttachedClustersClient(); - - // Prepare the request message. - $request = (new GetAttachedServerConfigRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AttachedServerConfig $response */ - $response = $attachedClustersClient->getAttachedServerConfig($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 = AttachedClustersClient::attachedServerConfigName('[PROJECT]', '[LOCATION]'); - - get_attached_server_config_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AttachedClusters_GetAttachedServerConfig_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/import_attached_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/import_attached_cluster.php deleted file mode 100644 index 775e51292a84..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/import_attached_cluster.php +++ /dev/null @@ -1,118 +0,0 @@ -/locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AttachedClustersClient::locationName()} for help formatting this field. - * @param string $fleetMembership The name of the fleet membership resource to import. - * @param string $platformVersion The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. - * @param string $distribution The Kubernetes distribution of the underlying attached cluster. - * - * Supported values: ["eks", "aks", "generic"]. - */ -function import_attached_cluster_sample( - string $formattedParent, - string $fleetMembership, - string $platformVersion, - string $distribution -): void { - // Create a client. - $attachedClustersClient = new AttachedClustersClient(); - - // Prepare the request message. - $request = (new ImportAttachedClusterRequest()) - ->setParent($formattedParent) - ->setFleetMembership($fleetMembership) - ->setPlatformVersion($platformVersion) - ->setDistribution($distribution); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $attachedClustersClient->importAttachedCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AttachedCluster $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 = AttachedClustersClient::locationName('[PROJECT]', '[LOCATION]'); - $fleetMembership = '[FLEET_MEMBERSHIP]'; - $platformVersion = '[PLATFORM_VERSION]'; - $distribution = '[DISTRIBUTION]'; - - import_attached_cluster_sample($formattedParent, $fleetMembership, $platformVersion, $distribution); -} -// [END gkemulticloud_v1_generated_AttachedClusters_ImportAttachedCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/list_attached_clusters.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/list_attached_clusters.php deleted file mode 100644 index a4481823f607..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/list_attached_clusters.php +++ /dev/null @@ -1,83 +0,0 @@ -/locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AttachedClustersClient::locationName()} for help formatting this field. - */ -function list_attached_clusters_sample(string $formattedParent): void -{ - // Create a client. - $attachedClustersClient = new AttachedClustersClient(); - - // Prepare the request message. - $request = (new ListAttachedClustersRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $attachedClustersClient->listAttachedClusters($request); - - /** @var AttachedCluster $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 = AttachedClustersClient::locationName('[PROJECT]', '[LOCATION]'); - - list_attached_clusters_sample($formattedParent); -} -// [END gkemulticloud_v1_generated_AttachedClusters_ListAttachedClusters_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/update_attached_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/update_attached_cluster.php deleted file mode 100644 index 9a97bd77315e..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AttachedClustersClient/update_attached_cluster.php +++ /dev/null @@ -1,117 +0,0 @@ -`. - */ -function update_attached_cluster_sample( - string $attachedClusterPlatformVersion, - string $attachedClusterDistribution, - string $attachedClusterFleetProject -): void { - // Create a client. - $attachedClustersClient = new AttachedClustersClient(); - - // Prepare the request message. - $attachedClusterOidcConfig = new AttachedOidcConfig(); - $attachedClusterFleet = (new Fleet()) - ->setProject($attachedClusterFleetProject); - $attachedCluster = (new AttachedCluster()) - ->setOidcConfig($attachedClusterOidcConfig) - ->setPlatformVersion($attachedClusterPlatformVersion) - ->setDistribution($attachedClusterDistribution) - ->setFleet($attachedClusterFleet); - $updateMask = new FieldMask(); - $request = (new UpdateAttachedClusterRequest()) - ->setAttachedCluster($attachedCluster) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $attachedClustersClient->updateAttachedCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AttachedCluster $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 -{ - $attachedClusterPlatformVersion = '[PLATFORM_VERSION]'; - $attachedClusterDistribution = '[DISTRIBUTION]'; - $attachedClusterFleetProject = '[PROJECT]'; - - update_attached_cluster_sample( - $attachedClusterPlatformVersion, - $attachedClusterDistribution, - $attachedClusterFleetProject - ); -} -// [END gkemulticloud_v1_generated_AttachedClusters_UpdateAttachedCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/create_aws_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/create_aws_cluster.php deleted file mode 100644 index f942bae9647c..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/create_aws_cluster.php +++ /dev/null @@ -1,220 +0,0 @@ -/locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::locationName()} for help formatting this field. - * @param string $awsClusterNetworkingVpcId The VPC associated with the cluster. All component clusters - * (i.e. control plane and node pools) run on a single VPC. - * - * This field cannot be changed after creation. - * @param string $awsClusterNetworkingPodAddressCidrBlocksElement All pods in the cluster are assigned an IPv4 address from these - * ranges. Only a single range is supported. This field cannot be changed - * after creation. - * @param string $awsClusterNetworkingServiceAddressCidrBlocksElement All services in the cluster are assigned an IPv4 address from - * these ranges. Only a single range is supported. This field cannot be - * changed after creation. - * @param string $awsClusterAwsRegion The AWS region where the cluster runs. - * - * Each Google Cloud region supports a subset of nearby AWS regions. - * You can call - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig] - * to list all supported AWS regions within a given Google Cloud region. - * @param string $awsClusterControlPlaneVersion The Kubernetes version to run on control plane replicas - * (e.g. `1.19.10-gke.1000`). - * - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - * @param string $awsClusterControlPlaneSubnetIdsElement The list of subnets where control plane replicas will run. - * A replica will be provisioned on each subnet and up to three values - * can be provided. - * Each subnet must be in a different AWS Availability Zone (AZ). - * @param string $awsClusterControlPlaneIamInstanceProfile The name or ARN of the AWS IAM instance profile to assign to each - * control plane replica. - * @param string $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn The ARN of the AWS KMS key used to encrypt cluster secrets. - * @param string $awsClusterControlPlaneAwsServicesAuthenticationRoleArn The Amazon Resource Name (ARN) of the role that the Anthos - * Multi-Cloud API will assume when managing AWS resources on your account. - * @param string $awsClusterControlPlaneConfigEncryptionKmsKeyArn The ARN of the AWS KMS key used to encrypt user data. - * @param string $awsClusterFleetProject The name of the Fleet host project where this cluster will be - * registered. - * - * Project names are formatted as - * `projects/`. - * @param string $awsClusterId A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name - * formatted as - * `projects//locations//awsClusters/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - */ -function create_aws_cluster_sample( - string $formattedParent, - string $awsClusterNetworkingVpcId, - string $awsClusterNetworkingPodAddressCidrBlocksElement, - string $awsClusterNetworkingServiceAddressCidrBlocksElement, - string $awsClusterAwsRegion, - string $awsClusterControlPlaneVersion, - string $awsClusterControlPlaneSubnetIdsElement, - string $awsClusterControlPlaneIamInstanceProfile, - string $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn, - string $awsClusterControlPlaneAwsServicesAuthenticationRoleArn, - string $awsClusterControlPlaneConfigEncryptionKmsKeyArn, - string $awsClusterFleetProject, - string $awsClusterId -): void { - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $awsClusterNetworkingPodAddressCidrBlocks = [$awsClusterNetworkingPodAddressCidrBlocksElement,]; - $awsClusterNetworkingServiceAddressCidrBlocks = [ - $awsClusterNetworkingServiceAddressCidrBlocksElement, - ]; - $awsClusterNetworking = (new AwsClusterNetworking()) - ->setVpcId($awsClusterNetworkingVpcId) - ->setPodAddressCidrBlocks($awsClusterNetworkingPodAddressCidrBlocks) - ->setServiceAddressCidrBlocks($awsClusterNetworkingServiceAddressCidrBlocks); - $awsClusterControlPlaneSubnetIds = [$awsClusterControlPlaneSubnetIdsElement,]; - $awsClusterControlPlaneDatabaseEncryption = (new AwsDatabaseEncryption()) - ->setKmsKeyArn($awsClusterControlPlaneDatabaseEncryptionKmsKeyArn); - $awsClusterControlPlaneAwsServicesAuthentication = (new AwsServicesAuthentication()) - ->setRoleArn($awsClusterControlPlaneAwsServicesAuthenticationRoleArn); - $awsClusterControlPlaneConfigEncryption = (new AwsConfigEncryption()) - ->setKmsKeyArn($awsClusterControlPlaneConfigEncryptionKmsKeyArn); - $awsClusterControlPlane = (new AwsControlPlane()) - ->setVersion($awsClusterControlPlaneVersion) - ->setSubnetIds($awsClusterControlPlaneSubnetIds) - ->setIamInstanceProfile($awsClusterControlPlaneIamInstanceProfile) - ->setDatabaseEncryption($awsClusterControlPlaneDatabaseEncryption) - ->setAwsServicesAuthentication($awsClusterControlPlaneAwsServicesAuthentication) - ->setConfigEncryption($awsClusterControlPlaneConfigEncryption); - $awsClusterAuthorization = new AwsAuthorization(); - $awsClusterFleet = (new Fleet()) - ->setProject($awsClusterFleetProject); - $awsCluster = (new AwsCluster()) - ->setNetworking($awsClusterNetworking) - ->setAwsRegion($awsClusterAwsRegion) - ->setControlPlane($awsClusterControlPlane) - ->setAuthorization($awsClusterAuthorization) - ->setFleet($awsClusterFleet); - $request = (new CreateAwsClusterRequest()) - ->setParent($formattedParent) - ->setAwsCluster($awsCluster) - ->setAwsClusterId($awsClusterId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $awsClustersClient->createAwsCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AwsCluster $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 = AwsClustersClient::locationName('[PROJECT]', '[LOCATION]'); - $awsClusterNetworkingVpcId = '[VPC_ID]'; - $awsClusterNetworkingPodAddressCidrBlocksElement = '[POD_ADDRESS_CIDR_BLOCKS]'; - $awsClusterNetworkingServiceAddressCidrBlocksElement = '[SERVICE_ADDRESS_CIDR_BLOCKS]'; - $awsClusterAwsRegion = '[AWS_REGION]'; - $awsClusterControlPlaneVersion = '[VERSION]'; - $awsClusterControlPlaneSubnetIdsElement = '[SUBNET_IDS]'; - $awsClusterControlPlaneIamInstanceProfile = '[IAM_INSTANCE_PROFILE]'; - $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; - $awsClusterControlPlaneAwsServicesAuthenticationRoleArn = '[ROLE_ARN]'; - $awsClusterControlPlaneConfigEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; - $awsClusterFleetProject = '[PROJECT]'; - $awsClusterId = '[AWS_CLUSTER_ID]'; - - create_aws_cluster_sample( - $formattedParent, - $awsClusterNetworkingVpcId, - $awsClusterNetworkingPodAddressCidrBlocksElement, - $awsClusterNetworkingServiceAddressCidrBlocksElement, - $awsClusterAwsRegion, - $awsClusterControlPlaneVersion, - $awsClusterControlPlaneSubnetIdsElement, - $awsClusterControlPlaneIamInstanceProfile, - $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn, - $awsClusterControlPlaneAwsServicesAuthenticationRoleArn, - $awsClusterControlPlaneConfigEncryptionKmsKeyArn, - $awsClusterFleetProject, - $awsClusterId - ); -} -// [END gkemulticloud_v1_generated_AwsClusters_CreateAwsCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/create_aws_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/create_aws_node_pool.php deleted file mode 100644 index 45e7090b6df4..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/create_aws_node_pool.php +++ /dev/null @@ -1,168 +0,0 @@ -/locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsClusterName()} for help formatting this field. - * @param string $awsNodePoolVersion The Kubernetes version to run on this node pool (e.g. - * `1.19.10-gke.1000`). - * - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - * @param string $awsNodePoolConfigIamInstanceProfile The name or ARN of the AWS IAM instance profile to assign to - * nodes in the pool. - * @param string $awsNodePoolConfigConfigEncryptionKmsKeyArn The ARN of the AWS KMS key used to encrypt user data. - * @param int $awsNodePoolAutoscalingMinNodeCount Minimum number of nodes in the node pool. Must be greater than or - * equal to 1 and less than or equal to max_node_count. - * @param int $awsNodePoolAutoscalingMaxNodeCount Maximum number of nodes in the node pool. Must be greater than or - * equal to min_node_count and less than or equal to 50. - * @param string $awsNodePoolSubnetId The subnet where the node pool node run. - * @param int $awsNodePoolMaxPodsConstraintMaxPodsPerNode The maximum number of pods to schedule on a single node. - * @param string $awsNodePoolId A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name - * formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - */ -function create_aws_node_pool_sample( - string $formattedParent, - string $awsNodePoolVersion, - string $awsNodePoolConfigIamInstanceProfile, - string $awsNodePoolConfigConfigEncryptionKmsKeyArn, - int $awsNodePoolAutoscalingMinNodeCount, - int $awsNodePoolAutoscalingMaxNodeCount, - string $awsNodePoolSubnetId, - int $awsNodePoolMaxPodsConstraintMaxPodsPerNode, - string $awsNodePoolId -): void { - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $awsNodePoolConfigConfigEncryption = (new AwsConfigEncryption()) - ->setKmsKeyArn($awsNodePoolConfigConfigEncryptionKmsKeyArn); - $awsNodePoolConfig = (new AwsNodeConfig()) - ->setIamInstanceProfile($awsNodePoolConfigIamInstanceProfile) - ->setConfigEncryption($awsNodePoolConfigConfigEncryption); - $awsNodePoolAutoscaling = (new AwsNodePoolAutoscaling()) - ->setMinNodeCount($awsNodePoolAutoscalingMinNodeCount) - ->setMaxNodeCount($awsNodePoolAutoscalingMaxNodeCount); - $awsNodePoolMaxPodsConstraint = (new MaxPodsConstraint()) - ->setMaxPodsPerNode($awsNodePoolMaxPodsConstraintMaxPodsPerNode); - $awsNodePool = (new AwsNodePool()) - ->setVersion($awsNodePoolVersion) - ->setConfig($awsNodePoolConfig) - ->setAutoscaling($awsNodePoolAutoscaling) - ->setSubnetId($awsNodePoolSubnetId) - ->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); - $request = (new CreateAwsNodePoolRequest()) - ->setParent($formattedParent) - ->setAwsNodePool($awsNodePool) - ->setAwsNodePoolId($awsNodePoolId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $awsClustersClient->createAwsNodePool($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AwsNodePool $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 = AwsClustersClient::awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $awsNodePoolVersion = '[VERSION]'; - $awsNodePoolConfigIamInstanceProfile = '[IAM_INSTANCE_PROFILE]'; - $awsNodePoolConfigConfigEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; - $awsNodePoolAutoscalingMinNodeCount = 0; - $awsNodePoolAutoscalingMaxNodeCount = 0; - $awsNodePoolSubnetId = '[SUBNET_ID]'; - $awsNodePoolMaxPodsConstraintMaxPodsPerNode = 0; - $awsNodePoolId = '[AWS_NODE_POOL_ID]'; - - create_aws_node_pool_sample( - $formattedParent, - $awsNodePoolVersion, - $awsNodePoolConfigIamInstanceProfile, - $awsNodePoolConfigConfigEncryptionKmsKeyArn, - $awsNodePoolAutoscalingMinNodeCount, - $awsNodePoolAutoscalingMaxNodeCount, - $awsNodePoolSubnetId, - $awsNodePoolMaxPodsConstraintMaxPodsPerNode, - $awsNodePoolId - ); -} -// [END gkemulticloud_v1_generated_AwsClusters_CreateAwsNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/delete_aws_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/delete_aws_cluster.php deleted file mode 100644 index 08c135a98769..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/delete_aws_cluster.php +++ /dev/null @@ -1,95 +0,0 @@ -/locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AwsClustersClient::awsClusterName()} for help formatting this field. - */ -function delete_aws_cluster_sample(string $formattedName): void -{ - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $request = (new DeleteAwsClusterRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $awsClustersClient->deleteAwsCluster($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 = AwsClustersClient::awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - - delete_aws_cluster_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AwsClusters_DeleteAwsCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/delete_aws_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/delete_aws_node_pool.php deleted file mode 100644 index cbfa0e20b825..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/delete_aws_node_pool.php +++ /dev/null @@ -1,97 +0,0 @@ -/locations//awsClusters//awsNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsNodePoolName()} for help formatting this field. - */ -function delete_aws_node_pool_sample(string $formattedName): void -{ - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $request = (new DeleteAwsNodePoolRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $awsClustersClient->deleteAwsNodePool($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 = AwsClustersClient::awsNodePoolName( - '[PROJECT]', - '[LOCATION]', - '[AWS_CLUSTER]', - '[AWS_NODE_POOL]' - ); - - delete_aws_node_pool_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AwsClusters_DeleteAwsNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/generate_aws_access_token.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/generate_aws_access_token.php deleted file mode 100644 index f0523bbd8775..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/generate_aws_access_token.php +++ /dev/null @@ -1,84 +0,0 @@ -/locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsClusterName()} for help formatting this field. - */ -function generate_aws_access_token_sample(string $formattedAwsCluster): void -{ - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $request = (new GenerateAwsAccessTokenRequest()) - ->setAwsCluster($formattedAwsCluster); - - // Call the API and handle any network failures. - try { - /** @var GenerateAwsAccessTokenResponse $response */ - $response = $awsClustersClient->generateAwsAccessToken($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 -{ - $formattedAwsCluster = AwsClustersClient::awsClusterName( - '[PROJECT]', - '[LOCATION]', - '[AWS_CLUSTER]' - ); - - generate_aws_access_token_sample($formattedAwsCluster); -} -// [END gkemulticloud_v1_generated_AwsClusters_GenerateAwsAccessToken_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/generate_aws_cluster_agent_token.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/generate_aws_cluster_agent_token.php deleted file mode 100644 index fbffa1fb945c..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/generate_aws_cluster_agent_token.php +++ /dev/null @@ -1,93 +0,0 @@ -setAwsCluster($formattedAwsCluster) - ->setSubjectToken($subjectToken) - ->setSubjectTokenType($subjectTokenType) - ->setVersion($version); - - // Call the API and handle any network failures. - try { - /** @var GenerateAwsClusterAgentTokenResponse $response */ - $response = $awsClustersClient->generateAwsClusterAgentToken($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 -{ - $formattedAwsCluster = AwsClustersClient::awsClusterName( - '[PROJECT]', - '[LOCATION]', - '[AWS_CLUSTER]' - ); - $subjectToken = '[SUBJECT_TOKEN]'; - $subjectTokenType = '[SUBJECT_TOKEN_TYPE]'; - $version = '[VERSION]'; - - generate_aws_cluster_agent_token_sample( - $formattedAwsCluster, - $subjectToken, - $subjectTokenType, - $version - ); -} -// [END gkemulticloud_v1_generated_AwsClusters_GenerateAwsClusterAgentToken_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_cluster.php deleted file mode 100644 index a1d582086646..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_cluster.php +++ /dev/null @@ -1,80 +0,0 @@ -/locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AwsClustersClient::awsClusterName()} for help formatting this field. - */ -function get_aws_cluster_sample(string $formattedName): void -{ - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $request = (new GetAwsClusterRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AwsCluster $response */ - $response = $awsClustersClient->getAwsCluster($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 = AwsClustersClient::awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - - get_aws_cluster_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AwsClusters_GetAwsCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_json_web_keys.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_json_web_keys.php deleted file mode 100644 index 80cd24035477..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_json_web_keys.php +++ /dev/null @@ -1,78 +0,0 @@ -setAwsCluster($formattedAwsCluster); - - // Call the API and handle any network failures. - try { - /** @var AwsJsonWebKeys $response */ - $response = $awsClustersClient->getAwsJsonWebKeys($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 -{ - $formattedAwsCluster = AwsClustersClient::awsClusterName( - '[PROJECT]', - '[LOCATION]', - '[AWS_CLUSTER]' - ); - - get_aws_json_web_keys_sample($formattedAwsCluster); -} -// [END gkemulticloud_v1_generated_AwsClusters_GetAwsJsonWebKeys_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_node_pool.php deleted file mode 100644 index cc3916643b41..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_node_pool.php +++ /dev/null @@ -1,85 +0,0 @@ -/locations//awsClusters//awsNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsNodePoolName()} for help formatting this field. - */ -function get_aws_node_pool_sample(string $formattedName): void -{ - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $request = (new GetAwsNodePoolRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AwsNodePool $response */ - $response = $awsClustersClient->getAwsNodePool($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 = AwsClustersClient::awsNodePoolName( - '[PROJECT]', - '[LOCATION]', - '[AWS_CLUSTER]', - '[AWS_NODE_POOL]' - ); - - get_aws_node_pool_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AwsClusters_GetAwsNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_open_id_config.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_open_id_config.php deleted file mode 100644 index 0925b1003dc0..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_open_id_config.php +++ /dev/null @@ -1,81 +0,0 @@ -setAwsCluster($formattedAwsCluster); - - // Call the API and handle any network failures. - try { - /** @var AwsOpenIdConfig $response */ - $response = $awsClustersClient->getAwsOpenIdConfig($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 -{ - $formattedAwsCluster = AwsClustersClient::awsClusterName( - '[PROJECT]', - '[LOCATION]', - '[AWS_CLUSTER]' - ); - - get_aws_open_id_config_sample($formattedAwsCluster); -} -// [END gkemulticloud_v1_generated_AwsClusters_GetAwsOpenIdConfig_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_server_config.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_server_config.php deleted file mode 100644 index 5d9aa61d3485..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/get_aws_server_config.php +++ /dev/null @@ -1,80 +0,0 @@ -/locations//awsServerConfig`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsServerConfigName()} for help formatting this field. - */ -function get_aws_server_config_sample(string $formattedName): void -{ - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $request = (new GetAwsServerConfigRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AwsServerConfig $response */ - $response = $awsClustersClient->getAwsServerConfig($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 = AwsClustersClient::awsServerConfigName('[PROJECT]', '[LOCATION]'); - - get_aws_server_config_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AwsClusters_GetAwsServerConfig_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/list_aws_clusters.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/list_aws_clusters.php deleted file mode 100644 index f62329e64fc4..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/list_aws_clusters.php +++ /dev/null @@ -1,83 +0,0 @@ -/locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AwsClustersClient::locationName()} for help formatting this field. - */ -function list_aws_clusters_sample(string $formattedParent): void -{ - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $request = (new ListAwsClustersRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $awsClustersClient->listAwsClusters($request); - - /** @var AwsCluster $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 = AwsClustersClient::locationName('[PROJECT]', '[LOCATION]'); - - list_aws_clusters_sample($formattedParent); -} -// [END gkemulticloud_v1_generated_AwsClusters_ListAwsClusters_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/list_aws_node_pools.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/list_aws_node_pools.php deleted file mode 100644 index 819fb64043eb..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/list_aws_node_pools.php +++ /dev/null @@ -1,85 +0,0 @@ -/locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsClusterName()} for help formatting this field. - */ -function list_aws_node_pools_sample(string $formattedParent): void -{ - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $request = (new ListAwsNodePoolsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $awsClustersClient->listAwsNodePools($request); - - /** @var AwsNodePool $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 = AwsClustersClient::awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - - list_aws_node_pools_sample($formattedParent); -} -// [END gkemulticloud_v1_generated_AwsClusters_ListAwsNodePools_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/rollback_aws_node_pool_update.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/rollback_aws_node_pool_update.php deleted file mode 100644 index 28dc11cd83b8..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/rollback_aws_node_pool_update.php +++ /dev/null @@ -1,101 +0,0 @@ -/locations//awsClusters//awsNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AwsClustersClient::awsNodePoolName()} for help formatting this field. - */ -function rollback_aws_node_pool_update_sample(string $formattedName): void -{ - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $request = (new RollbackAwsNodePoolUpdateRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $awsClustersClient->rollbackAwsNodePoolUpdate($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AwsNodePool $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 = AwsClustersClient::awsNodePoolName( - '[PROJECT]', - '[LOCATION]', - '[AWS_CLUSTER]', - '[AWS_NODE_POOL]' - ); - - rollback_aws_node_pool_update_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AwsClusters_RollbackAwsNodePoolUpdate_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/update_aws_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/update_aws_cluster.php deleted file mode 100644 index e548c99febd9..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/update_aws_cluster.php +++ /dev/null @@ -1,192 +0,0 @@ -`. - */ -function update_aws_cluster_sample( - string $awsClusterNetworkingVpcId, - string $awsClusterNetworkingPodAddressCidrBlocksElement, - string $awsClusterNetworkingServiceAddressCidrBlocksElement, - string $awsClusterAwsRegion, - string $awsClusterControlPlaneVersion, - string $awsClusterControlPlaneSubnetIdsElement, - string $awsClusterControlPlaneIamInstanceProfile, - string $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn, - string $awsClusterControlPlaneAwsServicesAuthenticationRoleArn, - string $awsClusterControlPlaneConfigEncryptionKmsKeyArn, - string $awsClusterFleetProject -): void { - // Create a client. - $awsClustersClient = new AwsClustersClient(); - - // Prepare the request message. - $awsClusterNetworkingPodAddressCidrBlocks = [$awsClusterNetworkingPodAddressCidrBlocksElement,]; - $awsClusterNetworkingServiceAddressCidrBlocks = [ - $awsClusterNetworkingServiceAddressCidrBlocksElement, - ]; - $awsClusterNetworking = (new AwsClusterNetworking()) - ->setVpcId($awsClusterNetworkingVpcId) - ->setPodAddressCidrBlocks($awsClusterNetworkingPodAddressCidrBlocks) - ->setServiceAddressCidrBlocks($awsClusterNetworkingServiceAddressCidrBlocks); - $awsClusterControlPlaneSubnetIds = [$awsClusterControlPlaneSubnetIdsElement,]; - $awsClusterControlPlaneDatabaseEncryption = (new AwsDatabaseEncryption()) - ->setKmsKeyArn($awsClusterControlPlaneDatabaseEncryptionKmsKeyArn); - $awsClusterControlPlaneAwsServicesAuthentication = (new AwsServicesAuthentication()) - ->setRoleArn($awsClusterControlPlaneAwsServicesAuthenticationRoleArn); - $awsClusterControlPlaneConfigEncryption = (new AwsConfigEncryption()) - ->setKmsKeyArn($awsClusterControlPlaneConfigEncryptionKmsKeyArn); - $awsClusterControlPlane = (new AwsControlPlane()) - ->setVersion($awsClusterControlPlaneVersion) - ->setSubnetIds($awsClusterControlPlaneSubnetIds) - ->setIamInstanceProfile($awsClusterControlPlaneIamInstanceProfile) - ->setDatabaseEncryption($awsClusterControlPlaneDatabaseEncryption) - ->setAwsServicesAuthentication($awsClusterControlPlaneAwsServicesAuthentication) - ->setConfigEncryption($awsClusterControlPlaneConfigEncryption); - $awsClusterAuthorization = new AwsAuthorization(); - $awsClusterFleet = (new Fleet()) - ->setProject($awsClusterFleetProject); - $awsCluster = (new AwsCluster()) - ->setNetworking($awsClusterNetworking) - ->setAwsRegion($awsClusterAwsRegion) - ->setControlPlane($awsClusterControlPlane) - ->setAuthorization($awsClusterAuthorization) - ->setFleet($awsClusterFleet); - $updateMask = new FieldMask(); - $request = (new UpdateAwsClusterRequest()) - ->setAwsCluster($awsCluster) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $awsClustersClient->updateAwsCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AwsCluster $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 -{ - $awsClusterNetworkingVpcId = '[VPC_ID]'; - $awsClusterNetworkingPodAddressCidrBlocksElement = '[POD_ADDRESS_CIDR_BLOCKS]'; - $awsClusterNetworkingServiceAddressCidrBlocksElement = '[SERVICE_ADDRESS_CIDR_BLOCKS]'; - $awsClusterAwsRegion = '[AWS_REGION]'; - $awsClusterControlPlaneVersion = '[VERSION]'; - $awsClusterControlPlaneSubnetIdsElement = '[SUBNET_IDS]'; - $awsClusterControlPlaneIamInstanceProfile = '[IAM_INSTANCE_PROFILE]'; - $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; - $awsClusterControlPlaneAwsServicesAuthenticationRoleArn = '[ROLE_ARN]'; - $awsClusterControlPlaneConfigEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; - $awsClusterFleetProject = '[PROJECT]'; - - update_aws_cluster_sample( - $awsClusterNetworkingVpcId, - $awsClusterNetworkingPodAddressCidrBlocksElement, - $awsClusterNetworkingServiceAddressCidrBlocksElement, - $awsClusterAwsRegion, - $awsClusterControlPlaneVersion, - $awsClusterControlPlaneSubnetIdsElement, - $awsClusterControlPlaneIamInstanceProfile, - $awsClusterControlPlaneDatabaseEncryptionKmsKeyArn, - $awsClusterControlPlaneAwsServicesAuthenticationRoleArn, - $awsClusterControlPlaneConfigEncryptionKmsKeyArn, - $awsClusterFleetProject - ); -} -// [END gkemulticloud_v1_generated_AwsClusters_UpdateAwsCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/update_aws_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/update_aws_node_pool.php deleted file mode 100644 index acbd595235ed..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AwsClustersClient/update_aws_node_pool.php +++ /dev/null @@ -1,140 +0,0 @@ -setKmsKeyArn($awsNodePoolConfigConfigEncryptionKmsKeyArn); - $awsNodePoolConfig = (new AwsNodeConfig()) - ->setIamInstanceProfile($awsNodePoolConfigIamInstanceProfile) - ->setConfigEncryption($awsNodePoolConfigConfigEncryption); - $awsNodePoolAutoscaling = (new AwsNodePoolAutoscaling()) - ->setMinNodeCount($awsNodePoolAutoscalingMinNodeCount) - ->setMaxNodeCount($awsNodePoolAutoscalingMaxNodeCount); - $awsNodePoolMaxPodsConstraint = (new MaxPodsConstraint()) - ->setMaxPodsPerNode($awsNodePoolMaxPodsConstraintMaxPodsPerNode); - $awsNodePool = (new AwsNodePool()) - ->setVersion($awsNodePoolVersion) - ->setConfig($awsNodePoolConfig) - ->setAutoscaling($awsNodePoolAutoscaling) - ->setSubnetId($awsNodePoolSubnetId) - ->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); - $updateMask = new FieldMask(); - $request = (new UpdateAwsNodePoolRequest()) - ->setAwsNodePool($awsNodePool) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $awsClustersClient->updateAwsNodePool($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AwsNodePool $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 -{ - $awsNodePoolVersion = '[VERSION]'; - $awsNodePoolConfigIamInstanceProfile = '[IAM_INSTANCE_PROFILE]'; - $awsNodePoolConfigConfigEncryptionKmsKeyArn = '[KMS_KEY_ARN]'; - $awsNodePoolAutoscalingMinNodeCount = 0; - $awsNodePoolAutoscalingMaxNodeCount = 0; - $awsNodePoolSubnetId = '[SUBNET_ID]'; - $awsNodePoolMaxPodsConstraintMaxPodsPerNode = 0; - - update_aws_node_pool_sample( - $awsNodePoolVersion, - $awsNodePoolConfigIamInstanceProfile, - $awsNodePoolConfigConfigEncryptionKmsKeyArn, - $awsNodePoolAutoscalingMinNodeCount, - $awsNodePoolAutoscalingMaxNodeCount, - $awsNodePoolSubnetId, - $awsNodePoolMaxPodsConstraintMaxPodsPerNode - ); -} -// [END gkemulticloud_v1_generated_AwsClusters_UpdateAwsNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_client.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_client.php deleted file mode 100644 index 459ce75c51fd..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_client.php +++ /dev/null @@ -1,127 +0,0 @@ -/locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::locationName()} for help formatting this field. - * @param string $azureClientTenantId The Azure Active Directory Tenant ID. - * @param string $azureClientApplicationId The Azure Active Directory Application ID. - * @param string $azureClientId A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name - * formatted as - * `projects//locations//azureClients/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - */ -function create_azure_client_sample( - string $formattedParent, - string $azureClientTenantId, - string $azureClientApplicationId, - string $azureClientId -): void { - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $azureClient = (new AzureClient()) - ->setTenantId($azureClientTenantId) - ->setApplicationId($azureClientApplicationId); - $request = (new CreateAzureClientRequest()) - ->setParent($formattedParent) - ->setAzureClient($azureClient) - ->setAzureClientId($azureClientId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $azureClustersClient->createAzureClient($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AzureClient $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 = AzureClustersClient::locationName('[PROJECT]', '[LOCATION]'); - $azureClientTenantId = '[TENANT_ID]'; - $azureClientApplicationId = '[APPLICATION_ID]'; - $azureClientId = '[AZURE_CLIENT_ID]'; - - create_azure_client_sample( - $formattedParent, - $azureClientTenantId, - $azureClientApplicationId, - $azureClientId - ); -} -// [END gkemulticloud_v1_generated_AzureClusters_CreateAzureClient_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_cluster.php deleted file mode 100644 index 42ddf16ffbe1..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_cluster.php +++ /dev/null @@ -1,213 +0,0 @@ -/locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::locationName()} for help formatting this field. - * @param string $azureClusterAzureRegion The Azure region where the cluster runs. - * - * Each Google Cloud region supports a subset of nearby Azure regions. - * You can call - * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig] - * to list all supported Azure regions within a given Google Cloud region. - * @param string $azureClusterResourceGroupId The ARM ID of the resource group where the cluster resources are - * deployed. For example: - * `/subscriptions//resourceGroups/` - * @param string $azureClusterNetworkingVirtualNetworkId The Azure Resource Manager (ARM) ID of the VNet associated with - * your cluster. - * - * All components in the cluster (i.e. control plane and node pools) run on a - * single VNet. - * - * Example: - * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/` - * - * This field cannot be changed after creation. - * @param string $azureClusterNetworkingPodAddressCidrBlocksElement The IP address range of the pods in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * - * All pods in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * - * This field cannot be changed after creation. - * @param string $azureClusterNetworkingServiceAddressCidrBlocksElement The IP address range for services in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * - * All services in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * - * This field cannot be changed after creating a cluster. - * @param string $azureClusterControlPlaneVersion The Kubernetes version to run on control plane replicas - * (e.g. `1.19.10-gke.1000`). - * - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]. - * @param string $azureClusterControlPlaneSshConfigAuthorizedKey The SSH public key data for VMs managed by Anthos. This accepts - * the authorized_keys file format used in OpenSSH according to the sshd(8) - * manual page. - * @param string $azureClusterFleetProject The name of the Fleet host project where this cluster will be - * registered. - * - * Project names are formatted as - * `projects/`. - * @param string $azureClusterId A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name - * formatted as - * `projects//locations//azureClusters/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - */ -function create_azure_cluster_sample( - string $formattedParent, - string $azureClusterAzureRegion, - string $azureClusterResourceGroupId, - string $azureClusterNetworkingVirtualNetworkId, - string $azureClusterNetworkingPodAddressCidrBlocksElement, - string $azureClusterNetworkingServiceAddressCidrBlocksElement, - string $azureClusterControlPlaneVersion, - string $azureClusterControlPlaneSshConfigAuthorizedKey, - string $azureClusterFleetProject, - string $azureClusterId -): void { - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $azureClusterNetworkingPodAddressCidrBlocks = [ - $azureClusterNetworkingPodAddressCidrBlocksElement, - ]; - $azureClusterNetworkingServiceAddressCidrBlocks = [ - $azureClusterNetworkingServiceAddressCidrBlocksElement, - ]; - $azureClusterNetworking = (new AzureClusterNetworking()) - ->setVirtualNetworkId($azureClusterNetworkingVirtualNetworkId) - ->setPodAddressCidrBlocks($azureClusterNetworkingPodAddressCidrBlocks) - ->setServiceAddressCidrBlocks($azureClusterNetworkingServiceAddressCidrBlocks); - $azureClusterControlPlaneSshConfig = (new AzureSshConfig()) - ->setAuthorizedKey($azureClusterControlPlaneSshConfigAuthorizedKey); - $azureClusterControlPlane = (new AzureControlPlane()) - ->setVersion($azureClusterControlPlaneVersion) - ->setSshConfig($azureClusterControlPlaneSshConfig); - $azureClusterAuthorization = new AzureAuthorization(); - $azureClusterFleet = (new Fleet()) - ->setProject($azureClusterFleetProject); - $azureCluster = (new AzureCluster()) - ->setAzureRegion($azureClusterAzureRegion) - ->setResourceGroupId($azureClusterResourceGroupId) - ->setNetworking($azureClusterNetworking) - ->setControlPlane($azureClusterControlPlane) - ->setAuthorization($azureClusterAuthorization) - ->setFleet($azureClusterFleet); - $request = (new CreateAzureClusterRequest()) - ->setParent($formattedParent) - ->setAzureCluster($azureCluster) - ->setAzureClusterId($azureClusterId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $azureClustersClient->createAzureCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AzureCluster $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 = AzureClustersClient::locationName('[PROJECT]', '[LOCATION]'); - $azureClusterAzureRegion = '[AZURE_REGION]'; - $azureClusterResourceGroupId = '[RESOURCE_GROUP_ID]'; - $azureClusterNetworkingVirtualNetworkId = '[VIRTUAL_NETWORK_ID]'; - $azureClusterNetworkingPodAddressCidrBlocksElement = '[POD_ADDRESS_CIDR_BLOCKS]'; - $azureClusterNetworkingServiceAddressCidrBlocksElement = '[SERVICE_ADDRESS_CIDR_BLOCKS]'; - $azureClusterControlPlaneVersion = '[VERSION]'; - $azureClusterControlPlaneSshConfigAuthorizedKey = '[AUTHORIZED_KEY]'; - $azureClusterFleetProject = '[PROJECT]'; - $azureClusterId = '[AZURE_CLUSTER_ID]'; - - create_azure_cluster_sample( - $formattedParent, - $azureClusterAzureRegion, - $azureClusterResourceGroupId, - $azureClusterNetworkingVirtualNetworkId, - $azureClusterNetworkingPodAddressCidrBlocksElement, - $azureClusterNetworkingServiceAddressCidrBlocksElement, - $azureClusterControlPlaneVersion, - $azureClusterControlPlaneSshConfigAuthorizedKey, - $azureClusterFleetProject, - $azureClusterId - ); -} -// [END gkemulticloud_v1_generated_AzureClusters_CreateAzureCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_node_pool.php deleted file mode 100644 index 890f931671d5..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/create_azure_node_pool.php +++ /dev/null @@ -1,166 +0,0 @@ -/locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureClusterName()} for help formatting this field. - * @param string $azureNodePoolVersion The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this - * node pool. - * @param string $azureNodePoolConfigSshConfigAuthorizedKey The SSH public key data for VMs managed by Anthos. This accepts - * the authorized_keys file format used in OpenSSH according to the sshd(8) - * manual page. - * @param string $azureNodePoolSubnetId The ARM ID of the subnet where the node pool VMs run. Make sure - * it's a subnet under the virtual network in the cluster configuration. - * @param int $azureNodePoolAutoscalingMinNodeCount Minimum number of nodes in the node pool. Must be greater than or - * equal to 1 and less than or equal to max_node_count. - * @param int $azureNodePoolAutoscalingMaxNodeCount Maximum number of nodes in the node pool. Must be greater than or - * equal to min_node_count and less than or equal to 50. - * @param int $azureNodePoolMaxPodsConstraintMaxPodsPerNode The maximum number of pods to schedule on a single node. - * @param string $azureNodePoolId A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name - * formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - */ -function create_azure_node_pool_sample( - string $formattedParent, - string $azureNodePoolVersion, - string $azureNodePoolConfigSshConfigAuthorizedKey, - string $azureNodePoolSubnetId, - int $azureNodePoolAutoscalingMinNodeCount, - int $azureNodePoolAutoscalingMaxNodeCount, - int $azureNodePoolMaxPodsConstraintMaxPodsPerNode, - string $azureNodePoolId -): void { - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $azureNodePoolConfigSshConfig = (new AzureSshConfig()) - ->setAuthorizedKey($azureNodePoolConfigSshConfigAuthorizedKey); - $azureNodePoolConfig = (new AzureNodeConfig()) - ->setSshConfig($azureNodePoolConfigSshConfig); - $azureNodePoolAutoscaling = (new AzureNodePoolAutoscaling()) - ->setMinNodeCount($azureNodePoolAutoscalingMinNodeCount) - ->setMaxNodeCount($azureNodePoolAutoscalingMaxNodeCount); - $azureNodePoolMaxPodsConstraint = (new MaxPodsConstraint()) - ->setMaxPodsPerNode($azureNodePoolMaxPodsConstraintMaxPodsPerNode); - $azureNodePool = (new AzureNodePool()) - ->setVersion($azureNodePoolVersion) - ->setConfig($azureNodePoolConfig) - ->setSubnetId($azureNodePoolSubnetId) - ->setAutoscaling($azureNodePoolAutoscaling) - ->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); - $request = (new CreateAzureNodePoolRequest()) - ->setParent($formattedParent) - ->setAzureNodePool($azureNodePool) - ->setAzureNodePoolId($azureNodePoolId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $azureClustersClient->createAzureNodePool($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AzureNodePool $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 = AzureClustersClient::azureClusterName( - '[PROJECT]', - '[LOCATION]', - '[AZURE_CLUSTER]' - ); - $azureNodePoolVersion = '[VERSION]'; - $azureNodePoolConfigSshConfigAuthorizedKey = '[AUTHORIZED_KEY]'; - $azureNodePoolSubnetId = '[SUBNET_ID]'; - $azureNodePoolAutoscalingMinNodeCount = 0; - $azureNodePoolAutoscalingMaxNodeCount = 0; - $azureNodePoolMaxPodsConstraintMaxPodsPerNode = 0; - $azureNodePoolId = '[AZURE_NODE_POOL_ID]'; - - create_azure_node_pool_sample( - $formattedParent, - $azureNodePoolVersion, - $azureNodePoolConfigSshConfigAuthorizedKey, - $azureNodePoolSubnetId, - $azureNodePoolAutoscalingMinNodeCount, - $azureNodePoolAutoscalingMaxNodeCount, - $azureNodePoolMaxPodsConstraintMaxPodsPerNode, - $azureNodePoolId - ); -} -// [END gkemulticloud_v1_generated_AzureClusters_CreateAzureNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_client.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_client.php deleted file mode 100644 index c930e1830087..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_client.php +++ /dev/null @@ -1,96 +0,0 @@ -/locations//azureClients/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureClientName()} for help formatting this field. - */ -function delete_azure_client_sample(string $formattedName): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new DeleteAzureClientRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $azureClustersClient->deleteAzureClient($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 = AzureClustersClient::azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); - - delete_azure_client_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AzureClusters_DeleteAzureClient_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_cluster.php deleted file mode 100644 index 8fac402b114f..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_cluster.php +++ /dev/null @@ -1,99 +0,0 @@ -/locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AzureClustersClient::azureClusterName()} for help formatting this field. - */ -function delete_azure_cluster_sample(string $formattedName): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new DeleteAzureClusterRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $azureClustersClient->deleteAzureCluster($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 = AzureClustersClient::azureClusterName( - '[PROJECT]', - '[LOCATION]', - '[AZURE_CLUSTER]' - ); - - delete_azure_cluster_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AzureClusters_DeleteAzureCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_node_pool.php deleted file mode 100644 index c2d9c3f56f7c..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/delete_azure_node_pool.php +++ /dev/null @@ -1,97 +0,0 @@ -/locations//azureClusters//azureNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureNodePoolName()} for help formatting this field. - */ -function delete_azure_node_pool_sample(string $formattedName): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new DeleteAzureNodePoolRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $azureClustersClient->deleteAzureNodePool($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 = AzureClustersClient::azureNodePoolName( - '[PROJECT]', - '[LOCATION]', - '[AZURE_CLUSTER]', - '[AZURE_NODE_POOL]' - ); - - delete_azure_node_pool_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AzureClusters_DeleteAzureNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/generate_azure_access_token.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/generate_azure_access_token.php deleted file mode 100644 index bcef5ed325d3..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/generate_azure_access_token.php +++ /dev/null @@ -1,84 +0,0 @@ -/locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureClusterName()} for help formatting this field. - */ -function generate_azure_access_token_sample(string $formattedAzureCluster): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new GenerateAzureAccessTokenRequest()) - ->setAzureCluster($formattedAzureCluster); - - // Call the API and handle any network failures. - try { - /** @var GenerateAzureAccessTokenResponse $response */ - $response = $azureClustersClient->generateAzureAccessToken($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 -{ - $formattedAzureCluster = AzureClustersClient::azureClusterName( - '[PROJECT]', - '[LOCATION]', - '[AZURE_CLUSTER]' - ); - - generate_azure_access_token_sample($formattedAzureCluster); -} -// [END gkemulticloud_v1_generated_AzureClusters_GenerateAzureAccessToken_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/generate_azure_cluster_agent_token.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/generate_azure_cluster_agent_token.php deleted file mode 100644 index 1fdec068bca5..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/generate_azure_cluster_agent_token.php +++ /dev/null @@ -1,93 +0,0 @@ -setAzureCluster($formattedAzureCluster) - ->setSubjectToken($subjectToken) - ->setSubjectTokenType($subjectTokenType) - ->setVersion($version); - - // Call the API and handle any network failures. - try { - /** @var GenerateAzureClusterAgentTokenResponse $response */ - $response = $azureClustersClient->generateAzureClusterAgentToken($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 -{ - $formattedAzureCluster = AzureClustersClient::azureClusterName( - '[PROJECT]', - '[LOCATION]', - '[AZURE_CLUSTER]' - ); - $subjectToken = '[SUBJECT_TOKEN]'; - $subjectTokenType = '[SUBJECT_TOKEN_TYPE]'; - $version = '[VERSION]'; - - generate_azure_cluster_agent_token_sample( - $formattedAzureCluster, - $subjectToken, - $subjectTokenType, - $version - ); -} -// [END gkemulticloud_v1_generated_AzureClusters_GenerateAzureClusterAgentToken_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_client.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_client.php deleted file mode 100644 index 6e5703c99462..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_client.php +++ /dev/null @@ -1,81 +0,0 @@ -/locations//azureClients/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureClientName()} for help formatting this field. - */ -function get_azure_client_sample(string $formattedName): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new GetAzureClientRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AzureClient $response */ - $response = $azureClustersClient->getAzureClient($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 = AzureClustersClient::azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); - - get_azure_client_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AzureClusters_GetAzureClient_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_cluster.php deleted file mode 100644 index 9b3b00ac41d0..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_cluster.php +++ /dev/null @@ -1,84 +0,0 @@ -/locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AzureClustersClient::azureClusterName()} for help formatting this field. - */ -function get_azure_cluster_sample(string $formattedName): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new GetAzureClusterRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AzureCluster $response */ - $response = $azureClustersClient->getAzureCluster($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 = AzureClustersClient::azureClusterName( - '[PROJECT]', - '[LOCATION]', - '[AZURE_CLUSTER]' - ); - - get_azure_cluster_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AzureClusters_GetAzureCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_json_web_keys.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_json_web_keys.php deleted file mode 100644 index 1055be18fffa..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_json_web_keys.php +++ /dev/null @@ -1,78 +0,0 @@ -/locations//azureClusters/` - * Please see {@see AzureClustersClient::azureClusterName()} for help formatting this field. - */ -function get_azure_json_web_keys_sample(string $formattedAzureCluster): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new GetAzureJsonWebKeysRequest()) - ->setAzureCluster($formattedAzureCluster); - - // Call the API and handle any network failures. - try { - /** @var AzureJsonWebKeys $response */ - $response = $azureClustersClient->getAzureJsonWebKeys($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 -{ - $formattedAzureCluster = AzureClustersClient::azureClusterName( - '[PROJECT]', - '[LOCATION]', - '[AZURE_CLUSTER]' - ); - - get_azure_json_web_keys_sample($formattedAzureCluster); -} -// [END gkemulticloud_v1_generated_AzureClusters_GetAzureJsonWebKeys_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_node_pool.php deleted file mode 100644 index e3841d2ecef0..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_node_pool.php +++ /dev/null @@ -1,85 +0,0 @@ -/locations//azureClusters//azureNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureNodePoolName()} for help formatting this field. - */ -function get_azure_node_pool_sample(string $formattedName): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new GetAzureNodePoolRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AzureNodePool $response */ - $response = $azureClustersClient->getAzureNodePool($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 = AzureClustersClient::azureNodePoolName( - '[PROJECT]', - '[LOCATION]', - '[AZURE_CLUSTER]', - '[AZURE_NODE_POOL]' - ); - - get_azure_node_pool_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AzureClusters_GetAzureNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_open_id_config.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_open_id_config.php deleted file mode 100644 index 6f9ededfea99..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_open_id_config.php +++ /dev/null @@ -1,81 +0,0 @@ -/locations//azureClusters/ - * Please see {@see AzureClustersClient::azureClusterName()} for help formatting this field. - */ -function get_azure_open_id_config_sample(string $formattedAzureCluster): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new GetAzureOpenIdConfigRequest()) - ->setAzureCluster($formattedAzureCluster); - - // Call the API and handle any network failures. - try { - /** @var AzureOpenIdConfig $response */ - $response = $azureClustersClient->getAzureOpenIdConfig($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 -{ - $formattedAzureCluster = AzureClustersClient::azureClusterName( - '[PROJECT]', - '[LOCATION]', - '[AZURE_CLUSTER]' - ); - - get_azure_open_id_config_sample($formattedAzureCluster); -} -// [END gkemulticloud_v1_generated_AzureClusters_GetAzureOpenIdConfig_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_server_config.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_server_config.php deleted file mode 100644 index 8546a324d59c..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/get_azure_server_config.php +++ /dev/null @@ -1,80 +0,0 @@ -/locations//azureServerConfig`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureServerConfigName()} for help formatting this field. - */ -function get_azure_server_config_sample(string $formattedName): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new GetAzureServerConfigRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AzureServerConfig $response */ - $response = $azureClustersClient->getAzureServerConfig($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 = AzureClustersClient::azureServerConfigName('[PROJECT]', '[LOCATION]'); - - get_azure_server_config_sample($formattedName); -} -// [END gkemulticloud_v1_generated_AzureClusters_GetAzureServerConfig_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_clients.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_clients.php deleted file mode 100644 index 909a0c7aad97..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_clients.php +++ /dev/null @@ -1,83 +0,0 @@ -/locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AzureClustersClient::locationName()} for help formatting this field. - */ -function list_azure_clients_sample(string $formattedParent): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new ListAzureClientsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $azureClustersClient->listAzureClients($request); - - /** @var AzureClient $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 = AzureClustersClient::locationName('[PROJECT]', '[LOCATION]'); - - list_azure_clients_sample($formattedParent); -} -// [END gkemulticloud_v1_generated_AzureClusters_ListAzureClients_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_clusters.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_clusters.php deleted file mode 100644 index 5b0f517c9dbd..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_clusters.php +++ /dev/null @@ -1,83 +0,0 @@ -/locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud Platform resource names. Please see - * {@see AzureClustersClient::locationName()} for help formatting this field. - */ -function list_azure_clusters_sample(string $formattedParent): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new ListAzureClustersRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $azureClustersClient->listAzureClusters($request); - - /** @var AzureCluster $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 = AzureClustersClient::locationName('[PROJECT]', '[LOCATION]'); - - list_azure_clusters_sample($formattedParent); -} -// [END gkemulticloud_v1_generated_AzureClusters_ListAzureClusters_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_node_pools.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_node_pools.php deleted file mode 100644 index ea4f81b80659..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/list_azure_node_pools.php +++ /dev/null @@ -1,89 +0,0 @@ -/locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. Please see - * {@see AzureClustersClient::azureClusterName()} for help formatting this field. - */ -function list_azure_node_pools_sample(string $formattedParent): void -{ - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $request = (new ListAzureNodePoolsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $azureClustersClient->listAzureNodePools($request); - - /** @var AzureNodePool $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 = AzureClustersClient::azureClusterName( - '[PROJECT]', - '[LOCATION]', - '[AZURE_CLUSTER]' - ); - - list_azure_node_pools_sample($formattedParent); -} -// [END gkemulticloud_v1_generated_AzureClusters_ListAzureNodePools_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/update_azure_cluster.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/update_azure_cluster.php deleted file mode 100644 index 4cab21c3e7a8..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/update_azure_cluster.php +++ /dev/null @@ -1,185 +0,0 @@ -/resourceGroups/` - * @param string $azureClusterNetworkingVirtualNetworkId The Azure Resource Manager (ARM) ID of the VNet associated with - * your cluster. - * - * All components in the cluster (i.e. control plane and node pools) run on a - * single VNet. - * - * Example: - * `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/` - * - * This field cannot be changed after creation. - * @param string $azureClusterNetworkingPodAddressCidrBlocksElement The IP address range of the pods in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * - * All pods in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * - * This field cannot be changed after creation. - * @param string $azureClusterNetworkingServiceAddressCidrBlocksElement The IP address range for services in this cluster, in CIDR - * notation (e.g. `10.96.0.0/14`). - * - * All services in the cluster get assigned a unique IPv4 address from these - * ranges. Only a single range is supported. - * - * This field cannot be changed after creating a cluster. - * @param string $azureClusterControlPlaneVersion The Kubernetes version to run on control plane replicas - * (e.g. `1.19.10-gke.1000`). - * - * You can list all supported versions on a given Google Cloud region by - * calling - * [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]. - * @param string $azureClusterControlPlaneSshConfigAuthorizedKey The SSH public key data for VMs managed by Anthos. This accepts - * the authorized_keys file format used in OpenSSH according to the sshd(8) - * manual page. - * @param string $azureClusterFleetProject The name of the Fleet host project where this cluster will be - * registered. - * - * Project names are formatted as - * `projects/`. - */ -function update_azure_cluster_sample( - string $azureClusterAzureRegion, - string $azureClusterResourceGroupId, - string $azureClusterNetworkingVirtualNetworkId, - string $azureClusterNetworkingPodAddressCidrBlocksElement, - string $azureClusterNetworkingServiceAddressCidrBlocksElement, - string $azureClusterControlPlaneVersion, - string $azureClusterControlPlaneSshConfigAuthorizedKey, - string $azureClusterFleetProject -): void { - // Create a client. - $azureClustersClient = new AzureClustersClient(); - - // Prepare the request message. - $azureClusterNetworkingPodAddressCidrBlocks = [ - $azureClusterNetworkingPodAddressCidrBlocksElement, - ]; - $azureClusterNetworkingServiceAddressCidrBlocks = [ - $azureClusterNetworkingServiceAddressCidrBlocksElement, - ]; - $azureClusterNetworking = (new AzureClusterNetworking()) - ->setVirtualNetworkId($azureClusterNetworkingVirtualNetworkId) - ->setPodAddressCidrBlocks($azureClusterNetworkingPodAddressCidrBlocks) - ->setServiceAddressCidrBlocks($azureClusterNetworkingServiceAddressCidrBlocks); - $azureClusterControlPlaneSshConfig = (new AzureSshConfig()) - ->setAuthorizedKey($azureClusterControlPlaneSshConfigAuthorizedKey); - $azureClusterControlPlane = (new AzureControlPlane()) - ->setVersion($azureClusterControlPlaneVersion) - ->setSshConfig($azureClusterControlPlaneSshConfig); - $azureClusterAuthorization = new AzureAuthorization(); - $azureClusterFleet = (new Fleet()) - ->setProject($azureClusterFleetProject); - $azureCluster = (new AzureCluster()) - ->setAzureRegion($azureClusterAzureRegion) - ->setResourceGroupId($azureClusterResourceGroupId) - ->setNetworking($azureClusterNetworking) - ->setControlPlane($azureClusterControlPlane) - ->setAuthorization($azureClusterAuthorization) - ->setFleet($azureClusterFleet); - $updateMask = new FieldMask(); - $request = (new UpdateAzureClusterRequest()) - ->setAzureCluster($azureCluster) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $azureClustersClient->updateAzureCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AzureCluster $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 -{ - $azureClusterAzureRegion = '[AZURE_REGION]'; - $azureClusterResourceGroupId = '[RESOURCE_GROUP_ID]'; - $azureClusterNetworkingVirtualNetworkId = '[VIRTUAL_NETWORK_ID]'; - $azureClusterNetworkingPodAddressCidrBlocksElement = '[POD_ADDRESS_CIDR_BLOCKS]'; - $azureClusterNetworkingServiceAddressCidrBlocksElement = '[SERVICE_ADDRESS_CIDR_BLOCKS]'; - $azureClusterControlPlaneVersion = '[VERSION]'; - $azureClusterControlPlaneSshConfigAuthorizedKey = '[AUTHORIZED_KEY]'; - $azureClusterFleetProject = '[PROJECT]'; - - update_azure_cluster_sample( - $azureClusterAzureRegion, - $azureClusterResourceGroupId, - $azureClusterNetworkingVirtualNetworkId, - $azureClusterNetworkingPodAddressCidrBlocksElement, - $azureClusterNetworkingServiceAddressCidrBlocksElement, - $azureClusterControlPlaneVersion, - $azureClusterControlPlaneSshConfigAuthorizedKey, - $azureClusterFleetProject - ); -} -// [END gkemulticloud_v1_generated_AzureClusters_UpdateAzureCluster_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/update_azure_node_pool.php b/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/update_azure_node_pool.php deleted file mode 100644 index 1fc5162657e5..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/samples/V1/AzureClustersClient/update_azure_node_pool.php +++ /dev/null @@ -1,133 +0,0 @@ -setAuthorizedKey($azureNodePoolConfigSshConfigAuthorizedKey); - $azureNodePoolConfig = (new AzureNodeConfig()) - ->setSshConfig($azureNodePoolConfigSshConfig); - $azureNodePoolAutoscaling = (new AzureNodePoolAutoscaling()) - ->setMinNodeCount($azureNodePoolAutoscalingMinNodeCount) - ->setMaxNodeCount($azureNodePoolAutoscalingMaxNodeCount); - $azureNodePoolMaxPodsConstraint = (new MaxPodsConstraint()) - ->setMaxPodsPerNode($azureNodePoolMaxPodsConstraintMaxPodsPerNode); - $azureNodePool = (new AzureNodePool()) - ->setVersion($azureNodePoolVersion) - ->setConfig($azureNodePoolConfig) - ->setSubnetId($azureNodePoolSubnetId) - ->setAutoscaling($azureNodePoolAutoscaling) - ->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); - $updateMask = new FieldMask(); - $request = (new UpdateAzureNodePoolRequest()) - ->setAzureNodePool($azureNodePool) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $azureClustersClient->updateAzureNodePool($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AzureNodePool $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 -{ - $azureNodePoolVersion = '[VERSION]'; - $azureNodePoolConfigSshConfigAuthorizedKey = '[AUTHORIZED_KEY]'; - $azureNodePoolSubnetId = '[SUBNET_ID]'; - $azureNodePoolAutoscalingMinNodeCount = 0; - $azureNodePoolAutoscalingMaxNodeCount = 0; - $azureNodePoolMaxPodsConstraintMaxPodsPerNode = 0; - - update_azure_node_pool_sample( - $azureNodePoolVersion, - $azureNodePoolConfigSshConfigAuthorizedKey, - $azureNodePoolSubnetId, - $azureNodePoolAutoscalingMinNodeCount, - $azureNodePoolAutoscalingMaxNodeCount, - $azureNodePoolMaxPodsConstraintMaxPodsPerNode - ); -} -// [END gkemulticloud_v1_generated_AzureClusters_UpdateAzureNodePool_sync] diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AttachedClustersClient.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AttachedClustersClient.php deleted file mode 100644 index 4a94f10a738f..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AttachedClustersClient.php +++ /dev/null @@ -1,595 +0,0 @@ - createAttachedClusterAsync(CreateAttachedClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAttachedClusterAsync(DeleteAttachedClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateAttachedClusterAgentTokenAsync(GenerateAttachedClusterAgentTokenRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateAttachedClusterInstallManifestAsync(GenerateAttachedClusterInstallManifestRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAttachedClusterAsync(GetAttachedClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAttachedServerConfigAsync(GetAttachedServerConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface importAttachedClusterAsync(ImportAttachedClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAttachedClustersAsync(ListAttachedClustersRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAttachedClusterAsync(UpdateAttachedClusterRequest $request, array $optionalArgs = []) - */ -final class AttachedClustersClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.gkemulticloud.v1.AttachedClusters'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'gkemulticloud.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'gkemulticloud.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', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/attached_clusters_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/attached_clusters_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/attached_clusters_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/attached_clusters_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 = isset($this->descriptors[$methodName]['longRunning']) ? $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 - * attached_cluster resource. - * - * @param string $project - * @param string $location - * @param string $attachedCluster - * - * @return string The formatted attached_cluster resource. - */ - public static function attachedClusterName(string $project, string $location, string $attachedCluster): string - { - return self::getPathTemplate('attachedCluster')->render([ - 'project' => $project, - 'location' => $location, - 'attached_cluster' => $attachedCluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * attached_server_config resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted attached_server_config resource. - */ - public static function attachedServerConfigName(string $project, string $location): string - { - return self::getPathTemplate('attachedServerConfig')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * 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 - * - attachedCluster: projects/{project}/locations/{location}/attachedClusters/{attached_cluster} - * - attachedServerConfig: projects/{project}/locations/{location}/attachedServerConfig - * - 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 $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 'gkemulticloud.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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 - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * on a given Google Cloud Platform project and region. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AttachedClustersClient::createAttachedClusterAsync()} - * . - * - * @example samples/V1/AttachedClustersClient/create_attached_cluster.php - * - * @param CreateAttachedClusterRequest $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 createAttachedCluster(CreateAttachedClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAttachedCluster', $request, $callOptions)->wait(); - } - - /** - * Deletes a specific - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AttachedClustersClient::deleteAttachedClusterAsync()} - * . - * - * @example samples/V1/AttachedClustersClient/delete_attached_cluster.php - * - * @param DeleteAttachedClusterRequest $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 deleteAttachedCluster(DeleteAttachedClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAttachedCluster', $request, $callOptions)->wait(); - } - - /** - * Generates an access token for a cluster agent. - * - * The async variant is - * {@see AttachedClustersClient::generateAttachedClusterAgentTokenAsync()} . - * - * @example samples/V1/AttachedClustersClient/generate_attached_cluster_agent_token.php - * - * @param GenerateAttachedClusterAgentTokenRequest $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 GenerateAttachedClusterAgentTokenResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateAttachedClusterAgentToken(GenerateAttachedClusterAgentTokenRequest $request, array $callOptions = []): GenerateAttachedClusterAgentTokenResponse - { - return $this->startApiCall('GenerateAttachedClusterAgentToken', $request, $callOptions)->wait(); - } - - /** - * Generates the install manifest to be installed on the target cluster. - * - * The async variant is - * {@see AttachedClustersClient::generateAttachedClusterInstallManifestAsync()} . - * - * @example samples/V1/AttachedClustersClient/generate_attached_cluster_install_manifest.php - * - * @param GenerateAttachedClusterInstallManifestRequest $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 GenerateAttachedClusterInstallManifestResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateAttachedClusterInstallManifest(GenerateAttachedClusterInstallManifestRequest $request, array $callOptions = []): GenerateAttachedClusterInstallManifestResponse - { - return $this->startApiCall('GenerateAttachedClusterInstallManifest', $request, $callOptions)->wait(); - } - - /** - * Describes a specific - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource. - * - * The async variant is {@see AttachedClustersClient::getAttachedClusterAsync()} . - * - * @example samples/V1/AttachedClustersClient/get_attached_cluster.php - * - * @param GetAttachedClusterRequest $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 AttachedCluster - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAttachedCluster(GetAttachedClusterRequest $request, array $callOptions = []): AttachedCluster - { - return $this->startApiCall('GetAttachedCluster', $request, $callOptions)->wait(); - } - - /** - * Returns information, such as supported Kubernetes versions, on a given - * Google Cloud location. - * - * The async variant is - * {@see AttachedClustersClient::getAttachedServerConfigAsync()} . - * - * @example samples/V1/AttachedClustersClient/get_attached_server_config.php - * - * @param GetAttachedServerConfigRequest $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 AttachedServerConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAttachedServerConfig(GetAttachedServerConfigRequest $request, array $callOptions = []): AttachedServerConfig - { - return $this->startApiCall('GetAttachedServerConfig', $request, $callOptions)->wait(); - } - - /** - * Imports creates a new - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource - * by importing an existing Fleet Membership resource. - * - * Attached Clusters created before the introduction of the Anthos Multi-Cloud - * API can be imported through this method. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AttachedClustersClient::importAttachedClusterAsync()} - * . - * - * @example samples/V1/AttachedClustersClient/import_attached_cluster.php - * - * @param ImportAttachedClusterRequest $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 importAttachedCluster(ImportAttachedClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ImportAttachedCluster', $request, $callOptions)->wait(); - } - - /** - * Lists all [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] - * resources on a given Google Cloud project and region. - * - * The async variant is {@see AttachedClustersClient::listAttachedClustersAsync()} - * . - * - * @example samples/V1/AttachedClustersClient/list_attached_clusters.php - * - * @param ListAttachedClustersRequest $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 listAttachedClusters(ListAttachedClustersRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAttachedClusters', $request, $callOptions); - } - - /** - * Updates an - * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. - * - * The async variant is {@see AttachedClustersClient::updateAttachedClusterAsync()} - * . - * - * @example samples/V1/AttachedClustersClient/update_attached_cluster.php - * - * @param UpdateAttachedClusterRequest $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 updateAttachedCluster(UpdateAttachedClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAttachedCluster', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AwsClustersClient.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AwsClustersClient.php deleted file mode 100644 index f9a3817c28fa..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AwsClustersClient.php +++ /dev/null @@ -1,825 +0,0 @@ - createAwsClusterAsync(CreateAwsClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface createAwsNodePoolAsync(CreateAwsNodePoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAwsClusterAsync(DeleteAwsClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAwsNodePoolAsync(DeleteAwsNodePoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateAwsAccessTokenAsync(GenerateAwsAccessTokenRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateAwsClusterAgentTokenAsync(GenerateAwsClusterAgentTokenRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAwsClusterAsync(GetAwsClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAwsJsonWebKeysAsync(GetAwsJsonWebKeysRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAwsNodePoolAsync(GetAwsNodePoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAwsOpenIdConfigAsync(GetAwsOpenIdConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAwsServerConfigAsync(GetAwsServerConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAwsClustersAsync(ListAwsClustersRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAwsNodePoolsAsync(ListAwsNodePoolsRequest $request, array $optionalArgs = []) - * @method PromiseInterface rollbackAwsNodePoolUpdateAsync(RollbackAwsNodePoolUpdateRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAwsClusterAsync(UpdateAwsClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAwsNodePoolAsync(UpdateAwsNodePoolRequest $request, array $optionalArgs = []) - */ -final class AwsClustersClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.gkemulticloud.v1.AwsClusters'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'gkemulticloud.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'gkemulticloud.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', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/aws_clusters_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/aws_clusters_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/aws_clusters_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/aws_clusters_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 = isset($this->descriptors[$methodName]['longRunning']) ? $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 aws_cluster - * resource. - * - * @param string $project - * @param string $location - * @param string $awsCluster - * - * @return string The formatted aws_cluster resource. - */ - public static function awsClusterName(string $project, string $location, string $awsCluster): string - { - return self::getPathTemplate('awsCluster')->render([ - 'project' => $project, - 'location' => $location, - 'aws_cluster' => $awsCluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * aws_node_pool resource. - * - * @param string $project - * @param string $location - * @param string $awsCluster - * @param string $awsNodePool - * - * @return string The formatted aws_node_pool resource. - */ - public static function awsNodePoolName(string $project, string $location, string $awsCluster, string $awsNodePool): string - { - return self::getPathTemplate('awsNodePool')->render([ - 'project' => $project, - 'location' => $location, - 'aws_cluster' => $awsCluster, - 'aws_node_pool' => $awsNodePool, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * aws_server_config resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted aws_server_config resource. - */ - public static function awsServerConfigName(string $project, string $location): string - { - return self::getPathTemplate('awsServerConfig')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * 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 - * - awsCluster: projects/{project}/locations/{location}/awsClusters/{aws_cluster} - * - awsNodePool: projects/{project}/locations/{location}/awsClusters/{aws_cluster}/awsNodePools/{aws_node_pool} - * - awsServerConfig: projects/{project}/locations/{location}/awsServerConfig - * - 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 $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 'gkemulticloud.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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 [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource on a given Google Cloud Platform project and region. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AwsClustersClient::createAwsClusterAsync()} . - * - * @example samples/V1/AwsClustersClient/create_aws_cluster.php - * - * @param CreateAwsClusterRequest $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 createAwsCluster(CreateAwsClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAwsCluster', $request, $callOptions)->wait(); - } - - /** - * Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], - * attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AwsClustersClient::createAwsNodePoolAsync()} . - * - * @example samples/V1/AwsClustersClient/create_aws_node_pool.php - * - * @param CreateAwsNodePoolRequest $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 createAwsNodePool(CreateAwsNodePoolRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAwsNodePool', $request, $callOptions)->wait(); - } - - /** - * Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource. - * - * Fails if the cluster has one or more associated - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AwsClustersClient::deleteAwsClusterAsync()} . - * - * @example samples/V1/AwsClustersClient/delete_aws_cluster.php - * - * @param DeleteAwsClusterRequest $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 deleteAwsCluster(DeleteAwsClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAwsCluster', $request, $callOptions)->wait(); - } - - /** - * Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resource. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AwsClustersClient::deleteAwsNodePoolAsync()} . - * - * @example samples/V1/AwsClustersClient/delete_aws_node_pool.php - * - * @param DeleteAwsNodePoolRequest $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 deleteAwsNodePool(DeleteAwsNodePoolRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAwsNodePool', $request, $callOptions)->wait(); - } - - /** - * Generates a short-lived access token to authenticate to a given - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. - * - * The async variant is {@see AwsClustersClient::generateAwsAccessTokenAsync()} . - * - * @example samples/V1/AwsClustersClient/generate_aws_access_token.php - * - * @param GenerateAwsAccessTokenRequest $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 GenerateAwsAccessTokenResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateAwsAccessToken(GenerateAwsAccessTokenRequest $request, array $callOptions = []): GenerateAwsAccessTokenResponse - { - return $this->startApiCall('GenerateAwsAccessToken', $request, $callOptions)->wait(); - } - - /** - * Generates an access token for a cluster agent. - * - * The async variant is - * {@see AwsClustersClient::generateAwsClusterAgentTokenAsync()} . - * - * @example samples/V1/AwsClustersClient/generate_aws_cluster_agent_token.php - * - * @param GenerateAwsClusterAgentTokenRequest $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 GenerateAwsClusterAgentTokenResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateAwsClusterAgentToken(GenerateAwsClusterAgentTokenRequest $request, array $callOptions = []): GenerateAwsClusterAgentTokenResponse - { - return $this->startApiCall('GenerateAwsClusterAgentToken', $request, $callOptions)->wait(); - } - - /** - * Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - * resource. - * - * The async variant is {@see AwsClustersClient::getAwsClusterAsync()} . - * - * @example samples/V1/AwsClustersClient/get_aws_cluster.php - * - * @param GetAwsClusterRequest $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 AwsCluster - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAwsCluster(GetAwsClusterRequest $request, array $callOptions = []): AwsCluster - { - return $this->startApiCall('GetAwsCluster', $request, $callOptions)->wait(); - } - - /** - * Gets the public component of the cluster signing keys in - * JSON Web Key format. - * - * The async variant is {@see AwsClustersClient::getAwsJsonWebKeysAsync()} . - * - * @example samples/V1/AwsClustersClient/get_aws_json_web_keys.php - * - * @param GetAwsJsonWebKeysRequest $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 AwsJsonWebKeys - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAwsJsonWebKeys(GetAwsJsonWebKeysRequest $request, array $callOptions = []): AwsJsonWebKeys - { - return $this->startApiCall('GetAwsJsonWebKeys', $request, $callOptions)->wait(); - } - - /** - * Describes a specific - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. - * - * The async variant is {@see AwsClustersClient::getAwsNodePoolAsync()} . - * - * @example samples/V1/AwsClustersClient/get_aws_node_pool.php - * - * @param GetAwsNodePoolRequest $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 AwsNodePool - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAwsNodePool(GetAwsNodePoolRequest $request, array $callOptions = []): AwsNodePool - { - return $this->startApiCall('GetAwsNodePool', $request, $callOptions)->wait(); - } - - /** - * Gets the OIDC discovery document for the cluster. - * See the - * [OpenID Connect Discovery 1.0 - * specification](https://openid.net/specs/openid-connect-discovery-1_0.html) - * for details. - * - * The async variant is {@see AwsClustersClient::getAwsOpenIdConfigAsync()} . - * - * @example samples/V1/AwsClustersClient/get_aws_open_id_config.php - * - * @param GetAwsOpenIdConfigRequest $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 AwsOpenIdConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAwsOpenIdConfig(GetAwsOpenIdConfigRequest $request, array $callOptions = []): AwsOpenIdConfig - { - return $this->startApiCall('GetAwsOpenIdConfig', $request, $callOptions)->wait(); - } - - /** - * Returns information, such as supported AWS regions and Kubernetes - * versions, on a given Google Cloud location. - * - * The async variant is {@see AwsClustersClient::getAwsServerConfigAsync()} . - * - * @example samples/V1/AwsClustersClient/get_aws_server_config.php - * - * @param GetAwsServerConfigRequest $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 AwsServerConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAwsServerConfig(GetAwsServerConfigRequest $request, array $callOptions = []): AwsServerConfig - { - return $this->startApiCall('GetAwsServerConfig', $request, $callOptions)->wait(); - } - - /** - * Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources - * on a given Google Cloud project and region. - * - * The async variant is {@see AwsClustersClient::listAwsClustersAsync()} . - * - * @example samples/V1/AwsClustersClient/list_aws_clusters.php - * - * @param ListAwsClustersRequest $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 listAwsClusters(ListAwsClustersRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAwsClusters', $request, $callOptions); - } - - /** - * Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - * resources on a given - * [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - * - * The async variant is {@see AwsClustersClient::listAwsNodePoolsAsync()} . - * - * @example samples/V1/AwsClustersClient/list_aws_node_pools.php - * - * @param ListAwsNodePoolsRequest $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 listAwsNodePools(ListAwsNodePoolsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAwsNodePools', $request, $callOptions); - } - - /** - * Rolls back a previously aborted or failed - * [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] update request. - * Makes no changes if the last update request successfully finished. - * If an update request is in progress, you cannot rollback the update. - * You must first cancel or let it finish unsuccessfully before you can - * rollback. - * - * The async variant is {@see AwsClustersClient::rollbackAwsNodePoolUpdateAsync()} - * . - * - * @example samples/V1/AwsClustersClient/rollback_aws_node_pool_update.php - * - * @param RollbackAwsNodePoolUpdateRequest $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 rollbackAwsNodePoolUpdate(RollbackAwsNodePoolUpdateRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RollbackAwsNodePoolUpdate', $request, $callOptions)->wait(); - } - - /** - * Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - * - * The async variant is {@see AwsClustersClient::updateAwsClusterAsync()} . - * - * @example samples/V1/AwsClustersClient/update_aws_cluster.php - * - * @param UpdateAwsClusterRequest $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 updateAwsCluster(UpdateAwsClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAwsCluster', $request, $callOptions)->wait(); - } - - /** - * Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. - * - * The async variant is {@see AwsClustersClient::updateAwsNodePoolAsync()} . - * - * @example samples/V1/AwsClustersClient/update_aws_node_pool.php - * - * @param UpdateAwsNodePoolRequest $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 updateAwsNodePool(UpdateAwsNodePoolRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAwsNodePool', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AzureClustersClient.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AzureClustersClient.php deleted file mode 100644 index 24e8ce797e6e..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/Client/AzureClustersClient.php +++ /dev/null @@ -1,945 +0,0 @@ - createAzureClientAsync(CreateAzureClientRequest $request, array $optionalArgs = []) - * @method PromiseInterface createAzureClusterAsync(CreateAzureClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface createAzureNodePoolAsync(CreateAzureNodePoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAzureClientAsync(DeleteAzureClientRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAzureClusterAsync(DeleteAzureClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAzureNodePoolAsync(DeleteAzureNodePoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateAzureAccessTokenAsync(GenerateAzureAccessTokenRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateAzureClusterAgentTokenAsync(GenerateAzureClusterAgentTokenRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAzureClientAsync(GetAzureClientRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAzureClusterAsync(GetAzureClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAzureJsonWebKeysAsync(GetAzureJsonWebKeysRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAzureNodePoolAsync(GetAzureNodePoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAzureOpenIdConfigAsync(GetAzureOpenIdConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAzureServerConfigAsync(GetAzureServerConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAzureClientsAsync(ListAzureClientsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAzureClustersAsync(ListAzureClustersRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAzureNodePoolsAsync(ListAzureNodePoolsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAzureClusterAsync(UpdateAzureClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAzureNodePoolAsync(UpdateAzureNodePoolRequest $request, array $optionalArgs = []) - */ -final class AzureClustersClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.gkemulticloud.v1.AzureClusters'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'gkemulticloud.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'gkemulticloud.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', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/azure_clusters_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/azure_clusters_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/azure_clusters_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/azure_clusters_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 = isset($this->descriptors[$methodName]['longRunning']) ? $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 azure_client - * resource. - * - * @param string $project - * @param string $location - * @param string $azureClient - * - * @return string The formatted azure_client resource. - */ - public static function azureClientName(string $project, string $location, string $azureClient): string - { - return self::getPathTemplate('azureClient')->render([ - 'project' => $project, - 'location' => $location, - 'azure_client' => $azureClient, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * azure_cluster resource. - * - * @param string $project - * @param string $location - * @param string $azureCluster - * - * @return string The formatted azure_cluster resource. - */ - public static function azureClusterName(string $project, string $location, string $azureCluster): string - { - return self::getPathTemplate('azureCluster')->render([ - 'project' => $project, - 'location' => $location, - 'azure_cluster' => $azureCluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * azure_node_pool resource. - * - * @param string $project - * @param string $location - * @param string $azureCluster - * @param string $azureNodePool - * - * @return string The formatted azure_node_pool resource. - */ - public static function azureNodePoolName(string $project, string $location, string $azureCluster, string $azureNodePool): string - { - return self::getPathTemplate('azureNodePool')->render([ - 'project' => $project, - 'location' => $location, - 'azure_cluster' => $azureCluster, - 'azure_node_pool' => $azureNodePool, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * azure_server_config resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted azure_server_config resource. - */ - public static function azureServerConfigName(string $project, string $location): string - { - return self::getPathTemplate('azureServerConfig')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * 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 - * - azureClient: projects/{project}/locations/{location}/azureClients/{azure_client} - * - azureCluster: projects/{project}/locations/{location}/azureClusters/{azure_cluster} - * - azureNodePool: projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool} - * - azureServerConfig: projects/{project}/locations/{location}/azureServerConfig - * - 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 $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 'gkemulticloud.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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 [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - * resource on a given Google Cloud project and region. - * - * `AzureClient` resources hold client authentication - * information needed by the Anthos Multicloud API to manage Azure resources - * on your Azure subscription on your behalf. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AzureClustersClient::createAzureClientAsync()} . - * - * @example samples/V1/AzureClustersClient/create_azure_client.php - * - * @param CreateAzureClientRequest $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 createAzureClient(CreateAzureClientRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAzureClient', $request, $callOptions)->wait(); - } - - /** - * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resource on a given Google Cloud Platform project and region. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AzureClustersClient::createAzureClusterAsync()} . - * - * @example samples/V1/AzureClustersClient/create_azure_cluster.php - * - * @param CreateAzureClusterRequest $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 createAzureCluster(CreateAzureClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAzureCluster', $request, $callOptions)->wait(); - } - - /** - * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], - * attached to a given - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AzureClustersClient::createAzureNodePoolAsync()} . - * - * @example samples/V1/AzureClustersClient/create_azure_node_pool.php - * - * @param CreateAzureNodePoolRequest $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 createAzureNodePool(CreateAzureNodePoolRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAzureNodePool', $request, $callOptions)->wait(); - } - - /** - * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - * resource. - * - * If the client is used by one or more clusters, deletion will - * fail and a `FAILED_PRECONDITION` error will be returned. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AzureClustersClient::deleteAzureClientAsync()} . - * - * @example samples/V1/AzureClustersClient/delete_azure_client.php - * - * @param DeleteAzureClientRequest $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 deleteAzureClient(DeleteAzureClientRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAzureClient', $request, $callOptions)->wait(); - } - - /** - * Deletes a specific - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. - * - * Fails if the cluster has one or more associated - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AzureClustersClient::deleteAzureClusterAsync()} . - * - * @example samples/V1/AzureClustersClient/delete_azure_cluster.php - * - * @param DeleteAzureClusterRequest $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 deleteAzureCluster(DeleteAzureClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAzureCluster', $request, $callOptions)->wait(); - } - - /** - * Deletes a specific - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. - * - * If successful, the response contains a newly created - * [Operation][google.longrunning.Operation] resource that can be - * described to track the status of the operation. - * - * The async variant is {@see AzureClustersClient::deleteAzureNodePoolAsync()} . - * - * @example samples/V1/AzureClustersClient/delete_azure_node_pool.php - * - * @param DeleteAzureNodePoolRequest $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 deleteAzureNodePool(DeleteAzureNodePoolRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAzureNodePool', $request, $callOptions)->wait(); - } - - /** - * Generates a short-lived access token to authenticate to a given - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. - * - * The async variant is {@see AzureClustersClient::generateAzureAccessTokenAsync()} - * . - * - * @example samples/V1/AzureClustersClient/generate_azure_access_token.php - * - * @param GenerateAzureAccessTokenRequest $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 GenerateAzureAccessTokenResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateAzureAccessToken(GenerateAzureAccessTokenRequest $request, array $callOptions = []): GenerateAzureAccessTokenResponse - { - return $this->startApiCall('GenerateAzureAccessToken', $request, $callOptions)->wait(); - } - - /** - * Generates an access token for a cluster agent. - * - * The async variant is - * {@see AzureClustersClient::generateAzureClusterAgentTokenAsync()} . - * - * @example samples/V1/AzureClustersClient/generate_azure_cluster_agent_token.php - * - * @param GenerateAzureClusterAgentTokenRequest $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 GenerateAzureClusterAgentTokenResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateAzureClusterAgentToken(GenerateAzureClusterAgentTokenRequest $request, array $callOptions = []): GenerateAzureClusterAgentTokenResponse - { - return $this->startApiCall('GenerateAzureClusterAgentToken', $request, $callOptions)->wait(); - } - - /** - * Describes a specific - * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. - * - * The async variant is {@see AzureClustersClient::getAzureClientAsync()} . - * - * @example samples/V1/AzureClustersClient/get_azure_client.php - * - * @param GetAzureClientRequest $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 AzureClient - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAzureClient(GetAzureClientRequest $request, array $callOptions = []): AzureClient - { - return $this->startApiCall('GetAzureClient', $request, $callOptions)->wait(); - } - - /** - * Describes a specific - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. - * - * The async variant is {@see AzureClustersClient::getAzureClusterAsync()} . - * - * @example samples/V1/AzureClustersClient/get_azure_cluster.php - * - * @param GetAzureClusterRequest $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 AzureCluster - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAzureCluster(GetAzureClusterRequest $request, array $callOptions = []): AzureCluster - { - return $this->startApiCall('GetAzureCluster', $request, $callOptions)->wait(); - } - - /** - * Gets the public component of the cluster signing keys in - * JSON Web Key format. - * - * The async variant is {@see AzureClustersClient::getAzureJsonWebKeysAsync()} . - * - * @example samples/V1/AzureClustersClient/get_azure_json_web_keys.php - * - * @param GetAzureJsonWebKeysRequest $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 AzureJsonWebKeys - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAzureJsonWebKeys(GetAzureJsonWebKeysRequest $request, array $callOptions = []): AzureJsonWebKeys - { - return $this->startApiCall('GetAzureJsonWebKeys', $request, $callOptions)->wait(); - } - - /** - * Describes a specific - * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. - * - * The async variant is {@see AzureClustersClient::getAzureNodePoolAsync()} . - * - * @example samples/V1/AzureClustersClient/get_azure_node_pool.php - * - * @param GetAzureNodePoolRequest $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 AzureNodePool - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAzureNodePool(GetAzureNodePoolRequest $request, array $callOptions = []): AzureNodePool - { - return $this->startApiCall('GetAzureNodePool', $request, $callOptions)->wait(); - } - - /** - * Gets the OIDC discovery document for the cluster. - * See the - * [OpenID Connect Discovery 1.0 - * specification](https://openid.net/specs/openid-connect-discovery-1_0.html) - * for details. - * - * The async variant is {@see AzureClustersClient::getAzureOpenIdConfigAsync()} . - * - * @example samples/V1/AzureClustersClient/get_azure_open_id_config.php - * - * @param GetAzureOpenIdConfigRequest $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 AzureOpenIdConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAzureOpenIdConfig(GetAzureOpenIdConfigRequest $request, array $callOptions = []): AzureOpenIdConfig - { - return $this->startApiCall('GetAzureOpenIdConfig', $request, $callOptions)->wait(); - } - - /** - * Returns information, such as supported Azure regions and Kubernetes - * versions, on a given Google Cloud location. - * - * The async variant is {@see AzureClustersClient::getAzureServerConfigAsync()} . - * - * @example samples/V1/AzureClustersClient/get_azure_server_config.php - * - * @param GetAzureServerConfigRequest $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 AzureServerConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAzureServerConfig(GetAzureServerConfigRequest $request, array $callOptions = []): AzureServerConfig - { - return $this->startApiCall('GetAzureServerConfig', $request, $callOptions)->wait(); - } - - /** - * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - * resources on a given Google Cloud project and region. - * - * The async variant is {@see AzureClustersClient::listAzureClientsAsync()} . - * - * @example samples/V1/AzureClustersClient/list_azure_clients.php - * - * @param ListAzureClientsRequest $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 listAzureClients(ListAzureClientsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAzureClients', $request, $callOptions); - } - - /** - * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - * resources on a given Google Cloud project and region. - * - * The async variant is {@see AzureClustersClient::listAzureClustersAsync()} . - * - * @example samples/V1/AzureClustersClient/list_azure_clusters.php - * - * @param ListAzureClustersRequest $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 listAzureClusters(ListAzureClustersRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAzureClusters', $request, $callOptions); - } - - /** - * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - * resources on a given - * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - * - * The async variant is {@see AzureClustersClient::listAzureNodePoolsAsync()} . - * - * @example samples/V1/AzureClustersClient/list_azure_node_pools.php - * - * @param ListAzureNodePoolsRequest $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 listAzureNodePools(ListAzureNodePoolsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAzureNodePools', $request, $callOptions); - } - - /** - * Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - * - * The async variant is {@see AzureClustersClient::updateAzureClusterAsync()} . - * - * @example samples/V1/AzureClustersClient/update_azure_cluster.php - * - * @param UpdateAzureClusterRequest $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 updateAzureCluster(UpdateAzureClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAzureCluster', $request, $callOptions)->wait(); - } - - /** - * Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. - * - * The async variant is {@see AzureClustersClient::updateAzureNodePoolAsync()} . - * - * @example samples/V1/AzureClustersClient/update_azure_node_pool.php - * - * @param UpdateAzureNodePoolRequest $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 updateAzureNodePool(UpdateAzureNodePoolRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAzureNodePool', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/gapic_metadata.json b/owl-bot-staging/GkeMultiCloud/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 511a1a11b279..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,256 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.gkemulticloud.v1", - "libraryPackage": "Google\\Cloud\\GkeMultiCloud\\V1", - "services": { - "AttachedClusters": { - "clients": { - "grpc": { - "libraryClient": "AttachedClustersGapicClient", - "rpcs": { - "CreateAttachedCluster": { - "methods": [ - "createAttachedCluster" - ] - }, - "DeleteAttachedCluster": { - "methods": [ - "deleteAttachedCluster" - ] - }, - "GenerateAttachedClusterAgentToken": { - "methods": [ - "generateAttachedClusterAgentToken" - ] - }, - "GenerateAttachedClusterInstallManifest": { - "methods": [ - "generateAttachedClusterInstallManifest" - ] - }, - "GetAttachedCluster": { - "methods": [ - "getAttachedCluster" - ] - }, - "GetAttachedServerConfig": { - "methods": [ - "getAttachedServerConfig" - ] - }, - "ImportAttachedCluster": { - "methods": [ - "importAttachedCluster" - ] - }, - "ListAttachedClusters": { - "methods": [ - "listAttachedClusters" - ] - }, - "UpdateAttachedCluster": { - "methods": [ - "updateAttachedCluster" - ] - } - } - } - } - }, - "AwsClusters": { - "clients": { - "grpc": { - "libraryClient": "AwsClustersGapicClient", - "rpcs": { - "CreateAwsCluster": { - "methods": [ - "createAwsCluster" - ] - }, - "CreateAwsNodePool": { - "methods": [ - "createAwsNodePool" - ] - }, - "DeleteAwsCluster": { - "methods": [ - "deleteAwsCluster" - ] - }, - "DeleteAwsNodePool": { - "methods": [ - "deleteAwsNodePool" - ] - }, - "GenerateAwsAccessToken": { - "methods": [ - "generateAwsAccessToken" - ] - }, - "GenerateAwsClusterAgentToken": { - "methods": [ - "generateAwsClusterAgentToken" - ] - }, - "GetAwsCluster": { - "methods": [ - "getAwsCluster" - ] - }, - "GetAwsJsonWebKeys": { - "methods": [ - "getAwsJsonWebKeys" - ] - }, - "GetAwsNodePool": { - "methods": [ - "getAwsNodePool" - ] - }, - "GetAwsOpenIdConfig": { - "methods": [ - "getAwsOpenIdConfig" - ] - }, - "GetAwsServerConfig": { - "methods": [ - "getAwsServerConfig" - ] - }, - "ListAwsClusters": { - "methods": [ - "listAwsClusters" - ] - }, - "ListAwsNodePools": { - "methods": [ - "listAwsNodePools" - ] - }, - "RollbackAwsNodePoolUpdate": { - "methods": [ - "rollbackAwsNodePoolUpdate" - ] - }, - "UpdateAwsCluster": { - "methods": [ - "updateAwsCluster" - ] - }, - "UpdateAwsNodePool": { - "methods": [ - "updateAwsNodePool" - ] - } - } - } - } - }, - "AzureClusters": { - "clients": { - "grpc": { - "libraryClient": "AzureClustersGapicClient", - "rpcs": { - "CreateAzureClient": { - "methods": [ - "createAzureClient" - ] - }, - "CreateAzureCluster": { - "methods": [ - "createAzureCluster" - ] - }, - "CreateAzureNodePool": { - "methods": [ - "createAzureNodePool" - ] - }, - "DeleteAzureClient": { - "methods": [ - "deleteAzureClient" - ] - }, - "DeleteAzureCluster": { - "methods": [ - "deleteAzureCluster" - ] - }, - "DeleteAzureNodePool": { - "methods": [ - "deleteAzureNodePool" - ] - }, - "GenerateAzureAccessToken": { - "methods": [ - "generateAzureAccessToken" - ] - }, - "GenerateAzureClusterAgentToken": { - "methods": [ - "generateAzureClusterAgentToken" - ] - }, - "GetAzureClient": { - "methods": [ - "getAzureClient" - ] - }, - "GetAzureCluster": { - "methods": [ - "getAzureCluster" - ] - }, - "GetAzureJsonWebKeys": { - "methods": [ - "getAzureJsonWebKeys" - ] - }, - "GetAzureNodePool": { - "methods": [ - "getAzureNodePool" - ] - }, - "GetAzureOpenIdConfig": { - "methods": [ - "getAzureOpenIdConfig" - ] - }, - "GetAzureServerConfig": { - "methods": [ - "getAzureServerConfig" - ] - }, - "ListAzureClients": { - "methods": [ - "listAzureClients" - ] - }, - "ListAzureClusters": { - "methods": [ - "listAzureClusters" - ] - }, - "ListAzureNodePools": { - "methods": [ - "listAzureNodePools" - ] - }, - "UpdateAzureCluster": { - "methods": [ - "updateAzureCluster" - ] - }, - "UpdateAzureNodePool": { - "methods": [ - "updateAzureNodePool" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_client_config.json b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_client_config.json deleted file mode 100644 index 54292e4dc542..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_client_config.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "interfaces": { - "google.cloud.gkemulticloud.v1.AttachedClusters": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "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": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "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 - } - }, - "methods": { - "CreateAttachedCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAttachedCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GenerateAttachedClusterAgentToken": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GenerateAttachedClusterInstallManifest": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAttachedCluster": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAttachedServerConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ImportAttachedCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListAttachedClusters": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateAttachedCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_descriptor_config.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_descriptor_config.php deleted file mode 100644 index 885a056af3ed..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_descriptor_config.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'google.cloud.gkemulticloud.v1.AttachedClusters' => [ - 'CreateAttachedCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AttachedCluster', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAttachedCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ImportAttachedCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AttachedCluster', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateAttachedCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AttachedCluster', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'attached_cluster.name', - 'fieldAccessors' => [ - 'getAttachedCluster', - 'getName', - ], - ], - ], - ], - 'GenerateAttachedClusterAgentToken' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterAgentTokenResponse', - 'headerParams' => [ - [ - 'keyName' => 'attached_cluster', - 'fieldAccessors' => [ - 'getAttachedCluster', - ], - ], - ], - ], - 'GenerateAttachedClusterInstallManifest' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\GenerateAttachedClusterInstallManifestResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetAttachedCluster' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AttachedCluster', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAttachedServerConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AttachedServerConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAttachedClusters' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAttachedClusters', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\ListAttachedClustersResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'attachedCluster' => 'projects/{project}/locations/{location}/attachedClusters/{attached_cluster}', - 'attachedServerConfig' => 'projects/{project}/locations/{location}/attachedServerConfig', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_rest_client_config.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_rest_client_config.php deleted file mode 100644 index 417a9fc013cb..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/attached_clusters_rest_client_config.php +++ /dev/null @@ -1,185 +0,0 @@ - [ - 'google.cloud.gkemulticloud.v1.AttachedClusters' => [ - 'CreateAttachedCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/attachedClusters', - 'body' => 'attached_cluster', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'attached_cluster_id', - ], - ], - 'DeleteAttachedCluster' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/attachedClusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateAttachedClusterAgentToken' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{attached_cluster=projects/*/locations/*/attachedClusters/*}:generateAttachedClusterAgentToken', - 'body' => '*', - 'placeholders' => [ - 'attached_cluster' => [ - 'getters' => [ - 'getAttachedCluster', - ], - ], - ], - ], - 'GenerateAttachedClusterInstallManifest' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:generateAttachedClusterInstallManifest', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetAttachedCluster' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/attachedClusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAttachedServerConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/attachedServerConfig}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportAttachedCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/attachedClusters:import', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListAttachedClusters' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/attachedClusters', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateAttachedCluster' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{attached_cluster.name=projects/*/locations/*/attachedClusters/*}', - 'body' => 'attached_cluster', - 'placeholders' => [ - 'attached_cluster.name' => [ - 'getters' => [ - 'getAttachedCluster', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_client_config.json b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_client_config.json deleted file mode 100644 index 25741e0c9cd6..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_client_config.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "interfaces": { - "google.cloud.gkemulticloud.v1.AwsClusters": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "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": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "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 - } - }, - "methods": { - "CreateAwsCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateAwsNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAwsCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAwsNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GenerateAwsAccessToken": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GenerateAwsClusterAgentToken": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAwsCluster": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAwsJsonWebKeys": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAwsNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAwsOpenIdConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAwsServerConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAwsClusters": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAwsNodePools": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "RollbackAwsNodePoolUpdate": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateAwsCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateAwsNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_descriptor_config.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_descriptor_config.php deleted file mode 100644 index a171b39f6a19..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_descriptor_config.php +++ /dev/null @@ -1,293 +0,0 @@ - [ - 'google.cloud.gkemulticloud.v1.AwsClusters' => [ - 'CreateAwsCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AwsCluster', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateAwsNodePool' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AwsNodePool', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAwsCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteAwsNodePool' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RollbackAwsNodePoolUpdate' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AwsNodePool', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAwsCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AwsCluster', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'aws_cluster.name', - 'fieldAccessors' => [ - 'getAwsCluster', - 'getName', - ], - ], - ], - ], - 'UpdateAwsNodePool' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AwsNodePool', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'aws_node_pool.name', - 'fieldAccessors' => [ - 'getAwsNodePool', - 'getName', - ], - ], - ], - ], - 'GenerateAwsAccessToken' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\GenerateAwsAccessTokenResponse', - 'headerParams' => [ - [ - 'keyName' => 'aws_cluster', - 'fieldAccessors' => [ - 'getAwsCluster', - ], - ], - ], - ], - 'GenerateAwsClusterAgentToken' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\GenerateAwsClusterAgentTokenResponse', - 'headerParams' => [ - [ - 'keyName' => 'aws_cluster', - 'fieldAccessors' => [ - 'getAwsCluster', - ], - ], - ], - ], - 'GetAwsCluster' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AwsCluster', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAwsJsonWebKeys' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AwsJsonWebKeys', - 'headerParams' => [ - [ - 'keyName' => 'aws_cluster', - 'fieldAccessors' => [ - 'getAwsCluster', - ], - ], - ], - ], - 'GetAwsNodePool' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AwsNodePool', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAwsOpenIdConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AwsOpenIdConfig', - 'headerParams' => [ - [ - 'keyName' => 'aws_cluster', - 'fieldAccessors' => [ - 'getAwsCluster', - ], - ], - ], - ], - 'GetAwsServerConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AwsServerConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAwsClusters' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAwsClusters', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\ListAwsClustersResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListAwsNodePools' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAwsNodePools', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\ListAwsNodePoolsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'awsCluster' => 'projects/{project}/locations/{location}/awsClusters/{aws_cluster}', - 'awsNodePool' => 'projects/{project}/locations/{location}/awsClusters/{aws_cluster}/awsNodePools/{aws_node_pool}', - 'awsServerConfig' => 'projects/{project}/locations/{location}/awsServerConfig', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_rest_client_config.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_rest_client_config.php deleted file mode 100644 index 77f73b4d1ef6..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/aws_clusters_rest_client_config.php +++ /dev/null @@ -1,271 +0,0 @@ - [ - 'google.cloud.gkemulticloud.v1.AwsClusters' => [ - 'CreateAwsCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/awsClusters', - 'body' => 'aws_cluster', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'aws_cluster_id', - ], - ], - 'CreateAwsNodePool' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePools', - 'body' => 'aws_node_pool', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'aws_node_pool_id', - ], - ], - 'DeleteAwsCluster' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/awsClusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteAwsNodePool' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateAwsAccessToken' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}:generateAwsAccessToken', - 'placeholders' => [ - 'aws_cluster' => [ - 'getters' => [ - 'getAwsCluster', - ], - ], - ], - ], - 'GenerateAwsClusterAgentToken' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}:generateAwsClusterAgentToken', - 'body' => '*', - 'placeholders' => [ - 'aws_cluster' => [ - 'getters' => [ - 'getAwsCluster', - ], - ], - ], - ], - 'GetAwsCluster' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/awsClusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAwsJsonWebKeys' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}/jwks', - 'placeholders' => [ - 'aws_cluster' => [ - 'getters' => [ - 'getAwsCluster', - ], - ], - ], - ], - 'GetAwsNodePool' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAwsOpenIdConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}/.well-known/openid-configuration', - 'placeholders' => [ - 'aws_cluster' => [ - 'getters' => [ - 'getAwsCluster', - ], - ], - ], - ], - 'GetAwsServerConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/awsServerConfig}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAwsClusters' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/awsClusters', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListAwsNodePools' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePools', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RollbackAwsNodePoolUpdate' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}:rollback', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAwsCluster' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{aws_cluster.name=projects/*/locations/*/awsClusters/*}', - 'body' => 'aws_cluster', - 'placeholders' => [ - 'aws_cluster.name' => [ - 'getters' => [ - 'getAwsCluster', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateAwsNodePool' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{aws_node_pool.name=projects/*/locations/*/awsClusters/*/awsNodePools/*}', - 'body' => 'aws_node_pool', - 'placeholders' => [ - 'aws_node_pool.name' => [ - 'getters' => [ - 'getAwsNodePool', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_client_config.json b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_client_config.json deleted file mode 100644 index 4b2a2924b13c..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_client_config.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "interfaces": { - "google.cloud.gkemulticloud.v1.AzureClusters": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "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": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "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 - } - }, - "methods": { - "CreateAzureClient": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateAzureCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateAzureNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAzureClient": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAzureCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAzureNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GenerateAzureAccessToken": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GenerateAzureClusterAgentToken": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAzureClient": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAzureCluster": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAzureJsonWebKeys": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAzureNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAzureOpenIdConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAzureServerConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAzureClients": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAzureClusters": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAzureNodePools": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateAzureCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateAzureNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_descriptor_config.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_descriptor_config.php deleted file mode 100644 index 60c660c2ae54..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_descriptor_config.php +++ /dev/null @@ -1,345 +0,0 @@ - [ - 'google.cloud.gkemulticloud.v1.AzureClusters' => [ - 'CreateAzureClient' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AzureClient', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateAzureCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AzureCluster', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateAzureNodePool' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AzureNodePool', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAzureClient' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteAzureCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteAzureNodePool' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAzureCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AzureCluster', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'azure_cluster.name', - 'fieldAccessors' => [ - 'getAzureCluster', - 'getName', - ], - ], - ], - ], - 'UpdateAzureNodePool' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeMultiCloud\V1\AzureNodePool', - 'metadataReturnType' => '\Google\Cloud\GkeMultiCloud\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'azure_node_pool.name', - 'fieldAccessors' => [ - 'getAzureNodePool', - 'getName', - ], - ], - ], - ], - 'GenerateAzureAccessToken' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\GenerateAzureAccessTokenResponse', - 'headerParams' => [ - [ - 'keyName' => 'azure_cluster', - 'fieldAccessors' => [ - 'getAzureCluster', - ], - ], - ], - ], - 'GenerateAzureClusterAgentToken' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\GenerateAzureClusterAgentTokenResponse', - 'headerParams' => [ - [ - 'keyName' => 'azure_cluster', - 'fieldAccessors' => [ - 'getAzureCluster', - ], - ], - ], - ], - 'GetAzureClient' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureClient', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAzureCluster' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureCluster', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAzureJsonWebKeys' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureJsonWebKeys', - 'headerParams' => [ - [ - 'keyName' => 'azure_cluster', - 'fieldAccessors' => [ - 'getAzureCluster', - ], - ], - ], - ], - 'GetAzureNodePool' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureNodePool', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAzureOpenIdConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureOpenIdConfig', - 'headerParams' => [ - [ - 'keyName' => 'azure_cluster', - 'fieldAccessors' => [ - 'getAzureCluster', - ], - ], - ], - ], - 'GetAzureServerConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\AzureServerConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAzureClients' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAzureClients', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\ListAzureClientsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListAzureClusters' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAzureClusters', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\ListAzureClustersResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListAzureNodePools' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAzureNodePools', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeMultiCloud\V1\ListAzureNodePoolsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'azureClient' => 'projects/{project}/locations/{location}/azureClients/{azure_client}', - 'azureCluster' => 'projects/{project}/locations/{location}/azureClusters/{azure_cluster}', - 'azureNodePool' => 'projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool}', - 'azureServerConfig' => 'projects/{project}/locations/{location}/azureServerConfig', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_rest_client_config.php b/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_rest_client_config.php deleted file mode 100644 index 73a101620a07..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/src/V1/resources/azure_clusters_rest_client_config.php +++ /dev/null @@ -1,307 +0,0 @@ - [ - 'google.cloud.gkemulticloud.v1.AzureClusters' => [ - 'CreateAzureClient' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/azureClients', - 'body' => 'azure_client', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'azure_client_id', - ], - ], - 'CreateAzureCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/azureClusters', - 'body' => 'azure_cluster', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'azure_cluster_id', - ], - ], - 'CreateAzureNodePool' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePools', - 'body' => 'azure_node_pool', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'azure_node_pool_id', - ], - ], - 'DeleteAzureClient' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureClients/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteAzureCluster' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureClusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteAzureNodePool' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateAzureAccessToken' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}:generateAzureAccessToken', - 'placeholders' => [ - 'azure_cluster' => [ - 'getters' => [ - 'getAzureCluster', - ], - ], - ], - ], - 'GenerateAzureClusterAgentToken' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}:generateAzureClusterAgentToken', - 'body' => '*', - 'placeholders' => [ - 'azure_cluster' => [ - 'getters' => [ - 'getAzureCluster', - ], - ], - ], - ], - 'GetAzureClient' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureClients/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAzureCluster' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureClusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAzureJsonWebKeys' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}/jwks', - 'placeholders' => [ - 'azure_cluster' => [ - 'getters' => [ - 'getAzureCluster', - ], - ], - ], - ], - 'GetAzureNodePool' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAzureOpenIdConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}/.well-known/openid-configuration', - 'placeholders' => [ - 'azure_cluster' => [ - 'getters' => [ - 'getAzureCluster', - ], - ], - ], - ], - 'GetAzureServerConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/azureServerConfig}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAzureClients' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/azureClients', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListAzureClusters' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/azureClusters', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListAzureNodePools' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePools', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateAzureCluster' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{azure_cluster.name=projects/*/locations/*/azureClusters/*}', - 'body' => 'azure_cluster', - 'placeholders' => [ - 'azure_cluster.name' => [ - 'getters' => [ - 'getAzureCluster', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateAzureNodePool' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{azure_node_pool.name=projects/*/locations/*/azureClusters/*/azureNodePools/*}', - 'body' => 'azure_node_pool', - 'placeholders' => [ - 'azure_node_pool.name' => [ - 'getters' => [ - 'getAzureNodePool', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AttachedClustersClientTest.php b/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AttachedClustersClientTest.php deleted file mode 100644 index 99079145e5a1..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AttachedClustersClientTest.php +++ /dev/null @@ -1,1174 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AttachedClustersClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AttachedClustersClient($options); - } - - /** @test */ - public function createAttachedClusterTest() - { - $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/createAttachedClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $platformVersion = 'platformVersion1813514508'; - $distribution = 'distribution-1580708220'; - $clusterRegion = 'clusterRegion993903833'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $kubernetesVersion = 'kubernetesVersion50850015'; - $expectedResponse = new AttachedCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPlatformVersion($platformVersion); - $expectedResponse->setDistribution($distribution); - $expectedResponse->setClusterRegion($clusterRegion); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setKubernetesVersion($kubernetesVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAttachedClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $attachedCluster = new AttachedCluster(); - $attachedClusterOidcConfig = new AttachedOidcConfig(); - $attachedCluster->setOidcConfig($attachedClusterOidcConfig); - $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; - $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); - $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; - $attachedCluster->setDistribution($attachedClusterDistribution); - $attachedClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $attachedClusterFleet->setProject($fleetProject); - $attachedCluster->setFleet($attachedClusterFleet); - $attachedClusterId = 'attachedClusterId-249426181'; - $request = (new CreateAttachedClusterRequest()) - ->setParent($formattedParent) - ->setAttachedCluster($attachedCluster) - ->setAttachedClusterId($attachedClusterId); - $response = $gapicClient->createAttachedCluster($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.gkemulticloud.v1.AttachedClusters/CreateAttachedCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAttachedCluster(); - $this->assertProtobufEquals($attachedCluster, $actualValue); - $actualValue = $actualApiRequestObject->getAttachedClusterId(); - $this->assertProtobufEquals($attachedClusterId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAttachedClusterTest'); - $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 createAttachedClusterExceptionTest() - { - $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/createAttachedClusterTest'); - $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]'); - $attachedCluster = new AttachedCluster(); - $attachedClusterOidcConfig = new AttachedOidcConfig(); - $attachedCluster->setOidcConfig($attachedClusterOidcConfig); - $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; - $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); - $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; - $attachedCluster->setDistribution($attachedClusterDistribution); - $attachedClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $attachedClusterFleet->setProject($fleetProject); - $attachedCluster->setFleet($attachedClusterFleet); - $attachedClusterId = 'attachedClusterId-249426181'; - $request = (new CreateAttachedClusterRequest()) - ->setParent($formattedParent) - ->setAttachedCluster($attachedCluster) - ->setAttachedClusterId($attachedClusterId); - $response = $gapicClient->createAttachedCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAttachedClusterTest'); - 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 deleteAttachedClusterTest() - { - $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/deleteAttachedClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAttachedClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); - $request = (new DeleteAttachedClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAttachedCluster($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.gkemulticloud.v1.AttachedClusters/DeleteAttachedCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAttachedClusterTest'); - $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 deleteAttachedClusterExceptionTest() - { - $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/deleteAttachedClusterTest'); - $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->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); - $request = (new DeleteAttachedClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAttachedCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAttachedClusterTest'); - 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 generateAttachedClusterAgentTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $accessToken = 'accessToken-1938933922'; - $expiresIn = 833810928; - $tokenType = 'tokenType101507520'; - $expectedResponse = new GenerateAttachedClusterAgentTokenResponse(); - $expectedResponse->setAccessToken($accessToken); - $expectedResponse->setExpiresIn($expiresIn); - $expectedResponse->setTokenType($tokenType); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAttachedCluster = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); - $subjectToken = 'subjectToken454811942'; - $subjectTokenType = 'subjectTokenType-697160013'; - $version = 'version351608024'; - $request = (new GenerateAttachedClusterAgentTokenRequest()) - ->setAttachedCluster($formattedAttachedCluster) - ->setSubjectToken($subjectToken) - ->setSubjectTokenType($subjectTokenType) - ->setVersion($version); - $response = $gapicClient->generateAttachedClusterAgentToken($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.gkemulticloud.v1.AttachedClusters/GenerateAttachedClusterAgentToken', $actualFuncCall); - $actualValue = $actualRequestObject->getAttachedCluster(); - $this->assertProtobufEquals($formattedAttachedCluster, $actualValue); - $actualValue = $actualRequestObject->getSubjectToken(); - $this->assertProtobufEquals($subjectToken, $actualValue); - $actualValue = $actualRequestObject->getSubjectTokenType(); - $this->assertProtobufEquals($subjectTokenType, $actualValue); - $actualValue = $actualRequestObject->getVersion(); - $this->assertProtobufEquals($version, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAttachedClusterAgentTokenExceptionTest() - { - $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 - $formattedAttachedCluster = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); - $subjectToken = 'subjectToken454811942'; - $subjectTokenType = 'subjectTokenType-697160013'; - $version = 'version351608024'; - $request = (new GenerateAttachedClusterAgentTokenRequest()) - ->setAttachedCluster($formattedAttachedCluster) - ->setSubjectToken($subjectToken) - ->setSubjectTokenType($subjectTokenType) - ->setVersion($version); - try { - $gapicClient->generateAttachedClusterAgentToken($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 generateAttachedClusterInstallManifestTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $manifest = 'manifest130625071'; - $expectedResponse = new GenerateAttachedClusterInstallManifestResponse(); - $expectedResponse->setManifest($manifest); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $attachedClusterId = 'attachedClusterId-249426181'; - $platformVersion = 'platformVersion1813514508'; - $request = (new GenerateAttachedClusterInstallManifestRequest()) - ->setParent($formattedParent) - ->setAttachedClusterId($attachedClusterId) - ->setPlatformVersion($platformVersion); - $response = $gapicClient->generateAttachedClusterInstallManifest($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.gkemulticloud.v1.AttachedClusters/GenerateAttachedClusterInstallManifest', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAttachedClusterId(); - $this->assertProtobufEquals($attachedClusterId, $actualValue); - $actualValue = $actualRequestObject->getPlatformVersion(); - $this->assertProtobufEquals($platformVersion, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAttachedClusterInstallManifestExceptionTest() - { - $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]'); - $attachedClusterId = 'attachedClusterId-249426181'; - $platformVersion = 'platformVersion1813514508'; - $request = (new GenerateAttachedClusterInstallManifestRequest()) - ->setParent($formattedParent) - ->setAttachedClusterId($attachedClusterId) - ->setPlatformVersion($platformVersion); - try { - $gapicClient->generateAttachedClusterInstallManifest($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 getAttachedClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $platformVersion = 'platformVersion1813514508'; - $distribution = 'distribution-1580708220'; - $clusterRegion = 'clusterRegion993903833'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $kubernetesVersion = 'kubernetesVersion50850015'; - $expectedResponse = new AttachedCluster(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setPlatformVersion($platformVersion); - $expectedResponse->setDistribution($distribution); - $expectedResponse->setClusterRegion($clusterRegion); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setKubernetesVersion($kubernetesVersion); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); - $request = (new GetAttachedClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->getAttachedCluster($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.gkemulticloud.v1.AttachedClusters/GetAttachedCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAttachedClusterExceptionTest() - { - $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->attachedClusterName('[PROJECT]', '[LOCATION]', '[ATTACHED_CLUSTER]'); - $request = (new GetAttachedClusterRequest()) - ->setName($formattedName); - try { - $gapicClient->getAttachedCluster($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 getAttachedServerConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new AttachedServerConfig(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->attachedServerConfigName('[PROJECT]', '[LOCATION]'); - $request = (new GetAttachedServerConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getAttachedServerConfig($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.gkemulticloud.v1.AttachedClusters/GetAttachedServerConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAttachedServerConfigExceptionTest() - { - $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->attachedServerConfigName('[PROJECT]', '[LOCATION]'); - $request = (new GetAttachedServerConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getAttachedServerConfig($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 importAttachedClusterTest() - { - $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/importAttachedClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $platformVersion2 = 'platformVersion2-969276993'; - $distribution2 = 'distribution21357826359'; - $clusterRegion = 'clusterRegion993903833'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $kubernetesVersion = 'kubernetesVersion50850015'; - $expectedResponse = new AttachedCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPlatformVersion($platformVersion2); - $expectedResponse->setDistribution($distribution2); - $expectedResponse->setClusterRegion($clusterRegion); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setKubernetesVersion($kubernetesVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importAttachedClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $fleetMembership = 'fleetMembership1817977703'; - $platformVersion = 'platformVersion1813514508'; - $distribution = 'distribution-1580708220'; - $request = (new ImportAttachedClusterRequest()) - ->setParent($formattedParent) - ->setFleetMembership($fleetMembership) - ->setPlatformVersion($platformVersion) - ->setDistribution($distribution); - $response = $gapicClient->importAttachedCluster($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.gkemulticloud.v1.AttachedClusters/ImportAttachedCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getFleetMembership(); - $this->assertProtobufEquals($fleetMembership, $actualValue); - $actualValue = $actualApiRequestObject->getPlatformVersion(); - $this->assertProtobufEquals($platformVersion, $actualValue); - $actualValue = $actualApiRequestObject->getDistribution(); - $this->assertProtobufEquals($distribution, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importAttachedClusterTest'); - $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 importAttachedClusterExceptionTest() - { - $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/importAttachedClusterTest'); - $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]'); - $fleetMembership = 'fleetMembership1817977703'; - $platformVersion = 'platformVersion1813514508'; - $distribution = 'distribution-1580708220'; - $request = (new ImportAttachedClusterRequest()) - ->setParent($formattedParent) - ->setFleetMembership($fleetMembership) - ->setPlatformVersion($platformVersion) - ->setDistribution($distribution); - $response = $gapicClient->importAttachedCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importAttachedClusterTest'); - 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 listAttachedClustersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $attachedClustersElement = new AttachedCluster(); - $attachedClusters = [ - $attachedClustersElement, - ]; - $expectedResponse = new ListAttachedClustersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAttachedClusters($attachedClusters); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAttachedClustersRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAttachedClusters($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAttachedClusters()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AttachedClusters/ListAttachedClusters', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAttachedClustersExceptionTest() - { - $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 ListAttachedClustersRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAttachedClusters($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 updateAttachedClusterTest() - { - $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/updateAttachedClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $platformVersion = 'platformVersion1813514508'; - $distribution = 'distribution-1580708220'; - $clusterRegion = 'clusterRegion993903833'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $kubernetesVersion = 'kubernetesVersion50850015'; - $expectedResponse = new AttachedCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPlatformVersion($platformVersion); - $expectedResponse->setDistribution($distribution); - $expectedResponse->setClusterRegion($clusterRegion); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setKubernetesVersion($kubernetesVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAttachedClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $attachedCluster = new AttachedCluster(); - $attachedClusterOidcConfig = new AttachedOidcConfig(); - $attachedCluster->setOidcConfig($attachedClusterOidcConfig); - $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; - $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); - $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; - $attachedCluster->setDistribution($attachedClusterDistribution); - $attachedClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $attachedClusterFleet->setProject($fleetProject); - $attachedCluster->setFleet($attachedClusterFleet); - $updateMask = new FieldMask(); - $request = (new UpdateAttachedClusterRequest()) - ->setAttachedCluster($attachedCluster) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAttachedCluster($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.gkemulticloud.v1.AttachedClusters/UpdateAttachedCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAttachedCluster(); - $this->assertProtobufEquals($attachedCluster, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAttachedClusterTest'); - $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 updateAttachedClusterExceptionTest() - { - $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/updateAttachedClusterTest'); - $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 - $attachedCluster = new AttachedCluster(); - $attachedClusterOidcConfig = new AttachedOidcConfig(); - $attachedCluster->setOidcConfig($attachedClusterOidcConfig); - $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; - $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); - $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; - $attachedCluster->setDistribution($attachedClusterDistribution); - $attachedClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $attachedClusterFleet->setProject($fleetProject); - $attachedCluster->setFleet($attachedClusterFleet); - $updateMask = new FieldMask(); - $request = (new UpdateAttachedClusterRequest()) - ->setAttachedCluster($attachedCluster) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAttachedCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAttachedClusterTest'); - 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 createAttachedClusterAsyncTest() - { - $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/createAttachedClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $platformVersion = 'platformVersion1813514508'; - $distribution = 'distribution-1580708220'; - $clusterRegion = 'clusterRegion993903833'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $kubernetesVersion = 'kubernetesVersion50850015'; - $expectedResponse = new AttachedCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPlatformVersion($platformVersion); - $expectedResponse->setDistribution($distribution); - $expectedResponse->setClusterRegion($clusterRegion); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setKubernetesVersion($kubernetesVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAttachedClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $attachedCluster = new AttachedCluster(); - $attachedClusterOidcConfig = new AttachedOidcConfig(); - $attachedCluster->setOidcConfig($attachedClusterOidcConfig); - $attachedClusterPlatformVersion = 'attachedClusterPlatformVersion-208126385'; - $attachedCluster->setPlatformVersion($attachedClusterPlatformVersion); - $attachedClusterDistribution = 'attachedClusterDistribution1692601690'; - $attachedCluster->setDistribution($attachedClusterDistribution); - $attachedClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $attachedClusterFleet->setProject($fleetProject); - $attachedCluster->setFleet($attachedClusterFleet); - $attachedClusterId = 'attachedClusterId-249426181'; - $request = (new CreateAttachedClusterRequest()) - ->setParent($formattedParent) - ->setAttachedCluster($attachedCluster) - ->setAttachedClusterId($attachedClusterId); - $response = $gapicClient->createAttachedClusterAsync($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.gkemulticloud.v1.AttachedClusters/CreateAttachedCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAttachedCluster(); - $this->assertProtobufEquals($attachedCluster, $actualValue); - $actualValue = $actualApiRequestObject->getAttachedClusterId(); - $this->assertProtobufEquals($attachedClusterId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAttachedClusterTest'); - $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/GkeMultiCloud/v1/tests/Unit/V1/Client/AwsClustersClientTest.php b/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AwsClustersClientTest.php deleted file mode 100644 index c3732dfa434a..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AwsClustersClientTest.php +++ /dev/null @@ -1,2046 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AwsClustersClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AwsClustersClient($options); - } - - /** @test */ - public function createAwsClusterTest() - { - $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/createAwsClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $awsRegion = 'awsRegion-1887255946'; - $endpoint = 'endpoint1741102485'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $clusterCaCertificate = 'clusterCaCertificate1324742683'; - $expectedResponse = new AwsCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAwsRegion($awsRegion); - $expectedResponse->setEndpoint($endpoint); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setClusterCaCertificate($clusterCaCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAwsClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $awsCluster = new AwsCluster(); - $awsClusterNetworking = new AwsClusterNetworking(); - $networkingVpcId = 'networkingVpcId-1154507440'; - $awsClusterNetworking->setVpcId($networkingVpcId); - $networkingPodAddressCidrBlocks = []; - $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $awsCluster->setNetworking($awsClusterNetworking); - $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; - $awsCluster->setAwsRegion($awsClusterAwsRegion); - $awsClusterControlPlane = new AwsControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $awsClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSubnetIds = []; - $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); - $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; - $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); - $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); - $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; - $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); - $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); - $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); - $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; - $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); - $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); - $controlPlaneConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); - $awsCluster->setControlPlane($awsClusterControlPlane); - $awsClusterAuthorization = new AwsAuthorization(); - $awsCluster->setAuthorization($awsClusterAuthorization); - $awsClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $awsClusterFleet->setProject($fleetProject); - $awsCluster->setFleet($awsClusterFleet); - $awsClusterId = 'awsClusterId938438658'; - $request = (new CreateAwsClusterRequest()) - ->setParent($formattedParent) - ->setAwsCluster($awsCluster) - ->setAwsClusterId($awsClusterId); - $response = $gapicClient->createAwsCluster($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.gkemulticloud.v1.AwsClusters/CreateAwsCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAwsCluster(); - $this->assertProtobufEquals($awsCluster, $actualValue); - $actualValue = $actualApiRequestObject->getAwsClusterId(); - $this->assertProtobufEquals($awsClusterId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAwsClusterTest'); - $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 createAwsClusterExceptionTest() - { - $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/createAwsClusterTest'); - $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]'); - $awsCluster = new AwsCluster(); - $awsClusterNetworking = new AwsClusterNetworking(); - $networkingVpcId = 'networkingVpcId-1154507440'; - $awsClusterNetworking->setVpcId($networkingVpcId); - $networkingPodAddressCidrBlocks = []; - $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $awsCluster->setNetworking($awsClusterNetworking); - $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; - $awsCluster->setAwsRegion($awsClusterAwsRegion); - $awsClusterControlPlane = new AwsControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $awsClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSubnetIds = []; - $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); - $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; - $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); - $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); - $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; - $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); - $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); - $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); - $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; - $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); - $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); - $controlPlaneConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); - $awsCluster->setControlPlane($awsClusterControlPlane); - $awsClusterAuthorization = new AwsAuthorization(); - $awsCluster->setAuthorization($awsClusterAuthorization); - $awsClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $awsClusterFleet->setProject($fleetProject); - $awsCluster->setFleet($awsClusterFleet); - $awsClusterId = 'awsClusterId938438658'; - $request = (new CreateAwsClusterRequest()) - ->setParent($formattedParent) - ->setAwsCluster($awsCluster) - ->setAwsClusterId($awsClusterId); - $response = $gapicClient->createAwsCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAwsClusterTest'); - 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 createAwsNodePoolTest() - { - $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/createAwsNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $version = 'version351608024'; - $subnetId = 'subnetId373593405'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $expectedResponse = new AwsNodePool(); - $expectedResponse->setName($name); - $expectedResponse->setVersion($version); - $expectedResponse->setSubnetId($subnetId); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAwsNodePoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $awsNodePool = new AwsNodePool(); - $awsNodePoolVersion = 'awsNodePoolVersion-617231107'; - $awsNodePool->setVersion($awsNodePoolVersion); - $awsNodePoolConfig = new AwsNodeConfig(); - $configIamInstanceProfile = 'configIamInstanceProfile805825313'; - $awsNodePoolConfig->setIamInstanceProfile($configIamInstanceProfile); - $configConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $configConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsNodePoolConfig->setConfigEncryption($configConfigEncryption); - $awsNodePool->setConfig($awsNodePoolConfig); - $awsNodePoolAutoscaling = new AwsNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $awsNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $awsNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $awsNodePool->setAutoscaling($awsNodePoolAutoscaling); - $awsNodePoolSubnetId = 'awsNodePoolSubnetId-2035401261'; - $awsNodePool->setSubnetId($awsNodePoolSubnetId); - $awsNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $awsNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $awsNodePool->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); - $awsNodePoolId = 'awsNodePoolId1958033635'; - $request = (new CreateAwsNodePoolRequest()) - ->setParent($formattedParent) - ->setAwsNodePool($awsNodePool) - ->setAwsNodePoolId($awsNodePoolId); - $response = $gapicClient->createAwsNodePool($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.gkemulticloud.v1.AwsClusters/CreateAwsNodePool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAwsNodePool(); - $this->assertProtobufEquals($awsNodePool, $actualValue); - $actualValue = $actualApiRequestObject->getAwsNodePoolId(); - $this->assertProtobufEquals($awsNodePoolId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAwsNodePoolTest'); - $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 createAwsNodePoolExceptionTest() - { - $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/createAwsNodePoolTest'); - $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->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $awsNodePool = new AwsNodePool(); - $awsNodePoolVersion = 'awsNodePoolVersion-617231107'; - $awsNodePool->setVersion($awsNodePoolVersion); - $awsNodePoolConfig = new AwsNodeConfig(); - $configIamInstanceProfile = 'configIamInstanceProfile805825313'; - $awsNodePoolConfig->setIamInstanceProfile($configIamInstanceProfile); - $configConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $configConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsNodePoolConfig->setConfigEncryption($configConfigEncryption); - $awsNodePool->setConfig($awsNodePoolConfig); - $awsNodePoolAutoscaling = new AwsNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $awsNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $awsNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $awsNodePool->setAutoscaling($awsNodePoolAutoscaling); - $awsNodePoolSubnetId = 'awsNodePoolSubnetId-2035401261'; - $awsNodePool->setSubnetId($awsNodePoolSubnetId); - $awsNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $awsNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $awsNodePool->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); - $awsNodePoolId = 'awsNodePoolId1958033635'; - $request = (new CreateAwsNodePoolRequest()) - ->setParent($formattedParent) - ->setAwsNodePool($awsNodePool) - ->setAwsNodePoolId($awsNodePoolId); - $response = $gapicClient->createAwsNodePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAwsNodePoolTest'); - 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 deleteAwsClusterTest() - { - $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/deleteAwsClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAwsClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new DeleteAwsClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAwsCluster($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.gkemulticloud.v1.AwsClusters/DeleteAwsCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAwsClusterTest'); - $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 deleteAwsClusterExceptionTest() - { - $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/deleteAwsClusterTest'); - $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->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new DeleteAwsClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAwsCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAwsClusterTest'); - 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 deleteAwsNodePoolTest() - { - $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/deleteAwsNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAwsNodePoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); - $request = (new DeleteAwsNodePoolRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAwsNodePool($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.gkemulticloud.v1.AwsClusters/DeleteAwsNodePool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAwsNodePoolTest'); - $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 deleteAwsNodePoolExceptionTest() - { - $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/deleteAwsNodePoolTest'); - $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->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); - $request = (new DeleteAwsNodePoolRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAwsNodePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAwsNodePoolTest'); - 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 generateAwsAccessTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $accessToken = 'accessToken-1938933922'; - $expectedResponse = new GenerateAwsAccessTokenResponse(); - $expectedResponse->setAccessToken($accessToken); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new GenerateAwsAccessTokenRequest()) - ->setAwsCluster($formattedAwsCluster); - $response = $gapicClient->generateAwsAccessToken($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.gkemulticloud.v1.AwsClusters/GenerateAwsAccessToken', $actualFuncCall); - $actualValue = $actualRequestObject->getAwsCluster(); - $this->assertProtobufEquals($formattedAwsCluster, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAwsAccessTokenExceptionTest() - { - $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 - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new GenerateAwsAccessTokenRequest()) - ->setAwsCluster($formattedAwsCluster); - try { - $gapicClient->generateAwsAccessToken($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 generateAwsClusterAgentTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $accessToken = 'accessToken-1938933922'; - $expiresIn = 833810928; - $tokenType = 'tokenType101507520'; - $expectedResponse = new GenerateAwsClusterAgentTokenResponse(); - $expectedResponse->setAccessToken($accessToken); - $expectedResponse->setExpiresIn($expiresIn); - $expectedResponse->setTokenType($tokenType); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $subjectToken = 'subjectToken454811942'; - $subjectTokenType = 'subjectTokenType-697160013'; - $version = 'version351608024'; - $request = (new GenerateAwsClusterAgentTokenRequest()) - ->setAwsCluster($formattedAwsCluster) - ->setSubjectToken($subjectToken) - ->setSubjectTokenType($subjectTokenType) - ->setVersion($version); - $response = $gapicClient->generateAwsClusterAgentToken($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.gkemulticloud.v1.AwsClusters/GenerateAwsClusterAgentToken', $actualFuncCall); - $actualValue = $actualRequestObject->getAwsCluster(); - $this->assertProtobufEquals($formattedAwsCluster, $actualValue); - $actualValue = $actualRequestObject->getSubjectToken(); - $this->assertProtobufEquals($subjectToken, $actualValue); - $actualValue = $actualRequestObject->getSubjectTokenType(); - $this->assertProtobufEquals($subjectTokenType, $actualValue); - $actualValue = $actualRequestObject->getVersion(); - $this->assertProtobufEquals($version, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAwsClusterAgentTokenExceptionTest() - { - $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 - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $subjectToken = 'subjectToken454811942'; - $subjectTokenType = 'subjectTokenType-697160013'; - $version = 'version351608024'; - $request = (new GenerateAwsClusterAgentTokenRequest()) - ->setAwsCluster($formattedAwsCluster) - ->setSubjectToken($subjectToken) - ->setSubjectTokenType($subjectTokenType) - ->setVersion($version); - try { - $gapicClient->generateAwsClusterAgentToken($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 getAwsClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $awsRegion = 'awsRegion-1887255946'; - $endpoint = 'endpoint1741102485'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $clusterCaCertificate = 'clusterCaCertificate1324742683'; - $expectedResponse = new AwsCluster(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setAwsRegion($awsRegion); - $expectedResponse->setEndpoint($endpoint); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setClusterCaCertificate($clusterCaCertificate); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new GetAwsClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->getAwsCluster($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.gkemulticloud.v1.AwsClusters/GetAwsCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsClusterExceptionTest() - { - $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->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new GetAwsClusterRequest()) - ->setName($formattedName); - try { - $gapicClient->getAwsCluster($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 getAwsJsonWebKeysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new AwsJsonWebKeys(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new GetAwsJsonWebKeysRequest()) - ->setAwsCluster($formattedAwsCluster); - $response = $gapicClient->getAwsJsonWebKeys($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.gkemulticloud.v1.AwsClusters/GetAwsJsonWebKeys', $actualFuncCall); - $actualValue = $actualRequestObject->getAwsCluster(); - $this->assertProtobufEquals($formattedAwsCluster, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsJsonWebKeysExceptionTest() - { - $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 - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new GetAwsJsonWebKeysRequest()) - ->setAwsCluster($formattedAwsCluster); - try { - $gapicClient->getAwsJsonWebKeys($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 getAwsNodePoolTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $version = 'version351608024'; - $subnetId = 'subnetId373593405'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $expectedResponse = new AwsNodePool(); - $expectedResponse->setName($name2); - $expectedResponse->setVersion($version); - $expectedResponse->setSubnetId($subnetId); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); - $request = (new GetAwsNodePoolRequest()) - ->setName($formattedName); - $response = $gapicClient->getAwsNodePool($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.gkemulticloud.v1.AwsClusters/GetAwsNodePool', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsNodePoolExceptionTest() - { - $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->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); - $request = (new GetAwsNodePoolRequest()) - ->setName($formattedName); - try { - $gapicClient->getAwsNodePool($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 getAwsOpenIdConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $issuer = 'issuer-1179159879'; - $jwksUri = 'jwksUri1465527714'; - $expectedResponse = new AwsOpenIdConfig(); - $expectedResponse->setIssuer($issuer); - $expectedResponse->setJwksUri($jwksUri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new GetAwsOpenIdConfigRequest()) - ->setAwsCluster($formattedAwsCluster); - $response = $gapicClient->getAwsOpenIdConfig($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.gkemulticloud.v1.AwsClusters/GetAwsOpenIdConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getAwsCluster(); - $this->assertProtobufEquals($formattedAwsCluster, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsOpenIdConfigExceptionTest() - { - $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 - $formattedAwsCluster = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new GetAwsOpenIdConfigRequest()) - ->setAwsCluster($formattedAwsCluster); - try { - $gapicClient->getAwsOpenIdConfig($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 getAwsServerConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new AwsServerConfig(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->awsServerConfigName('[PROJECT]', '[LOCATION]'); - $request = (new GetAwsServerConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getAwsServerConfig($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.gkemulticloud.v1.AwsClusters/GetAwsServerConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAwsServerConfigExceptionTest() - { - $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->awsServerConfigName('[PROJECT]', '[LOCATION]'); - $request = (new GetAwsServerConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getAwsServerConfig($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 listAwsClustersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $awsClustersElement = new AwsCluster(); - $awsClusters = [ - $awsClustersElement, - ]; - $expectedResponse = new ListAwsClustersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAwsClusters($awsClusters); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAwsClustersRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAwsClusters($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAwsClusters()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/ListAwsClusters', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAwsClustersExceptionTest() - { - $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 ListAwsClustersRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAwsClusters($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 listAwsNodePoolsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $awsNodePoolsElement = new AwsNodePool(); - $awsNodePools = [ - $awsNodePoolsElement, - ]; - $expectedResponse = new ListAwsNodePoolsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAwsNodePools($awsNodePools); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new ListAwsNodePoolsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAwsNodePools($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAwsNodePools()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AwsClusters/ListAwsNodePools', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAwsNodePoolsExceptionTest() - { - $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->awsClusterName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]'); - $request = (new ListAwsNodePoolsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAwsNodePools($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 rollbackAwsNodePoolUpdateTest() - { - $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/rollbackAwsNodePoolUpdateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $version = 'version351608024'; - $subnetId = 'subnetId373593405'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $expectedResponse = new AwsNodePool(); - $expectedResponse->setName($name2); - $expectedResponse->setVersion($version); - $expectedResponse->setSubnetId($subnetId); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/rollbackAwsNodePoolUpdateTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); - $request = (new RollbackAwsNodePoolUpdateRequest()) - ->setName($formattedName); - $response = $gapicClient->rollbackAwsNodePoolUpdate($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.gkemulticloud.v1.AwsClusters/RollbackAwsNodePoolUpdate', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rollbackAwsNodePoolUpdateTest'); - $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 rollbackAwsNodePoolUpdateExceptionTest() - { - $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/rollbackAwsNodePoolUpdateTest'); - $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->awsNodePoolName('[PROJECT]', '[LOCATION]', '[AWS_CLUSTER]', '[AWS_NODE_POOL]'); - $request = (new RollbackAwsNodePoolUpdateRequest()) - ->setName($formattedName); - $response = $gapicClient->rollbackAwsNodePoolUpdate($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rollbackAwsNodePoolUpdateTest'); - 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 updateAwsClusterTest() - { - $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/updateAwsClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $awsRegion = 'awsRegion-1887255946'; - $endpoint = 'endpoint1741102485'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $clusterCaCertificate = 'clusterCaCertificate1324742683'; - $expectedResponse = new AwsCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAwsRegion($awsRegion); - $expectedResponse->setEndpoint($endpoint); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setClusterCaCertificate($clusterCaCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAwsClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $awsCluster = new AwsCluster(); - $awsClusterNetworking = new AwsClusterNetworking(); - $networkingVpcId = 'networkingVpcId-1154507440'; - $awsClusterNetworking->setVpcId($networkingVpcId); - $networkingPodAddressCidrBlocks = []; - $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $awsCluster->setNetworking($awsClusterNetworking); - $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; - $awsCluster->setAwsRegion($awsClusterAwsRegion); - $awsClusterControlPlane = new AwsControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $awsClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSubnetIds = []; - $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); - $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; - $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); - $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); - $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; - $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); - $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); - $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); - $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; - $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); - $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); - $controlPlaneConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); - $awsCluster->setControlPlane($awsClusterControlPlane); - $awsClusterAuthorization = new AwsAuthorization(); - $awsCluster->setAuthorization($awsClusterAuthorization); - $awsClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $awsClusterFleet->setProject($fleetProject); - $awsCluster->setFleet($awsClusterFleet); - $updateMask = new FieldMask(); - $request = (new UpdateAwsClusterRequest()) - ->setAwsCluster($awsCluster) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAwsCluster($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.gkemulticloud.v1.AwsClusters/UpdateAwsCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAwsCluster(); - $this->assertProtobufEquals($awsCluster, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAwsClusterTest'); - $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 updateAwsClusterExceptionTest() - { - $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/updateAwsClusterTest'); - $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 - $awsCluster = new AwsCluster(); - $awsClusterNetworking = new AwsClusterNetworking(); - $networkingVpcId = 'networkingVpcId-1154507440'; - $awsClusterNetworking->setVpcId($networkingVpcId); - $networkingPodAddressCidrBlocks = []; - $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $awsCluster->setNetworking($awsClusterNetworking); - $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; - $awsCluster->setAwsRegion($awsClusterAwsRegion); - $awsClusterControlPlane = new AwsControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $awsClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSubnetIds = []; - $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); - $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; - $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); - $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); - $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; - $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); - $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); - $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); - $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; - $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); - $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); - $controlPlaneConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); - $awsCluster->setControlPlane($awsClusterControlPlane); - $awsClusterAuthorization = new AwsAuthorization(); - $awsCluster->setAuthorization($awsClusterAuthorization); - $awsClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $awsClusterFleet->setProject($fleetProject); - $awsCluster->setFleet($awsClusterFleet); - $updateMask = new FieldMask(); - $request = (new UpdateAwsClusterRequest()) - ->setAwsCluster($awsCluster) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAwsCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAwsClusterTest'); - 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 updateAwsNodePoolTest() - { - $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/updateAwsNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $version = 'version351608024'; - $subnetId = 'subnetId373593405'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $expectedResponse = new AwsNodePool(); - $expectedResponse->setName($name); - $expectedResponse->setVersion($version); - $expectedResponse->setSubnetId($subnetId); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAwsNodePoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $awsNodePool = new AwsNodePool(); - $awsNodePoolVersion = 'awsNodePoolVersion-617231107'; - $awsNodePool->setVersion($awsNodePoolVersion); - $awsNodePoolConfig = new AwsNodeConfig(); - $configIamInstanceProfile = 'configIamInstanceProfile805825313'; - $awsNodePoolConfig->setIamInstanceProfile($configIamInstanceProfile); - $configConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $configConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsNodePoolConfig->setConfigEncryption($configConfigEncryption); - $awsNodePool->setConfig($awsNodePoolConfig); - $awsNodePoolAutoscaling = new AwsNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $awsNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $awsNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $awsNodePool->setAutoscaling($awsNodePoolAutoscaling); - $awsNodePoolSubnetId = 'awsNodePoolSubnetId-2035401261'; - $awsNodePool->setSubnetId($awsNodePoolSubnetId); - $awsNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $awsNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $awsNodePool->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); - $updateMask = new FieldMask(); - $request = (new UpdateAwsNodePoolRequest()) - ->setAwsNodePool($awsNodePool) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAwsNodePool($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.gkemulticloud.v1.AwsClusters/UpdateAwsNodePool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAwsNodePool(); - $this->assertProtobufEquals($awsNodePool, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAwsNodePoolTest'); - $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 updateAwsNodePoolExceptionTest() - { - $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/updateAwsNodePoolTest'); - $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 - $awsNodePool = new AwsNodePool(); - $awsNodePoolVersion = 'awsNodePoolVersion-617231107'; - $awsNodePool->setVersion($awsNodePoolVersion); - $awsNodePoolConfig = new AwsNodeConfig(); - $configIamInstanceProfile = 'configIamInstanceProfile805825313'; - $awsNodePoolConfig->setIamInstanceProfile($configIamInstanceProfile); - $configConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $configConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsNodePoolConfig->setConfigEncryption($configConfigEncryption); - $awsNodePool->setConfig($awsNodePoolConfig); - $awsNodePoolAutoscaling = new AwsNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $awsNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $awsNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $awsNodePool->setAutoscaling($awsNodePoolAutoscaling); - $awsNodePoolSubnetId = 'awsNodePoolSubnetId-2035401261'; - $awsNodePool->setSubnetId($awsNodePoolSubnetId); - $awsNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $awsNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $awsNodePool->setMaxPodsConstraint($awsNodePoolMaxPodsConstraint); - $updateMask = new FieldMask(); - $request = (new UpdateAwsNodePoolRequest()) - ->setAwsNodePool($awsNodePool) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAwsNodePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAwsNodePoolTest'); - 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 createAwsClusterAsyncTest() - { - $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/createAwsClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $awsRegion = 'awsRegion-1887255946'; - $endpoint = 'endpoint1741102485'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $clusterCaCertificate = 'clusterCaCertificate1324742683'; - $expectedResponse = new AwsCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAwsRegion($awsRegion); - $expectedResponse->setEndpoint($endpoint); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setClusterCaCertificate($clusterCaCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAwsClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $awsCluster = new AwsCluster(); - $awsClusterNetworking = new AwsClusterNetworking(); - $networkingVpcId = 'networkingVpcId-1154507440'; - $awsClusterNetworking->setVpcId($networkingVpcId); - $networkingPodAddressCidrBlocks = []; - $awsClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $awsClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $awsCluster->setNetworking($awsClusterNetworking); - $awsClusterAwsRegion = 'awsClusterAwsRegion574122132'; - $awsCluster->setAwsRegion($awsClusterAwsRegion); - $awsClusterControlPlane = new AwsControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $awsClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSubnetIds = []; - $awsClusterControlPlane->setSubnetIds($controlPlaneSubnetIds); - $controlPlaneIamInstanceProfile = 'controlPlaneIamInstanceProfile1905273246'; - $awsClusterControlPlane->setIamInstanceProfile($controlPlaneIamInstanceProfile); - $controlPlaneDatabaseEncryption = new AwsDatabaseEncryption(); - $databaseEncryptionKmsKeyArn = 'databaseEncryptionKmsKeyArn1858324593'; - $controlPlaneDatabaseEncryption->setKmsKeyArn($databaseEncryptionKmsKeyArn); - $awsClusterControlPlane->setDatabaseEncryption($controlPlaneDatabaseEncryption); - $controlPlaneAwsServicesAuthentication = new AwsServicesAuthentication(); - $awsServicesAuthenticationRoleArn = 'awsServicesAuthenticationRoleArn1905212596'; - $controlPlaneAwsServicesAuthentication->setRoleArn($awsServicesAuthenticationRoleArn); - $awsClusterControlPlane->setAwsServicesAuthentication($controlPlaneAwsServicesAuthentication); - $controlPlaneConfigEncryption = new AwsConfigEncryption(); - $configEncryptionKmsKeyArn = 'configEncryptionKmsKeyArn-992257206'; - $controlPlaneConfigEncryption->setKmsKeyArn($configEncryptionKmsKeyArn); - $awsClusterControlPlane->setConfigEncryption($controlPlaneConfigEncryption); - $awsCluster->setControlPlane($awsClusterControlPlane); - $awsClusterAuthorization = new AwsAuthorization(); - $awsCluster->setAuthorization($awsClusterAuthorization); - $awsClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $awsClusterFleet->setProject($fleetProject); - $awsCluster->setFleet($awsClusterFleet); - $awsClusterId = 'awsClusterId938438658'; - $request = (new CreateAwsClusterRequest()) - ->setParent($formattedParent) - ->setAwsCluster($awsCluster) - ->setAwsClusterId($awsClusterId); - $response = $gapicClient->createAwsClusterAsync($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.gkemulticloud.v1.AwsClusters/CreateAwsCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAwsCluster(); - $this->assertProtobufEquals($awsCluster, $actualValue); - $actualValue = $actualApiRequestObject->getAwsClusterId(); - $this->assertProtobufEquals($awsClusterId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAwsClusterTest'); - $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/GkeMultiCloud/v1/tests/Unit/V1/Client/AzureClustersClientTest.php b/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AzureClustersClientTest.php deleted file mode 100644 index 2d7bbc308ab3..000000000000 --- a/owl-bot-staging/GkeMultiCloud/v1/tests/Unit/V1/Client/AzureClustersClientTest.php +++ /dev/null @@ -1,2270 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AzureClustersClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AzureClustersClient($options); - } - - /** @test */ - public function createAzureClientTest() - { - $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/createAzureClientTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $tenantId = 'tenantId-1852780336'; - $applicationId = 'applicationId-1287148950'; - $reconciling = false; - $pemCertificate = 'pemCertificate1234463984'; - $uid = 'uid115792'; - $expectedResponse = new AzureClient(); - $expectedResponse->setName($name); - $expectedResponse->setTenantId($tenantId); - $expectedResponse->setApplicationId($applicationId); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setPemCertificate($pemCertificate); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAzureClientTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $azureClient = new AzureClient(); - $azureClientTenantId = 'azureClientTenantId-567307073'; - $azureClient->setTenantId($azureClientTenantId); - $azureClientApplicationId = 'azureClientApplicationId264838513'; - $azureClient->setApplicationId($azureClientApplicationId); - $azureClientId = 'azureClientId315645023'; - $request = (new CreateAzureClientRequest()) - ->setParent($formattedParent) - ->setAzureClient($azureClient) - ->setAzureClientId($azureClientId); - $response = $gapicClient->createAzureClient($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.gkemulticloud.v1.AzureClusters/CreateAzureClient', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAzureClient(); - $this->assertProtobufEquals($azureClient, $actualValue); - $actualValue = $actualApiRequestObject->getAzureClientId(); - $this->assertProtobufEquals($azureClientId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAzureClientTest'); - $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 createAzureClientExceptionTest() - { - $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/createAzureClientTest'); - $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]'); - $azureClient = new AzureClient(); - $azureClientTenantId = 'azureClientTenantId-567307073'; - $azureClient->setTenantId($azureClientTenantId); - $azureClientApplicationId = 'azureClientApplicationId264838513'; - $azureClient->setApplicationId($azureClientApplicationId); - $azureClientId = 'azureClientId315645023'; - $request = (new CreateAzureClientRequest()) - ->setParent($formattedParent) - ->setAzureClient($azureClient) - ->setAzureClientId($azureClientId); - $response = $gapicClient->createAzureClient($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAzureClientTest'); - 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 createAzureClusterTest() - { - $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/createAzureClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $azureRegion = 'azureRegion-253373788'; - $resourceGroupId = 'resourceGroupId-1092054036'; - $azureClient = 'azureClient-676290693'; - $endpoint = 'endpoint1741102485'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $clusterCaCertificate = 'clusterCaCertificate1324742683'; - $expectedResponse = new AzureCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAzureRegion($azureRegion); - $expectedResponse->setResourceGroupId($resourceGroupId); - $expectedResponse->setAzureClient($azureClient); - $expectedResponse->setEndpoint($endpoint); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setClusterCaCertificate($clusterCaCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAzureClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $azureCluster = new AzureCluster(); - $azureClusterAzureRegion = 'azureClusterAzureRegion-1036501768'; - $azureCluster->setAzureRegion($azureClusterAzureRegion); - $azureClusterResourceGroupId = 'azureClusterResourceGroupId-1683734495'; - $azureCluster->setResourceGroupId($azureClusterResourceGroupId); - $azureClusterNetworking = new AzureClusterNetworking(); - $networkingVirtualNetworkId = 'networkingVirtualNetworkId-516550606'; - $azureClusterNetworking->setVirtualNetworkId($networkingVirtualNetworkId); - $networkingPodAddressCidrBlocks = []; - $azureClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $azureClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $azureCluster->setNetworking($azureClusterNetworking); - $azureClusterControlPlane = new AzureControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $azureClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $controlPlaneSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); - $azureCluster->setControlPlane($azureClusterControlPlane); - $azureClusterAuthorization = new AzureAuthorization(); - $azureCluster->setAuthorization($azureClusterAuthorization); - $azureClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $azureClusterFleet->setProject($fleetProject); - $azureCluster->setFleet($azureClusterFleet); - $azureClusterId = 'azureClusterId332577072'; - $request = (new CreateAzureClusterRequest()) - ->setParent($formattedParent) - ->setAzureCluster($azureCluster) - ->setAzureClusterId($azureClusterId); - $response = $gapicClient->createAzureCluster($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.gkemulticloud.v1.AzureClusters/CreateAzureCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAzureCluster(); - $this->assertProtobufEquals($azureCluster, $actualValue); - $actualValue = $actualApiRequestObject->getAzureClusterId(); - $this->assertProtobufEquals($azureClusterId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAzureClusterTest'); - $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 createAzureClusterExceptionTest() - { - $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/createAzureClusterTest'); - $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]'); - $azureCluster = new AzureCluster(); - $azureClusterAzureRegion = 'azureClusterAzureRegion-1036501768'; - $azureCluster->setAzureRegion($azureClusterAzureRegion); - $azureClusterResourceGroupId = 'azureClusterResourceGroupId-1683734495'; - $azureCluster->setResourceGroupId($azureClusterResourceGroupId); - $azureClusterNetworking = new AzureClusterNetworking(); - $networkingVirtualNetworkId = 'networkingVirtualNetworkId-516550606'; - $azureClusterNetworking->setVirtualNetworkId($networkingVirtualNetworkId); - $networkingPodAddressCidrBlocks = []; - $azureClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $azureClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $azureCluster->setNetworking($azureClusterNetworking); - $azureClusterControlPlane = new AzureControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $azureClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $controlPlaneSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); - $azureCluster->setControlPlane($azureClusterControlPlane); - $azureClusterAuthorization = new AzureAuthorization(); - $azureCluster->setAuthorization($azureClusterAuthorization); - $azureClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $azureClusterFleet->setProject($fleetProject); - $azureCluster->setFleet($azureClusterFleet); - $azureClusterId = 'azureClusterId332577072'; - $request = (new CreateAzureClusterRequest()) - ->setParent($formattedParent) - ->setAzureCluster($azureCluster) - ->setAzureClusterId($azureClusterId); - $response = $gapicClient->createAzureCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAzureClusterTest'); - 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 createAzureNodePoolTest() - { - $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/createAzureNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $version = 'version351608024'; - $subnetId = 'subnetId373593405'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $azureAvailabilityZone = 'azureAvailabilityZone541920864'; - $expectedResponse = new AzureNodePool(); - $expectedResponse->setName($name); - $expectedResponse->setVersion($version); - $expectedResponse->setSubnetId($subnetId); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setAzureAvailabilityZone($azureAvailabilityZone); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAzureNodePoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $azureNodePool = new AzureNodePool(); - $azureNodePoolVersion = 'azureNodePoolVersion349490987'; - $azureNodePool->setVersion($azureNodePoolVersion); - $azureNodePoolConfig = new AzureNodeConfig(); - $configSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $configSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureNodePoolConfig->setSshConfig($configSshConfig); - $azureNodePool->setConfig($azureNodePoolConfig); - $azureNodePoolSubnetId = 'azureNodePoolSubnetId-2131787419'; - $azureNodePool->setSubnetId($azureNodePoolSubnetId); - $azureNodePoolAutoscaling = new AzureNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $azureNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $azureNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $azureNodePool->setAutoscaling($azureNodePoolAutoscaling); - $azureNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $azureNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $azureNodePool->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); - $azureNodePoolId = 'azureNodePoolId-454365551'; - $request = (new CreateAzureNodePoolRequest()) - ->setParent($formattedParent) - ->setAzureNodePool($azureNodePool) - ->setAzureNodePoolId($azureNodePoolId); - $response = $gapicClient->createAzureNodePool($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.gkemulticloud.v1.AzureClusters/CreateAzureNodePool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAzureNodePool(); - $this->assertProtobufEquals($azureNodePool, $actualValue); - $actualValue = $actualApiRequestObject->getAzureNodePoolId(); - $this->assertProtobufEquals($azureNodePoolId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAzureNodePoolTest'); - $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 createAzureNodePoolExceptionTest() - { - $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/createAzureNodePoolTest'); - $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->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $azureNodePool = new AzureNodePool(); - $azureNodePoolVersion = 'azureNodePoolVersion349490987'; - $azureNodePool->setVersion($azureNodePoolVersion); - $azureNodePoolConfig = new AzureNodeConfig(); - $configSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $configSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureNodePoolConfig->setSshConfig($configSshConfig); - $azureNodePool->setConfig($azureNodePoolConfig); - $azureNodePoolSubnetId = 'azureNodePoolSubnetId-2131787419'; - $azureNodePool->setSubnetId($azureNodePoolSubnetId); - $azureNodePoolAutoscaling = new AzureNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $azureNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $azureNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $azureNodePool->setAutoscaling($azureNodePoolAutoscaling); - $azureNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $azureNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $azureNodePool->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); - $azureNodePoolId = 'azureNodePoolId-454365551'; - $request = (new CreateAzureNodePoolRequest()) - ->setParent($formattedParent) - ->setAzureNodePool($azureNodePool) - ->setAzureNodePoolId($azureNodePoolId); - $response = $gapicClient->createAzureNodePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAzureNodePoolTest'); - 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 deleteAzureClientTest() - { - $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/deleteAzureClientTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAzureClientTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); - $request = (new DeleteAzureClientRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAzureClient($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.gkemulticloud.v1.AzureClusters/DeleteAzureClient', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAzureClientTest'); - $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 deleteAzureClientExceptionTest() - { - $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/deleteAzureClientTest'); - $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->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); - $request = (new DeleteAzureClientRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAzureClient($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAzureClientTest'); - 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 deleteAzureClusterTest() - { - $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/deleteAzureClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAzureClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new DeleteAzureClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAzureCluster($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.gkemulticloud.v1.AzureClusters/DeleteAzureCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAzureClusterTest'); - $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 deleteAzureClusterExceptionTest() - { - $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/deleteAzureClusterTest'); - $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->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new DeleteAzureClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAzureCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAzureClusterTest'); - 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 deleteAzureNodePoolTest() - { - $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/deleteAzureNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAzureNodePoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); - $request = (new DeleteAzureNodePoolRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAzureNodePool($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.gkemulticloud.v1.AzureClusters/DeleteAzureNodePool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAzureNodePoolTest'); - $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 deleteAzureNodePoolExceptionTest() - { - $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/deleteAzureNodePoolTest'); - $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->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); - $request = (new DeleteAzureNodePoolRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAzureNodePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAzureNodePoolTest'); - 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 generateAzureAccessTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $accessToken = 'accessToken-1938933922'; - $expectedResponse = new GenerateAzureAccessTokenResponse(); - $expectedResponse->setAccessToken($accessToken); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new GenerateAzureAccessTokenRequest()) - ->setAzureCluster($formattedAzureCluster); - $response = $gapicClient->generateAzureAccessToken($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.gkemulticloud.v1.AzureClusters/GenerateAzureAccessToken', $actualFuncCall); - $actualValue = $actualRequestObject->getAzureCluster(); - $this->assertProtobufEquals($formattedAzureCluster, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAzureAccessTokenExceptionTest() - { - $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 - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new GenerateAzureAccessTokenRequest()) - ->setAzureCluster($formattedAzureCluster); - try { - $gapicClient->generateAzureAccessToken($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 generateAzureClusterAgentTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $accessToken = 'accessToken-1938933922'; - $expiresIn = 833810928; - $tokenType = 'tokenType101507520'; - $expectedResponse = new GenerateAzureClusterAgentTokenResponse(); - $expectedResponse->setAccessToken($accessToken); - $expectedResponse->setExpiresIn($expiresIn); - $expectedResponse->setTokenType($tokenType); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $subjectToken = 'subjectToken454811942'; - $subjectTokenType = 'subjectTokenType-697160013'; - $version = 'version351608024'; - $request = (new GenerateAzureClusterAgentTokenRequest()) - ->setAzureCluster($formattedAzureCluster) - ->setSubjectToken($subjectToken) - ->setSubjectTokenType($subjectTokenType) - ->setVersion($version); - $response = $gapicClient->generateAzureClusterAgentToken($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.gkemulticloud.v1.AzureClusters/GenerateAzureClusterAgentToken', $actualFuncCall); - $actualValue = $actualRequestObject->getAzureCluster(); - $this->assertProtobufEquals($formattedAzureCluster, $actualValue); - $actualValue = $actualRequestObject->getSubjectToken(); - $this->assertProtobufEquals($subjectToken, $actualValue); - $actualValue = $actualRequestObject->getSubjectTokenType(); - $this->assertProtobufEquals($subjectTokenType, $actualValue); - $actualValue = $actualRequestObject->getVersion(); - $this->assertProtobufEquals($version, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAzureClusterAgentTokenExceptionTest() - { - $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 - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $subjectToken = 'subjectToken454811942'; - $subjectTokenType = 'subjectTokenType-697160013'; - $version = 'version351608024'; - $request = (new GenerateAzureClusterAgentTokenRequest()) - ->setAzureCluster($formattedAzureCluster) - ->setSubjectToken($subjectToken) - ->setSubjectTokenType($subjectTokenType) - ->setVersion($version); - try { - $gapicClient->generateAzureClusterAgentToken($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 getAzureClientTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $tenantId = 'tenantId-1852780336'; - $applicationId = 'applicationId-1287148950'; - $reconciling = false; - $pemCertificate = 'pemCertificate1234463984'; - $uid = 'uid115792'; - $expectedResponse = new AzureClient(); - $expectedResponse->setName($name2); - $expectedResponse->setTenantId($tenantId); - $expectedResponse->setApplicationId($applicationId); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setPemCertificate($pemCertificate); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); - $request = (new GetAzureClientRequest()) - ->setName($formattedName); - $response = $gapicClient->getAzureClient($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.gkemulticloud.v1.AzureClusters/GetAzureClient', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureClientExceptionTest() - { - $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->azureClientName('[PROJECT]', '[LOCATION]', '[AZURE_CLIENT]'); - $request = (new GetAzureClientRequest()) - ->setName($formattedName); - try { - $gapicClient->getAzureClient($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 getAzureClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $azureRegion = 'azureRegion-253373788'; - $resourceGroupId = 'resourceGroupId-1092054036'; - $azureClient = 'azureClient-676290693'; - $endpoint = 'endpoint1741102485'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $clusterCaCertificate = 'clusterCaCertificate1324742683'; - $expectedResponse = new AzureCluster(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setAzureRegion($azureRegion); - $expectedResponse->setResourceGroupId($resourceGroupId); - $expectedResponse->setAzureClient($azureClient); - $expectedResponse->setEndpoint($endpoint); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setClusterCaCertificate($clusterCaCertificate); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new GetAzureClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->getAzureCluster($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.gkemulticloud.v1.AzureClusters/GetAzureCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureClusterExceptionTest() - { - $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->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new GetAzureClusterRequest()) - ->setName($formattedName); - try { - $gapicClient->getAzureCluster($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 getAzureJsonWebKeysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new AzureJsonWebKeys(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new GetAzureJsonWebKeysRequest()) - ->setAzureCluster($formattedAzureCluster); - $response = $gapicClient->getAzureJsonWebKeys($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.gkemulticloud.v1.AzureClusters/GetAzureJsonWebKeys', $actualFuncCall); - $actualValue = $actualRequestObject->getAzureCluster(); - $this->assertProtobufEquals($formattedAzureCluster, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureJsonWebKeysExceptionTest() - { - $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 - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new GetAzureJsonWebKeysRequest()) - ->setAzureCluster($formattedAzureCluster); - try { - $gapicClient->getAzureJsonWebKeys($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 getAzureNodePoolTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $version = 'version351608024'; - $subnetId = 'subnetId373593405'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $azureAvailabilityZone = 'azureAvailabilityZone541920864'; - $expectedResponse = new AzureNodePool(); - $expectedResponse->setName($name2); - $expectedResponse->setVersion($version); - $expectedResponse->setSubnetId($subnetId); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setAzureAvailabilityZone($azureAvailabilityZone); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); - $request = (new GetAzureNodePoolRequest()) - ->setName($formattedName); - $response = $gapicClient->getAzureNodePool($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.gkemulticloud.v1.AzureClusters/GetAzureNodePool', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureNodePoolExceptionTest() - { - $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->azureNodePoolName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]', '[AZURE_NODE_POOL]'); - $request = (new GetAzureNodePoolRequest()) - ->setName($formattedName); - try { - $gapicClient->getAzureNodePool($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 getAzureOpenIdConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $issuer = 'issuer-1179159879'; - $jwksUri = 'jwksUri1465527714'; - $expectedResponse = new AzureOpenIdConfig(); - $expectedResponse->setIssuer($issuer); - $expectedResponse->setJwksUri($jwksUri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new GetAzureOpenIdConfigRequest()) - ->setAzureCluster($formattedAzureCluster); - $response = $gapicClient->getAzureOpenIdConfig($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.gkemulticloud.v1.AzureClusters/GetAzureOpenIdConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getAzureCluster(); - $this->assertProtobufEquals($formattedAzureCluster, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureOpenIdConfigExceptionTest() - { - $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 - $formattedAzureCluster = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new GetAzureOpenIdConfigRequest()) - ->setAzureCluster($formattedAzureCluster); - try { - $gapicClient->getAzureOpenIdConfig($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 getAzureServerConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new AzureServerConfig(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->azureServerConfigName('[PROJECT]', '[LOCATION]'); - $request = (new GetAzureServerConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getAzureServerConfig($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.gkemulticloud.v1.AzureClusters/GetAzureServerConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAzureServerConfigExceptionTest() - { - $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->azureServerConfigName('[PROJECT]', '[LOCATION]'); - $request = (new GetAzureServerConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getAzureServerConfig($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 listAzureClientsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $azureClientsElement = new AzureClient(); - $azureClients = [ - $azureClientsElement, - ]; - $expectedResponse = new ListAzureClientsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAzureClients($azureClients); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAzureClientsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAzureClients($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAzureClients()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/ListAzureClients', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAzureClientsExceptionTest() - { - $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 ListAzureClientsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAzureClients($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 listAzureClustersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $azureClustersElement = new AzureCluster(); - $azureClusters = [ - $azureClustersElement, - ]; - $expectedResponse = new ListAzureClustersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAzureClusters($azureClusters); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAzureClustersRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAzureClusters($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAzureClusters()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/ListAzureClusters', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAzureClustersExceptionTest() - { - $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 ListAzureClustersRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAzureClusters($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 listAzureNodePoolsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $azureNodePoolsElement = new AzureNodePool(); - $azureNodePools = [ - $azureNodePoolsElement, - ]; - $expectedResponse = new ListAzureNodePoolsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAzureNodePools($azureNodePools); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new ListAzureNodePoolsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAzureNodePools($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAzureNodePools()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkemulticloud.v1.AzureClusters/ListAzureNodePools', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAzureNodePoolsExceptionTest() - { - $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->azureClusterName('[PROJECT]', '[LOCATION]', '[AZURE_CLUSTER]'); - $request = (new ListAzureNodePoolsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAzureNodePools($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 updateAzureClusterTest() - { - $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/updateAzureClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $azureRegion = 'azureRegion-253373788'; - $resourceGroupId = 'resourceGroupId-1092054036'; - $azureClient = 'azureClient-676290693'; - $endpoint = 'endpoint1741102485'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $clusterCaCertificate = 'clusterCaCertificate1324742683'; - $expectedResponse = new AzureCluster(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAzureRegion($azureRegion); - $expectedResponse->setResourceGroupId($resourceGroupId); - $expectedResponse->setAzureClient($azureClient); - $expectedResponse->setEndpoint($endpoint); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setClusterCaCertificate($clusterCaCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAzureClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $azureCluster = new AzureCluster(); - $azureClusterAzureRegion = 'azureClusterAzureRegion-1036501768'; - $azureCluster->setAzureRegion($azureClusterAzureRegion); - $azureClusterResourceGroupId = 'azureClusterResourceGroupId-1683734495'; - $azureCluster->setResourceGroupId($azureClusterResourceGroupId); - $azureClusterNetworking = new AzureClusterNetworking(); - $networkingVirtualNetworkId = 'networkingVirtualNetworkId-516550606'; - $azureClusterNetworking->setVirtualNetworkId($networkingVirtualNetworkId); - $networkingPodAddressCidrBlocks = []; - $azureClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $azureClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $azureCluster->setNetworking($azureClusterNetworking); - $azureClusterControlPlane = new AzureControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $azureClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $controlPlaneSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); - $azureCluster->setControlPlane($azureClusterControlPlane); - $azureClusterAuthorization = new AzureAuthorization(); - $azureCluster->setAuthorization($azureClusterAuthorization); - $azureClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $azureClusterFleet->setProject($fleetProject); - $azureCluster->setFleet($azureClusterFleet); - $updateMask = new FieldMask(); - $request = (new UpdateAzureClusterRequest()) - ->setAzureCluster($azureCluster) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAzureCluster($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.gkemulticloud.v1.AzureClusters/UpdateAzureCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAzureCluster(); - $this->assertProtobufEquals($azureCluster, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAzureClusterTest'); - $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 updateAzureClusterExceptionTest() - { - $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/updateAzureClusterTest'); - $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 - $azureCluster = new AzureCluster(); - $azureClusterAzureRegion = 'azureClusterAzureRegion-1036501768'; - $azureCluster->setAzureRegion($azureClusterAzureRegion); - $azureClusterResourceGroupId = 'azureClusterResourceGroupId-1683734495'; - $azureCluster->setResourceGroupId($azureClusterResourceGroupId); - $azureClusterNetworking = new AzureClusterNetworking(); - $networkingVirtualNetworkId = 'networkingVirtualNetworkId-516550606'; - $azureClusterNetworking->setVirtualNetworkId($networkingVirtualNetworkId); - $networkingPodAddressCidrBlocks = []; - $azureClusterNetworking->setPodAddressCidrBlocks($networkingPodAddressCidrBlocks); - $networkingServiceAddressCidrBlocks = []; - $azureClusterNetworking->setServiceAddressCidrBlocks($networkingServiceAddressCidrBlocks); - $azureCluster->setNetworking($azureClusterNetworking); - $azureClusterControlPlane = new AzureControlPlane(); - $controlPlaneVersion = 'controlPlaneVersion648040665'; - $azureClusterControlPlane->setVersion($controlPlaneVersion); - $controlPlaneSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $controlPlaneSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureClusterControlPlane->setSshConfig($controlPlaneSshConfig); - $azureCluster->setControlPlane($azureClusterControlPlane); - $azureClusterAuthorization = new AzureAuthorization(); - $azureCluster->setAuthorization($azureClusterAuthorization); - $azureClusterFleet = new Fleet(); - $fleetProject = 'fleetProject604893675'; - $azureClusterFleet->setProject($fleetProject); - $azureCluster->setFleet($azureClusterFleet); - $updateMask = new FieldMask(); - $request = (new UpdateAzureClusterRequest()) - ->setAzureCluster($azureCluster) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAzureCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAzureClusterTest'); - 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 updateAzureNodePoolTest() - { - $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/updateAzureNodePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $version = 'version351608024'; - $subnetId = 'subnetId373593405'; - $uid = 'uid115792'; - $reconciling = false; - $etag = 'etag3123477'; - $azureAvailabilityZone = 'azureAvailabilityZone541920864'; - $expectedResponse = new AzureNodePool(); - $expectedResponse->setName($name); - $expectedResponse->setVersion($version); - $expectedResponse->setSubnetId($subnetId); - $expectedResponse->setUid($uid); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setEtag($etag); - $expectedResponse->setAzureAvailabilityZone($azureAvailabilityZone); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAzureNodePoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $azureNodePool = new AzureNodePool(); - $azureNodePoolVersion = 'azureNodePoolVersion349490987'; - $azureNodePool->setVersion($azureNodePoolVersion); - $azureNodePoolConfig = new AzureNodeConfig(); - $configSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $configSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureNodePoolConfig->setSshConfig($configSshConfig); - $azureNodePool->setConfig($azureNodePoolConfig); - $azureNodePoolSubnetId = 'azureNodePoolSubnetId-2131787419'; - $azureNodePool->setSubnetId($azureNodePoolSubnetId); - $azureNodePoolAutoscaling = new AzureNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $azureNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $azureNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $azureNodePool->setAutoscaling($azureNodePoolAutoscaling); - $azureNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $azureNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $azureNodePool->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); - $updateMask = new FieldMask(); - $request = (new UpdateAzureNodePoolRequest()) - ->setAzureNodePool($azureNodePool) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAzureNodePool($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.gkemulticloud.v1.AzureClusters/UpdateAzureNodePool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAzureNodePool(); - $this->assertProtobufEquals($azureNodePool, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAzureNodePoolTest'); - $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 updateAzureNodePoolExceptionTest() - { - $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/updateAzureNodePoolTest'); - $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 - $azureNodePool = new AzureNodePool(); - $azureNodePoolVersion = 'azureNodePoolVersion349490987'; - $azureNodePool->setVersion($azureNodePoolVersion); - $azureNodePoolConfig = new AzureNodeConfig(); - $configSshConfig = new AzureSshConfig(); - $sshConfigAuthorizedKey = 'sshConfigAuthorizedKey1626409850'; - $configSshConfig->setAuthorizedKey($sshConfigAuthorizedKey); - $azureNodePoolConfig->setSshConfig($configSshConfig); - $azureNodePool->setConfig($azureNodePoolConfig); - $azureNodePoolSubnetId = 'azureNodePoolSubnetId-2131787419'; - $azureNodePool->setSubnetId($azureNodePoolSubnetId); - $azureNodePoolAutoscaling = new AzureNodePoolAutoscaling(); - $autoscalingMinNodeCount = 1464441581; - $azureNodePoolAutoscaling->setMinNodeCount($autoscalingMinNodeCount); - $autoscalingMaxNodeCount = 1938867647; - $azureNodePoolAutoscaling->setMaxNodeCount($autoscalingMaxNodeCount); - $azureNodePool->setAutoscaling($azureNodePoolAutoscaling); - $azureNodePoolMaxPodsConstraint = new MaxPodsConstraint(); - $maxPodsConstraintMaxPodsPerNode = 1072618940; - $azureNodePoolMaxPodsConstraint->setMaxPodsPerNode($maxPodsConstraintMaxPodsPerNode); - $azureNodePool->setMaxPodsConstraint($azureNodePoolMaxPodsConstraint); - $updateMask = new FieldMask(); - $request = (new UpdateAzureNodePoolRequest()) - ->setAzureNodePool($azureNodePool) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAzureNodePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAzureNodePoolTest'); - 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 createAzureClientAsyncTest() - { - $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/createAzureClientTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $tenantId = 'tenantId-1852780336'; - $applicationId = 'applicationId-1287148950'; - $reconciling = false; - $pemCertificate = 'pemCertificate1234463984'; - $uid = 'uid115792'; - $expectedResponse = new AzureClient(); - $expectedResponse->setName($name); - $expectedResponse->setTenantId($tenantId); - $expectedResponse->setApplicationId($applicationId); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setPemCertificate($pemCertificate); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAzureClientTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $azureClient = new AzureClient(); - $azureClientTenantId = 'azureClientTenantId-567307073'; - $azureClient->setTenantId($azureClientTenantId); - $azureClientApplicationId = 'azureClientApplicationId264838513'; - $azureClient->setApplicationId($azureClientApplicationId); - $azureClientId = 'azureClientId315645023'; - $request = (new CreateAzureClientRequest()) - ->setParent($formattedParent) - ->setAzureClient($azureClient) - ->setAzureClientId($azureClientId); - $response = $gapicClient->createAzureClientAsync($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.gkemulticloud.v1.AzureClusters/CreateAzureClient', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAzureClient(); - $this->assertProtobufEquals($azureClient, $actualValue); - $actualValue = $actualApiRequestObject->getAzureClientId(); - $this->assertProtobufEquals($azureClientId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAzureClientTest'); - $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/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Attestation.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Attestation.php deleted file mode 100644 index 8db0f36078c4..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Attestation.php +++ /dev/null @@ -1,40 +0,0 @@ -internalAddGeneratedFile( - ' -ˆ -grafeas/v1/attestation.proto -grafeas.v1"f -AttestationNote. -hint ( 2 .grafeas.v1.AttestationNote.Hint# -Hint -human_readable_name ( " -Jwt - compact_jwt ( "} -AttestationOccurrence -serialized_payload ( ) - -signatures ( 2.grafeas.v1.Signature -jwts ( 2.grafeas.v1.JwtBQ - io.grafeas.v1PZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Build.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Build.php deleted file mode 100644 index 7f2b13ffa0c6..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Build.php +++ /dev/null @@ -1,40 +0,0 @@ -internalAddGeneratedFile( - ' -ü -grafeas/v1/build.proto -grafeas.v1!grafeas/v1/intoto_statement.protografeas/v1/provenance.proto"$ - BuildNote -builder_version ( "” -BuildOccurrence/ - -provenance ( 2.grafeas.v1.BuildProvenance -provenance_bytes ( 7 -intoto_provenance ( 2.grafeas.v1.InTotoProvenance5 -intoto_statement ( 2.grafeas.v1.InTotoStatementF -in_toto_slsa_provenance_v1 ( 2".grafeas.v1.InTotoSlsaProvenanceV1BQ - io.grafeas.v1PZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Common.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Common.php deleted file mode 100644 index d5a341508000..000000000000 Binary files a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Common.php and /dev/null differ diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Compliance.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Compliance.php deleted file mode 100644 index e03f334377b8..000000000000 Binary files a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Compliance.php and /dev/null differ diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Cvss.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Cvss.php deleted file mode 100644 index 53c421029b13..000000000000 Binary files a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Cvss.php and /dev/null differ diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Deployment.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Deployment.php deleted file mode 100644 index 4c9c49aad310..000000000000 Binary files a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Deployment.php and /dev/null differ diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Discovery.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Discovery.php deleted file mode 100644 index 8b69527a34b7..000000000000 Binary files a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Discovery.php and /dev/null differ diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/DsseAttestation.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/DsseAttestation.php deleted file mode 100644 index ef80894effc9..000000000000 Binary files a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/DsseAttestation.php and /dev/null differ diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Grafeas.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Grafeas.php deleted file mode 100644 index 3a86c56c5c7c..000000000000 Binary files a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Grafeas.php and /dev/null differ diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Image.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Image.php deleted file mode 100644 index 4756c06563d8..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Image.php +++ /dev/null @@ -1,44 +0,0 @@ -internalAddGeneratedFile( - ' -× -grafeas/v1/image.proto -grafeas.v1"- -Layer - directive (  - arguments ( "@ - Fingerprint -v1_name (  -v2_blob (  -v2_name ( "O - ImageNote - resource_url ( , - fingerprint ( 2.grafeas.v1.Fingerprint"“ -ImageOccurrence, - fingerprint ( 2.grafeas.v1.Fingerprint -distance (% - -layer_info ( 2.grafeas.v1.Layer -base_resource_url ( BQ - io.grafeas.v1PZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/IntotoProvenance.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/IntotoProvenance.php deleted file mode 100644 index 5861d7ce8a1b..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/IntotoProvenance.php +++ /dev/null @@ -1,54 +0,0 @@ -internalAddGeneratedFile( - ' -Î -"grafeas/v1/intoto_provenance.proto -grafeas.v1google/protobuf/timestamp.proto"œ -Recipe -type (  -defined_in_material ( - entry_point ( \' - arguments ( 2.google.protobuf.Any) - environment ( 2.google.protobuf.Any"I - Completeness - arguments ( - environment ( - materials ("Ú -Metadata -build_invocation_id ( 4 -build_started_on ( 2.google.protobuf.Timestamp5 -build_finished_on ( 2.google.protobuf.Timestamp. - completeness ( 2.grafeas.v1.Completeness - reproducible (" - BuilderConfig - -id ( "¤ -InTotoProvenance1 -builder_config ( 2.grafeas.v1.BuilderConfig" -recipe ( 2.grafeas.v1.Recipe& -metadata ( 2.grafeas.v1.Metadata - materials ( Bh - io.grafeas.v1BInTotoProvenanceProtoPZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/IntotoStatement.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/IntotoStatement.php deleted file mode 100644 index f7c025c02f99..000000000000 Binary files a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/IntotoStatement.php and /dev/null differ diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Package.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Package.php deleted file mode 100644 index b9aecb5e41fd..000000000000 Binary files a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Package.php and /dev/null differ diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Provenance.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Provenance.php deleted file mode 100644 index 26eac47b31ce..000000000000 Binary files a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Provenance.php and /dev/null differ diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Sbom.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Sbom.php deleted file mode 100644 index d36bb8a06471..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Sbom.php +++ /dev/null @@ -1,51 +0,0 @@ -internalAddGeneratedFile( - ' -ô -grafeas/v1/sbom.proto -grafeas.v1!grafeas/v1/intoto_statement.proto"4 -SBOMReferenceNote -format (  -version ( "› -SBOMReferenceOccurrence7 -payload ( 2&.grafeas.v1.SbomReferenceIntotoPayload - payload_type ( 1 - -signatures ( 2.grafeas.v1.EnvelopeSignature"¬ -SbomReferenceIntotoPayload -type ( R_type -predicate_type ( $ -subject ( 2.grafeas.v1.Subject; - predicate ( 2(.grafeas.v1.SbomReferenceIntotoPredicate"Í -SbomReferenceIntotoPredicate - referrer_id (  -location (  - mime_type ( D -digest ( 24.grafeas.v1.SbomReferenceIntotoPredicate.DigestEntry- - DigestEntry -key (  -value ( :8BQ - io.grafeas.v1PZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Severity.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Severity.php deleted file mode 100644 index bd0c81933da8..000000000000 Binary files a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Severity.php and /dev/null differ diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/SlsaProvenance.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/SlsaProvenance.php deleted file mode 100644 index 0a0032106807..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/SlsaProvenance.php +++ /dev/null @@ -1,61 +0,0 @@ -internalAddGeneratedFile( - ' -À - grafeas/v1/slsa_provenance.proto -grafeas.v1google/protobuf/timestamp.proto"þ -SlsaProvenance7 -builder ( 2&.grafeas.v1.SlsaProvenance.SlsaBuilder5 -recipe ( 2%.grafeas.v1.SlsaProvenance.SlsaRecipe9 -metadata ( 2\'.grafeas.v1.SlsaProvenance.SlsaMetadata6 - materials ( 2#.grafeas.v1.SlsaProvenance.Material  - -SlsaRecipe -type (  -defined_in_material ( - entry_point ( \' - arguments ( 2.google.protobuf.Any) - environment ( 2.google.protobuf.AnyM -SlsaCompleteness - arguments ( - environment ( - materials (ñ - SlsaMetadata -build_invocation_id ( 4 -build_started_on ( 2.google.protobuf.Timestamp5 -build_finished_on ( 2.google.protobuf.TimestampA - completeness ( 2+.grafeas.v1.SlsaProvenance.SlsaCompleteness - reproducible ( - SlsaBuilder - -id ( ‡ -Material -uri ( ? -digest ( 2/.grafeas.v1.SlsaProvenance.Material.DigestEntry- - DigestEntry -key (  -value ( :8Bf - io.grafeas.v1BSlsaProvenanceProtoPZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/SlsaProvenanceZeroTwo.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/SlsaProvenanceZeroTwo.php deleted file mode 100644 index 2df7242755b6..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/SlsaProvenanceZeroTwo.php +++ /dev/null @@ -1,71 +0,0 @@ -internalAddGeneratedFile( - ' -¥ -)grafeas/v1/slsa_provenance_zero_two.proto -grafeas.v1google/protobuf/timestamp.proto"Ó -SlsaProvenanceZeroTwo> -builder ( 2-.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder - -build_type ( D - -invocation ( 20.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation- - build_config ( 2.google.protobuf.Struct@ -metadata ( 2..grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataA - materials ( 2..grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial - SlsaBuilder - -id ( – - SlsaMaterial -uri ( J -digest ( 2:.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.DigestEntry- - DigestEntry -key (  -value ( :8¶ -SlsaInvocationI - config_source ( 22.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource+ - -parameters ( 2.google.protobuf.Struct, - environment ( 2.google.protobuf.Struct³ -SlsaConfigSource -uri ( N -digest ( 2>.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.DigestEntry - entry_point ( - - DigestEntry -key (  -value ( :8ø - SlsaMetadata -build_invocation_id ( 4 -build_started_on ( 2.google.protobuf.Timestamp5 -build_finished_on ( 2.google.protobuf.TimestampH - completeness ( 22.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness - reproducible (N -SlsaCompleteness - -parameters ( - environment ( - materials (Bm - io.grafeas.v1BSlsaProvenanceZeroTwoProtoPZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Upgrade.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Upgrade.php deleted file mode 100644 index ccca29a0b7e1..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Upgrade.php +++ /dev/null @@ -1,60 +0,0 @@ -internalAddGeneratedFile( - ' -Ù -grafeas/v1/upgrade.proto -grafeas.v1grafeas/v1/package.proto"¯ - UpgradeNote -package ( $ -version ( 2.grafeas.v1.Version6 - distributions ( 2.grafeas.v1.UpgradeDistribution1 -windows_update ( 2.grafeas.v1.WindowsUpdate"] -UpgradeDistribution -cpe_uri (  -classification (  -severity (  -cve ( "ì - WindowsUpdate4 -identity ( 2".grafeas.v1.WindowsUpdate.Identity -title (  - description ( 6 - -categories ( 2".grafeas.v1.WindowsUpdate.Category -kb_article_ids (  - support_url ( < -last_published_timestamp ( 2.google.protobuf.Timestamp/ -Identity - update_id (  -revision (- -Category - category_id (  -name ( "» -UpgradeOccurrence -package ( + -parsed_version ( 2.grafeas.v1.Version5 - distribution ( 2.grafeas.v1.UpgradeDistribution1 -windows_update ( 2.grafeas.v1.WindowsUpdateBQ - io.grafeas.v1PZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Vex.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Vex.php deleted file mode 100644 index 9b897bf4c76d..000000000000 Binary files a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Vex.php and /dev/null differ diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Vulnerability.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Vulnerability.php deleted file mode 100644 index ddec156823dc..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Vulnerability.php +++ /dev/null @@ -1,109 +0,0 @@ -internalAddGeneratedFile( - ' -­ -grafeas/v1/vulnerability.proto -grafeas.v1google/protobuf/timestamp.protografeas/v1/common.protografeas/v1/cvss.protografeas/v1/package.protografeas/v1/severity.protografeas/v1/vex.proto"ì -VulnerabilityNote - -cvss_score (& -severity (2.grafeas.v1.Severity5 -details ( 2$.grafeas.v1.VulnerabilityNote.Detail# -cvss_v3 ( 2.grafeas.v1.CVSSv3D -windows_details ( 2+.grafeas.v1.VulnerabilityNote.WindowsDetail6 -source_update_time ( 2.google.protobuf.Timestamp- - cvss_version (2.grafeas.v1.CVSSVersion! -cvss_v2 ( 2.grafeas.v1.CVSS­ -Detail - severity_name (  - description (  - package_type (  -affected_cpe_uri (  -affected_package ( 3 -affected_version_start ( 2.grafeas.v1.Version1 -affected_version_end ( 2.grafeas.v1.Version - fixed_cpe_uri (  - fixed_package ( * - fixed_version - ( 2.grafeas.v1.Version - is_obsolete (6 -source_update_time ( 2.google.protobuf.Timestamp -source (  -vendor ( ¾ - WindowsDetail -cpe_uri (  -name (  - description ( M - -fixing_kbs ( 29.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase* - KnowledgeBase -name (  -url ( "˜ - -VulnerabilityOccurrence -type ( & -severity (2.grafeas.v1.Severity - -cvss_score ( -cvssv3 - ( 2.grafeas.v1.CVSSG - package_issue ( 20.grafeas.v1.VulnerabilityOccurrence.PackageIssue -short_description (  -long_description ( , - related_urls ( 2.grafeas.v1.RelatedUrl0 -effective_severity (2.grafeas.v1.Severity - fix_available (- - cvss_version (2.grafeas.v1.CVSSVersion! -cvss_v2 ( 2.grafeas.v1.CVSSI -vex_assessment ( 21.grafeas.v1.VulnerabilityOccurrence.VexAssessment - extra_details ( à - PackageIssue -affected_cpe_uri (  -affected_package ( - -affected_version ( 2.grafeas.v1.Version - fixed_cpe_uri (  - fixed_package ( * - fixed_version ( 2.grafeas.v1.Version - fix_available ( - package_type ( 5 -effective_severity (2.grafeas.v1.SeverityBàA/ - file_location - ( 2.grafeas.v1.FileLocation„ - VexAssessment -cve ( B -vulnerability_id ( , - related_uris ( 2.grafeas.v1.RelatedUrl - note_name ( G -state (28.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State -impacts ( T - remediations ( 2>.grafeas.v1.VulnerabilityAssessmentNote.Assessment.RemediationW - justification ( 2@.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationBQ - io.grafeas.v1PZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext.php deleted file mode 100644 index 36f9800b4f76..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext.php +++ /dev/null @@ -1,101 +0,0 @@ -grafeas.v1.AliasContext - */ -class AliasContext extends \Google\Protobuf\Internal\Message -{ - /** - * The alias kind. - * - * Generated from protobuf field .grafeas.v1.AliasContext.Kind kind = 1; - */ - protected $kind = 0; - /** - * The alias name. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $kind - * The alias kind. - * @type string $name - * The alias name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * The alias kind. - * - * Generated from protobuf field .grafeas.v1.AliasContext.Kind kind = 1; - * @return int - */ - public function getKind() - { - return $this->kind; - } - - /** - * The alias kind. - * - * Generated from protobuf field .grafeas.v1.AliasContext.Kind kind = 1; - * @param int $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\AliasContext\Kind::class); - $this->kind = $var; - - return $this; - } - - /** - * The alias name. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The alias name. - * - * Generated from protobuf field string name = 2; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext/Kind.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext/Kind.php deleted file mode 100644 index f46137817ef2..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext/Kind.php +++ /dev/null @@ -1,72 +0,0 @@ -grafeas.v1.AliasContext.Kind - */ -class Kind -{ - /** - * Unknown. - * - * Generated from protobuf enum KIND_UNSPECIFIED = 0; - */ - const KIND_UNSPECIFIED = 0; - /** - * Git tag. - * - * Generated from protobuf enum FIXED = 1; - */ - const FIXED = 1; - /** - * Git branch. - * - * Generated from protobuf enum MOVABLE = 2; - */ - const MOVABLE = 2; - /** - * Used to specify non-standard aliases. For example, if a Git repo has a - * ref named "refs/foo/bar". - * - * Generated from protobuf enum OTHER = 4; - */ - const OTHER = 4; - - private static $valueToName = [ - self::KIND_UNSPECIFIED => 'KIND_UNSPECIFIED', - self::FIXED => 'FIXED', - self::MOVABLE => 'MOVABLE', - self::OTHER => 'OTHER', - ]; - - 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(Kind::class, \Grafeas\V1\AliasContext_Kind::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Architecture.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Architecture.php deleted file mode 100644 index ea83dfee8e77..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Architecture.php +++ /dev/null @@ -1,61 +0,0 @@ -grafeas.v1.Architecture - */ -class Architecture -{ - /** - * Unknown architecture. - * - * Generated from protobuf enum ARCHITECTURE_UNSPECIFIED = 0; - */ - const ARCHITECTURE_UNSPECIFIED = 0; - /** - * X86 architecture. - * - * Generated from protobuf enum X86 = 1; - */ - const X86 = 1; - /** - * X64 architecture. - * - * Generated from protobuf enum X64 = 2; - */ - const X64 = 2; - - private static $valueToName = [ - self::ARCHITECTURE_UNSPECIFIED => 'ARCHITECTURE_UNSPECIFIED', - self::X86 => 'X86', - self::X64 => 'X64', - ]; - - 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/Grafeas/v1/proto/src/Grafeas/V1/Artifact.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Artifact.php deleted file mode 100644 index ff6f4d0a38d3..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Artifact.php +++ /dev/null @@ -1,159 +0,0 @@ -grafeas.v1.Artifact - */ -class Artifact extends \Google\Protobuf\Internal\Message -{ - /** - * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a - * container. - * - * Generated from protobuf field string checksum = 1; - */ - protected $checksum = ''; - /** - * Artifact ID, if any; for container images, this will be a URL by digest - * like `gcr.io/projectID/imagename@sha256:123456`. - * - * Generated from protobuf field string id = 2; - */ - protected $id = ''; - /** - * Related artifact names. This may be the path to a binary or jar file, or in - * the case of a container build, the name used to push the container image to - * Google Container Registry, as presented to `docker push`. Note that a - * single Artifact ID can have multiple names, for example if two tags are - * applied to one image. - * - * Generated from protobuf field repeated string names = 3; - */ - private $names; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $checksum - * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a - * container. - * @type string $id - * Artifact ID, if any; for container images, this will be a URL by digest - * like `gcr.io/projectID/imagename@sha256:123456`. - * @type array|\Google\Protobuf\Internal\RepeatedField $names - * Related artifact names. This may be the path to a binary or jar file, or in - * the case of a container build, the name used to push the container image to - * Google Container Registry, as presented to `docker push`. Note that a - * single Artifact ID can have multiple names, for example if two tags are - * applied to one image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a - * container. - * - * Generated from protobuf field string checksum = 1; - * @return string - */ - public function getChecksum() - { - return $this->checksum; - } - - /** - * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a - * container. - * - * Generated from protobuf field string checksum = 1; - * @param string $var - * @return $this - */ - public function setChecksum($var) - { - GPBUtil::checkString($var, True); - $this->checksum = $var; - - return $this; - } - - /** - * Artifact ID, if any; for container images, this will be a URL by digest - * like `gcr.io/projectID/imagename@sha256:123456`. - * - * Generated from protobuf field string id = 2; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Artifact ID, if any; for container images, this will be a URL by digest - * like `gcr.io/projectID/imagename@sha256:123456`. - * - * Generated from protobuf field string id = 2; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Related artifact names. This may be the path to a binary or jar file, or in - * the case of a container build, the name used to push the container image to - * Google Container Registry, as presented to `docker push`. Note that a - * single Artifact ID can have multiple names, for example if two tags are - * applied to one image. - * - * Generated from protobuf field repeated string names = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNames() - { - return $this->names; - } - - /** - * Related artifact names. This may be the path to a binary or jar file, or in - * the case of a container build, the name used to push the container image to - * Google Container Registry, as presented to `docker push`. Note that a - * single Artifact ID can have multiple names, for example if two tags are - * applied to one image. - * - * Generated from protobuf field repeated string names = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->names = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote.php deleted file mode 100644 index f6c61a7ac8f0..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote.php +++ /dev/null @@ -1,84 +0,0 @@ -grafeas.v1.AttestationNote - */ -class AttestationNote extends \Google\Protobuf\Internal\Message -{ - /** - * Hint hints at the purpose of the attestation authority. - * - * Generated from protobuf field .grafeas.v1.AttestationNote.Hint hint = 1; - */ - protected $hint = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\AttestationNote\Hint $hint - * Hint hints at the purpose of the attestation authority. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Attestation::initOnce(); - parent::__construct($data); - } - - /** - * Hint hints at the purpose of the attestation authority. - * - * Generated from protobuf field .grafeas.v1.AttestationNote.Hint hint = 1; - * @return \Grafeas\V1\AttestationNote\Hint|null - */ - public function getHint() - { - return $this->hint; - } - - public function hasHint() - { - return isset($this->hint); - } - - public function clearHint() - { - unset($this->hint); - } - - /** - * Hint hints at the purpose of the attestation authority. - * - * Generated from protobuf field .grafeas.v1.AttestationNote.Hint hint = 1; - * @param \Grafeas\V1\AttestationNote\Hint $var - * @return $this - */ - public function setHint($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\AttestationNote\Hint::class); - $this->hint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote/Hint.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote/Hint.php deleted file mode 100644 index a9646f504708..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote/Hint.php +++ /dev/null @@ -1,80 +0,0 @@ -grafeas.v1.AttestationNote.Hint - */ -class Hint extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The human readable name of this attestation authority, for - * example "qa". - * - * Generated from protobuf field string human_readable_name = 1; - */ - protected $human_readable_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $human_readable_name - * Required. The human readable name of this attestation authority, for - * example "qa". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Attestation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The human readable name of this attestation authority, for - * example "qa". - * - * Generated from protobuf field string human_readable_name = 1; - * @return string - */ - public function getHumanReadableName() - { - return $this->human_readable_name; - } - - /** - * Required. The human readable name of this attestation authority, for - * example "qa". - * - * Generated from protobuf field string human_readable_name = 1; - * @param string $var - * @return $this - */ - public function setHumanReadableName($var) - { - GPBUtil::checkString($var, True); - $this->human_readable_name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Hint::class, \Grafeas\V1\AttestationNote_Hint::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationOccurrence.php deleted file mode 100644 index 08020cd64fc6..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationOccurrence.php +++ /dev/null @@ -1,190 +0,0 @@ -grafeas.v1.AttestationOccurrence - */ -class AttestationOccurrence extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The serialized payload that is verified by one or more - * `signatures`. - * - * Generated from protobuf field bytes serialized_payload = 1; - */ - protected $serialized_payload = ''; - /** - * One or more signatures over `serialized_payload`. Verifier implementations - * should consider this attestation message verified if at least one - * `signature` verifies `serialized_payload`. See `Signature` in common.proto - * for more details on signature structure and verification. - * - * Generated from protobuf field repeated .grafeas.v1.Signature signatures = 2; - */ - private $signatures; - /** - * One or more JWTs encoding a self-contained attestation. - * Each JWT encodes the payload that it verifies within the JWT itself. - * Verifier implementation SHOULD ignore the `serialized_payload` field - * when verifying these JWTs. - * If only JWTs are present on this AttestationOccurrence, then the - * `serialized_payload` SHOULD be left empty. - * Each JWT SHOULD encode a claim specific to the `resource_uri` of this - * Occurrence, but this is not validated by Grafeas metadata API - * implementations. The JWT itself is opaque to Grafeas. - * - * Generated from protobuf field repeated .grafeas.v1.Jwt jwts = 3; - */ - private $jwts; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $serialized_payload - * Required. The serialized payload that is verified by one or more - * `signatures`. - * @type array<\Grafeas\V1\Signature>|\Google\Protobuf\Internal\RepeatedField $signatures - * One or more signatures over `serialized_payload`. Verifier implementations - * should consider this attestation message verified if at least one - * `signature` verifies `serialized_payload`. See `Signature` in common.proto - * for more details on signature structure and verification. - * @type array<\Grafeas\V1\Jwt>|\Google\Protobuf\Internal\RepeatedField $jwts - * One or more JWTs encoding a self-contained attestation. - * Each JWT encodes the payload that it verifies within the JWT itself. - * Verifier implementation SHOULD ignore the `serialized_payload` field - * when verifying these JWTs. - * If only JWTs are present on this AttestationOccurrence, then the - * `serialized_payload` SHOULD be left empty. - * Each JWT SHOULD encode a claim specific to the `resource_uri` of this - * Occurrence, but this is not validated by Grafeas metadata API - * implementations. The JWT itself is opaque to Grafeas. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Attestation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The serialized payload that is verified by one or more - * `signatures`. - * - * Generated from protobuf field bytes serialized_payload = 1; - * @return string - */ - public function getSerializedPayload() - { - return $this->serialized_payload; - } - - /** - * Required. The serialized payload that is verified by one or more - * `signatures`. - * - * Generated from protobuf field bytes serialized_payload = 1; - * @param string $var - * @return $this - */ - public function setSerializedPayload($var) - { - GPBUtil::checkString($var, False); - $this->serialized_payload = $var; - - return $this; - } - - /** - * One or more signatures over `serialized_payload`. Verifier implementations - * should consider this attestation message verified if at least one - * `signature` verifies `serialized_payload`. See `Signature` in common.proto - * for more details on signature structure and verification. - * - * Generated from protobuf field repeated .grafeas.v1.Signature signatures = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSignatures() - { - return $this->signatures; - } - - /** - * One or more signatures over `serialized_payload`. Verifier implementations - * should consider this attestation message verified if at least one - * `signature` verifies `serialized_payload`. See `Signature` in common.proto - * for more details on signature structure and verification. - * - * Generated from protobuf field repeated .grafeas.v1.Signature signatures = 2; - * @param array<\Grafeas\V1\Signature>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSignatures($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Signature::class); - $this->signatures = $arr; - - return $this; - } - - /** - * One or more JWTs encoding a self-contained attestation. - * Each JWT encodes the payload that it verifies within the JWT itself. - * Verifier implementation SHOULD ignore the `serialized_payload` field - * when verifying these JWTs. - * If only JWTs are present on this AttestationOccurrence, then the - * `serialized_payload` SHOULD be left empty. - * Each JWT SHOULD encode a claim specific to the `resource_uri` of this - * Occurrence, but this is not validated by Grafeas metadata API - * implementations. The JWT itself is opaque to Grafeas. - * - * Generated from protobuf field repeated .grafeas.v1.Jwt jwts = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJwts() - { - return $this->jwts; - } - - /** - * One or more JWTs encoding a self-contained attestation. - * Each JWT encodes the payload that it verifies within the JWT itself. - * Verifier implementation SHOULD ignore the `serialized_payload` field - * when verifying these JWTs. - * If only JWTs are present on this AttestationOccurrence, then the - * `serialized_payload` SHOULD be left empty. - * Each JWT SHOULD encode a claim specific to the `resource_uri` of this - * Occurrence, but this is not validated by Grafeas metadata API - * implementations. The JWT itself is opaque to Grafeas. - * - * Generated from protobuf field repeated .grafeas.v1.Jwt jwts = 3; - * @param array<\Grafeas\V1\Jwt>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJwts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Jwt::class); - $this->jwts = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateNotesRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateNotesRequest.php deleted file mode 100644 index 57d5ba438a91..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateNotesRequest.php +++ /dev/null @@ -1,122 +0,0 @@ -grafeas.v1.BatchCreateNotesRequest - */ -class BatchCreateNotesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the notes are to be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The notes to create. Max allowed length is 1000. - * - * Generated from protobuf field map notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $notes; - - /** - * @param string $parent The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the notes are to be created. Please see - * {@see GrafeasClient::projectName()} for help formatting this field. - * @param array $notes The notes to create. Max allowed length is 1000. - * - * @return \Grafeas\V1\BatchCreateNotesRequest - * - * @experimental - */ - public static function build(string $parent, array $notes): self - { - return (new self()) - ->setParent($parent) - ->setNotes($notes); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the notes are to be created. - * @type array|\Google\Protobuf\Internal\MapField $notes - * The notes to create. Max allowed length is 1000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the notes are to be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the notes are to be created. - * - * 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; - } - - /** - * The notes to create. Max allowed length is 1000. - * - * Generated from protobuf field map notes = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getNotes() - { - return $this->notes; - } - - /** - * The notes to create. Max allowed length is 1000. - * - * Generated from protobuf field map notes = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setNotes($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Note::class); - $this->notes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateNotesResponse.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateNotesResponse.php deleted file mode 100644 index da4f910330f7..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateNotesResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -grafeas.v1.BatchCreateNotesResponse - */ -class BatchCreateNotesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The notes that were created. - * - * Generated from protobuf field repeated .grafeas.v1.Note notes = 1; - */ - private $notes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Grafeas\V1\Note>|\Google\Protobuf\Internal\RepeatedField $notes - * The notes that were created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The notes that were created. - * - * Generated from protobuf field repeated .grafeas.v1.Note notes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNotes() - { - return $this->notes; - } - - /** - * The notes that were created. - * - * Generated from protobuf field repeated .grafeas.v1.Note notes = 1; - * @param array<\Grafeas\V1\Note>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNotes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Note::class); - $this->notes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateOccurrencesRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateOccurrencesRequest.php deleted file mode 100644 index 353ab9a1b68f..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateOccurrencesRequest.php +++ /dev/null @@ -1,122 +0,0 @@ -grafeas.v1.BatchCreateOccurrencesRequest - */ -class BatchCreateOccurrencesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the occurrences are to be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The occurrences to create. Max allowed length is 1000. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $occurrences; - - /** - * @param string $parent The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the occurrences are to be created. Please see - * {@see GrafeasClient::projectName()} for help formatting this field. - * @param \Grafeas\V1\Occurrence[] $occurrences The occurrences to create. Max allowed length is 1000. - * - * @return \Grafeas\V1\BatchCreateOccurrencesRequest - * - * @experimental - */ - public static function build(string $parent, array $occurrences): self - { - return (new self()) - ->setParent($parent) - ->setOccurrences($occurrences); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the occurrences are to be created. - * @type array<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $occurrences - * The occurrences to create. Max allowed length is 1000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the occurrences are to be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the occurrences are to be created. - * - * 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; - } - - /** - * The occurrences to create. Max allowed length is 1000. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOccurrences() - { - return $this->occurrences; - } - - /** - * The occurrences to create. Max allowed length is 1000. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOccurrences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Occurrence::class); - $this->occurrences = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateOccurrencesResponse.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateOccurrencesResponse.php deleted file mode 100644 index ff03d5abda45..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateOccurrencesResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -grafeas.v1.BatchCreateOccurrencesResponse - */ -class BatchCreateOccurrencesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The occurrences that were created. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; - */ - private $occurrences; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $occurrences - * The occurrences that were created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The occurrences that were created. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOccurrences() - { - return $this->occurrences; - } - - /** - * The occurrences that were created. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; - * @param array<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOccurrences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Occurrence::class); - $this->occurrences = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildNote.php deleted file mode 100644 index 033b8e22bb8c..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildNote.php +++ /dev/null @@ -1,68 +0,0 @@ -grafeas.v1.BuildNote - */ -class BuildNote extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Immutable. Version of the builder which produced this build. - * - * Generated from protobuf field string builder_version = 1; - */ - protected $builder_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $builder_version - * Required. Immutable. Version of the builder which produced this build. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Build::initOnce(); - parent::__construct($data); - } - - /** - * Required. Immutable. Version of the builder which produced this build. - * - * Generated from protobuf field string builder_version = 1; - * @return string - */ - public function getBuilderVersion() - { - return $this->builder_version; - } - - /** - * Required. Immutable. Version of the builder which produced this build. - * - * Generated from protobuf field string builder_version = 1; - * @param string $var - * @return $this - */ - public function setBuilderVersion($var) - { - GPBUtil::checkString($var, True); - $this->builder_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildOccurrence.php deleted file mode 100644 index e7f35ae36569..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildOccurrence.php +++ /dev/null @@ -1,307 +0,0 @@ -grafeas.v1.BuildOccurrence - */ -class BuildOccurrence extends \Google\Protobuf\Internal\Message -{ - /** - * The actual provenance for the build. - * - * Generated from protobuf field .grafeas.v1.BuildProvenance provenance = 1; - */ - protected $provenance = null; - /** - * Serialized JSON representation of the provenance, used in generating the - * build signature in the corresponding build note. After verifying the - * signature, `provenance_bytes` can be unmarshalled and compared to the - * provenance to confirm that it is unchanged. A base64-encoded string - * representation of the provenance bytes is used for the signature in order - * to interoperate with openssl which expects this format for signature - * verification. - * The serialized form is captured both to avoid ambiguity in how the - * provenance is marshalled to json as well to prevent incompatibilities with - * future changes. - * - * Generated from protobuf field string provenance_bytes = 2; - */ - protected $provenance_bytes = ''; - /** - * Deprecated. See InTotoStatement for the replacement. - * In-toto Provenance representation as defined in spec. - * - * Generated from protobuf field .grafeas.v1.InTotoProvenance intoto_provenance = 3; - */ - protected $intoto_provenance = null; - /** - * In-toto Statement representation as defined in spec. - * The intoto_statement can contain any type of provenance. The serialized - * payload of the statement can be stored and signed in the Occurrence's - * envelope. - * - * Generated from protobuf field .grafeas.v1.InTotoStatement intoto_statement = 4; - */ - protected $intoto_statement = null; - /** - * In-Toto Slsa Provenance V1 represents a slsa provenance meeting the slsa - * spec, wrapped in an in-toto statement. This allows for direct - * jsonification of a to-spec in-toto slsa statement with a to-spec - * slsa provenance. - * - * Generated from protobuf field .grafeas.v1.InTotoSlsaProvenanceV1 in_toto_slsa_provenance_v1 = 5; - */ - protected $in_toto_slsa_provenance_v1 = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\BuildProvenance $provenance - * The actual provenance for the build. - * @type string $provenance_bytes - * Serialized JSON representation of the provenance, used in generating the - * build signature in the corresponding build note. After verifying the - * signature, `provenance_bytes` can be unmarshalled and compared to the - * provenance to confirm that it is unchanged. A base64-encoded string - * representation of the provenance bytes is used for the signature in order - * to interoperate with openssl which expects this format for signature - * verification. - * The serialized form is captured both to avoid ambiguity in how the - * provenance is marshalled to json as well to prevent incompatibilities with - * future changes. - * @type \Grafeas\V1\InTotoProvenance $intoto_provenance - * Deprecated. See InTotoStatement for the replacement. - * In-toto Provenance representation as defined in spec. - * @type \Grafeas\V1\InTotoStatement $intoto_statement - * In-toto Statement representation as defined in spec. - * The intoto_statement can contain any type of provenance. The serialized - * payload of the statement can be stored and signed in the Occurrence's - * envelope. - * @type \Grafeas\V1\InTotoSlsaProvenanceV1 $in_toto_slsa_provenance_v1 - * In-Toto Slsa Provenance V1 represents a slsa provenance meeting the slsa - * spec, wrapped in an in-toto statement. This allows for direct - * jsonification of a to-spec in-toto slsa statement with a to-spec - * slsa provenance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Build::initOnce(); - parent::__construct($data); - } - - /** - * The actual provenance for the build. - * - * Generated from protobuf field .grafeas.v1.BuildProvenance provenance = 1; - * @return \Grafeas\V1\BuildProvenance|null - */ - public function getProvenance() - { - return $this->provenance; - } - - public function hasProvenance() - { - return isset($this->provenance); - } - - public function clearProvenance() - { - unset($this->provenance); - } - - /** - * The actual provenance for the build. - * - * Generated from protobuf field .grafeas.v1.BuildProvenance provenance = 1; - * @param \Grafeas\V1\BuildProvenance $var - * @return $this - */ - public function setProvenance($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\BuildProvenance::class); - $this->provenance = $var; - - return $this; - } - - /** - * Serialized JSON representation of the provenance, used in generating the - * build signature in the corresponding build note. After verifying the - * signature, `provenance_bytes` can be unmarshalled and compared to the - * provenance to confirm that it is unchanged. A base64-encoded string - * representation of the provenance bytes is used for the signature in order - * to interoperate with openssl which expects this format for signature - * verification. - * The serialized form is captured both to avoid ambiguity in how the - * provenance is marshalled to json as well to prevent incompatibilities with - * future changes. - * - * Generated from protobuf field string provenance_bytes = 2; - * @return string - */ - public function getProvenanceBytes() - { - return $this->provenance_bytes; - } - - /** - * Serialized JSON representation of the provenance, used in generating the - * build signature in the corresponding build note. After verifying the - * signature, `provenance_bytes` can be unmarshalled and compared to the - * provenance to confirm that it is unchanged. A base64-encoded string - * representation of the provenance bytes is used for the signature in order - * to interoperate with openssl which expects this format for signature - * verification. - * The serialized form is captured both to avoid ambiguity in how the - * provenance is marshalled to json as well to prevent incompatibilities with - * future changes. - * - * Generated from protobuf field string provenance_bytes = 2; - * @param string $var - * @return $this - */ - public function setProvenanceBytes($var) - { - GPBUtil::checkString($var, True); - $this->provenance_bytes = $var; - - return $this; - } - - /** - * Deprecated. See InTotoStatement for the replacement. - * In-toto Provenance representation as defined in spec. - * - * Generated from protobuf field .grafeas.v1.InTotoProvenance intoto_provenance = 3; - * @return \Grafeas\V1\InTotoProvenance|null - */ - public function getIntotoProvenance() - { - return $this->intoto_provenance; - } - - public function hasIntotoProvenance() - { - return isset($this->intoto_provenance); - } - - public function clearIntotoProvenance() - { - unset($this->intoto_provenance); - } - - /** - * Deprecated. See InTotoStatement for the replacement. - * In-toto Provenance representation as defined in spec. - * - * Generated from protobuf field .grafeas.v1.InTotoProvenance intoto_provenance = 3; - * @param \Grafeas\V1\InTotoProvenance $var - * @return $this - */ - public function setIntotoProvenance($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\InTotoProvenance::class); - $this->intoto_provenance = $var; - - return $this; - } - - /** - * In-toto Statement representation as defined in spec. - * The intoto_statement can contain any type of provenance. The serialized - * payload of the statement can be stored and signed in the Occurrence's - * envelope. - * - * Generated from protobuf field .grafeas.v1.InTotoStatement intoto_statement = 4; - * @return \Grafeas\V1\InTotoStatement|null - */ - public function getIntotoStatement() - { - return $this->intoto_statement; - } - - public function hasIntotoStatement() - { - return isset($this->intoto_statement); - } - - public function clearIntotoStatement() - { - unset($this->intoto_statement); - } - - /** - * In-toto Statement representation as defined in spec. - * The intoto_statement can contain any type of provenance. The serialized - * payload of the statement can be stored and signed in the Occurrence's - * envelope. - * - * Generated from protobuf field .grafeas.v1.InTotoStatement intoto_statement = 4; - * @param \Grafeas\V1\InTotoStatement $var - * @return $this - */ - public function setIntotoStatement($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\InTotoStatement::class); - $this->intoto_statement = $var; - - return $this; - } - - /** - * In-Toto Slsa Provenance V1 represents a slsa provenance meeting the slsa - * spec, wrapped in an in-toto statement. This allows for direct - * jsonification of a to-spec in-toto slsa statement with a to-spec - * slsa provenance. - * - * Generated from protobuf field .grafeas.v1.InTotoSlsaProvenanceV1 in_toto_slsa_provenance_v1 = 5; - * @return \Grafeas\V1\InTotoSlsaProvenanceV1|null - */ - public function getInTotoSlsaProvenanceV1() - { - return $this->in_toto_slsa_provenance_v1; - } - - public function hasInTotoSlsaProvenanceV1() - { - return isset($this->in_toto_slsa_provenance_v1); - } - - public function clearInTotoSlsaProvenanceV1() - { - unset($this->in_toto_slsa_provenance_v1); - } - - /** - * In-Toto Slsa Provenance V1 represents a slsa provenance meeting the slsa - * spec, wrapped in an in-toto statement. This allows for direct - * jsonification of a to-spec in-toto slsa statement with a to-spec - * slsa provenance. - * - * Generated from protobuf field .grafeas.v1.InTotoSlsaProvenanceV1 in_toto_slsa_provenance_v1 = 5; - * @param \Grafeas\V1\InTotoSlsaProvenanceV1 $var - * @return $this - */ - public function setInTotoSlsaProvenanceV1($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\InTotoSlsaProvenanceV1::class); - $this->in_toto_slsa_provenance_v1 = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildProvenance.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildProvenance.php deleted file mode 100644 index 8e8c3289d1ee..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildProvenance.php +++ /dev/null @@ -1,528 +0,0 @@ -grafeas.v1.BuildProvenance - */ -class BuildProvenance extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Unique identifier of the build. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * ID of the project. - * - * Generated from protobuf field string project_id = 2; - */ - protected $project_id = ''; - /** - * Commands requested by the build. - * - * Generated from protobuf field repeated .grafeas.v1.Command commands = 3; - */ - private $commands; - /** - * Output of the build. - * - * Generated from protobuf field repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - private $built_artifacts; - /** - * Time at which the build was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - */ - protected $create_time = null; - /** - * Time at which execution of the build was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 6; - */ - protected $start_time = null; - /** - * Time at which execution of the build was finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 7; - */ - protected $end_time = null; - /** - * E-mail address of the user who initiated this build. Note that this was the - * user's e-mail address at the time the build was initiated; this address may - * not represent the same end-user for all time. - * - * Generated from protobuf field string creator = 8; - */ - protected $creator = ''; - /** - * URI where any logs for this provenance were written. - * - * Generated from protobuf field string logs_uri = 9; - */ - protected $logs_uri = ''; - /** - * Details of the Source input to the build. - * - * Generated from protobuf field .grafeas.v1.Source source_provenance = 10; - */ - protected $source_provenance = null; - /** - * Trigger identifier if the build was triggered automatically; empty if not. - * - * Generated from protobuf field string trigger_id = 11; - */ - protected $trigger_id = ''; - /** - * Special options applied to this build. This is a catch-all field where - * build providers can enter any desired additional details. - * - * Generated from protobuf field map build_options = 12; - */ - private $build_options; - /** - * Version string of the builder at the time this build was executed. - * - * Generated from protobuf field string builder_version = 13; - */ - protected $builder_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Required. Unique identifier of the build. - * @type string $project_id - * ID of the project. - * @type array<\Grafeas\V1\Command>|\Google\Protobuf\Internal\RepeatedField $commands - * Commands requested by the build. - * @type array<\Grafeas\V1\Artifact>|\Google\Protobuf\Internal\RepeatedField $built_artifacts - * Output of the build. - * @type \Google\Protobuf\Timestamp $create_time - * Time at which the build was created. - * @type \Google\Protobuf\Timestamp $start_time - * Time at which execution of the build was started. - * @type \Google\Protobuf\Timestamp $end_time - * Time at which execution of the build was finished. - * @type string $creator - * E-mail address of the user who initiated this build. Note that this was the - * user's e-mail address at the time the build was initiated; this address may - * not represent the same end-user for all time. - * @type string $logs_uri - * URI where any logs for this provenance were written. - * @type \Grafeas\V1\Source $source_provenance - * Details of the Source input to the build. - * @type string $trigger_id - * Trigger identifier if the build was triggered automatically; empty if not. - * @type array|\Google\Protobuf\Internal\MapField $build_options - * Special options applied to this build. This is a catch-all field where - * build providers can enter any desired additional details. - * @type string $builder_version - * Version string of the builder at the time this build was executed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * Required. Unique identifier of the build. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Required. Unique identifier of the build. - * - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * ID of the project. - * - * Generated from protobuf field string project_id = 2; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * ID of the project. - * - * Generated from protobuf field string project_id = 2; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Commands requested by the build. - * - * Generated from protobuf field repeated .grafeas.v1.Command commands = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCommands() - { - return $this->commands; - } - - /** - * Commands requested by the build. - * - * Generated from protobuf field repeated .grafeas.v1.Command commands = 3; - * @param array<\Grafeas\V1\Command>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCommands($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Command::class); - $this->commands = $arr; - - return $this; - } - - /** - * Output of the build. - * - * Generated from protobuf field repeated .grafeas.v1.Artifact built_artifacts = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBuiltArtifacts() - { - return $this->built_artifacts; - } - - /** - * Output of the build. - * - * Generated from protobuf field repeated .grafeas.v1.Artifact built_artifacts = 4; - * @param array<\Grafeas\V1\Artifact>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBuiltArtifacts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Artifact::class); - $this->built_artifacts = $arr; - - return $this; - } - - /** - * Time at which the build was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - * @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); - } - - /** - * Time at which the build was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Time at which execution of the build was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Time at which execution of the build was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Time at which execution of the build was finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Time at which execution of the build was finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * E-mail address of the user who initiated this build. Note that this was the - * user's e-mail address at the time the build was initiated; this address may - * not represent the same end-user for all time. - * - * Generated from protobuf field string creator = 8; - * @return string - */ - public function getCreator() - { - return $this->creator; - } - - /** - * E-mail address of the user who initiated this build. Note that this was the - * user's e-mail address at the time the build was initiated; this address may - * not represent the same end-user for all time. - * - * Generated from protobuf field string creator = 8; - * @param string $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkString($var, True); - $this->creator = $var; - - return $this; - } - - /** - * URI where any logs for this provenance were written. - * - * Generated from protobuf field string logs_uri = 9; - * @return string - */ - public function getLogsUri() - { - return $this->logs_uri; - } - - /** - * URI where any logs for this provenance were written. - * - * Generated from protobuf field string logs_uri = 9; - * @param string $var - * @return $this - */ - public function setLogsUri($var) - { - GPBUtil::checkString($var, True); - $this->logs_uri = $var; - - return $this; - } - - /** - * Details of the Source input to the build. - * - * Generated from protobuf field .grafeas.v1.Source source_provenance = 10; - * @return \Grafeas\V1\Source|null - */ - public function getSourceProvenance() - { - return $this->source_provenance; - } - - public function hasSourceProvenance() - { - return isset($this->source_provenance); - } - - public function clearSourceProvenance() - { - unset($this->source_provenance); - } - - /** - * Details of the Source input to the build. - * - * Generated from protobuf field .grafeas.v1.Source source_provenance = 10; - * @param \Grafeas\V1\Source $var - * @return $this - */ - public function setSourceProvenance($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Source::class); - $this->source_provenance = $var; - - return $this; - } - - /** - * Trigger identifier if the build was triggered automatically; empty if not. - * - * Generated from protobuf field string trigger_id = 11; - * @return string - */ - public function getTriggerId() - { - return $this->trigger_id; - } - - /** - * Trigger identifier if the build was triggered automatically; empty if not. - * - * Generated from protobuf field string trigger_id = 11; - * @param string $var - * @return $this - */ - public function setTriggerId($var) - { - GPBUtil::checkString($var, True); - $this->trigger_id = $var; - - return $this; - } - - /** - * Special options applied to this build. This is a catch-all field where - * build providers can enter any desired additional details. - * - * Generated from protobuf field map build_options = 12; - * @return \Google\Protobuf\Internal\MapField - */ - public function getBuildOptions() - { - return $this->build_options; - } - - /** - * Special options applied to this build. This is a catch-all field where - * build providers can enter any desired additional details. - * - * Generated from protobuf field map build_options = 12; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setBuildOptions($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->build_options = $arr; - - return $this; - } - - /** - * Version string of the builder at the time this build was executed. - * - * Generated from protobuf field string builder_version = 13; - * @return string - */ - public function getBuilderVersion() - { - return $this->builder_version; - } - - /** - * Version string of the builder at the time this build was executed. - * - * Generated from protobuf field string builder_version = 13; - * @param string $var - * @return $this - */ - public function setBuilderVersion($var) - { - GPBUtil::checkString($var, True); - $this->builder_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuilderConfig.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuilderConfig.php deleted file mode 100644 index 97732fb870dd..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuilderConfig.php +++ /dev/null @@ -1,58 +0,0 @@ -grafeas.v1.BuilderConfig - */ -class BuilderConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\IntotoProvenance::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS.php deleted file mode 100644 index eed433379f38..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS.php +++ /dev/null @@ -1,382 +0,0 @@ -grafeas.v1.CVSS - */ -class CVSS extends \Google\Protobuf\Internal\Message -{ - /** - * The base score is a function of the base metric scores. - * - * Generated from protobuf field float base_score = 1; - */ - protected $base_score = 0.0; - /** - * Generated from protobuf field float exploitability_score = 2; - */ - protected $exploitability_score = 0.0; - /** - * Generated from protobuf field float impact_score = 3; - */ - protected $impact_score = 0.0; - /** - * Base Metrics - * Represents the intrinsic characteristics of a vulnerability that are - * constant over time and across user environments. - * - * Generated from protobuf field .grafeas.v1.CVSS.AttackVector attack_vector = 4; - */ - protected $attack_vector = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - */ - protected $attack_complexity = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSS.Authentication authentication = 6; - */ - protected $authentication = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - */ - protected $privileges_required = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - */ - protected $user_interaction = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSS.Scope scope = 9; - */ - protected $scope = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - */ - protected $confidentiality_impact = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSS.Impact integrity_impact = 11; - */ - protected $integrity_impact = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSS.Impact availability_impact = 12; - */ - protected $availability_impact = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $base_score - * The base score is a function of the base metric scores. - * @type float $exploitability_score - * @type float $impact_score - * @type int $attack_vector - * Base Metrics - * Represents the intrinsic characteristics of a vulnerability that are - * constant over time and across user environments. - * @type int $attack_complexity - * @type int $authentication - * @type int $privileges_required - * @type int $user_interaction - * @type int $scope - * @type int $confidentiality_impact - * @type int $integrity_impact - * @type int $availability_impact - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Cvss::initOnce(); - parent::__construct($data); - } - - /** - * The base score is a function of the base metric scores. - * - * Generated from protobuf field float base_score = 1; - * @return float - */ - public function getBaseScore() - { - return $this->base_score; - } - - /** - * The base score is a function of the base metric scores. - * - * Generated from protobuf field float base_score = 1; - * @param float $var - * @return $this - */ - public function setBaseScore($var) - { - GPBUtil::checkFloat($var); - $this->base_score = $var; - - return $this; - } - - /** - * Generated from protobuf field float exploitability_score = 2; - * @return float - */ - public function getExploitabilityScore() - { - return $this->exploitability_score; - } - - /** - * Generated from protobuf field float exploitability_score = 2; - * @param float $var - * @return $this - */ - public function setExploitabilityScore($var) - { - GPBUtil::checkFloat($var); - $this->exploitability_score = $var; - - return $this; - } - - /** - * Generated from protobuf field float impact_score = 3; - * @return float - */ - public function getImpactScore() - { - return $this->impact_score; - } - - /** - * Generated from protobuf field float impact_score = 3; - * @param float $var - * @return $this - */ - public function setImpactScore($var) - { - GPBUtil::checkFloat($var); - $this->impact_score = $var; - - return $this; - } - - /** - * Base Metrics - * Represents the intrinsic characteristics of a vulnerability that are - * constant over time and across user environments. - * - * Generated from protobuf field .grafeas.v1.CVSS.AttackVector attack_vector = 4; - * @return int - */ - public function getAttackVector() - { - return $this->attack_vector; - } - - /** - * Base Metrics - * Represents the intrinsic characteristics of a vulnerability that are - * constant over time and across user environments. - * - * Generated from protobuf field .grafeas.v1.CVSS.AttackVector attack_vector = 4; - * @param int $var - * @return $this - */ - public function setAttackVector($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\AttackVector::class); - $this->attack_vector = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - * @return int - */ - public function getAttackComplexity() - { - return $this->attack_complexity; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - * @param int $var - * @return $this - */ - public function setAttackComplexity($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\AttackComplexity::class); - $this->attack_complexity = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.Authentication authentication = 6; - * @return int - */ - public function getAuthentication() - { - return $this->authentication; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.Authentication authentication = 6; - * @param int $var - * @return $this - */ - public function setAuthentication($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\Authentication::class); - $this->authentication = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - * @return int - */ - public function getPrivilegesRequired() - { - return $this->privileges_required; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - * @param int $var - * @return $this - */ - public function setPrivilegesRequired($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\PrivilegesRequired::class); - $this->privileges_required = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - * @return int - */ - public function getUserInteraction() - { - return $this->user_interaction; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - * @param int $var - * @return $this - */ - public function setUserInteraction($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\UserInteraction::class); - $this->user_interaction = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.Scope scope = 9; - * @return int - */ - public function getScope() - { - return $this->scope; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.Scope scope = 9; - * @param int $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\Scope::class); - $this->scope = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - * @return int - */ - public function getConfidentialityImpact() - { - return $this->confidentiality_impact; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - * @param int $var - * @return $this - */ - public function setConfidentialityImpact($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\Impact::class); - $this->confidentiality_impact = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.Impact integrity_impact = 11; - * @return int - */ - public function getIntegrityImpact() - { - return $this->integrity_impact; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.Impact integrity_impact = 11; - * @param int $var - * @return $this - */ - public function setIntegrityImpact($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\Impact::class); - $this->integrity_impact = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.Impact availability_impact = 12; - * @return int - */ - public function getAvailabilityImpact() - { - return $this->availability_impact; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.Impact availability_impact = 12; - * @param int $var - * @return $this - */ - public function setAvailabilityImpact($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\Impact::class); - $this->availability_impact = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/AttackComplexity.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/AttackComplexity.php deleted file mode 100644 index 011e833e68aa..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/AttackComplexity.php +++ /dev/null @@ -1,61 +0,0 @@ -grafeas.v1.CVSS.AttackComplexity - */ -class AttackComplexity -{ - /** - * Generated from protobuf enum ATTACK_COMPLEXITY_UNSPECIFIED = 0; - */ - const ATTACK_COMPLEXITY_UNSPECIFIED = 0; - /** - * Generated from protobuf enum ATTACK_COMPLEXITY_LOW = 1; - */ - const ATTACK_COMPLEXITY_LOW = 1; - /** - * Generated from protobuf enum ATTACK_COMPLEXITY_HIGH = 2; - */ - const ATTACK_COMPLEXITY_HIGH = 2; - /** - * Generated from protobuf enum ATTACK_COMPLEXITY_MEDIUM = 3; - */ - const ATTACK_COMPLEXITY_MEDIUM = 3; - - private static $valueToName = [ - self::ATTACK_COMPLEXITY_UNSPECIFIED => 'ATTACK_COMPLEXITY_UNSPECIFIED', - self::ATTACK_COMPLEXITY_LOW => 'ATTACK_COMPLEXITY_LOW', - self::ATTACK_COMPLEXITY_HIGH => 'ATTACK_COMPLEXITY_HIGH', - self::ATTACK_COMPLEXITY_MEDIUM => 'ATTACK_COMPLEXITY_MEDIUM', - ]; - - 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(AttackComplexity::class, \Grafeas\V1\CVSS_AttackComplexity::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/AttackVector.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/AttackVector.php deleted file mode 100644 index e012b40cdfd8..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/AttackVector.php +++ /dev/null @@ -1,66 +0,0 @@ -grafeas.v1.CVSS.AttackVector - */ -class AttackVector -{ - /** - * Generated from protobuf enum ATTACK_VECTOR_UNSPECIFIED = 0; - */ - const ATTACK_VECTOR_UNSPECIFIED = 0; - /** - * Generated from protobuf enum ATTACK_VECTOR_NETWORK = 1; - */ - const ATTACK_VECTOR_NETWORK = 1; - /** - * Generated from protobuf enum ATTACK_VECTOR_ADJACENT = 2; - */ - const ATTACK_VECTOR_ADJACENT = 2; - /** - * Generated from protobuf enum ATTACK_VECTOR_LOCAL = 3; - */ - const ATTACK_VECTOR_LOCAL = 3; - /** - * Generated from protobuf enum ATTACK_VECTOR_PHYSICAL = 4; - */ - const ATTACK_VECTOR_PHYSICAL = 4; - - private static $valueToName = [ - self::ATTACK_VECTOR_UNSPECIFIED => 'ATTACK_VECTOR_UNSPECIFIED', - self::ATTACK_VECTOR_NETWORK => 'ATTACK_VECTOR_NETWORK', - self::ATTACK_VECTOR_ADJACENT => 'ATTACK_VECTOR_ADJACENT', - self::ATTACK_VECTOR_LOCAL => 'ATTACK_VECTOR_LOCAL', - self::ATTACK_VECTOR_PHYSICAL => 'ATTACK_VECTOR_PHYSICAL', - ]; - - 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(AttackVector::class, \Grafeas\V1\CVSS_AttackVector::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Authentication.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Authentication.php deleted file mode 100644 index 3e49c8c45e11..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Authentication.php +++ /dev/null @@ -1,61 +0,0 @@ -grafeas.v1.CVSS.Authentication - */ -class Authentication -{ - /** - * Generated from protobuf enum AUTHENTICATION_UNSPECIFIED = 0; - */ - const AUTHENTICATION_UNSPECIFIED = 0; - /** - * Generated from protobuf enum AUTHENTICATION_MULTIPLE = 1; - */ - const AUTHENTICATION_MULTIPLE = 1; - /** - * Generated from protobuf enum AUTHENTICATION_SINGLE = 2; - */ - const AUTHENTICATION_SINGLE = 2; - /** - * Generated from protobuf enum AUTHENTICATION_NONE = 3; - */ - const AUTHENTICATION_NONE = 3; - - private static $valueToName = [ - self::AUTHENTICATION_UNSPECIFIED => 'AUTHENTICATION_UNSPECIFIED', - self::AUTHENTICATION_MULTIPLE => 'AUTHENTICATION_MULTIPLE', - self::AUTHENTICATION_SINGLE => 'AUTHENTICATION_SINGLE', - self::AUTHENTICATION_NONE => 'AUTHENTICATION_NONE', - ]; - - 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(Authentication::class, \Grafeas\V1\CVSS_Authentication::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Impact.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Impact.php deleted file mode 100644 index a7c402857bfd..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Impact.php +++ /dev/null @@ -1,71 +0,0 @@ -grafeas.v1.CVSS.Impact - */ -class Impact -{ - /** - * Generated from protobuf enum IMPACT_UNSPECIFIED = 0; - */ - const IMPACT_UNSPECIFIED = 0; - /** - * Generated from protobuf enum IMPACT_HIGH = 1; - */ - const IMPACT_HIGH = 1; - /** - * Generated from protobuf enum IMPACT_LOW = 2; - */ - const IMPACT_LOW = 2; - /** - * Generated from protobuf enum IMPACT_NONE = 3; - */ - const IMPACT_NONE = 3; - /** - * Generated from protobuf enum IMPACT_PARTIAL = 4; - */ - const IMPACT_PARTIAL = 4; - /** - * Generated from protobuf enum IMPACT_COMPLETE = 5; - */ - const IMPACT_COMPLETE = 5; - - private static $valueToName = [ - self::IMPACT_UNSPECIFIED => 'IMPACT_UNSPECIFIED', - self::IMPACT_HIGH => 'IMPACT_HIGH', - self::IMPACT_LOW => 'IMPACT_LOW', - self::IMPACT_NONE => 'IMPACT_NONE', - self::IMPACT_PARTIAL => 'IMPACT_PARTIAL', - self::IMPACT_COMPLETE => 'IMPACT_COMPLETE', - ]; - - 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(Impact::class, \Grafeas\V1\CVSS_Impact::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/PrivilegesRequired.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/PrivilegesRequired.php deleted file mode 100644 index b3f593d06893..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/PrivilegesRequired.php +++ /dev/null @@ -1,61 +0,0 @@ -grafeas.v1.CVSS.PrivilegesRequired - */ -class PrivilegesRequired -{ - /** - * Generated from protobuf enum PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - */ - const PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - /** - * Generated from protobuf enum PRIVILEGES_REQUIRED_NONE = 1; - */ - const PRIVILEGES_REQUIRED_NONE = 1; - /** - * Generated from protobuf enum PRIVILEGES_REQUIRED_LOW = 2; - */ - const PRIVILEGES_REQUIRED_LOW = 2; - /** - * Generated from protobuf enum PRIVILEGES_REQUIRED_HIGH = 3; - */ - const PRIVILEGES_REQUIRED_HIGH = 3; - - private static $valueToName = [ - self::PRIVILEGES_REQUIRED_UNSPECIFIED => 'PRIVILEGES_REQUIRED_UNSPECIFIED', - self::PRIVILEGES_REQUIRED_NONE => 'PRIVILEGES_REQUIRED_NONE', - self::PRIVILEGES_REQUIRED_LOW => 'PRIVILEGES_REQUIRED_LOW', - self::PRIVILEGES_REQUIRED_HIGH => 'PRIVILEGES_REQUIRED_HIGH', - ]; - - 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(PrivilegesRequired::class, \Grafeas\V1\CVSS_PrivilegesRequired::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Scope.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Scope.php deleted file mode 100644 index 44ac100792e8..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Scope.php +++ /dev/null @@ -1,56 +0,0 @@ -grafeas.v1.CVSS.Scope - */ -class Scope -{ - /** - * Generated from protobuf enum SCOPE_UNSPECIFIED = 0; - */ - const SCOPE_UNSPECIFIED = 0; - /** - * Generated from protobuf enum SCOPE_UNCHANGED = 1; - */ - const SCOPE_UNCHANGED = 1; - /** - * Generated from protobuf enum SCOPE_CHANGED = 2; - */ - const SCOPE_CHANGED = 2; - - private static $valueToName = [ - self::SCOPE_UNSPECIFIED => 'SCOPE_UNSPECIFIED', - self::SCOPE_UNCHANGED => 'SCOPE_UNCHANGED', - self::SCOPE_CHANGED => 'SCOPE_CHANGED', - ]; - - 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(Scope::class, \Grafeas\V1\CVSS_Scope::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/UserInteraction.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/UserInteraction.php deleted file mode 100644 index 2e0e911d1c88..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/UserInteraction.php +++ /dev/null @@ -1,56 +0,0 @@ -grafeas.v1.CVSS.UserInteraction - */ -class UserInteraction -{ - /** - * Generated from protobuf enum USER_INTERACTION_UNSPECIFIED = 0; - */ - const USER_INTERACTION_UNSPECIFIED = 0; - /** - * Generated from protobuf enum USER_INTERACTION_NONE = 1; - */ - const USER_INTERACTION_NONE = 1; - /** - * Generated from protobuf enum USER_INTERACTION_REQUIRED = 2; - */ - const USER_INTERACTION_REQUIRED = 2; - - private static $valueToName = [ - self::USER_INTERACTION_UNSPECIFIED => 'USER_INTERACTION_UNSPECIFIED', - self::USER_INTERACTION_NONE => 'USER_INTERACTION_NONE', - self::USER_INTERACTION_REQUIRED => 'USER_INTERACTION_REQUIRED', - ]; - - 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(UserInteraction::class, \Grafeas\V1\CVSS_UserInteraction::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSVersion.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSVersion.php deleted file mode 100644 index 8c25036f4fff..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSVersion.php +++ /dev/null @@ -1,55 +0,0 @@ -grafeas.v1.CVSSVersion - */ -class CVSSVersion -{ - /** - * Generated from protobuf enum CVSS_VERSION_UNSPECIFIED = 0; - */ - const CVSS_VERSION_UNSPECIFIED = 0; - /** - * Generated from protobuf enum CVSS_VERSION_2 = 1; - */ - const CVSS_VERSION_2 = 1; - /** - * Generated from protobuf enum CVSS_VERSION_3 = 2; - */ - const CVSS_VERSION_3 = 2; - - private static $valueToName = [ - self::CVSS_VERSION_UNSPECIFIED => 'CVSS_VERSION_UNSPECIFIED', - self::CVSS_VERSION_2 => 'CVSS_VERSION_2', - self::CVSS_VERSION_3 => 'CVSS_VERSION_3', - ]; - - 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/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3.php deleted file mode 100644 index 9c1895cf5b46..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3.php +++ /dev/null @@ -1,353 +0,0 @@ -grafeas.v1.CVSSv3 - */ -class CVSSv3 extends \Google\Protobuf\Internal\Message -{ - /** - * The base score is a function of the base metric scores. - * - * Generated from protobuf field float base_score = 1; - */ - protected $base_score = 0.0; - /** - * Generated from protobuf field float exploitability_score = 2; - */ - protected $exploitability_score = 0.0; - /** - * Generated from protobuf field float impact_score = 3; - */ - protected $impact_score = 0.0; - /** - * Base Metrics - * Represents the intrinsic characteristics of a vulnerability that are - * constant over time and across user environments. - * - * Generated from protobuf field .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - */ - protected $attack_vector = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - */ - protected $attack_complexity = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - */ - protected $privileges_required = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - */ - protected $user_interaction = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Scope scope = 9; - */ - protected $scope = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - */ - protected $confidentiality_impact = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - */ - protected $integrity_impact = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Impact availability_impact = 12; - */ - protected $availability_impact = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $base_score - * The base score is a function of the base metric scores. - * @type float $exploitability_score - * @type float $impact_score - * @type int $attack_vector - * Base Metrics - * Represents the intrinsic characteristics of a vulnerability that are - * constant over time and across user environments. - * @type int $attack_complexity - * @type int $privileges_required - * @type int $user_interaction - * @type int $scope - * @type int $confidentiality_impact - * @type int $integrity_impact - * @type int $availability_impact - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Cvss::initOnce(); - parent::__construct($data); - } - - /** - * The base score is a function of the base metric scores. - * - * Generated from protobuf field float base_score = 1; - * @return float - */ - public function getBaseScore() - { - return $this->base_score; - } - - /** - * The base score is a function of the base metric scores. - * - * Generated from protobuf field float base_score = 1; - * @param float $var - * @return $this - */ - public function setBaseScore($var) - { - GPBUtil::checkFloat($var); - $this->base_score = $var; - - return $this; - } - - /** - * Generated from protobuf field float exploitability_score = 2; - * @return float - */ - public function getExploitabilityScore() - { - return $this->exploitability_score; - } - - /** - * Generated from protobuf field float exploitability_score = 2; - * @param float $var - * @return $this - */ - public function setExploitabilityScore($var) - { - GPBUtil::checkFloat($var); - $this->exploitability_score = $var; - - return $this; - } - - /** - * Generated from protobuf field float impact_score = 3; - * @return float - */ - public function getImpactScore() - { - return $this->impact_score; - } - - /** - * Generated from protobuf field float impact_score = 3; - * @param float $var - * @return $this - */ - public function setImpactScore($var) - { - GPBUtil::checkFloat($var); - $this->impact_score = $var; - - return $this; - } - - /** - * Base Metrics - * Represents the intrinsic characteristics of a vulnerability that are - * constant over time and across user environments. - * - * Generated from protobuf field .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - * @return int - */ - public function getAttackVector() - { - return $this->attack_vector; - } - - /** - * Base Metrics - * Represents the intrinsic characteristics of a vulnerability that are - * constant over time and across user environments. - * - * Generated from protobuf field .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - * @param int $var - * @return $this - */ - public function setAttackVector($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\AttackVector::class); - $this->attack_vector = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @return int - */ - public function getAttackComplexity() - { - return $this->attack_complexity; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @param int $var - * @return $this - */ - public function setAttackComplexity($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\AttackComplexity::class); - $this->attack_complexity = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @return int - */ - public function getPrivilegesRequired() - { - return $this->privileges_required; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @param int $var - * @return $this - */ - public function setPrivilegesRequired($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\PrivilegesRequired::class); - $this->privileges_required = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - * @return int - */ - public function getUserInteraction() - { - return $this->user_interaction; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - * @param int $var - * @return $this - */ - public function setUserInteraction($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\UserInteraction::class); - $this->user_interaction = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Scope scope = 9; - * @return int - */ - public function getScope() - { - return $this->scope; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Scope scope = 9; - * @param int $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\Scope::class); - $this->scope = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - * @return int - */ - public function getConfidentialityImpact() - { - return $this->confidentiality_impact; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - * @param int $var - * @return $this - */ - public function setConfidentialityImpact($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\Impact::class); - $this->confidentiality_impact = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - * @return int - */ - public function getIntegrityImpact() - { - return $this->integrity_impact; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - * @param int $var - * @return $this - */ - public function setIntegrityImpact($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\Impact::class); - $this->integrity_impact = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Impact availability_impact = 12; - * @return int - */ - public function getAvailabilityImpact() - { - return $this->availability_impact; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Impact availability_impact = 12; - * @param int $var - * @return $this - */ - public function setAvailabilityImpact($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\Impact::class); - $this->availability_impact = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/AttackComplexity.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/AttackComplexity.php deleted file mode 100644 index 6086d84dc982..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/AttackComplexity.php +++ /dev/null @@ -1,56 +0,0 @@ -grafeas.v1.CVSSv3.AttackComplexity - */ -class AttackComplexity -{ - /** - * Generated from protobuf enum ATTACK_COMPLEXITY_UNSPECIFIED = 0; - */ - const ATTACK_COMPLEXITY_UNSPECIFIED = 0; - /** - * Generated from protobuf enum ATTACK_COMPLEXITY_LOW = 1; - */ - const ATTACK_COMPLEXITY_LOW = 1; - /** - * Generated from protobuf enum ATTACK_COMPLEXITY_HIGH = 2; - */ - const ATTACK_COMPLEXITY_HIGH = 2; - - private static $valueToName = [ - self::ATTACK_COMPLEXITY_UNSPECIFIED => 'ATTACK_COMPLEXITY_UNSPECIFIED', - self::ATTACK_COMPLEXITY_LOW => 'ATTACK_COMPLEXITY_LOW', - self::ATTACK_COMPLEXITY_HIGH => 'ATTACK_COMPLEXITY_HIGH', - ]; - - 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(AttackComplexity::class, \Grafeas\V1\CVSSv3_AttackComplexity::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/AttackVector.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/AttackVector.php deleted file mode 100644 index 9f0892749620..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/AttackVector.php +++ /dev/null @@ -1,66 +0,0 @@ -grafeas.v1.CVSSv3.AttackVector - */ -class AttackVector -{ - /** - * Generated from protobuf enum ATTACK_VECTOR_UNSPECIFIED = 0; - */ - const ATTACK_VECTOR_UNSPECIFIED = 0; - /** - * Generated from protobuf enum ATTACK_VECTOR_NETWORK = 1; - */ - const ATTACK_VECTOR_NETWORK = 1; - /** - * Generated from protobuf enum ATTACK_VECTOR_ADJACENT = 2; - */ - const ATTACK_VECTOR_ADJACENT = 2; - /** - * Generated from protobuf enum ATTACK_VECTOR_LOCAL = 3; - */ - const ATTACK_VECTOR_LOCAL = 3; - /** - * Generated from protobuf enum ATTACK_VECTOR_PHYSICAL = 4; - */ - const ATTACK_VECTOR_PHYSICAL = 4; - - private static $valueToName = [ - self::ATTACK_VECTOR_UNSPECIFIED => 'ATTACK_VECTOR_UNSPECIFIED', - self::ATTACK_VECTOR_NETWORK => 'ATTACK_VECTOR_NETWORK', - self::ATTACK_VECTOR_ADJACENT => 'ATTACK_VECTOR_ADJACENT', - self::ATTACK_VECTOR_LOCAL => 'ATTACK_VECTOR_LOCAL', - self::ATTACK_VECTOR_PHYSICAL => 'ATTACK_VECTOR_PHYSICAL', - ]; - - 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(AttackVector::class, \Grafeas\V1\CVSSv3_AttackVector::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/Impact.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/Impact.php deleted file mode 100644 index d933d36fe7fb..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/Impact.php +++ /dev/null @@ -1,61 +0,0 @@ -grafeas.v1.CVSSv3.Impact - */ -class Impact -{ - /** - * Generated from protobuf enum IMPACT_UNSPECIFIED = 0; - */ - const IMPACT_UNSPECIFIED = 0; - /** - * Generated from protobuf enum IMPACT_HIGH = 1; - */ - const IMPACT_HIGH = 1; - /** - * Generated from protobuf enum IMPACT_LOW = 2; - */ - const IMPACT_LOW = 2; - /** - * Generated from protobuf enum IMPACT_NONE = 3; - */ - const IMPACT_NONE = 3; - - private static $valueToName = [ - self::IMPACT_UNSPECIFIED => 'IMPACT_UNSPECIFIED', - self::IMPACT_HIGH => 'IMPACT_HIGH', - self::IMPACT_LOW => 'IMPACT_LOW', - self::IMPACT_NONE => 'IMPACT_NONE', - ]; - - 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(Impact::class, \Grafeas\V1\CVSSv3_Impact::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/PrivilegesRequired.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/PrivilegesRequired.php deleted file mode 100644 index dff9206db9b8..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/PrivilegesRequired.php +++ /dev/null @@ -1,61 +0,0 @@ -grafeas.v1.CVSSv3.PrivilegesRequired - */ -class PrivilegesRequired -{ - /** - * Generated from protobuf enum PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - */ - const PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - /** - * Generated from protobuf enum PRIVILEGES_REQUIRED_NONE = 1; - */ - const PRIVILEGES_REQUIRED_NONE = 1; - /** - * Generated from protobuf enum PRIVILEGES_REQUIRED_LOW = 2; - */ - const PRIVILEGES_REQUIRED_LOW = 2; - /** - * Generated from protobuf enum PRIVILEGES_REQUIRED_HIGH = 3; - */ - const PRIVILEGES_REQUIRED_HIGH = 3; - - private static $valueToName = [ - self::PRIVILEGES_REQUIRED_UNSPECIFIED => 'PRIVILEGES_REQUIRED_UNSPECIFIED', - self::PRIVILEGES_REQUIRED_NONE => 'PRIVILEGES_REQUIRED_NONE', - self::PRIVILEGES_REQUIRED_LOW => 'PRIVILEGES_REQUIRED_LOW', - self::PRIVILEGES_REQUIRED_HIGH => 'PRIVILEGES_REQUIRED_HIGH', - ]; - - 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(PrivilegesRequired::class, \Grafeas\V1\CVSSv3_PrivilegesRequired::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/Scope.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/Scope.php deleted file mode 100644 index fc48b6eed3d7..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/Scope.php +++ /dev/null @@ -1,56 +0,0 @@ -grafeas.v1.CVSSv3.Scope - */ -class Scope -{ - /** - * Generated from protobuf enum SCOPE_UNSPECIFIED = 0; - */ - const SCOPE_UNSPECIFIED = 0; - /** - * Generated from protobuf enum SCOPE_UNCHANGED = 1; - */ - const SCOPE_UNCHANGED = 1; - /** - * Generated from protobuf enum SCOPE_CHANGED = 2; - */ - const SCOPE_CHANGED = 2; - - private static $valueToName = [ - self::SCOPE_UNSPECIFIED => 'SCOPE_UNSPECIFIED', - self::SCOPE_UNCHANGED => 'SCOPE_UNCHANGED', - self::SCOPE_CHANGED => 'SCOPE_CHANGED', - ]; - - 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(Scope::class, \Grafeas\V1\CVSSv3_Scope::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/UserInteraction.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/UserInteraction.php deleted file mode 100644 index 2348d20766da..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/UserInteraction.php +++ /dev/null @@ -1,56 +0,0 @@ -grafeas.v1.CVSSv3.UserInteraction - */ -class UserInteraction -{ - /** - * Generated from protobuf enum USER_INTERACTION_UNSPECIFIED = 0; - */ - const USER_INTERACTION_UNSPECIFIED = 0; - /** - * Generated from protobuf enum USER_INTERACTION_NONE = 1; - */ - const USER_INTERACTION_NONE = 1; - /** - * Generated from protobuf enum USER_INTERACTION_REQUIRED = 2; - */ - const USER_INTERACTION_REQUIRED = 2; - - private static $valueToName = [ - self::USER_INTERACTION_UNSPECIFIED => 'USER_INTERACTION_UNSPECIFIED', - self::USER_INTERACTION_NONE => 'USER_INTERACTION_NONE', - self::USER_INTERACTION_REQUIRED => 'USER_INTERACTION_REQUIRED', - ]; - - 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(UserInteraction::class, \Grafeas\V1\CVSSv3_UserInteraction::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CloudRepoSourceContext.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CloudRepoSourceContext.php deleted file mode 100644 index ffa168fdc342..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CloudRepoSourceContext.php +++ /dev/null @@ -1,153 +0,0 @@ -grafeas.v1.CloudRepoSourceContext - */ -class CloudRepoSourceContext extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of the repo. - * - * Generated from protobuf field .grafeas.v1.RepoId repo_id = 1; - */ - protected $repo_id = null; - protected $revision; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\RepoId $repo_id - * The ID of the repo. - * @type string $revision_id - * A revision ID. - * @type \Grafeas\V1\AliasContext $alias_context - * An alias, which may be a branch or tag. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * The ID of the repo. - * - * Generated from protobuf field .grafeas.v1.RepoId repo_id = 1; - * @return \Grafeas\V1\RepoId|null - */ - public function getRepoId() - { - return $this->repo_id; - } - - public function hasRepoId() - { - return isset($this->repo_id); - } - - public function clearRepoId() - { - unset($this->repo_id); - } - - /** - * The ID of the repo. - * - * Generated from protobuf field .grafeas.v1.RepoId repo_id = 1; - * @param \Grafeas\V1\RepoId $var - * @return $this - */ - public function setRepoId($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\RepoId::class); - $this->repo_id = $var; - - return $this; - } - - /** - * A revision ID. - * - * Generated from protobuf field string revision_id = 2; - * @return string - */ - public function getRevisionId() - { - return $this->readOneof(2); - } - - public function hasRevisionId() - { - return $this->hasOneof(2); - } - - /** - * A revision ID. - * - * Generated from protobuf field string revision_id = 2; - * @param string $var - * @return $this - */ - public function setRevisionId($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * An alias, which may be a branch or tag. - * - * Generated from protobuf field .grafeas.v1.AliasContext alias_context = 3; - * @return \Grafeas\V1\AliasContext|null - */ - public function getAliasContext() - { - return $this->readOneof(3); - } - - public function hasAliasContext() - { - return $this->hasOneof(3); - } - - /** - * An alias, which may be a branch or tag. - * - * Generated from protobuf field .grafeas.v1.AliasContext alias_context = 3; - * @param \Grafeas\V1\AliasContext $var - * @return $this - */ - public function setAliasContext($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\AliasContext::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getRevision() - { - return $this->whichOneof("revision"); - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Command.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Command.php deleted file mode 100644 index 40d507cfd67f..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Command.php +++ /dev/null @@ -1,249 +0,0 @@ -grafeas.v1.Command - */ -class Command extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the command, as presented on the command line, or if the - * command is packaged as a Docker container, as presented to `docker pull`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Environment variables set before running this command. - * - * Generated from protobuf field repeated string env = 2; - */ - private $env; - /** - * Command-line arguments used when executing this command. - * - * Generated from protobuf field repeated string args = 3; - */ - private $args; - /** - * Working directory (relative to project source root) used when running this - * command. - * - * Generated from protobuf field string dir = 4; - */ - protected $dir = ''; - /** - * Optional unique identifier for this command, used in wait_for to reference - * this command as a dependency. - * - * Generated from protobuf field string id = 5; - */ - protected $id = ''; - /** - * The ID(s) of the command(s) that this command depends on. - * - * Generated from protobuf field repeated string wait_for = 6; - */ - private $wait_for; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the command, as presented on the command line, or if the - * command is packaged as a Docker container, as presented to `docker pull`. - * @type array|\Google\Protobuf\Internal\RepeatedField $env - * Environment variables set before running this command. - * @type array|\Google\Protobuf\Internal\RepeatedField $args - * Command-line arguments used when executing this command. - * @type string $dir - * Working directory (relative to project source root) used when running this - * command. - * @type string $id - * Optional unique identifier for this command, used in wait_for to reference - * this command as a dependency. - * @type array|\Google\Protobuf\Internal\RepeatedField $wait_for - * The ID(s) of the command(s) that this command depends on. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the command, as presented on the command line, or if the - * command is packaged as a Docker container, as presented to `docker pull`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the command, as presented on the command line, or if the - * command is packaged as a Docker container, as presented to `docker pull`. - * - * 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; - } - - /** - * Environment variables set before running this command. - * - * Generated from protobuf field repeated string env = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEnv() - { - return $this->env; - } - - /** - * Environment variables set before running this command. - * - * Generated from protobuf field repeated string env = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEnv($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->env = $arr; - - return $this; - } - - /** - * Command-line arguments used when executing this command. - * - * Generated from protobuf field repeated string args = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArgs() - { - return $this->args; - } - - /** - * Command-line arguments used when executing this command. - * - * Generated from protobuf field repeated string args = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArgs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->args = $arr; - - return $this; - } - - /** - * Working directory (relative to project source root) used when running this - * command. - * - * Generated from protobuf field string dir = 4; - * @return string - */ - public function getDir() - { - return $this->dir; - } - - /** - * Working directory (relative to project source root) used when running this - * command. - * - * Generated from protobuf field string dir = 4; - * @param string $var - * @return $this - */ - public function setDir($var) - { - GPBUtil::checkString($var, True); - $this->dir = $var; - - return $this; - } - - /** - * Optional unique identifier for this command, used in wait_for to reference - * this command as a dependency. - * - * Generated from protobuf field string id = 5; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Optional unique identifier for this command, used in wait_for to reference - * this command as a dependency. - * - * Generated from protobuf field string id = 5; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The ID(s) of the command(s) that this command depends on. - * - * Generated from protobuf field repeated string wait_for = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWaitFor() - { - return $this->wait_for; - } - - /** - * The ID(s) of the command(s) that this command depends on. - * - * Generated from protobuf field repeated string wait_for = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWaitFor($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->wait_for = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Completeness.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Completeness.php deleted file mode 100644 index d5cd151e9b5d..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Completeness.php +++ /dev/null @@ -1,148 +0,0 @@ -grafeas.v1.Completeness - */ -class Completeness extends \Google\Protobuf\Internal\Message -{ - /** - * If true, the builder claims that recipe.arguments is complete, meaning that - * all external inputs are properly captured in the recipe. - * - * Generated from protobuf field bool arguments = 1; - */ - protected $arguments = false; - /** - * If true, the builder claims that recipe.environment is claimed to be - * complete. - * - * Generated from protobuf field bool environment = 2; - */ - protected $environment = false; - /** - * If true, the builder claims that materials are complete, usually through - * some controls to prevent network access. Sometimes called "hermetic". - * - * Generated from protobuf field bool materials = 3; - */ - protected $materials = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $arguments - * If true, the builder claims that recipe.arguments is complete, meaning that - * all external inputs are properly captured in the recipe. - * @type bool $environment - * If true, the builder claims that recipe.environment is claimed to be - * complete. - * @type bool $materials - * If true, the builder claims that materials are complete, usually through - * some controls to prevent network access. Sometimes called "hermetic". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\IntotoProvenance::initOnce(); - parent::__construct($data); - } - - /** - * If true, the builder claims that recipe.arguments is complete, meaning that - * all external inputs are properly captured in the recipe. - * - * Generated from protobuf field bool arguments = 1; - * @return bool - */ - public function getArguments() - { - return $this->arguments; - } - - /** - * If true, the builder claims that recipe.arguments is complete, meaning that - * all external inputs are properly captured in the recipe. - * - * Generated from protobuf field bool arguments = 1; - * @param bool $var - * @return $this - */ - public function setArguments($var) - { - GPBUtil::checkBool($var); - $this->arguments = $var; - - return $this; - } - - /** - * If true, the builder claims that recipe.environment is claimed to be - * complete. - * - * Generated from protobuf field bool environment = 2; - * @return bool - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * If true, the builder claims that recipe.environment is claimed to be - * complete. - * - * Generated from protobuf field bool environment = 2; - * @param bool $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkBool($var); - $this->environment = $var; - - return $this; - } - - /** - * If true, the builder claims that materials are complete, usually through - * some controls to prevent network access. Sometimes called "hermetic". - * - * Generated from protobuf field bool materials = 3; - * @return bool - */ - public function getMaterials() - { - return $this->materials; - } - - /** - * If true, the builder claims that materials are complete, usually through - * some controls to prevent network access. Sometimes called "hermetic". - * - * Generated from protobuf field bool materials = 3; - * @param bool $var - * @return $this - */ - public function setMaterials($var) - { - GPBUtil::checkBool($var); - $this->materials = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote.php deleted file mode 100644 index a204ef071db4..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote.php +++ /dev/null @@ -1,309 +0,0 @@ -grafeas.v1.ComplianceNote - */ -class ComplianceNote extends \Google\Protobuf\Internal\Message -{ - /** - * The title that identifies this compliance check. - * - * Generated from protobuf field string title = 1; - */ - protected $title = ''; - /** - * A description about this compliance check. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * The OS and config versions the benchmark applies to. - * - * Generated from protobuf field repeated .grafeas.v1.ComplianceVersion version = 3; - */ - private $version; - /** - * A rationale for the existence of this compliance check. - * - * Generated from protobuf field string rationale = 4; - */ - protected $rationale = ''; - /** - * A description of remediation steps if the compliance check fails. - * - * Generated from protobuf field string remediation = 5; - */ - protected $remediation = ''; - /** - * Serialized scan instructions with a predefined format. - * - * Generated from protobuf field bytes scan_instructions = 7; - */ - protected $scan_instructions = ''; - protected $compliance_type; - protected $potential_impact; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $title - * The title that identifies this compliance check. - * @type string $description - * A description about this compliance check. - * @type array<\Grafeas\V1\ComplianceVersion>|\Google\Protobuf\Internal\RepeatedField $version - * The OS and config versions the benchmark applies to. - * @type string $rationale - * A rationale for the existence of this compliance check. - * @type string $remediation - * A description of remediation steps if the compliance check fails. - * @type \Grafeas\V1\ComplianceNote\CisBenchmark $cis_benchmark - * @type string $scan_instructions - * Serialized scan instructions with a predefined format. - * @type string $impact - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Compliance::initOnce(); - parent::__construct($data); - } - - /** - * The title that identifies this compliance check. - * - * Generated from protobuf field string title = 1; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * The title that identifies this compliance check. - * - * Generated from protobuf field string title = 1; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * A description about this compliance check. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A description about this compliance check. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The OS and config versions the benchmark applies to. - * - * Generated from protobuf field repeated .grafeas.v1.ComplianceVersion version = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVersion() - { - return $this->version; - } - - /** - * The OS and config versions the benchmark applies to. - * - * Generated from protobuf field repeated .grafeas.v1.ComplianceVersion version = 3; - * @param array<\Grafeas\V1\ComplianceVersion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVersion($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\ComplianceVersion::class); - $this->version = $arr; - - return $this; - } - - /** - * A rationale for the existence of this compliance check. - * - * Generated from protobuf field string rationale = 4; - * @return string - */ - public function getRationale() - { - return $this->rationale; - } - - /** - * A rationale for the existence of this compliance check. - * - * Generated from protobuf field string rationale = 4; - * @param string $var - * @return $this - */ - public function setRationale($var) - { - GPBUtil::checkString($var, True); - $this->rationale = $var; - - return $this; - } - - /** - * A description of remediation steps if the compliance check fails. - * - * Generated from protobuf field string remediation = 5; - * @return string - */ - public function getRemediation() - { - return $this->remediation; - } - - /** - * A description of remediation steps if the compliance check fails. - * - * Generated from protobuf field string remediation = 5; - * @param string $var - * @return $this - */ - public function setRemediation($var) - { - GPBUtil::checkString($var, True); - $this->remediation = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - * @return \Grafeas\V1\ComplianceNote\CisBenchmark|null - */ - public function getCisBenchmark() - { - return $this->readOneof(6); - } - - public function hasCisBenchmark() - { - return $this->hasOneof(6); - } - - /** - * Generated from protobuf field .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - * @param \Grafeas\V1\ComplianceNote\CisBenchmark $var - * @return $this - */ - public function setCisBenchmark($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\ComplianceNote\CisBenchmark::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Serialized scan instructions with a predefined format. - * - * Generated from protobuf field bytes scan_instructions = 7; - * @return string - */ - public function getScanInstructions() - { - return $this->scan_instructions; - } - - /** - * Serialized scan instructions with a predefined format. - * - * Generated from protobuf field bytes scan_instructions = 7; - * @param string $var - * @return $this - */ - public function setScanInstructions($var) - { - GPBUtil::checkString($var, False); - $this->scan_instructions = $var; - - return $this; - } - - /** - * Generated from protobuf field string impact = 8; - * @return string - */ - public function getImpact() - { - return $this->readOneof(8); - } - - public function hasImpact() - { - return $this->hasOneof(8); - } - - /** - * Generated from protobuf field string impact = 8; - * @param string $var - * @return $this - */ - public function setImpact($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * @return string - */ - public function getComplianceType() - { - return $this->whichOneof("compliance_type"); - } - - /** - * @return string - */ - public function getPotentialImpact() - { - return $this->whichOneof("potential_impact"); - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote/CisBenchmark.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote/CisBenchmark.php deleted file mode 100644 index be70e77b1666..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote/CisBenchmark.php +++ /dev/null @@ -1,90 +0,0 @@ -grafeas.v1.ComplianceNote.CisBenchmark - */ -class CisBenchmark extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field int32 profile_level = 1; - */ - protected $profile_level = 0; - /** - * Generated from protobuf field .grafeas.v1.Severity severity = 2; - */ - protected $severity = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $profile_level - * @type int $severity - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Compliance::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field int32 profile_level = 1; - * @return int - */ - public function getProfileLevel() - { - return $this->profile_level; - } - - /** - * Generated from protobuf field int32 profile_level = 1; - * @param int $var - * @return $this - */ - public function setProfileLevel($var) - { - GPBUtil::checkInt32($var); - $this->profile_level = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.Severity severity = 2; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * Generated from protobuf field .grafeas.v1.Severity severity = 2; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\Severity::class); - $this->severity = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CisBenchmark::class, \Grafeas\V1\ComplianceNote_CisBenchmark::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceOccurrence.php deleted file mode 100644 index 48224305c9f7..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceOccurrence.php +++ /dev/null @@ -1,132 +0,0 @@ -grafeas.v1.ComplianceOccurrence - */ -class ComplianceOccurrence extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - private $non_compliant_files; - /** - * Generated from protobuf field string non_compliance_reason = 3; - */ - protected $non_compliance_reason = ''; - /** - * The OS and config version the benchmark was run on. - * - * Generated from protobuf field .grafeas.v1.ComplianceVersion version = 4; - */ - protected $version = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Grafeas\V1\NonCompliantFile>|\Google\Protobuf\Internal\RepeatedField $non_compliant_files - * @type string $non_compliance_reason - * @type \Grafeas\V1\ComplianceVersion $version - * The OS and config version the benchmark was run on. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Compliance::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNonCompliantFiles() - { - return $this->non_compliant_files; - } - - /** - * Generated from protobuf field repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - * @param array<\Grafeas\V1\NonCompliantFile>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNonCompliantFiles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\NonCompliantFile::class); - $this->non_compliant_files = $arr; - - return $this; - } - - /** - * Generated from protobuf field string non_compliance_reason = 3; - * @return string - */ - public function getNonComplianceReason() - { - return $this->non_compliance_reason; - } - - /** - * Generated from protobuf field string non_compliance_reason = 3; - * @param string $var - * @return $this - */ - public function setNonComplianceReason($var) - { - GPBUtil::checkString($var, True); - $this->non_compliance_reason = $var; - - return $this; - } - - /** - * The OS and config version the benchmark was run on. - * - * Generated from protobuf field .grafeas.v1.ComplianceVersion version = 4; - * @return \Grafeas\V1\ComplianceVersion|null - */ - public function getVersion() - { - return $this->version; - } - - public function hasVersion() - { - return isset($this->version); - } - - public function clearVersion() - { - unset($this->version); - } - - /** - * The OS and config version the benchmark was run on. - * - * Generated from protobuf field .grafeas.v1.ComplianceVersion version = 4; - * @param \Grafeas\V1\ComplianceVersion $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\ComplianceVersion::class); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceVersion.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceVersion.php deleted file mode 100644 index 19d19abd80bd..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceVersion.php +++ /dev/null @@ -1,148 +0,0 @@ -grafeas.v1.ComplianceVersion - */ -class ComplianceVersion extends \Google\Protobuf\Internal\Message -{ - /** - * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is - * applicable to. - * - * Generated from protobuf field string cpe_uri = 1; - */ - protected $cpe_uri = ''; - /** - * The name of the document that defines this benchmark, e.g. "CIS - * Container-Optimized OS". - * - * Generated from protobuf field string benchmark_document = 3; - */ - protected $benchmark_document = ''; - /** - * The version of the benchmark. This is set to the version of the OS-specific - * CIS document the benchmark is defined in. - * - * Generated from protobuf field string version = 2; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cpe_uri - * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is - * applicable to. - * @type string $benchmark_document - * The name of the document that defines this benchmark, e.g. "CIS - * Container-Optimized OS". - * @type string $version - * The version of the benchmark. This is set to the version of the OS-specific - * CIS document the benchmark is defined in. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Compliance::initOnce(); - parent::__construct($data); - } - - /** - * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is - * applicable to. - * - * Generated from protobuf field string cpe_uri = 1; - * @return string - */ - public function getCpeUri() - { - return $this->cpe_uri; - } - - /** - * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is - * applicable to. - * - * Generated from protobuf field string cpe_uri = 1; - * @param string $var - * @return $this - */ - public function setCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->cpe_uri = $var; - - return $this; - } - - /** - * The name of the document that defines this benchmark, e.g. "CIS - * Container-Optimized OS". - * - * Generated from protobuf field string benchmark_document = 3; - * @return string - */ - public function getBenchmarkDocument() - { - return $this->benchmark_document; - } - - /** - * The name of the document that defines this benchmark, e.g. "CIS - * Container-Optimized OS". - * - * Generated from protobuf field string benchmark_document = 3; - * @param string $var - * @return $this - */ - public function setBenchmarkDocument($var) - { - GPBUtil::checkString($var, True); - $this->benchmark_document = $var; - - return $this; - } - - /** - * The version of the benchmark. This is set to the version of the OS-specific - * CIS document the benchmark is defined in. - * - * Generated from protobuf field string version = 2; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The version of the benchmark. This is set to the version of the OS-specific - * CIS document the benchmark is defined in. - * - * Generated from protobuf field string version = 2; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CreateNoteRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CreateNoteRequest.php deleted file mode 100644 index b03b9181f323..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CreateNoteRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -grafeas.v1.CreateNoteRequest - */ -class CreateNoteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the note is to be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The ID to use for this note. - * - * Generated from protobuf field string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $note_id = ''; - /** - * The note to create. - * - * Generated from protobuf field .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $note = null; - - /** - * @param string $parent The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the note is to be created. Please see - * {@see GrafeasClient::projectName()} for help formatting this field. - * @param string $noteId The ID to use for this note. - * @param \Grafeas\V1\Note $note The note to create. - * - * @return \Grafeas\V1\CreateNoteRequest - * - * @experimental - */ - public static function build(string $parent, string $noteId, \Grafeas\V1\Note $note): self - { - return (new self()) - ->setParent($parent) - ->setNoteId($noteId) - ->setNote($note); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the note is to be created. - * @type string $note_id - * The ID to use for this note. - * @type \Grafeas\V1\Note $note - * The note to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the note is to be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the note is to be created. - * - * 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; - } - - /** - * The ID to use for this note. - * - * Generated from protobuf field string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNoteId() - { - return $this->note_id; - } - - /** - * The ID to use for this note. - * - * Generated from protobuf field string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNoteId($var) - { - GPBUtil::checkString($var, True); - $this->note_id = $var; - - return $this; - } - - /** - * The note to create. - * - * Generated from protobuf field .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Grafeas\V1\Note|null - */ - public function getNote() - { - return $this->note; - } - - public function hasNote() - { - return isset($this->note); - } - - public function clearNote() - { - unset($this->note); - } - - /** - * The note to create. - * - * Generated from protobuf field .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Grafeas\V1\Note $var - * @return $this - */ - public function setNote($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Note::class); - $this->note = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CreateOccurrenceRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CreateOccurrenceRequest.php deleted file mode 100644 index ac9031ca5a6f..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CreateOccurrenceRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -grafeas.v1.CreateOccurrenceRequest - */ -class CreateOccurrenceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the occurrence is to be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The occurrence to create. - * - * Generated from protobuf field .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $occurrence = null; - - /** - * @param string $parent The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the occurrence is to be created. Please see - * {@see GrafeasClient::projectName()} for help formatting this field. - * @param \Grafeas\V1\Occurrence $occurrence The occurrence to create. - * - * @return \Grafeas\V1\CreateOccurrenceRequest - * - * @experimental - */ - public static function build(string $parent, \Grafeas\V1\Occurrence $occurrence): self - { - return (new self()) - ->setParent($parent) - ->setOccurrence($occurrence); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the occurrence is to be created. - * @type \Grafeas\V1\Occurrence $occurrence - * The occurrence to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the occurrence is to be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the occurrence is to be created. - * - * 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; - } - - /** - * The occurrence to create. - * - * Generated from protobuf field .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Grafeas\V1\Occurrence|null - */ - public function getOccurrence() - { - return $this->occurrence; - } - - public function hasOccurrence() - { - return isset($this->occurrence); - } - - public function clearOccurrence() - { - unset($this->occurrence); - } - - /** - * The occurrence to create. - * - * Generated from protobuf field .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Grafeas\V1\Occurrence $var - * @return $this - */ - public function setOccurrence($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Occurrence::class); - $this->occurrence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote.php deleted file mode 100644 index b40b73c92c36..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote.php +++ /dev/null @@ -1,75 +0,0 @@ -grafeas.v1.DSSEAttestationNote - */ -class DSSEAttestationNote extends \Google\Protobuf\Internal\Message -{ - /** - * DSSEHint hints at the purpose of the attestation authority. - * - * Generated from protobuf field .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - */ - protected $hint = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\DSSEAttestationNote\DSSEHint $hint - * DSSEHint hints at the purpose of the attestation authority. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\DsseAttestation::initOnce(); - parent::__construct($data); - } - - /** - * DSSEHint hints at the purpose of the attestation authority. - * - * Generated from protobuf field .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - * @return \Grafeas\V1\DSSEAttestationNote\DSSEHint|null - */ - public function getHint() - { - return $this->hint; - } - - public function hasHint() - { - return isset($this->hint); - } - - public function clearHint() - { - unset($this->hint); - } - - /** - * DSSEHint hints at the purpose of the attestation authority. - * - * Generated from protobuf field .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - * @param \Grafeas\V1\DSSEAttestationNote\DSSEHint $var - * @return $this - */ - public function setHint($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\DSSEAttestationNote\DSSEHint::class); - $this->hint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote/DSSEHint.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote/DSSEHint.php deleted file mode 100644 index 972f84285167..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote/DSSEHint.php +++ /dev/null @@ -1,80 +0,0 @@ -grafeas.v1.DSSEAttestationNote.DSSEHint - */ -class DSSEHint extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The human readable name of this attestation authority, for - * example "cloudbuild-prod". - * - * Generated from protobuf field string human_readable_name = 1; - */ - protected $human_readable_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $human_readable_name - * Required. The human readable name of this attestation authority, for - * example "cloudbuild-prod". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\DsseAttestation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The human readable name of this attestation authority, for - * example "cloudbuild-prod". - * - * Generated from protobuf field string human_readable_name = 1; - * @return string - */ - public function getHumanReadableName() - { - return $this->human_readable_name; - } - - /** - * Required. The human readable name of this attestation authority, for - * example "cloudbuild-prod". - * - * Generated from protobuf field string human_readable_name = 1; - * @param string $var - * @return $this - */ - public function setHumanReadableName($var) - { - GPBUtil::checkString($var, True); - $this->human_readable_name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DSSEHint::class, \Grafeas\V1\DSSEAttestationNote_DSSEHint::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationOccurrence.php deleted file mode 100644 index 28ccbbd9f0f6..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationOccurrence.php +++ /dev/null @@ -1,119 +0,0 @@ -grafeas.v1.DSSEAttestationOccurrence - */ -class DSSEAttestationOccurrence extends \Google\Protobuf\Internal\Message -{ - /** - * If doing something security critical, make sure to verify the signatures in - * this metadata. - * - * Generated from protobuf field .grafeas.v1.Envelope envelope = 1; - */ - protected $envelope = null; - protected $decoded_payload; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\Envelope $envelope - * If doing something security critical, make sure to verify the signatures in - * this metadata. - * @type \Grafeas\V1\InTotoStatement $statement - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\DsseAttestation::initOnce(); - parent::__construct($data); - } - - /** - * If doing something security critical, make sure to verify the signatures in - * this metadata. - * - * Generated from protobuf field .grafeas.v1.Envelope envelope = 1; - * @return \Grafeas\V1\Envelope|null - */ - public function getEnvelope() - { - return $this->envelope; - } - - public function hasEnvelope() - { - return isset($this->envelope); - } - - public function clearEnvelope() - { - unset($this->envelope); - } - - /** - * If doing something security critical, make sure to verify the signatures in - * this metadata. - * - * Generated from protobuf field .grafeas.v1.Envelope envelope = 1; - * @param \Grafeas\V1\Envelope $var - * @return $this - */ - public function setEnvelope($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Envelope::class); - $this->envelope = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.InTotoStatement statement = 2; - * @return \Grafeas\V1\InTotoStatement|null - */ - public function getStatement() - { - return $this->readOneof(2); - } - - public function hasStatement() - { - return $this->hasOneof(2); - } - - /** - * Generated from protobuf field .grafeas.v1.InTotoStatement statement = 2; - * @param \Grafeas\V1\InTotoStatement $var - * @return $this - */ - public function setStatement($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\InTotoStatement::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getDecodedPayload() - { - return $this->whichOneof("decoded_payload"); - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeleteNoteRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeleteNoteRequest.php deleted file mode 100644 index 14fcef007666..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeleteNoteRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -grafeas.v1.DeleteNoteRequest - */ -class DeleteNoteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. Please see - * {@see GrafeasClient::noteName()} for help formatting this field. - * - * @return \Grafeas\V1\DeleteNoteRequest - * - * @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 - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_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; - } - - /** - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_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/Grafeas/v1/proto/src/Grafeas/V1/DeleteOccurrenceRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeleteOccurrenceRequest.php deleted file mode 100644 index 4318a5540847..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeleteOccurrenceRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -grafeas.v1.DeleteOccurrenceRequest - */ -class DeleteOccurrenceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. Please see - * {@see GrafeasClient::occurrenceName()} for help formatting this field. - * - * @return \Grafeas\V1\DeleteOccurrenceRequest - * - * @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 - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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; - } - - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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/Grafeas/v1/proto/src/Grafeas/V1/DeploymentNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentNote.php deleted file mode 100644 index d934670e3bb8..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentNote.php +++ /dev/null @@ -1,67 +0,0 @@ -grafeas.v1.DeploymentNote - */ -class DeploymentNote extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource URI for the artifact being deployed. - * - * Generated from protobuf field repeated string resource_uri = 1; - */ - private $resource_uri; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $resource_uri - * Required. Resource URI for the artifact being deployed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Deployment::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource URI for the artifact being deployed. - * - * Generated from protobuf field repeated string resource_uri = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResourceUri() - { - return $this->resource_uri; - } - - /** - * Required. Resource URI for the artifact being deployed. - * - * Generated from protobuf field repeated string resource_uri = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResourceUri($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->resource_uri = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence.php deleted file mode 100644 index 9971d3eb3d44..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence.php +++ /dev/null @@ -1,295 +0,0 @@ -grafeas.v1.DeploymentOccurrence - */ -class DeploymentOccurrence extends \Google\Protobuf\Internal\Message -{ - /** - * Identity of the user that triggered this deployment. - * - * Generated from protobuf field string user_email = 1; - */ - protected $user_email = ''; - /** - * Required. Beginning of the lifetime of this deployment. - * - * Generated from protobuf field .google.protobuf.Timestamp deploy_time = 2; - */ - protected $deploy_time = null; - /** - * End of the lifetime of this deployment. - * - * Generated from protobuf field .google.protobuf.Timestamp undeploy_time = 3; - */ - protected $undeploy_time = null; - /** - * Configuration used to create this deployment. - * - * Generated from protobuf field string config = 4; - */ - protected $config = ''; - /** - * Address of the runtime element hosting this deployment. - * - * Generated from protobuf field string address = 5; - */ - protected $address = ''; - /** - * Output only. Resource URI for the artifact being deployed taken from - * the deployable field with the same name. - * - * Generated from protobuf field repeated string resource_uri = 6; - */ - private $resource_uri; - /** - * Platform hosting this deployment. - * - * Generated from protobuf field .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - */ - protected $platform = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $user_email - * Identity of the user that triggered this deployment. - * @type \Google\Protobuf\Timestamp $deploy_time - * Required. Beginning of the lifetime of this deployment. - * @type \Google\Protobuf\Timestamp $undeploy_time - * End of the lifetime of this deployment. - * @type string $config - * Configuration used to create this deployment. - * @type string $address - * Address of the runtime element hosting this deployment. - * @type array|\Google\Protobuf\Internal\RepeatedField $resource_uri - * Output only. Resource URI for the artifact being deployed taken from - * the deployable field with the same name. - * @type int $platform - * Platform hosting this deployment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Deployment::initOnce(); - parent::__construct($data); - } - - /** - * Identity of the user that triggered this deployment. - * - * Generated from protobuf field string user_email = 1; - * @return string - */ - public function getUserEmail() - { - return $this->user_email; - } - - /** - * Identity of the user that triggered this deployment. - * - * Generated from protobuf field string user_email = 1; - * @param string $var - * @return $this - */ - public function setUserEmail($var) - { - GPBUtil::checkString($var, True); - $this->user_email = $var; - - return $this; - } - - /** - * Required. Beginning of the lifetime of this deployment. - * - * Generated from protobuf field .google.protobuf.Timestamp deploy_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeployTime() - { - return $this->deploy_time; - } - - public function hasDeployTime() - { - return isset($this->deploy_time); - } - - public function clearDeployTime() - { - unset($this->deploy_time); - } - - /** - * Required. Beginning of the lifetime of this deployment. - * - * Generated from protobuf field .google.protobuf.Timestamp deploy_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeployTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->deploy_time = $var; - - return $this; - } - - /** - * End of the lifetime of this deployment. - * - * Generated from protobuf field .google.protobuf.Timestamp undeploy_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUndeployTime() - { - return $this->undeploy_time; - } - - public function hasUndeployTime() - { - return isset($this->undeploy_time); - } - - public function clearUndeployTime() - { - unset($this->undeploy_time); - } - - /** - * End of the lifetime of this deployment. - * - * Generated from protobuf field .google.protobuf.Timestamp undeploy_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUndeployTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->undeploy_time = $var; - - return $this; - } - - /** - * Configuration used to create this deployment. - * - * Generated from protobuf field string config = 4; - * @return string - */ - public function getConfig() - { - return $this->config; - } - - /** - * Configuration used to create this deployment. - * - * Generated from protobuf field string config = 4; - * @param string $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkString($var, True); - $this->config = $var; - - return $this; - } - - /** - * Address of the runtime element hosting this deployment. - * - * Generated from protobuf field string address = 5; - * @return string - */ - public function getAddress() - { - return $this->address; - } - - /** - * Address of the runtime element hosting this deployment. - * - * Generated from protobuf field string address = 5; - * @param string $var - * @return $this - */ - public function setAddress($var) - { - GPBUtil::checkString($var, True); - $this->address = $var; - - return $this; - } - - /** - * Output only. Resource URI for the artifact being deployed taken from - * the deployable field with the same name. - * - * Generated from protobuf field repeated string resource_uri = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResourceUri() - { - return $this->resource_uri; - } - - /** - * Output only. Resource URI for the artifact being deployed taken from - * the deployable field with the same name. - * - * Generated from protobuf field repeated string resource_uri = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResourceUri($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->resource_uri = $arr; - - return $this; - } - - /** - * Platform hosting this deployment. - * - * Generated from protobuf field .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - * @return int - */ - public function getPlatform() - { - return $this->platform; - } - - /** - * Platform hosting this deployment. - * - * Generated from protobuf field .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - * @param int $var - * @return $this - */ - public function setPlatform($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\DeploymentOccurrence\Platform::class); - $this->platform = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence/Platform.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence/Platform.php deleted file mode 100644 index 35b13b4c7858..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence/Platform.php +++ /dev/null @@ -1,71 +0,0 @@ -grafeas.v1.DeploymentOccurrence.Platform - */ -class Platform -{ - /** - * Unknown. - * - * Generated from protobuf enum PLATFORM_UNSPECIFIED = 0; - */ - const PLATFORM_UNSPECIFIED = 0; - /** - * Google Container Engine. - * - * Generated from protobuf enum GKE = 1; - */ - const GKE = 1; - /** - * Google App Engine: Flexible Environment. - * - * Generated from protobuf enum FLEX = 2; - */ - const FLEX = 2; - /** - * Custom user-defined platform. - * - * Generated from protobuf enum CUSTOM = 3; - */ - const CUSTOM = 3; - - private static $valueToName = [ - self::PLATFORM_UNSPECIFIED => 'PLATFORM_UNSPECIFIED', - self::GKE => 'GKE', - self::FLEX => 'FLEX', - self::CUSTOM => 'CUSTOM', - ]; - - 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(Platform::class, \Grafeas\V1\DeploymentOccurrence_Platform::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Digest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Digest.php deleted file mode 100644 index 2e3c7163d6fc..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Digest.php +++ /dev/null @@ -1,101 +0,0 @@ -grafeas.v1.Digest - */ -class Digest extends \Google\Protobuf\Internal\Message -{ - /** - * `SHA1`, `SHA512` etc. - * - * Generated from protobuf field string algo = 1; - */ - protected $algo = ''; - /** - * Value of the digest. - * - * Generated from protobuf field bytes digest_bytes = 2; - */ - protected $digest_bytes = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $algo - * `SHA1`, `SHA512` etc. - * @type string $digest_bytes - * Value of the digest. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * `SHA1`, `SHA512` etc. - * - * Generated from protobuf field string algo = 1; - * @return string - */ - public function getAlgo() - { - return $this->algo; - } - - /** - * `SHA1`, `SHA512` etc. - * - * Generated from protobuf field string algo = 1; - * @param string $var - * @return $this - */ - public function setAlgo($var) - { - GPBUtil::checkString($var, True); - $this->algo = $var; - - return $this; - } - - /** - * Value of the digest. - * - * Generated from protobuf field bytes digest_bytes = 2; - * @return string - */ - public function getDigestBytes() - { - return $this->digest_bytes; - } - - /** - * Value of the digest. - * - * Generated from protobuf field bytes digest_bytes = 2; - * @param string $var - * @return $this - */ - public function setDigestBytes($var) - { - GPBUtil::checkString($var, False); - $this->digest_bytes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryNote.php deleted file mode 100644 index d1fa446c046d..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryNote.php +++ /dev/null @@ -1,73 +0,0 @@ -grafeas.v1.DiscoveryNote - */ -class DiscoveryNote extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Immutable. The kind of analysis that is handled by this - * discovery. - * - * Generated from protobuf field .grafeas.v1.NoteKind analysis_kind = 1; - */ - protected $analysis_kind = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $analysis_kind - * Required. Immutable. The kind of analysis that is handled by this - * discovery. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Discovery::initOnce(); - parent::__construct($data); - } - - /** - * Required. Immutable. The kind of analysis that is handled by this - * discovery. - * - * Generated from protobuf field .grafeas.v1.NoteKind analysis_kind = 1; - * @return int - */ - public function getAnalysisKind() - { - return $this->analysis_kind; - } - - /** - * Required. Immutable. The kind of analysis that is handled by this - * discovery. - * - * Generated from protobuf field .grafeas.v1.NoteKind analysis_kind = 1; - * @param int $var - * @return $this - */ - public function setAnalysisKind($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\NoteKind::class); - $this->analysis_kind = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence.php deleted file mode 100644 index f01e0fe3da66..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence.php +++ /dev/null @@ -1,438 +0,0 @@ -grafeas.v1.DiscoveryOccurrence - */ -class DiscoveryOccurrence extends \Google\Protobuf\Internal\Message -{ - /** - * Whether the resource is continuously analyzed. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - */ - protected $continuous_analysis = 0; - /** - * The status of discovery for the resource. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - */ - protected $analysis_status = 0; - /** - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - */ - protected $analysis_completed = null; - /** - * Indicates any errors encountered during analysis of a resource. There - * could be 0 or more of these errors. - * - * Generated from protobuf field repeated .google.rpc.Status analysis_error = 8; - */ - private $analysis_error; - /** - * When an error is encountered this will contain a LocalizedMessage under - * details to show to the user. The LocalizedMessage is output only and - * populated by the API. - * - * Generated from protobuf field .google.rpc.Status analysis_status_error = 3; - */ - protected $analysis_status_error = null; - /** - * The CPE of the resource being scanned. - * - * Generated from protobuf field string cpe = 4; - */ - protected $cpe = ''; - /** - * The last time this resource was scanned. - * - * Generated from protobuf field .google.protobuf.Timestamp last_scan_time = 5; - */ - protected $last_scan_time = null; - /** - * The time occurrences related to this discovery occurrence were archived. - * - * Generated from protobuf field .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $archive_time = null; - /** - * The status of an SBOM generation. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.SBOMStatus sbom_status = 9; - */ - protected $sbom_status = null; - /** - * The status of an vulnerability attestation generation. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation vulnerability_attestation = 10; - */ - protected $vulnerability_attestation = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $continuous_analysis - * Whether the resource is continuously analyzed. - * @type int $analysis_status - * The status of discovery for the resource. - * @type \Grafeas\V1\DiscoveryOccurrence\AnalysisCompleted $analysis_completed - * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $analysis_error - * Indicates any errors encountered during analysis of a resource. There - * could be 0 or more of these errors. - * @type \Google\Rpc\Status $analysis_status_error - * When an error is encountered this will contain a LocalizedMessage under - * details to show to the user. The LocalizedMessage is output only and - * populated by the API. - * @type string $cpe - * The CPE of the resource being scanned. - * @type \Google\Protobuf\Timestamp $last_scan_time - * The last time this resource was scanned. - * @type \Google\Protobuf\Timestamp $archive_time - * The time occurrences related to this discovery occurrence were archived. - * @type \Grafeas\V1\DiscoveryOccurrence\SBOMStatus $sbom_status - * The status of an SBOM generation. - * @type \Grafeas\V1\DiscoveryOccurrence\VulnerabilityAttestation $vulnerability_attestation - * The status of an vulnerability attestation generation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Discovery::initOnce(); - parent::__construct($data); - } - - /** - * Whether the resource is continuously analyzed. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - * @return int - */ - public function getContinuousAnalysis() - { - return $this->continuous_analysis; - } - - /** - * Whether the resource is continuously analyzed. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - * @param int $var - * @return $this - */ - public function setContinuousAnalysis($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\DiscoveryOccurrence\ContinuousAnalysis::class); - $this->continuous_analysis = $var; - - return $this; - } - - /** - * The status of discovery for the resource. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - * @return int - */ - public function getAnalysisStatus() - { - return $this->analysis_status; - } - - /** - * The status of discovery for the resource. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - * @param int $var - * @return $this - */ - public function setAnalysisStatus($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\DiscoveryOccurrence\AnalysisStatus::class); - $this->analysis_status = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - * @return \Grafeas\V1\DiscoveryOccurrence\AnalysisCompleted|null - */ - public function getAnalysisCompleted() - { - return $this->analysis_completed; - } - - public function hasAnalysisCompleted() - { - return isset($this->analysis_completed); - } - - public function clearAnalysisCompleted() - { - unset($this->analysis_completed); - } - - /** - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - * @param \Grafeas\V1\DiscoveryOccurrence\AnalysisCompleted $var - * @return $this - */ - public function setAnalysisCompleted($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\DiscoveryOccurrence\AnalysisCompleted::class); - $this->analysis_completed = $var; - - return $this; - } - - /** - * Indicates any errors encountered during analysis of a resource. There - * could be 0 or more of these errors. - * - * Generated from protobuf field repeated .google.rpc.Status analysis_error = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAnalysisError() - { - return $this->analysis_error; - } - - /** - * Indicates any errors encountered during analysis of a resource. There - * could be 0 or more of these errors. - * - * Generated from protobuf field repeated .google.rpc.Status analysis_error = 8; - * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAnalysisError($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->analysis_error = $arr; - - return $this; - } - - /** - * When an error is encountered this will contain a LocalizedMessage under - * details to show to the user. The LocalizedMessage is output only and - * populated by the API. - * - * Generated from protobuf field .google.rpc.Status analysis_status_error = 3; - * @return \Google\Rpc\Status|null - */ - public function getAnalysisStatusError() - { - return $this->analysis_status_error; - } - - public function hasAnalysisStatusError() - { - return isset($this->analysis_status_error); - } - - public function clearAnalysisStatusError() - { - unset($this->analysis_status_error); - } - - /** - * When an error is encountered this will contain a LocalizedMessage under - * details to show to the user. The LocalizedMessage is output only and - * populated by the API. - * - * Generated from protobuf field .google.rpc.Status analysis_status_error = 3; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setAnalysisStatusError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->analysis_status_error = $var; - - return $this; - } - - /** - * The CPE of the resource being scanned. - * - * Generated from protobuf field string cpe = 4; - * @return string - */ - public function getCpe() - { - return $this->cpe; - } - - /** - * The CPE of the resource being scanned. - * - * Generated from protobuf field string cpe = 4; - * @param string $var - * @return $this - */ - public function setCpe($var) - { - GPBUtil::checkString($var, True); - $this->cpe = $var; - - return $this; - } - - /** - * The last time this resource was scanned. - * - * Generated from protobuf field .google.protobuf.Timestamp last_scan_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastScanTime() - { - return $this->last_scan_time; - } - - public function hasLastScanTime() - { - return isset($this->last_scan_time); - } - - public function clearLastScanTime() - { - unset($this->last_scan_time); - } - - /** - * The last time this resource was scanned. - * - * Generated from protobuf field .google.protobuf.Timestamp last_scan_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastScanTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_scan_time = $var; - - return $this; - } - - /** - * The time occurrences related to this discovery occurrence were archived. - * - * Generated from protobuf field .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getArchiveTime() - { - return $this->archive_time; - } - - public function hasArchiveTime() - { - return isset($this->archive_time); - } - - public function clearArchiveTime() - { - unset($this->archive_time); - } - - /** - * The time occurrences related to this discovery occurrence were archived. - * - * Generated from protobuf field .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setArchiveTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->archive_time = $var; - - return $this; - } - - /** - * The status of an SBOM generation. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.SBOMStatus sbom_status = 9; - * @return \Grafeas\V1\DiscoveryOccurrence\SBOMStatus|null - */ - public function getSbomStatus() - { - return $this->sbom_status; - } - - public function hasSbomStatus() - { - return isset($this->sbom_status); - } - - public function clearSbomStatus() - { - unset($this->sbom_status); - } - - /** - * The status of an SBOM generation. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.SBOMStatus sbom_status = 9; - * @param \Grafeas\V1\DiscoveryOccurrence\SBOMStatus $var - * @return $this - */ - public function setSbomStatus($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\DiscoveryOccurrence\SBOMStatus::class); - $this->sbom_status = $var; - - return $this; - } - - /** - * The status of an vulnerability attestation generation. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation vulnerability_attestation = 10; - * @return \Grafeas\V1\DiscoveryOccurrence\VulnerabilityAttestation|null - */ - public function getVulnerabilityAttestation() - { - return $this->vulnerability_attestation; - } - - public function hasVulnerabilityAttestation() - { - return isset($this->vulnerability_attestation); - } - - public function clearVulnerabilityAttestation() - { - unset($this->vulnerability_attestation); - } - - /** - * The status of an vulnerability attestation generation. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation vulnerability_attestation = 10; - * @param \Grafeas\V1\DiscoveryOccurrence\VulnerabilityAttestation $var - * @return $this - */ - public function setVulnerabilityAttestation($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\DiscoveryOccurrence\VulnerabilityAttestation::class); - $this->vulnerability_attestation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/AnalysisCompleted.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/AnalysisCompleted.php deleted file mode 100644 index 5d1e7201fb22..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/AnalysisCompleted.php +++ /dev/null @@ -1,64 +0,0 @@ -grafeas.v1.DiscoveryOccurrence.AnalysisCompleted - */ -class AnalysisCompleted extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field repeated string analysis_type = 1; - */ - private $analysis_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $analysis_type - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Discovery::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field repeated string analysis_type = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAnalysisType() - { - return $this->analysis_type; - } - - /** - * Generated from protobuf field repeated string analysis_type = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAnalysisType($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->analysis_type = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AnalysisCompleted::class, \Grafeas\V1\DiscoveryOccurrence_AnalysisCompleted::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/AnalysisStatus.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/AnalysisStatus.php deleted file mode 100644 index fcef24fb33a3..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/AnalysisStatus.php +++ /dev/null @@ -1,94 +0,0 @@ -grafeas.v1.DiscoveryOccurrence.AnalysisStatus - */ -class AnalysisStatus -{ - /** - * Unknown. - * - * Generated from protobuf enum ANALYSIS_STATUS_UNSPECIFIED = 0; - */ - const ANALYSIS_STATUS_UNSPECIFIED = 0; - /** - * Resource is known but no action has been taken yet. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * Resource is being analyzed. - * - * Generated from protobuf enum SCANNING = 2; - */ - const SCANNING = 2; - /** - * Analysis has finished successfully. - * - * Generated from protobuf enum FINISHED_SUCCESS = 3; - */ - const FINISHED_SUCCESS = 3; - /** - * Analysis has completed. - * - * Generated from protobuf enum COMPLETE = 3; - */ - const COMPLETE = 3; - /** - * Analysis has finished unsuccessfully, the analysis itself is in a bad - * state. - * - * Generated from protobuf enum FINISHED_FAILED = 4; - */ - const FINISHED_FAILED = 4; - /** - * The resource is known not to be supported. - * - * Generated from protobuf enum FINISHED_UNSUPPORTED = 5; - */ - const FINISHED_UNSUPPORTED = 5; - - private static $valueToName = [ - self::ANALYSIS_STATUS_UNSPECIFIED => 'ANALYSIS_STATUS_UNSPECIFIED', - self::PENDING => 'PENDING', - self::SCANNING => 'SCANNING', - self::FINISHED_SUCCESS => 'FINISHED_SUCCESS', - self::COMPLETE => 'COMPLETE', - self::FINISHED_FAILED => 'FINISHED_FAILED', - self::FINISHED_UNSUPPORTED => 'FINISHED_UNSUPPORTED', - ]; - - 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(AnalysisStatus::class, \Grafeas\V1\DiscoveryOccurrence_AnalysisStatus::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/ContinuousAnalysis.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/ContinuousAnalysis.php deleted file mode 100644 index 350c2fb7590b..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/ContinuousAnalysis.php +++ /dev/null @@ -1,64 +0,0 @@ -grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis - */ -class ContinuousAnalysis -{ - /** - * Unknown. - * - * Generated from protobuf enum CONTINUOUS_ANALYSIS_UNSPECIFIED = 0; - */ - const CONTINUOUS_ANALYSIS_UNSPECIFIED = 0; - /** - * The resource is continuously analyzed. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The resource is ignored for continuous analysis. - * - * Generated from protobuf enum INACTIVE = 2; - */ - const INACTIVE = 2; - - private static $valueToName = [ - self::CONTINUOUS_ANALYSIS_UNSPECIFIED => 'CONTINUOUS_ANALYSIS_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::INACTIVE => 'INACTIVE', - ]; - - 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(ContinuousAnalysis::class, \Grafeas\V1\DiscoveryOccurrence_ContinuousAnalysis::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/SBOMStatus.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/SBOMStatus.php deleted file mode 100644 index dee01078c8cb..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/SBOMStatus.php +++ /dev/null @@ -1,108 +0,0 @@ -grafeas.v1.DiscoveryOccurrence.SBOMStatus - */ -class SBOMStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The progress of the SBOM generation. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.SBOMStatus.SBOMState sbom_state = 1; - */ - protected $sbom_state = 0; - /** - * If there was an error generating an SBOM, this will indicate what that - * error was. - * - * Generated from protobuf field string error = 2; - */ - protected $error = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $sbom_state - * The progress of the SBOM generation. - * @type string $error - * If there was an error generating an SBOM, this will indicate what that - * error was. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Discovery::initOnce(); - parent::__construct($data); - } - - /** - * The progress of the SBOM generation. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.SBOMStatus.SBOMState sbom_state = 1; - * @return int - */ - public function getSbomState() - { - return $this->sbom_state; - } - - /** - * The progress of the SBOM generation. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.SBOMStatus.SBOMState sbom_state = 1; - * @param int $var - * @return $this - */ - public function setSbomState($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\DiscoveryOccurrence\SBOMStatus\SBOMState::class); - $this->sbom_state = $var; - - return $this; - } - - /** - * If there was an error generating an SBOM, this will indicate what that - * error was. - * - * Generated from protobuf field string error = 2; - * @return string - */ - public function getError() - { - return $this->error; - } - - /** - * If there was an error generating an SBOM, this will indicate what that - * error was. - * - * Generated from protobuf field string error = 2; - * @param string $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkString($var, True); - $this->error = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SBOMStatus::class, \Grafeas\V1\DiscoveryOccurrence_SBOMStatus::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/SBOMStatus/SBOMState.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/SBOMStatus/SBOMState.php deleted file mode 100644 index 0ce25b22873f..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/SBOMStatus/SBOMState.php +++ /dev/null @@ -1,64 +0,0 @@ -grafeas.v1.DiscoveryOccurrence.SBOMStatus.SBOMState - */ -class SBOMState -{ - /** - * Default unknown state. - * - * Generated from protobuf enum SBOM_STATE_UNSPECIFIED = 0; - */ - const SBOM_STATE_UNSPECIFIED = 0; - /** - * SBOM scanning is pending. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * SBOM scanning has completed. - * - * Generated from protobuf enum COMPLETE = 2; - */ - const COMPLETE = 2; - - private static $valueToName = [ - self::SBOM_STATE_UNSPECIFIED => 'SBOM_STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::COMPLETE => 'COMPLETE', - ]; - - 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(SBOMState::class, \Grafeas\V1\DiscoveryOccurrence_SBOMStatus_SBOMState::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/VulnerabilityAttestation.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/VulnerabilityAttestation.php deleted file mode 100644 index 2e1ec8e5dc33..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/VulnerabilityAttestation.php +++ /dev/null @@ -1,148 +0,0 @@ -grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation - */ -class VulnerabilityAttestation extends \Google\Protobuf\Internal\Message -{ - /** - * The last time we attempted to generate an attestation. - * - * Generated from protobuf field .google.protobuf.Timestamp last_attempt_time = 1; - */ - protected $last_attempt_time = null; - /** - * The success/failure state of the latest attestation attempt. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation.VulnerabilityAttestationState state = 2; - */ - protected $state = 0; - /** - * If failure, the error reason for why the attestation generation failed. - * - * Generated from protobuf field string error = 3; - */ - protected $error = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $last_attempt_time - * The last time we attempted to generate an attestation. - * @type int $state - * The success/failure state of the latest attestation attempt. - * @type string $error - * If failure, the error reason for why the attestation generation failed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Discovery::initOnce(); - parent::__construct($data); - } - - /** - * The last time we attempted to generate an attestation. - * - * Generated from protobuf field .google.protobuf.Timestamp last_attempt_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastAttemptTime() - { - return $this->last_attempt_time; - } - - public function hasLastAttemptTime() - { - return isset($this->last_attempt_time); - } - - public function clearLastAttemptTime() - { - unset($this->last_attempt_time); - } - - /** - * The last time we attempted to generate an attestation. - * - * Generated from protobuf field .google.protobuf.Timestamp last_attempt_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastAttemptTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_attempt_time = $var; - - return $this; - } - - /** - * The success/failure state of the latest attestation attempt. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation.VulnerabilityAttestationState state = 2; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The success/failure state of the latest attestation attempt. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation.VulnerabilityAttestationState state = 2; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\DiscoveryOccurrence\VulnerabilityAttestation\VulnerabilityAttestationState::class); - $this->state = $var; - - return $this; - } - - /** - * If failure, the error reason for why the attestation generation failed. - * - * Generated from protobuf field string error = 3; - * @return string - */ - public function getError() - { - return $this->error; - } - - /** - * If failure, the error reason for why the attestation generation failed. - * - * Generated from protobuf field string error = 3; - * @param string $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkString($var, True); - $this->error = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VulnerabilityAttestation::class, \Grafeas\V1\DiscoveryOccurrence_VulnerabilityAttestation::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/VulnerabilityAttestation/VulnerabilityAttestationState.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/VulnerabilityAttestation/VulnerabilityAttestationState.php deleted file mode 100644 index 415948b9ae6d..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/VulnerabilityAttestation/VulnerabilityAttestationState.php +++ /dev/null @@ -1,64 +0,0 @@ -grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation.VulnerabilityAttestationState - */ -class VulnerabilityAttestationState -{ - /** - * Default unknown state. - * - * Generated from protobuf enum VULNERABILITY_ATTESTATION_STATE_UNSPECIFIED = 0; - */ - const VULNERABILITY_ATTESTATION_STATE_UNSPECIFIED = 0; - /** - * Attestation was successfully generated and stored. - * - * Generated from protobuf enum SUCCESS = 1; - */ - const SUCCESS = 1; - /** - * Attestation was unsuccessfully generated and stored. - * - * Generated from protobuf enum FAILURE = 2; - */ - const FAILURE = 2; - - private static $valueToName = [ - self::VULNERABILITY_ATTESTATION_STATE_UNSPECIFIED => 'VULNERABILITY_ATTESTATION_STATE_UNSPECIFIED', - self::SUCCESS => 'SUCCESS', - self::FAILURE => 'FAILURE', - ]; - - 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(VulnerabilityAttestationState::class, \Grafeas\V1\DiscoveryOccurrence_VulnerabilityAttestation_VulnerabilityAttestationState::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Distribution.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Distribution.php deleted file mode 100644 index 84a7d28208b2..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Distribution.php +++ /dev/null @@ -1,256 +0,0 @@ -grafeas.v1.Distribution - */ -class Distribution extends \Google\Protobuf\Internal\Message -{ - /** - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * - * Generated from protobuf field string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cpe_uri = ''; - /** - * The CPU architecture for which packages in this distribution channel were - * built. - * - * Generated from protobuf field .grafeas.v1.Architecture architecture = 2; - */ - protected $architecture = 0; - /** - * The latest available version of this package in this distribution channel. - * - * Generated from protobuf field .grafeas.v1.Version latest_version = 3; - */ - protected $latest_version = null; - /** - * A freeform string denoting the maintainer of this package. - * - * Generated from protobuf field string maintainer = 4; - */ - protected $maintainer = ''; - /** - * The distribution channel-specific homepage for this package. - * - * Generated from protobuf field string url = 5; - */ - protected $url = ''; - /** - * The distribution channel-specific description of this package. - * - * Generated from protobuf field string description = 6; - */ - protected $description = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cpe_uri - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * @type int $architecture - * The CPU architecture for which packages in this distribution channel were - * built. - * @type \Grafeas\V1\Version $latest_version - * The latest available version of this package in this distribution channel. - * @type string $maintainer - * A freeform string denoting the maintainer of this package. - * @type string $url - * The distribution channel-specific homepage for this package. - * @type string $description - * The distribution channel-specific description of this package. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Package::initOnce(); - parent::__construct($data); - } - - /** - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * - * Generated from protobuf field string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCpeUri() - { - return $this->cpe_uri; - } - - /** - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * - * Generated from protobuf field string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->cpe_uri = $var; - - return $this; - } - - /** - * The CPU architecture for which packages in this distribution channel were - * built. - * - * Generated from protobuf field .grafeas.v1.Architecture architecture = 2; - * @return int - */ - public function getArchitecture() - { - return $this->architecture; - } - - /** - * The CPU architecture for which packages in this distribution channel were - * built. - * - * Generated from protobuf field .grafeas.v1.Architecture architecture = 2; - * @param int $var - * @return $this - */ - public function setArchitecture($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\Architecture::class); - $this->architecture = $var; - - return $this; - } - - /** - * The latest available version of this package in this distribution channel. - * - * Generated from protobuf field .grafeas.v1.Version latest_version = 3; - * @return \Grafeas\V1\Version|null - */ - public function getLatestVersion() - { - return $this->latest_version; - } - - public function hasLatestVersion() - { - return isset($this->latest_version); - } - - public function clearLatestVersion() - { - unset($this->latest_version); - } - - /** - * The latest available version of this package in this distribution channel. - * - * Generated from protobuf field .grafeas.v1.Version latest_version = 3; - * @param \Grafeas\V1\Version $var - * @return $this - */ - public function setLatestVersion($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); - $this->latest_version = $var; - - return $this; - } - - /** - * A freeform string denoting the maintainer of this package. - * - * Generated from protobuf field string maintainer = 4; - * @return string - */ - public function getMaintainer() - { - return $this->maintainer; - } - - /** - * A freeform string denoting the maintainer of this package. - * - * Generated from protobuf field string maintainer = 4; - * @param string $var - * @return $this - */ - public function setMaintainer($var) - { - GPBUtil::checkString($var, True); - $this->maintainer = $var; - - return $this; - } - - /** - * The distribution channel-specific homepage for this package. - * - * Generated from protobuf field string url = 5; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * The distribution channel-specific homepage for this package. - * - * Generated from protobuf field string url = 5; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - - /** - * The distribution channel-specific description of this package. - * - * Generated from protobuf field string description = 6; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The distribution channel-specific description of this package. - * - * Generated from protobuf field string description = 6; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Envelope.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Envelope.php deleted file mode 100644 index 17bcc1346ae5..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Envelope.php +++ /dev/null @@ -1,116 +0,0 @@ -grafeas.v1.Envelope - */ -class Envelope extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field bytes payload = 1; - */ - protected $payload = ''; - /** - * Generated from protobuf field string payload_type = 2; - */ - protected $payload_type = ''; - /** - * Generated from protobuf field repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - private $signatures; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $payload - * @type string $payload_type - * @type array<\Grafeas\V1\EnvelopeSignature>|\Google\Protobuf\Internal\RepeatedField $signatures - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field bytes payload = 1; - * @return string - */ - public function getPayload() - { - return $this->payload; - } - - /** - * Generated from protobuf field bytes payload = 1; - * @param string $var - * @return $this - */ - public function setPayload($var) - { - GPBUtil::checkString($var, False); - $this->payload = $var; - - return $this; - } - - /** - * Generated from protobuf field string payload_type = 2; - * @return string - */ - public function getPayloadType() - { - return $this->payload_type; - } - - /** - * Generated from protobuf field string payload_type = 2; - * @param string $var - * @return $this - */ - public function setPayloadType($var) - { - GPBUtil::checkString($var, True); - $this->payload_type = $var; - - return $this; - } - - /** - * Generated from protobuf field repeated .grafeas.v1.EnvelopeSignature signatures = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSignatures() - { - return $this->signatures; - } - - /** - * Generated from protobuf field repeated .grafeas.v1.EnvelopeSignature signatures = 3; - * @param array<\Grafeas\V1\EnvelopeSignature>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSignatures($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\EnvelopeSignature::class); - $this->signatures = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/EnvelopeSignature.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/EnvelopeSignature.php deleted file mode 100644 index 61ebdc60fbcf..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/EnvelopeSignature.php +++ /dev/null @@ -1,85 +0,0 @@ -grafeas.v1.EnvelopeSignature - */ -class EnvelopeSignature extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field bytes sig = 1; - */ - protected $sig = ''; - /** - * Generated from protobuf field string keyid = 2; - */ - protected $keyid = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sig - * @type string $keyid - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field bytes sig = 1; - * @return string - */ - public function getSig() - { - return $this->sig; - } - - /** - * Generated from protobuf field bytes sig = 1; - * @param string $var - * @return $this - */ - public function setSig($var) - { - GPBUtil::checkString($var, False); - $this->sig = $var; - - return $this; - } - - /** - * Generated from protobuf field string keyid = 2; - * @return string - */ - public function getKeyid() - { - return $this->keyid; - } - - /** - * Generated from protobuf field string keyid = 2; - * @param string $var - * @return $this - */ - public function setKeyid($var) - { - GPBUtil::checkString($var, True); - $this->keyid = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/FileHashes.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/FileHashes.php deleted file mode 100644 index a24ab1da8401..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/FileHashes.php +++ /dev/null @@ -1,68 +0,0 @@ -grafeas.v1.FileHashes - */ -class FileHashes extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Collection of file hashes. - * - * Generated from protobuf field repeated .grafeas.v1.Hash file_hash = 1; - */ - private $file_hash; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Grafeas\V1\Hash>|\Google\Protobuf\Internal\RepeatedField $file_hash - * Required. Collection of file hashes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * Required. Collection of file hashes. - * - * Generated from protobuf field repeated .grafeas.v1.Hash file_hash = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFileHash() - { - return $this->file_hash; - } - - /** - * Required. Collection of file hashes. - * - * Generated from protobuf field repeated .grafeas.v1.Hash file_hash = 1; - * @param array<\Grafeas\V1\Hash>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFileHash($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Hash::class); - $this->file_hash = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/FileLocation.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/FileLocation.php deleted file mode 100644 index c7f6d9e7cccc..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/FileLocation.php +++ /dev/null @@ -1,71 +0,0 @@ -grafeas.v1.FileLocation - */ -class FileLocation extends \Google\Protobuf\Internal\Message -{ - /** - * For jars that are contained inside .war files, this filepath - * can indicate the path to war file combined with the path to jar file. - * - * Generated from protobuf field string file_path = 1; - */ - protected $file_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $file_path - * For jars that are contained inside .war files, this filepath - * can indicate the path to war file combined with the path to jar file. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * For jars that are contained inside .war files, this filepath - * can indicate the path to war file combined with the path to jar file. - * - * Generated from protobuf field string file_path = 1; - * @return string - */ - public function getFilePath() - { - return $this->file_path; - } - - /** - * For jars that are contained inside .war files, this filepath - * can indicate the path to war file combined with the path to jar file. - * - * Generated from protobuf field string file_path = 1; - * @param string $var - * @return $this - */ - public function setFilePath($var) - { - GPBUtil::checkString($var, True); - $this->file_path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Fingerprint.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Fingerprint.php deleted file mode 100644 index 7191d7383ef5..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Fingerprint.php +++ /dev/null @@ -1,151 +0,0 @@ -grafeas.v1.Fingerprint - */ -class Fingerprint extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The layer ID of the final layer in the Docker image's v1 - * representation. - * - * Generated from protobuf field string v1_name = 1; - */ - protected $v1_name = ''; - /** - * Required. The ordered list of v2 blobs that represent a given image. - * - * Generated from protobuf field repeated string v2_blob = 2; - */ - private $v2_blob; - /** - * Output only. The name of the image's v2 blobs computed via: - * [bottom] := v2_blob[bottom] - * [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) - * Only the name of the final blob is kept. - * - * Generated from protobuf field string v2_name = 3; - */ - protected $v2_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $v1_name - * Required. The layer ID of the final layer in the Docker image's v1 - * representation. - * @type array|\Google\Protobuf\Internal\RepeatedField $v2_blob - * Required. The ordered list of v2 blobs that represent a given image. - * @type string $v2_name - * Output only. The name of the image's v2 blobs computed via: - * [bottom] := v2_blob[bottom] - * [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) - * Only the name of the final blob is kept. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Image::initOnce(); - parent::__construct($data); - } - - /** - * Required. The layer ID of the final layer in the Docker image's v1 - * representation. - * - * Generated from protobuf field string v1_name = 1; - * @return string - */ - public function getV1Name() - { - return $this->v1_name; - } - - /** - * Required. The layer ID of the final layer in the Docker image's v1 - * representation. - * - * Generated from protobuf field string v1_name = 1; - * @param string $var - * @return $this - */ - public function setV1Name($var) - { - GPBUtil::checkString($var, True); - $this->v1_name = $var; - - return $this; - } - - /** - * Required. The ordered list of v2 blobs that represent a given image. - * - * Generated from protobuf field repeated string v2_blob = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getV2Blob() - { - return $this->v2_blob; - } - - /** - * Required. The ordered list of v2 blobs that represent a given image. - * - * Generated from protobuf field repeated string v2_blob = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setV2Blob($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->v2_blob = $arr; - - return $this; - } - - /** - * Output only. The name of the image's v2 blobs computed via: - * [bottom] := v2_blob[bottom] - * [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) - * Only the name of the final blob is kept. - * - * Generated from protobuf field string v2_name = 3; - * @return string - */ - public function getV2Name() - { - return $this->v2_name; - } - - /** - * Output only. The name of the image's v2 blobs computed via: - * [bottom] := v2_blob[bottom] - * [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) - * Only the name of the final blob is kept. - * - * Generated from protobuf field string v2_name = 3; - * @param string $var - * @return $this - */ - public function setV2Name($var) - { - GPBUtil::checkString($var, True); - $this->v2_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GerritSourceContext.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GerritSourceContext.php deleted file mode 100644 index 616fb62984ad..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GerritSourceContext.php +++ /dev/null @@ -1,184 +0,0 @@ -grafeas.v1.GerritSourceContext - */ -class GerritSourceContext extends \Google\Protobuf\Internal\Message -{ - /** - * The URI of a running Gerrit instance. - * - * Generated from protobuf field string host_uri = 1; - */ - protected $host_uri = ''; - /** - * The full project name within the host. Projects may be nested, so - * "project/subproject" is a valid project name. The "repo name" is the - * hostURI/project. - * - * Generated from protobuf field string gerrit_project = 2; - */ - protected $gerrit_project = ''; - protected $revision; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $host_uri - * The URI of a running Gerrit instance. - * @type string $gerrit_project - * The full project name within the host. Projects may be nested, so - * "project/subproject" is a valid project name. The "repo name" is the - * hostURI/project. - * @type string $revision_id - * A revision (commit) ID. - * @type \Grafeas\V1\AliasContext $alias_context - * An alias, which may be a branch or tag. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * The URI of a running Gerrit instance. - * - * Generated from protobuf field string host_uri = 1; - * @return string - */ - public function getHostUri() - { - return $this->host_uri; - } - - /** - * The URI of a running Gerrit instance. - * - * Generated from protobuf field string host_uri = 1; - * @param string $var - * @return $this - */ - public function setHostUri($var) - { - GPBUtil::checkString($var, True); - $this->host_uri = $var; - - return $this; - } - - /** - * The full project name within the host. Projects may be nested, so - * "project/subproject" is a valid project name. The "repo name" is the - * hostURI/project. - * - * Generated from protobuf field string gerrit_project = 2; - * @return string - */ - public function getGerritProject() - { - return $this->gerrit_project; - } - - /** - * The full project name within the host. Projects may be nested, so - * "project/subproject" is a valid project name. The "repo name" is the - * hostURI/project. - * - * Generated from protobuf field string gerrit_project = 2; - * @param string $var - * @return $this - */ - public function setGerritProject($var) - { - GPBUtil::checkString($var, True); - $this->gerrit_project = $var; - - return $this; - } - - /** - * A revision (commit) ID. - * - * Generated from protobuf field string revision_id = 3; - * @return string - */ - public function getRevisionId() - { - return $this->readOneof(3); - } - - public function hasRevisionId() - { - return $this->hasOneof(3); - } - - /** - * A revision (commit) ID. - * - * Generated from protobuf field string revision_id = 3; - * @param string $var - * @return $this - */ - public function setRevisionId($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * An alias, which may be a branch or tag. - * - * Generated from protobuf field .grafeas.v1.AliasContext alias_context = 4; - * @return \Grafeas\V1\AliasContext|null - */ - public function getAliasContext() - { - return $this->readOneof(4); - } - - public function hasAliasContext() - { - return $this->hasOneof(4); - } - - /** - * An alias, which may be a branch or tag. - * - * Generated from protobuf field .grafeas.v1.AliasContext alias_context = 4; - * @param \Grafeas\V1\AliasContext $var - * @return $this - */ - public function setAliasContext($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\AliasContext::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getRevision() - { - return $this->whichOneof("revision"); - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetNoteRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetNoteRequest.php deleted file mode 100644 index 8f653431ea0e..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetNoteRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -grafeas.v1.GetNoteRequest - */ -class GetNoteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. Please see - * {@see GrafeasClient::noteName()} for help formatting this field. - * - * @return \Grafeas\V1\GetNoteRequest - * - * @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 - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_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; - } - - /** - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_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/Grafeas/v1/proto/src/Grafeas/V1/GetOccurrenceNoteRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetOccurrenceNoteRequest.php deleted file mode 100644 index 805395e9fb91..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetOccurrenceNoteRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -grafeas.v1.GetOccurrenceNoteRequest - */ -class GetOccurrenceNoteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. Please see - * {@see GrafeasClient::occurrenceName()} for help formatting this field. - * - * @return \Grafeas\V1\GetOccurrenceNoteRequest - * - * @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 - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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; - } - - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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/Grafeas/v1/proto/src/Grafeas/V1/GetOccurrenceRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetOccurrenceRequest.php deleted file mode 100644 index 4e2ef6f3fa04..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetOccurrenceRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -grafeas.v1.GetOccurrenceRequest - */ -class GetOccurrenceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. Please see - * {@see GrafeasClient::occurrenceName()} for help formatting this field. - * - * @return \Grafeas\V1\GetOccurrenceRequest - * - * @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 - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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; - } - - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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/Grafeas/v1/proto/src/Grafeas/V1/GitSourceContext.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GitSourceContext.php deleted file mode 100644 index 6eb31ad84fe2..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GitSourceContext.php +++ /dev/null @@ -1,102 +0,0 @@ -grafeas.v1.GitSourceContext - */ -class GitSourceContext extends \Google\Protobuf\Internal\Message -{ - /** - * Git repository URL. - * - * Generated from protobuf field string url = 1; - */ - protected $url = ''; - /** - * Git commit hash. - * - * Generated from protobuf field string revision_id = 2; - */ - protected $revision_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $url - * Git repository URL. - * @type string $revision_id - * Git commit hash. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * Git repository URL. - * - * Generated from protobuf field string url = 1; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * Git repository URL. - * - * Generated from protobuf field string url = 1; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - - /** - * Git commit hash. - * - * Generated from protobuf field string revision_id = 2; - * @return string - */ - public function getRevisionId() - { - return $this->revision_id; - } - - /** - * Git commit hash. - * - * Generated from protobuf field string revision_id = 2; - * @param string $var - * @return $this - */ - public function setRevisionId($var) - { - GPBUtil::checkString($var, True); - $this->revision_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Hash.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Hash.php deleted file mode 100644 index a6f6d1b8ae02..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Hash.php +++ /dev/null @@ -1,101 +0,0 @@ -grafeas.v1.Hash - */ -class Hash extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The type of hash that was performed, e.g. "SHA-256". - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - /** - * Required. The hash value. - * - * Generated from protobuf field bytes value = 2; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * Required. The type of hash that was performed, e.g. "SHA-256". - * @type string $value - * Required. The hash value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * Required. The type of hash that was performed, e.g. "SHA-256". - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The type of hash that was performed, e.g. "SHA-256". - * - * Generated from protobuf field string type = 1; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Required. The hash value. - * - * Generated from protobuf field bytes value = 2; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Required. The hash value. - * - * Generated from protobuf field bytes value = 2; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, False); - $this->value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ImageNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ImageNote.php deleted file mode 100644 index 661c99087167..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ImageNote.php +++ /dev/null @@ -1,119 +0,0 @@ - - * Or an equivalent reference, e.g., a tag of the resource_url. - * - * Generated from protobuf message grafeas.v1.ImageNote - */ -class ImageNote extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Immutable. The resource_url for the resource representing the - * basis of associated occurrence images. - * - * Generated from protobuf field string resource_url = 1; - */ - protected $resource_url = ''; - /** - * Required. Immutable. The fingerprint of the base image. - * - * Generated from protobuf field .grafeas.v1.Fingerprint fingerprint = 2; - */ - protected $fingerprint = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource_url - * Required. Immutable. The resource_url for the resource representing the - * basis of associated occurrence images. - * @type \Grafeas\V1\Fingerprint $fingerprint - * Required. Immutable. The fingerprint of the base image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Image::initOnce(); - parent::__construct($data); - } - - /** - * Required. Immutable. The resource_url for the resource representing the - * basis of associated occurrence images. - * - * Generated from protobuf field string resource_url = 1; - * @return string - */ - public function getResourceUrl() - { - return $this->resource_url; - } - - /** - * Required. Immutable. The resource_url for the resource representing the - * basis of associated occurrence images. - * - * Generated from protobuf field string resource_url = 1; - * @param string $var - * @return $this - */ - public function setResourceUrl($var) - { - GPBUtil::checkString($var, True); - $this->resource_url = $var; - - return $this; - } - - /** - * Required. Immutable. The fingerprint of the base image. - * - * Generated from protobuf field .grafeas.v1.Fingerprint fingerprint = 2; - * @return \Grafeas\V1\Fingerprint|null - */ - public function getFingerprint() - { - return $this->fingerprint; - } - - public function hasFingerprint() - { - return isset($this->fingerprint); - } - - public function clearFingerprint() - { - unset($this->fingerprint); - } - - /** - * Required. Immutable. The fingerprint of the base image. - * - * Generated from protobuf field .grafeas.v1.Fingerprint fingerprint = 2; - * @param \Grafeas\V1\Fingerprint $var - * @return $this - */ - public function setFingerprint($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Fingerprint::class); - $this->fingerprint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ImageOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ImageOccurrence.php deleted file mode 100644 index e6c64fc037e3..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ImageOccurrence.php +++ /dev/null @@ -1,197 +0,0 @@ -. - * - * Generated from protobuf message grafeas.v1.ImageOccurrence - */ -class ImageOccurrence extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The fingerprint of the derived image. - * - * Generated from protobuf field .grafeas.v1.Fingerprint fingerprint = 1; - */ - protected $fingerprint = null; - /** - * Output only. The number of layers by which this image differs from the - * associated image basis. - * - * Generated from protobuf field int32 distance = 2; - */ - protected $distance = 0; - /** - * This contains layer-specific metadata, if populated it has length - * "distance" and is ordered with [distance] being the layer immediately - * following the base image and [1] being the final layer. - * - * Generated from protobuf field repeated .grafeas.v1.Layer layer_info = 3; - */ - private $layer_info; - /** - * Output only. This contains the base image URL for the derived image - * occurrence. - * - * Generated from protobuf field string base_resource_url = 4; - */ - protected $base_resource_url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\Fingerprint $fingerprint - * Required. The fingerprint of the derived image. - * @type int $distance - * Output only. The number of layers by which this image differs from the - * associated image basis. - * @type array<\Grafeas\V1\Layer>|\Google\Protobuf\Internal\RepeatedField $layer_info - * This contains layer-specific metadata, if populated it has length - * "distance" and is ordered with [distance] being the layer immediately - * following the base image and [1] being the final layer. - * @type string $base_resource_url - * Output only. This contains the base image URL for the derived image - * occurrence. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Image::initOnce(); - parent::__construct($data); - } - - /** - * Required. The fingerprint of the derived image. - * - * Generated from protobuf field .grafeas.v1.Fingerprint fingerprint = 1; - * @return \Grafeas\V1\Fingerprint|null - */ - public function getFingerprint() - { - return $this->fingerprint; - } - - public function hasFingerprint() - { - return isset($this->fingerprint); - } - - public function clearFingerprint() - { - unset($this->fingerprint); - } - - /** - * Required. The fingerprint of the derived image. - * - * Generated from protobuf field .grafeas.v1.Fingerprint fingerprint = 1; - * @param \Grafeas\V1\Fingerprint $var - * @return $this - */ - public function setFingerprint($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Fingerprint::class); - $this->fingerprint = $var; - - return $this; - } - - /** - * Output only. The number of layers by which this image differs from the - * associated image basis. - * - * Generated from protobuf field int32 distance = 2; - * @return int - */ - public function getDistance() - { - return $this->distance; - } - - /** - * Output only. The number of layers by which this image differs from the - * associated image basis. - * - * Generated from protobuf field int32 distance = 2; - * @param int $var - * @return $this - */ - public function setDistance($var) - { - GPBUtil::checkInt32($var); - $this->distance = $var; - - return $this; - } - - /** - * This contains layer-specific metadata, if populated it has length - * "distance" and is ordered with [distance] being the layer immediately - * following the base image and [1] being the final layer. - * - * Generated from protobuf field repeated .grafeas.v1.Layer layer_info = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLayerInfo() - { - return $this->layer_info; - } - - /** - * This contains layer-specific metadata, if populated it has length - * "distance" and is ordered with [distance] being the layer immediately - * following the base image and [1] being the final layer. - * - * Generated from protobuf field repeated .grafeas.v1.Layer layer_info = 3; - * @param array<\Grafeas\V1\Layer>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLayerInfo($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Layer::class); - $this->layer_info = $arr; - - return $this; - } - - /** - * Output only. This contains the base image URL for the derived image - * occurrence. - * - * Generated from protobuf field string base_resource_url = 4; - * @return string - */ - public function getBaseResourceUrl() - { - return $this->base_resource_url; - } - - /** - * Output only. This contains the base image URL for the derived image - * occurrence. - * - * Generated from protobuf field string base_resource_url = 4; - * @param string $var - * @return $this - */ - public function setBaseResourceUrl($var) - { - GPBUtil::checkString($var, True); - $this->base_resource_url = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoProvenance.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoProvenance.php deleted file mode 100644 index 74cc83a629ce..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoProvenance.php +++ /dev/null @@ -1,214 +0,0 @@ -grafeas.v1.InTotoProvenance - */ -class InTotoProvenance extends \Google\Protobuf\Internal\Message -{ - /** - * required - * - * Generated from protobuf field .grafeas.v1.BuilderConfig builder_config = 1; - */ - protected $builder_config = null; - /** - * Identifies the configuration used for the build. - * When combined with materials, this SHOULD fully describe the build, - * such that re-running this recipe results in bit-for-bit identical output - * (if the build is reproducible). - * - * Generated from protobuf field .grafeas.v1.Recipe recipe = 2; - */ - protected $recipe = null; - /** - * Generated from protobuf field .grafeas.v1.Metadata metadata = 3; - */ - protected $metadata = null; - /** - * The collection of artifacts that influenced the build including sources, - * dependencies, build tools, base images, and so on. This is considered to be - * incomplete unless metadata.completeness.materials is true. Unset or null is - * equivalent to empty. - * - * Generated from protobuf field repeated string materials = 4; - */ - private $materials; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\BuilderConfig $builder_config - * required - * @type \Grafeas\V1\Recipe $recipe - * Identifies the configuration used for the build. - * When combined with materials, this SHOULD fully describe the build, - * such that re-running this recipe results in bit-for-bit identical output - * (if the build is reproducible). - * @type \Grafeas\V1\Metadata $metadata - * @type array|\Google\Protobuf\Internal\RepeatedField $materials - * The collection of artifacts that influenced the build including sources, - * dependencies, build tools, base images, and so on. This is considered to be - * incomplete unless metadata.completeness.materials is true. Unset or null is - * equivalent to empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\IntotoProvenance::initOnce(); - parent::__construct($data); - } - - /** - * required - * - * Generated from protobuf field .grafeas.v1.BuilderConfig builder_config = 1; - * @return \Grafeas\V1\BuilderConfig|null - */ - public function getBuilderConfig() - { - return $this->builder_config; - } - - public function hasBuilderConfig() - { - return isset($this->builder_config); - } - - public function clearBuilderConfig() - { - unset($this->builder_config); - } - - /** - * required - * - * Generated from protobuf field .grafeas.v1.BuilderConfig builder_config = 1; - * @param \Grafeas\V1\BuilderConfig $var - * @return $this - */ - public function setBuilderConfig($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\BuilderConfig::class); - $this->builder_config = $var; - - return $this; - } - - /** - * Identifies the configuration used for the build. - * When combined with materials, this SHOULD fully describe the build, - * such that re-running this recipe results in bit-for-bit identical output - * (if the build is reproducible). - * - * Generated from protobuf field .grafeas.v1.Recipe recipe = 2; - * @return \Grafeas\V1\Recipe|null - */ - public function getRecipe() - { - return $this->recipe; - } - - public function hasRecipe() - { - return isset($this->recipe); - } - - public function clearRecipe() - { - unset($this->recipe); - } - - /** - * Identifies the configuration used for the build. - * When combined with materials, this SHOULD fully describe the build, - * such that re-running this recipe results in bit-for-bit identical output - * (if the build is reproducible). - * - * Generated from protobuf field .grafeas.v1.Recipe recipe = 2; - * @param \Grafeas\V1\Recipe $var - * @return $this - */ - public function setRecipe($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Recipe::class); - $this->recipe = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.Metadata metadata = 3; - * @return \Grafeas\V1\Metadata|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * Generated from protobuf field .grafeas.v1.Metadata metadata = 3; - * @param \Grafeas\V1\Metadata $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Metadata::class); - $this->metadata = $var; - - return $this; - } - - /** - * The collection of artifacts that influenced the build including sources, - * dependencies, build tools, base images, and so on. This is considered to be - * incomplete unless metadata.completeness.materials is true. Unset or null is - * equivalent to empty. - * - * Generated from protobuf field repeated string materials = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMaterials() - { - return $this->materials; - } - - /** - * The collection of artifacts that influenced the build including sources, - * dependencies, build tools, base images, and so on. This is considered to be - * incomplete unless metadata.completeness.materials is true. Unset or null is - * equivalent to empty. - * - * Generated from protobuf field repeated string materials = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMaterials($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->materials = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoSlsaProvenanceV1.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoSlsaProvenanceV1.php deleted file mode 100644 index b29b231a5bd5..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoSlsaProvenanceV1.php +++ /dev/null @@ -1,160 +0,0 @@ -grafeas.v1.InTotoSlsaProvenanceV1 - */ -class InTotoSlsaProvenanceV1 extends \Google\Protobuf\Internal\Message -{ - /** - * InToto spec defined at - * https://github.com/in-toto/attestation/tree/main/spec#statement - * - * Generated from protobuf field string type = 1 [json_name = "_type"]; - */ - protected $type = ''; - /** - * Generated from protobuf field repeated .grafeas.v1.Subject subject = 2; - */ - private $subject; - /** - * Generated from protobuf field string predicate_type = 3; - */ - protected $predicate_type = ''; - /** - * Generated from protobuf field .grafeas.v1.InTotoSlsaProvenanceV1.SlsaProvenanceV1 predicate = 4; - */ - protected $predicate = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * InToto spec defined at - * https://github.com/in-toto/attestation/tree/main/spec#statement - * @type array<\Grafeas\V1\Subject>|\Google\Protobuf\Internal\RepeatedField $subject - * @type string $predicate_type - * @type \Grafeas\V1\InTotoSlsaProvenanceV1\SlsaProvenanceV1 $predicate - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\IntotoStatement::initOnce(); - parent::__construct($data); - } - - /** - * InToto spec defined at - * https://github.com/in-toto/attestation/tree/main/spec#statement - * - * Generated from protobuf field string type = 1 [json_name = "_type"]; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * InToto spec defined at - * https://github.com/in-toto/attestation/tree/main/spec#statement - * - * Generated from protobuf field string type = 1 [json_name = "_type"]; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Generated from protobuf field repeated .grafeas.v1.Subject subject = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSubject() - { - return $this->subject; - } - - /** - * Generated from protobuf field repeated .grafeas.v1.Subject subject = 2; - * @param array<\Grafeas\V1\Subject>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSubject($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Subject::class); - $this->subject = $arr; - - return $this; - } - - /** - * Generated from protobuf field string predicate_type = 3; - * @return string - */ - public function getPredicateType() - { - return $this->predicate_type; - } - - /** - * Generated from protobuf field string predicate_type = 3; - * @param string $var - * @return $this - */ - public function setPredicateType($var) - { - GPBUtil::checkString($var, True); - $this->predicate_type = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.InTotoSlsaProvenanceV1.SlsaProvenanceV1 predicate = 4; - * @return \Grafeas\V1\InTotoSlsaProvenanceV1\SlsaProvenanceV1|null - */ - public function getPredicate() - { - return $this->predicate; - } - - public function hasPredicate() - { - return isset($this->predicate); - } - - public function clearPredicate() - { - unset($this->predicate); - } - - /** - * Generated from protobuf field .grafeas.v1.InTotoSlsaProvenanceV1.SlsaProvenanceV1 predicate = 4; - * @param \Grafeas\V1\InTotoSlsaProvenanceV1\SlsaProvenanceV1 $var - * @return $this - */ - public function setPredicate($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\InTotoSlsaProvenanceV1\SlsaProvenanceV1::class); - $this->predicate = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoSlsaProvenanceV1/BuildDefinition.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoSlsaProvenanceV1/BuildDefinition.php deleted file mode 100644 index ec7740b90bf2..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoSlsaProvenanceV1/BuildDefinition.php +++ /dev/null @@ -1,162 +0,0 @@ -grafeas.v1.InTotoSlsaProvenanceV1.BuildDefinition - */ -class BuildDefinition extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string build_type = 1; - */ - protected $build_type = ''; - /** - * Generated from protobuf field .google.protobuf.Struct external_parameters = 2; - */ - protected $external_parameters = null; - /** - * Generated from protobuf field .google.protobuf.Struct internal_parameters = 3; - */ - protected $internal_parameters = null; - /** - * Generated from protobuf field repeated .grafeas.v1.InTotoSlsaProvenanceV1.ResourceDescriptor resolved_dependencies = 4; - */ - private $resolved_dependencies; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $build_type - * @type \Google\Protobuf\Struct $external_parameters - * @type \Google\Protobuf\Struct $internal_parameters - * @type array<\Grafeas\V1\InTotoSlsaProvenanceV1\ResourceDescriptor>|\Google\Protobuf\Internal\RepeatedField $resolved_dependencies - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\IntotoStatement::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string build_type = 1; - * @return string - */ - public function getBuildType() - { - return $this->build_type; - } - - /** - * Generated from protobuf field string build_type = 1; - * @param string $var - * @return $this - */ - public function setBuildType($var) - { - GPBUtil::checkString($var, True); - $this->build_type = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.protobuf.Struct external_parameters = 2; - * @return \Google\Protobuf\Struct|null - */ - public function getExternalParameters() - { - return $this->external_parameters; - } - - public function hasExternalParameters() - { - return isset($this->external_parameters); - } - - public function clearExternalParameters() - { - unset($this->external_parameters); - } - - /** - * Generated from protobuf field .google.protobuf.Struct external_parameters = 2; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setExternalParameters($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->external_parameters = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.protobuf.Struct internal_parameters = 3; - * @return \Google\Protobuf\Struct|null - */ - public function getInternalParameters() - { - return $this->internal_parameters; - } - - public function hasInternalParameters() - { - return isset($this->internal_parameters); - } - - public function clearInternalParameters() - { - unset($this->internal_parameters); - } - - /** - * Generated from protobuf field .google.protobuf.Struct internal_parameters = 3; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setInternalParameters($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->internal_parameters = $var; - - return $this; - } - - /** - * Generated from protobuf field repeated .grafeas.v1.InTotoSlsaProvenanceV1.ResourceDescriptor resolved_dependencies = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResolvedDependencies() - { - return $this->resolved_dependencies; - } - - /** - * Generated from protobuf field repeated .grafeas.v1.InTotoSlsaProvenanceV1.ResourceDescriptor resolved_dependencies = 4; - * @param array<\Grafeas\V1\InTotoSlsaProvenanceV1\ResourceDescriptor>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResolvedDependencies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\InTotoSlsaProvenanceV1\ResourceDescriptor::class); - $this->resolved_dependencies = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BuildDefinition::class, \Grafeas\V1\InTotoSlsaProvenanceV1_BuildDefinition::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoSlsaProvenanceV1/BuildMetadata.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoSlsaProvenanceV1/BuildMetadata.php deleted file mode 100644 index 0ae282c633b5..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoSlsaProvenanceV1/BuildMetadata.php +++ /dev/null @@ -1,135 +0,0 @@ -grafeas.v1.InTotoSlsaProvenanceV1.BuildMetadata - */ -class BuildMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string invocation_id = 1; - */ - protected $invocation_id = ''; - /** - * Generated from protobuf field .google.protobuf.Timestamp started_on = 2; - */ - protected $started_on = null; - /** - * Generated from protobuf field .google.protobuf.Timestamp finished_on = 3; - */ - protected $finished_on = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $invocation_id - * @type \Google\Protobuf\Timestamp $started_on - * @type \Google\Protobuf\Timestamp $finished_on - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\IntotoStatement::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string invocation_id = 1; - * @return string - */ - public function getInvocationId() - { - return $this->invocation_id; - } - - /** - * Generated from protobuf field string invocation_id = 1; - * @param string $var - * @return $this - */ - public function setInvocationId($var) - { - GPBUtil::checkString($var, True); - $this->invocation_id = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.protobuf.Timestamp started_on = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartedOn() - { - return $this->started_on; - } - - public function hasStartedOn() - { - return isset($this->started_on); - } - - public function clearStartedOn() - { - unset($this->started_on); - } - - /** - * Generated from protobuf field .google.protobuf.Timestamp started_on = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartedOn($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->started_on = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.protobuf.Timestamp finished_on = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFinishedOn() - { - return $this->finished_on; - } - - public function hasFinishedOn() - { - return isset($this->finished_on); - } - - public function clearFinishedOn() - { - unset($this->finished_on); - } - - /** - * Generated from protobuf field .google.protobuf.Timestamp finished_on = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFinishedOn($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->finished_on = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BuildMetadata::class, \Grafeas\V1\InTotoSlsaProvenanceV1_BuildMetadata::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoSlsaProvenanceV1/ProvenanceBuilder.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoSlsaProvenanceV1/ProvenanceBuilder.php deleted file mode 100644 index 7f713fb9b0e6..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoSlsaProvenanceV1/ProvenanceBuilder.php +++ /dev/null @@ -1,115 +0,0 @@ -grafeas.v1.InTotoSlsaProvenanceV1.ProvenanceBuilder - */ -class ProvenanceBuilder extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * Generated from protobuf field map version = 2; - */ - private $version; - /** - * Generated from protobuf field repeated .grafeas.v1.InTotoSlsaProvenanceV1.ResourceDescriptor builder_dependencies = 3; - */ - private $builder_dependencies; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * @type array|\Google\Protobuf\Internal\MapField $version - * @type array<\Grafeas\V1\InTotoSlsaProvenanceV1\ResourceDescriptor>|\Google\Protobuf\Internal\RepeatedField $builder_dependencies - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\IntotoStatement::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Generated from protobuf field map version = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getVersion() - { - return $this->version; - } - - /** - * Generated from protobuf field map version = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setVersion($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->version = $arr; - - return $this; - } - - /** - * Generated from protobuf field repeated .grafeas.v1.InTotoSlsaProvenanceV1.ResourceDescriptor builder_dependencies = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBuilderDependencies() - { - return $this->builder_dependencies; - } - - /** - * Generated from protobuf field repeated .grafeas.v1.InTotoSlsaProvenanceV1.ResourceDescriptor builder_dependencies = 3; - * @param array<\Grafeas\V1\InTotoSlsaProvenanceV1\ResourceDescriptor>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBuilderDependencies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\InTotoSlsaProvenanceV1\ResourceDescriptor::class); - $this->builder_dependencies = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ProvenanceBuilder::class, \Grafeas\V1\InTotoSlsaProvenanceV1_ProvenanceBuilder::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoSlsaProvenanceV1/ResourceDescriptor.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoSlsaProvenanceV1/ResourceDescriptor.php deleted file mode 100644 index 2f5a9ebacdf5..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoSlsaProvenanceV1/ResourceDescriptor.php +++ /dev/null @@ -1,223 +0,0 @@ -grafeas.v1.InTotoSlsaProvenanceV1.ResourceDescriptor - */ -class ResourceDescriptor extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Generated from protobuf field map digest = 3; - */ - private $digest; - /** - * Generated from protobuf field bytes content = 4; - */ - protected $content = ''; - /** - * Generated from protobuf field string download_location = 5; - */ - protected $download_location = ''; - /** - * Generated from protobuf field string media_type = 6; - */ - protected $media_type = ''; - /** - * Generated from protobuf field map annotations = 7; - */ - private $annotations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * @type string $uri - * @type array|\Google\Protobuf\Internal\MapField $digest - * @type string $content - * @type string $download_location - * @type string $media_type - * @type array|\Google\Protobuf\Internal\MapField $annotations - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\IntotoStatement::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * 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; - } - - /** - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Generated from protobuf field map digest = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getDigest() - { - return $this->digest; - } - - /** - * Generated from protobuf field map digest = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setDigest($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->digest = $arr; - - return $this; - } - - /** - * Generated from protobuf field bytes content = 4; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * Generated from protobuf field bytes content = 4; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, False); - $this->content = $var; - - return $this; - } - - /** - * Generated from protobuf field string download_location = 5; - * @return string - */ - public function getDownloadLocation() - { - return $this->download_location; - } - - /** - * Generated from protobuf field string download_location = 5; - * @param string $var - * @return $this - */ - public function setDownloadLocation($var) - { - GPBUtil::checkString($var, True); - $this->download_location = $var; - - return $this; - } - - /** - * Generated from protobuf field string media_type = 6; - * @return string - */ - public function getMediaType() - { - return $this->media_type; - } - - /** - * Generated from protobuf field string media_type = 6; - * @param string $var - * @return $this - */ - public function setMediaType($var) - { - GPBUtil::checkString($var, True); - $this->media_type = $var; - - return $this; - } - - /** - * Generated from protobuf field map annotations = 7; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Generated from protobuf field map annotations = 7; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); - $this->annotations = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ResourceDescriptor::class, \Grafeas\V1\InTotoSlsaProvenanceV1_ResourceDescriptor::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoSlsaProvenanceV1/RunDetails.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoSlsaProvenanceV1/RunDetails.php deleted file mode 100644 index 4bf240af3bf3..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoSlsaProvenanceV1/RunDetails.php +++ /dev/null @@ -1,135 +0,0 @@ -grafeas.v1.InTotoSlsaProvenanceV1.RunDetails - */ -class RunDetails extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field .grafeas.v1.InTotoSlsaProvenanceV1.ProvenanceBuilder builder = 1; - */ - protected $builder = null; - /** - * Generated from protobuf field .grafeas.v1.InTotoSlsaProvenanceV1.BuildMetadata metadata = 2; - */ - protected $metadata = null; - /** - * Generated from protobuf field repeated .grafeas.v1.InTotoSlsaProvenanceV1.ResourceDescriptor byproducts = 3; - */ - private $byproducts; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\InTotoSlsaProvenanceV1\ProvenanceBuilder $builder - * @type \Grafeas\V1\InTotoSlsaProvenanceV1\BuildMetadata $metadata - * @type array<\Grafeas\V1\InTotoSlsaProvenanceV1\ResourceDescriptor>|\Google\Protobuf\Internal\RepeatedField $byproducts - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\IntotoStatement::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field .grafeas.v1.InTotoSlsaProvenanceV1.ProvenanceBuilder builder = 1; - * @return \Grafeas\V1\InTotoSlsaProvenanceV1\ProvenanceBuilder|null - */ - public function getBuilder() - { - return $this->builder; - } - - public function hasBuilder() - { - return isset($this->builder); - } - - public function clearBuilder() - { - unset($this->builder); - } - - /** - * Generated from protobuf field .grafeas.v1.InTotoSlsaProvenanceV1.ProvenanceBuilder builder = 1; - * @param \Grafeas\V1\InTotoSlsaProvenanceV1\ProvenanceBuilder $var - * @return $this - */ - public function setBuilder($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\InTotoSlsaProvenanceV1\ProvenanceBuilder::class); - $this->builder = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.InTotoSlsaProvenanceV1.BuildMetadata metadata = 2; - * @return \Grafeas\V1\InTotoSlsaProvenanceV1\BuildMetadata|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * Generated from protobuf field .grafeas.v1.InTotoSlsaProvenanceV1.BuildMetadata metadata = 2; - * @param \Grafeas\V1\InTotoSlsaProvenanceV1\BuildMetadata $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\InTotoSlsaProvenanceV1\BuildMetadata::class); - $this->metadata = $var; - - return $this; - } - - /** - * Generated from protobuf field repeated .grafeas.v1.InTotoSlsaProvenanceV1.ResourceDescriptor byproducts = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getByproducts() - { - return $this->byproducts; - } - - /** - * Generated from protobuf field repeated .grafeas.v1.InTotoSlsaProvenanceV1.ResourceDescriptor byproducts = 3; - * @param array<\Grafeas\V1\InTotoSlsaProvenanceV1\ResourceDescriptor>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setByproducts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\InTotoSlsaProvenanceV1\ResourceDescriptor::class); - $this->byproducts = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RunDetails::class, \Grafeas\V1\InTotoSlsaProvenanceV1_RunDetails::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoSlsaProvenanceV1/SlsaProvenanceV1.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoSlsaProvenanceV1/SlsaProvenanceV1.php deleted file mode 100644 index 12c8f2ba7cef..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoSlsaProvenanceV1/SlsaProvenanceV1.php +++ /dev/null @@ -1,112 +0,0 @@ -grafeas.v1.InTotoSlsaProvenanceV1.SlsaProvenanceV1 - */ -class SlsaProvenanceV1 extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field .grafeas.v1.InTotoSlsaProvenanceV1.BuildDefinition build_definition = 1; - */ - protected $build_definition = null; - /** - * Generated from protobuf field .grafeas.v1.InTotoSlsaProvenanceV1.RunDetails run_details = 2; - */ - protected $run_details = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\InTotoSlsaProvenanceV1\BuildDefinition $build_definition - * @type \Grafeas\V1\InTotoSlsaProvenanceV1\RunDetails $run_details - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\IntotoStatement::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field .grafeas.v1.InTotoSlsaProvenanceV1.BuildDefinition build_definition = 1; - * @return \Grafeas\V1\InTotoSlsaProvenanceV1\BuildDefinition|null - */ - public function getBuildDefinition() - { - return $this->build_definition; - } - - public function hasBuildDefinition() - { - return isset($this->build_definition); - } - - public function clearBuildDefinition() - { - unset($this->build_definition); - } - - /** - * Generated from protobuf field .grafeas.v1.InTotoSlsaProvenanceV1.BuildDefinition build_definition = 1; - * @param \Grafeas\V1\InTotoSlsaProvenanceV1\BuildDefinition $var - * @return $this - */ - public function setBuildDefinition($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\InTotoSlsaProvenanceV1\BuildDefinition::class); - $this->build_definition = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.InTotoSlsaProvenanceV1.RunDetails run_details = 2; - * @return \Grafeas\V1\InTotoSlsaProvenanceV1\RunDetails|null - */ - public function getRunDetails() - { - return $this->run_details; - } - - public function hasRunDetails() - { - return isset($this->run_details); - } - - public function clearRunDetails() - { - unset($this->run_details); - } - - /** - * Generated from protobuf field .grafeas.v1.InTotoSlsaProvenanceV1.RunDetails run_details = 2; - * @param \Grafeas\V1\InTotoSlsaProvenanceV1\RunDetails $var - * @return $this - */ - public function setRunDetails($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\InTotoSlsaProvenanceV1\RunDetails::class); - $this->run_details = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SlsaProvenanceV1::class, \Grafeas\V1\InTotoSlsaProvenanceV1_SlsaProvenanceV1::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoStatement.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoStatement.php deleted file mode 100644 index 93a86b0dd503..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoStatement.php +++ /dev/null @@ -1,224 +0,0 @@ -grafeas.v1.InTotoStatement - */ -class InTotoStatement extends \Google\Protobuf\Internal\Message -{ - /** - * Always `https://in-toto.io/Statement/v0.1`. - * - * Generated from protobuf field string type = 1 [json_name = "_type"]; - */ - protected $type = ''; - /** - * Generated from protobuf field repeated .grafeas.v1.Subject subject = 2; - */ - private $subject; - /** - * `https://slsa.dev/provenance/v0.1` for SlsaProvenance. - * - * Generated from protobuf field string predicate_type = 3; - */ - protected $predicate_type = ''; - protected $predicate; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * Always `https://in-toto.io/Statement/v0.1`. - * @type array<\Grafeas\V1\Subject>|\Google\Protobuf\Internal\RepeatedField $subject - * @type string $predicate_type - * `https://slsa.dev/provenance/v0.1` for SlsaProvenance. - * @type \Grafeas\V1\InTotoProvenance $provenance - * @type \Grafeas\V1\SlsaProvenance $slsa_provenance - * @type \Grafeas\V1\SlsaProvenanceZeroTwo $slsa_provenance_zero_two - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\IntotoStatement::initOnce(); - parent::__construct($data); - } - - /** - * Always `https://in-toto.io/Statement/v0.1`. - * - * Generated from protobuf field string type = 1 [json_name = "_type"]; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Always `https://in-toto.io/Statement/v0.1`. - * - * Generated from protobuf field string type = 1 [json_name = "_type"]; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Generated from protobuf field repeated .grafeas.v1.Subject subject = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSubject() - { - return $this->subject; - } - - /** - * Generated from protobuf field repeated .grafeas.v1.Subject subject = 2; - * @param array<\Grafeas\V1\Subject>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSubject($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Subject::class); - $this->subject = $arr; - - return $this; - } - - /** - * `https://slsa.dev/provenance/v0.1` for SlsaProvenance. - * - * Generated from protobuf field string predicate_type = 3; - * @return string - */ - public function getPredicateType() - { - return $this->predicate_type; - } - - /** - * `https://slsa.dev/provenance/v0.1` for SlsaProvenance. - * - * Generated from protobuf field string predicate_type = 3; - * @param string $var - * @return $this - */ - public function setPredicateType($var) - { - GPBUtil::checkString($var, True); - $this->predicate_type = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.InTotoProvenance provenance = 4; - * @return \Grafeas\V1\InTotoProvenance|null - */ - public function getProvenance() - { - return $this->readOneof(4); - } - - public function hasProvenance() - { - return $this->hasOneof(4); - } - - /** - * Generated from protobuf field .grafeas.v1.InTotoProvenance provenance = 4; - * @param \Grafeas\V1\InTotoProvenance $var - * @return $this - */ - public function setProvenance($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\InTotoProvenance::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenance slsa_provenance = 5; - * @return \Grafeas\V1\SlsaProvenance|null - */ - public function getSlsaProvenance() - { - return $this->readOneof(5); - } - - public function hasSlsaProvenance() - { - return $this->hasOneof(5); - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenance slsa_provenance = 5; - * @param \Grafeas\V1\SlsaProvenance $var - * @return $this - */ - public function setSlsaProvenance($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenance::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - * @return \Grafeas\V1\SlsaProvenanceZeroTwo|null - */ - public function getSlsaProvenanceZeroTwo() - { - return $this->readOneof(6); - } - - public function hasSlsaProvenanceZeroTwo() - { - return $this->hasOneof(6); - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - * @param \Grafeas\V1\SlsaProvenanceZeroTwo $var - * @return $this - */ - public function setSlsaProvenanceZeroTwo($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenanceZeroTwo::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getPredicate() - { - return $this->whichOneof("predicate"); - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Jwt.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Jwt.php deleted file mode 100644 index 3b9e9a5ece42..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Jwt.php +++ /dev/null @@ -1,73 +0,0 @@ -grafeas.v1.Jwt - */ -class Jwt extends \Google\Protobuf\Internal\Message -{ - /** - * The compact encoding of a JWS, which is always three base64 encoded strings - * joined by periods. For details, see: - * https://tools.ietf.org/html/rfc7515.html#section-3.1 - * - * Generated from protobuf field string compact_jwt = 1; - */ - protected $compact_jwt = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $compact_jwt - * The compact encoding of a JWS, which is always three base64 encoded strings - * joined by periods. For details, see: - * https://tools.ietf.org/html/rfc7515.html#section-3.1 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Attestation::initOnce(); - parent::__construct($data); - } - - /** - * The compact encoding of a JWS, which is always three base64 encoded strings - * joined by periods. For details, see: - * https://tools.ietf.org/html/rfc7515.html#section-3.1 - * - * Generated from protobuf field string compact_jwt = 1; - * @return string - */ - public function getCompactJwt() - { - return $this->compact_jwt; - } - - /** - * The compact encoding of a JWS, which is always three base64 encoded strings - * joined by periods. For details, see: - * https://tools.ietf.org/html/rfc7515.html#section-3.1 - * - * Generated from protobuf field string compact_jwt = 1; - * @param string $var - * @return $this - */ - public function setCompactJwt($var) - { - GPBUtil::checkString($var, True); - $this->compact_jwt = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Layer.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Layer.php deleted file mode 100644 index 429ce63f2c3a..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Layer.php +++ /dev/null @@ -1,105 +0,0 @@ -grafeas.v1.Layer - */ -class Layer extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The recovered Dockerfile directive used to construct this layer. - * See https://docs.docker.com/engine/reference/builder/ for more information. - * - * Generated from protobuf field string directive = 1; - */ - protected $directive = ''; - /** - * The recovered arguments to the Dockerfile directive. - * - * Generated from protobuf field string arguments = 2; - */ - protected $arguments = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $directive - * Required. The recovered Dockerfile directive used to construct this layer. - * See https://docs.docker.com/engine/reference/builder/ for more information. - * @type string $arguments - * The recovered arguments to the Dockerfile directive. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Image::initOnce(); - parent::__construct($data); - } - - /** - * Required. The recovered Dockerfile directive used to construct this layer. - * See https://docs.docker.com/engine/reference/builder/ for more information. - * - * Generated from protobuf field string directive = 1; - * @return string - */ - public function getDirective() - { - return $this->directive; - } - - /** - * Required. The recovered Dockerfile directive used to construct this layer. - * See https://docs.docker.com/engine/reference/builder/ for more information. - * - * Generated from protobuf field string directive = 1; - * @param string $var - * @return $this - */ - public function setDirective($var) - { - GPBUtil::checkString($var, True); - $this->directive = $var; - - return $this; - } - - /** - * The recovered arguments to the Dockerfile directive. - * - * Generated from protobuf field string arguments = 2; - * @return string - */ - public function getArguments() - { - return $this->arguments; - } - - /** - * The recovered arguments to the Dockerfile directive. - * - * Generated from protobuf field string arguments = 2; - * @param string $var - * @return $this - */ - public function setArguments($var) - { - GPBUtil::checkString($var, True); - $this->arguments = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/License.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/License.php deleted file mode 100644 index cf2409f0739f..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/License.php +++ /dev/null @@ -1,117 +0,0 @@ -grafeas.v1.License - */ -class License extends \Google\Protobuf\Internal\Message -{ - /** - * Often a single license can be used to represent the licensing terms. - * Sometimes it is necessary to include a choice of one or more licenses - * or some combination of license identifiers. - * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT", - * "GPL-2.0-or-later WITH Bison-exception-2.2". - * - * Generated from protobuf field string expression = 1; - */ - protected $expression = ''; - /** - * Comments - * - * Generated from protobuf field string comments = 2; - */ - protected $comments = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $expression - * Often a single license can be used to represent the licensing terms. - * Sometimes it is necessary to include a choice of one or more licenses - * or some combination of license identifiers. - * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT", - * "GPL-2.0-or-later WITH Bison-exception-2.2". - * @type string $comments - * Comments - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Often a single license can be used to represent the licensing terms. - * Sometimes it is necessary to include a choice of one or more licenses - * or some combination of license identifiers. - * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT", - * "GPL-2.0-or-later WITH Bison-exception-2.2". - * - * Generated from protobuf field string expression = 1; - * @return string - */ - public function getExpression() - { - return $this->expression; - } - - /** - * Often a single license can be used to represent the licensing terms. - * Sometimes it is necessary to include a choice of one or more licenses - * or some combination of license identifiers. - * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT", - * "GPL-2.0-or-later WITH Bison-exception-2.2". - * - * Generated from protobuf field string expression = 1; - * @param string $var - * @return $this - */ - public function setExpression($var) - { - GPBUtil::checkString($var, True); - $this->expression = $var; - - return $this; - } - - /** - * Comments - * - * Generated from protobuf field string comments = 2; - * @return string - */ - public function getComments() - { - return $this->comments; - } - - /** - * Comments - * - * Generated from protobuf field string comments = 2; - * @param string $var - * @return $this - */ - public function setComments($var) - { - GPBUtil::checkString($var, True); - $this->comments = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNoteOccurrencesRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNoteOccurrencesRequest.php deleted file mode 100644 index 2a854147766a..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNoteOccurrencesRequest.php +++ /dev/null @@ -1,190 +0,0 @@ -grafeas.v1.ListNoteOccurrencesRequest - */ -class ListNoteOccurrencesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the note to list occurrences for in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The filter expression. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * Number of occurrences to return in the list. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * Token to provide to skip to a particular spot in the list. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $name The name of the note to list occurrences for in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. Please see - * {@see GrafeasClient::noteName()} for help formatting this field. - * @param string $filter The filter expression. - * - * @return \Grafeas\V1\ListNoteOccurrencesRequest - * - * @experimental - */ - public static function build(string $name, string $filter): self - { - return (new self()) - ->setName($name) - ->setFilter($filter); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the note to list occurrences for in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @type string $filter - * The filter expression. - * @type int $page_size - * Number of occurrences to return in the list. - * @type string $page_token - * Token to provide to skip to a particular spot in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the note to list occurrences for in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_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; - } - - /** - * The name of the note to list occurrences for in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_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; - } - - /** - * The filter expression. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter expression. - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Number of occurrences to return in the list. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Number of occurrences to return in the list. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Token to provide to skip to a particular spot in the list. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Token to provide to skip to a particular spot in the list. - * - * Generated from protobuf field string page_token = 4; - * @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/Grafeas/v1/proto/src/Grafeas/V1/ListNoteOccurrencesResponse.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNoteOccurrencesResponse.php deleted file mode 100644 index d76a8a59df99..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNoteOccurrencesResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -grafeas.v1.ListNoteOccurrencesResponse - */ -class ListNoteOccurrencesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The occurrences attached to the specified note. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; - */ - private $occurrences; - /** - * Token to provide to skip to a particular spot in the list. - * - * 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<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $occurrences - * The occurrences attached to the specified note. - * @type string $next_page_token - * Token to provide to skip to a particular spot in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The occurrences attached to the specified note. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOccurrences() - { - return $this->occurrences; - } - - /** - * The occurrences attached to the specified note. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; - * @param array<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOccurrences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Occurrence::class); - $this->occurrences = $arr; - - return $this; - } - - /** - * Token to provide to skip to a particular spot in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to provide to skip to a particular spot in the list. - * - * 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/Grafeas/v1/proto/src/Grafeas/V1/ListNotesRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNotesRequest.php deleted file mode 100644 index a2a556f02170..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNotesRequest.php +++ /dev/null @@ -1,194 +0,0 @@ -grafeas.v1.ListNotesRequest - */ -class ListNotesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the project to list notes for in the form of - * `projects/[PROJECT_ID]`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The filter expression. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * Number of notes to return in the list. Must be positive. Max allowed page - * size is 1000. If not specified, page size defaults to 20. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * Token to provide to skip to a particular spot in the list. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent The name of the project to list notes for in the form of - * `projects/[PROJECT_ID]`. Please see - * {@see GrafeasClient::projectName()} for help formatting this field. - * @param string $filter The filter expression. - * - * @return \Grafeas\V1\ListNotesRequest - * - * @experimental - */ - public static function build(string $parent, string $filter): self - { - return (new self()) - ->setParent($parent) - ->setFilter($filter); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The name of the project to list notes for in the form of - * `projects/[PROJECT_ID]`. - * @type string $filter - * The filter expression. - * @type int $page_size - * Number of notes to return in the list. Must be positive. Max allowed page - * size is 1000. If not specified, page size defaults to 20. - * @type string $page_token - * Token to provide to skip to a particular spot in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the project to list notes for in the form of - * `projects/[PROJECT_ID]`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The name of the project to list notes for in the form of - * `projects/[PROJECT_ID]`. - * - * 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; - } - - /** - * The filter expression. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter expression. - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Number of notes to return in the list. Must be positive. Max allowed page - * size is 1000. If not specified, page size defaults to 20. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Number of notes to return in the list. Must be positive. Max allowed page - * size is 1000. If not specified, page size defaults to 20. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Token to provide to skip to a particular spot in the list. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Token to provide to skip to a particular spot in the list. - * - * Generated from protobuf field string page_token = 4; - * @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/Grafeas/v1/proto/src/Grafeas/V1/ListNotesResponse.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNotesResponse.php deleted file mode 100644 index 22c8bc22a257..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNotesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -grafeas.v1.ListNotesResponse - */ -class ListNotesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The notes requested. - * - * Generated from protobuf field repeated .grafeas.v1.Note notes = 1; - */ - private $notes; - /** - * The next pagination token in the list response. It should be used as - * `page_token` for the following request. An empty value means no more - * 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<\Grafeas\V1\Note>|\Google\Protobuf\Internal\RepeatedField $notes - * The notes requested. - * @type string $next_page_token - * The next pagination token in the list response. It should be used as - * `page_token` for the following request. An empty value means no more - * results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The notes requested. - * - * Generated from protobuf field repeated .grafeas.v1.Note notes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNotes() - { - return $this->notes; - } - - /** - * The notes requested. - * - * Generated from protobuf field repeated .grafeas.v1.Note notes = 1; - * @param array<\Grafeas\V1\Note>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNotes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Note::class); - $this->notes = $arr; - - return $this; - } - - /** - * The next pagination token in the list response. It should be used as - * `page_token` for the following request. An empty value means no more - * results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The next pagination token in the list response. It should be used as - * `page_token` for the following request. An empty value means no more - * 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/Grafeas/v1/proto/src/Grafeas/V1/ListOccurrencesRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListOccurrencesRequest.php deleted file mode 100644 index d530c4ea371a..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListOccurrencesRequest.php +++ /dev/null @@ -1,194 +0,0 @@ -grafeas.v1.ListOccurrencesRequest - */ -class ListOccurrencesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the project to list occurrences for in the form of - * `projects/[PROJECT_ID]`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The filter expression. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * Number of occurrences to return in the list. Must be positive. Max allowed - * page size is 1000. If not specified, page size defaults to 20. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * Token to provide to skip to a particular spot in the list. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent The name of the project to list occurrences for in the form of - * `projects/[PROJECT_ID]`. Please see - * {@see GrafeasClient::projectName()} for help formatting this field. - * @param string $filter The filter expression. - * - * @return \Grafeas\V1\ListOccurrencesRequest - * - * @experimental - */ - public static function build(string $parent, string $filter): self - { - return (new self()) - ->setParent($parent) - ->setFilter($filter); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The name of the project to list occurrences for in the form of - * `projects/[PROJECT_ID]`. - * @type string $filter - * The filter expression. - * @type int $page_size - * Number of occurrences to return in the list. Must be positive. Max allowed - * page size is 1000. If not specified, page size defaults to 20. - * @type string $page_token - * Token to provide to skip to a particular spot in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the project to list occurrences for in the form of - * `projects/[PROJECT_ID]`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The name of the project to list occurrences for in the form of - * `projects/[PROJECT_ID]`. - * - * 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; - } - - /** - * The filter expression. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter expression. - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Number of occurrences to return in the list. Must be positive. Max allowed - * page size is 1000. If not specified, page size defaults to 20. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Number of occurrences to return in the list. Must be positive. Max allowed - * page size is 1000. If not specified, page size defaults to 20. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Token to provide to skip to a particular spot in the list. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Token to provide to skip to a particular spot in the list. - * - * Generated from protobuf field string page_token = 4; - * @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/Grafeas/v1/proto/src/Grafeas/V1/ListOccurrencesResponse.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListOccurrencesResponse.php deleted file mode 100644 index c698cc7476a2..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListOccurrencesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -grafeas.v1.ListOccurrencesResponse - */ -class ListOccurrencesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The occurrences requested. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; - */ - private $occurrences; - /** - * The next pagination token in the list response. It should be used as - * `page_token` for the following request. An empty value means no more - * 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<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $occurrences - * The occurrences requested. - * @type string $next_page_token - * The next pagination token in the list response. It should be used as - * `page_token` for the following request. An empty value means no more - * results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The occurrences requested. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOccurrences() - { - return $this->occurrences; - } - - /** - * The occurrences requested. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; - * @param array<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOccurrences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Occurrence::class); - $this->occurrences = $arr; - - return $this; - } - - /** - * The next pagination token in the list response. It should be used as - * `page_token` for the following request. An empty value means no more - * results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The next pagination token in the list response. It should be used as - * `page_token` for the following request. An empty value means no more - * 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/Grafeas/v1/proto/src/Grafeas/V1/Location.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Location.php deleted file mode 100644 index b8381eca4d41..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Location.php +++ /dev/null @@ -1,154 +0,0 @@ -grafeas.v1.Location - */ -class Location extends \Google\Protobuf\Internal\Message -{ - /** - * Deprecated. - * The CPE URI in [CPE format](https://cpe.mitre.org/specification/) - * - * Generated from protobuf field string cpe_uri = 1; - */ - protected $cpe_uri = ''; - /** - * Deprecated. - * The version installed at this location. - * - * Generated from protobuf field .grafeas.v1.Version version = 2; - */ - protected $version = null; - /** - * The path from which we gathered that this package/version is installed. - * - * Generated from protobuf field string path = 3; - */ - protected $path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cpe_uri - * Deprecated. - * The CPE URI in [CPE format](https://cpe.mitre.org/specification/) - * @type \Grafeas\V1\Version $version - * Deprecated. - * The version installed at this location. - * @type string $path - * The path from which we gathered that this package/version is installed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Package::initOnce(); - parent::__construct($data); - } - - /** - * Deprecated. - * The CPE URI in [CPE format](https://cpe.mitre.org/specification/) - * - * Generated from protobuf field string cpe_uri = 1; - * @return string - */ - public function getCpeUri() - { - return $this->cpe_uri; - } - - /** - * Deprecated. - * The CPE URI in [CPE format](https://cpe.mitre.org/specification/) - * - * Generated from protobuf field string cpe_uri = 1; - * @param string $var - * @return $this - */ - public function setCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->cpe_uri = $var; - - return $this; - } - - /** - * Deprecated. - * The version installed at this location. - * - * Generated from protobuf field .grafeas.v1.Version version = 2; - * @return \Grafeas\V1\Version|null - */ - public function getVersion() - { - return $this->version; - } - - public function hasVersion() - { - return isset($this->version); - } - - public function clearVersion() - { - unset($this->version); - } - - /** - * Deprecated. - * The version installed at this location. - * - * Generated from protobuf field .grafeas.v1.Version version = 2; - * @param \Grafeas\V1\Version $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); - $this->version = $var; - - return $this; - } - - /** - * The path from which we gathered that this package/version is installed. - * - * Generated from protobuf field string path = 3; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * The path from which we gathered that this package/version is installed. - * - * Generated from protobuf field string path = 3; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Metadata.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Metadata.php deleted file mode 100644 index 496b347e8c53..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Metadata.php +++ /dev/null @@ -1,249 +0,0 @@ -grafeas.v1.Metadata - */ -class Metadata extends \Google\Protobuf\Internal\Message -{ - /** - * Identifies the particular build invocation, which can be useful for finding - * associated logs or other ad-hoc analysis. The value SHOULD be globally - * unique, per in-toto Provenance spec. - * - * Generated from protobuf field string build_invocation_id = 1; - */ - protected $build_invocation_id = ''; - /** - * The timestamp of when the build started. - * - * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; - */ - protected $build_started_on = null; - /** - * The timestamp of when the build completed. - * - * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; - */ - protected $build_finished_on = null; - /** - * Indicates that the builder claims certain fields in this message to be - * complete. - * - * Generated from protobuf field .grafeas.v1.Completeness completeness = 4; - */ - protected $completeness = null; - /** - * If true, the builder claims that running the recipe on materials will - * produce bit-for-bit identical output. - * - * Generated from protobuf field bool reproducible = 5; - */ - protected $reproducible = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $build_invocation_id - * Identifies the particular build invocation, which can be useful for finding - * associated logs or other ad-hoc analysis. The value SHOULD be globally - * unique, per in-toto Provenance spec. - * @type \Google\Protobuf\Timestamp $build_started_on - * The timestamp of when the build started. - * @type \Google\Protobuf\Timestamp $build_finished_on - * The timestamp of when the build completed. - * @type \Grafeas\V1\Completeness $completeness - * Indicates that the builder claims certain fields in this message to be - * complete. - * @type bool $reproducible - * If true, the builder claims that running the recipe on materials will - * produce bit-for-bit identical output. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\IntotoProvenance::initOnce(); - parent::__construct($data); - } - - /** - * Identifies the particular build invocation, which can be useful for finding - * associated logs or other ad-hoc analysis. The value SHOULD be globally - * unique, per in-toto Provenance spec. - * - * Generated from protobuf field string build_invocation_id = 1; - * @return string - */ - public function getBuildInvocationId() - { - return $this->build_invocation_id; - } - - /** - * Identifies the particular build invocation, which can be useful for finding - * associated logs or other ad-hoc analysis. The value SHOULD be globally - * unique, per in-toto Provenance spec. - * - * Generated from protobuf field string build_invocation_id = 1; - * @param string $var - * @return $this - */ - public function setBuildInvocationId($var) - { - GPBUtil::checkString($var, True); - $this->build_invocation_id = $var; - - return $this; - } - - /** - * The timestamp of when the build started. - * - * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getBuildStartedOn() - { - return $this->build_started_on; - } - - public function hasBuildStartedOn() - { - return isset($this->build_started_on); - } - - public function clearBuildStartedOn() - { - unset($this->build_started_on); - } - - /** - * The timestamp of when the build started. - * - * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setBuildStartedOn($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->build_started_on = $var; - - return $this; - } - - /** - * The timestamp of when the build completed. - * - * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getBuildFinishedOn() - { - return $this->build_finished_on; - } - - public function hasBuildFinishedOn() - { - return isset($this->build_finished_on); - } - - public function clearBuildFinishedOn() - { - unset($this->build_finished_on); - } - - /** - * The timestamp of when the build completed. - * - * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setBuildFinishedOn($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->build_finished_on = $var; - - return $this; - } - - /** - * Indicates that the builder claims certain fields in this message to be - * complete. - * - * Generated from protobuf field .grafeas.v1.Completeness completeness = 4; - * @return \Grafeas\V1\Completeness|null - */ - public function getCompleteness() - { - return $this->completeness; - } - - public function hasCompleteness() - { - return isset($this->completeness); - } - - public function clearCompleteness() - { - unset($this->completeness); - } - - /** - * Indicates that the builder claims certain fields in this message to be - * complete. - * - * Generated from protobuf field .grafeas.v1.Completeness completeness = 4; - * @param \Grafeas\V1\Completeness $var - * @return $this - */ - public function setCompleteness($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Completeness::class); - $this->completeness = $var; - - return $this; - } - - /** - * If true, the builder claims that running the recipe on materials will - * produce bit-for-bit identical output. - * - * Generated from protobuf field bool reproducible = 5; - * @return bool - */ - public function getReproducible() - { - return $this->reproducible; - } - - /** - * If true, the builder claims that running the recipe on materials will - * produce bit-for-bit identical output. - * - * Generated from protobuf field bool reproducible = 5; - * @param bool $var - * @return $this - */ - public function setReproducible($var) - { - GPBUtil::checkBool($var); - $this->reproducible = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/NonCompliantFile.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/NonCompliantFile.php deleted file mode 100644 index db2f7ae1e2f2..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/NonCompliantFile.php +++ /dev/null @@ -1,135 +0,0 @@ -grafeas.v1.NonCompliantFile - */ -class NonCompliantFile extends \Google\Protobuf\Internal\Message -{ - /** - * Empty if `display_command` is set. - * - * Generated from protobuf field string path = 1; - */ - protected $path = ''; - /** - * Command to display the non-compliant files. - * - * Generated from protobuf field string display_command = 2; - */ - protected $display_command = ''; - /** - * Explains why a file is non compliant for a CIS check. - * - * Generated from protobuf field string reason = 3; - */ - protected $reason = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $path - * Empty if `display_command` is set. - * @type string $display_command - * Command to display the non-compliant files. - * @type string $reason - * Explains why a file is non compliant for a CIS check. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Compliance::initOnce(); - parent::__construct($data); - } - - /** - * Empty if `display_command` is set. - * - * Generated from protobuf field string path = 1; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Empty if `display_command` is set. - * - * Generated from protobuf field string path = 1; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * Command to display the non-compliant files. - * - * Generated from protobuf field string display_command = 2; - * @return string - */ - public function getDisplayCommand() - { - return $this->display_command; - } - - /** - * Command to display the non-compliant files. - * - * Generated from protobuf field string display_command = 2; - * @param string $var - * @return $this - */ - public function setDisplayCommand($var) - { - GPBUtil::checkString($var, True); - $this->display_command = $var; - - return $this; - } - - /** - * Explains why a file is non compliant for a CIS check. - * - * Generated from protobuf field string reason = 3; - * @return string - */ - public function getReason() - { - return $this->reason; - } - - /** - * Explains why a file is non compliant for a CIS check. - * - * Generated from protobuf field string reason = 3; - * @param string $var - * @return $this - */ - public function setReason($var) - { - GPBUtil::checkString($var, True); - $this->reason = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Note.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Note.php deleted file mode 100644 index 4f68925c3b7b..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Note.php +++ /dev/null @@ -1,790 +0,0 @@ -grafeas.v1.Note - */ -class Note extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * A one sentence description of this note. - * - * Generated from protobuf field string short_description = 2; - */ - protected $short_description = ''; - /** - * A detailed description of this note. - * - * Generated from protobuf field string long_description = 3; - */ - protected $long_description = ''; - /** - * Output only. The type of analysis. This field can be used as a filter in - * list requests. - * - * Generated from protobuf field .grafeas.v1.NoteKind kind = 4; - */ - protected $kind = 0; - /** - * URLs associated with this note. - * - * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - private $related_url; - /** - * Time of expiration for this note. Empty if note does not expire. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; - */ - protected $expiration_time = null; - /** - * Output only. The time this note was created. This field can be used as a - * filter in list requests. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; - */ - protected $create_time = null; - /** - * Output only. The time this note was last updated. This field can be used as - * a filter in list requests. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8; - */ - protected $update_time = null; - /** - * Other notes related to this note. - * - * Generated from protobuf field repeated string related_note_names = 9; - */ - private $related_note_names; - protected $type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @type string $short_description - * A one sentence description of this note. - * @type string $long_description - * A detailed description of this note. - * @type int $kind - * Output only. The type of analysis. This field can be used as a filter in - * list requests. - * @type array<\Grafeas\V1\RelatedUrl>|\Google\Protobuf\Internal\RepeatedField $related_url - * URLs associated with this note. - * @type \Google\Protobuf\Timestamp $expiration_time - * Time of expiration for this note. Empty if note does not expire. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time this note was created. This field can be used as a - * filter in list requests. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time this note was last updated. This field can be used as - * a filter in list requests. - * @type array|\Google\Protobuf\Internal\RepeatedField $related_note_names - * Other notes related to this note. - * @type \Grafeas\V1\VulnerabilityNote $vulnerability - * A note describing a package vulnerability. - * @type \Grafeas\V1\BuildNote $build - * A note describing build provenance for a verifiable build. - * @type \Grafeas\V1\ImageNote $image - * A note describing a base image. - * @type \Grafeas\V1\PackageNote $package - * A note describing a package hosted by various package managers. - * @type \Grafeas\V1\DeploymentNote $deployment - * A note describing something that can be deployed. - * @type \Grafeas\V1\DiscoveryNote $discovery - * A note describing the initial analysis of a resource. - * @type \Grafeas\V1\AttestationNote $attestation - * A note describing an attestation role. - * @type \Grafeas\V1\UpgradeNote $upgrade - * A note describing available package upgrades. - * @type \Grafeas\V1\ComplianceNote $compliance - * A note describing a compliance check. - * @type \Grafeas\V1\DSSEAttestationNote $dsse_attestation - * A note describing a dsse attestation note. - * @type \Grafeas\V1\VulnerabilityAssessmentNote $vulnerability_assessment - * A note describing a vulnerability assessment. - * @type \Grafeas\V1\SBOMReferenceNote $sbom_reference - * A note describing an SBOM reference. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * - * 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; - } - - /** - * A one sentence description of this note. - * - * Generated from protobuf field string short_description = 2; - * @return string - */ - public function getShortDescription() - { - return $this->short_description; - } - - /** - * A one sentence description of this note. - * - * Generated from protobuf field string short_description = 2; - * @param string $var - * @return $this - */ - public function setShortDescription($var) - { - GPBUtil::checkString($var, True); - $this->short_description = $var; - - return $this; - } - - /** - * A detailed description of this note. - * - * Generated from protobuf field string long_description = 3; - * @return string - */ - public function getLongDescription() - { - return $this->long_description; - } - - /** - * A detailed description of this note. - * - * Generated from protobuf field string long_description = 3; - * @param string $var - * @return $this - */ - public function setLongDescription($var) - { - GPBUtil::checkString($var, True); - $this->long_description = $var; - - return $this; - } - - /** - * Output only. The type of analysis. This field can be used as a filter in - * list requests. - * - * Generated from protobuf field .grafeas.v1.NoteKind kind = 4; - * @return int - */ - public function getKind() - { - return $this->kind; - } - - /** - * Output only. The type of analysis. This field can be used as a filter in - * list requests. - * - * Generated from protobuf field .grafeas.v1.NoteKind kind = 4; - * @param int $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\NoteKind::class); - $this->kind = $var; - - return $this; - } - - /** - * URLs associated with this note. - * - * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_url = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRelatedUrl() - { - return $this->related_url; - } - - /** - * URLs associated with this note. - * - * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_url = 5; - * @param array<\Grafeas\V1\RelatedUrl>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRelatedUrl($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\RelatedUrl::class); - $this->related_url = $arr; - - return $this; - } - - /** - * Time of expiration for this note. Empty if note does not expire. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpirationTime() - { - return $this->expiration_time; - } - - public function hasExpirationTime() - { - return isset($this->expiration_time); - } - - public function clearExpirationTime() - { - unset($this->expiration_time); - } - - /** - * Time of expiration for this note. Empty if note does not expire. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpirationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expiration_time = $var; - - return $this; - } - - /** - * Output only. The time this note was created. This field can be used as a - * filter in list requests. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; - * @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 this note was created. This field can be used as a - * filter in list requests. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; - * @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 note was last updated. This field can be used as - * a filter in list requests. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time this note was last updated. This field can be used as - * a filter in list requests. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Other notes related to this note. - * - * Generated from protobuf field repeated string related_note_names = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRelatedNoteNames() - { - return $this->related_note_names; - } - - /** - * Other notes related to this note. - * - * Generated from protobuf field repeated string related_note_names = 9; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRelatedNoteNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->related_note_names = $arr; - - return $this; - } - - /** - * A note describing a package vulnerability. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityNote vulnerability = 10; - * @return \Grafeas\V1\VulnerabilityNote|null - */ - public function getVulnerability() - { - return $this->readOneof(10); - } - - public function hasVulnerability() - { - return $this->hasOneof(10); - } - - /** - * A note describing a package vulnerability. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityNote vulnerability = 10; - * @param \Grafeas\V1\VulnerabilityNote $var - * @return $this - */ - public function setVulnerability($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\VulnerabilityNote::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * A note describing build provenance for a verifiable build. - * - * Generated from protobuf field .grafeas.v1.BuildNote build = 11; - * @return \Grafeas\V1\BuildNote|null - */ - public function getBuild() - { - return $this->readOneof(11); - } - - public function hasBuild() - { - return $this->hasOneof(11); - } - - /** - * A note describing build provenance for a verifiable build. - * - * Generated from protobuf field .grafeas.v1.BuildNote build = 11; - * @param \Grafeas\V1\BuildNote $var - * @return $this - */ - public function setBuild($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\BuildNote::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * A note describing a base image. - * - * Generated from protobuf field .grafeas.v1.ImageNote image = 12; - * @return \Grafeas\V1\ImageNote|null - */ - public function getImage() - { - return $this->readOneof(12); - } - - public function hasImage() - { - return $this->hasOneof(12); - } - - /** - * A note describing a base image. - * - * Generated from protobuf field .grafeas.v1.ImageNote image = 12; - * @param \Grafeas\V1\ImageNote $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\ImageNote::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * A note describing a package hosted by various package managers. - * - * Generated from protobuf field .grafeas.v1.PackageNote package = 13; - * @return \Grafeas\V1\PackageNote|null - */ - public function getPackage() - { - return $this->readOneof(13); - } - - public function hasPackage() - { - return $this->hasOneof(13); - } - - /** - * A note describing a package hosted by various package managers. - * - * Generated from protobuf field .grafeas.v1.PackageNote package = 13; - * @param \Grafeas\V1\PackageNote $var - * @return $this - */ - public function setPackage($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\PackageNote::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * A note describing something that can be deployed. - * - * Generated from protobuf field .grafeas.v1.DeploymentNote deployment = 14; - * @return \Grafeas\V1\DeploymentNote|null - */ - public function getDeployment() - { - return $this->readOneof(14); - } - - public function hasDeployment() - { - return $this->hasOneof(14); - } - - /** - * A note describing something that can be deployed. - * - * Generated from protobuf field .grafeas.v1.DeploymentNote deployment = 14; - * @param \Grafeas\V1\DeploymentNote $var - * @return $this - */ - public function setDeployment($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\DeploymentNote::class); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * A note describing the initial analysis of a resource. - * - * Generated from protobuf field .grafeas.v1.DiscoveryNote discovery = 15; - * @return \Grafeas\V1\DiscoveryNote|null - */ - public function getDiscovery() - { - return $this->readOneof(15); - } - - public function hasDiscovery() - { - return $this->hasOneof(15); - } - - /** - * A note describing the initial analysis of a resource. - * - * Generated from protobuf field .grafeas.v1.DiscoveryNote discovery = 15; - * @param \Grafeas\V1\DiscoveryNote $var - * @return $this - */ - public function setDiscovery($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\DiscoveryNote::class); - $this->writeOneof(15, $var); - - return $this; - } - - /** - * A note describing an attestation role. - * - * Generated from protobuf field .grafeas.v1.AttestationNote attestation = 16; - * @return \Grafeas\V1\AttestationNote|null - */ - public function getAttestation() - { - return $this->readOneof(16); - } - - public function hasAttestation() - { - return $this->hasOneof(16); - } - - /** - * A note describing an attestation role. - * - * Generated from protobuf field .grafeas.v1.AttestationNote attestation = 16; - * @param \Grafeas\V1\AttestationNote $var - * @return $this - */ - public function setAttestation($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\AttestationNote::class); - $this->writeOneof(16, $var); - - return $this; - } - - /** - * A note describing available package upgrades. - * - * Generated from protobuf field .grafeas.v1.UpgradeNote upgrade = 17; - * @return \Grafeas\V1\UpgradeNote|null - */ - public function getUpgrade() - { - return $this->readOneof(17); - } - - public function hasUpgrade() - { - return $this->hasOneof(17); - } - - /** - * A note describing available package upgrades. - * - * Generated from protobuf field .grafeas.v1.UpgradeNote upgrade = 17; - * @param \Grafeas\V1\UpgradeNote $var - * @return $this - */ - public function setUpgrade($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\UpgradeNote::class); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * A note describing a compliance check. - * - * Generated from protobuf field .grafeas.v1.ComplianceNote compliance = 18; - * @return \Grafeas\V1\ComplianceNote|null - */ - public function getCompliance() - { - return $this->readOneof(18); - } - - public function hasCompliance() - { - return $this->hasOneof(18); - } - - /** - * A note describing a compliance check. - * - * Generated from protobuf field .grafeas.v1.ComplianceNote compliance = 18; - * @param \Grafeas\V1\ComplianceNote $var - * @return $this - */ - public function setCompliance($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\ComplianceNote::class); - $this->writeOneof(18, $var); - - return $this; - } - - /** - * A note describing a dsse attestation note. - * - * Generated from protobuf field .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - * @return \Grafeas\V1\DSSEAttestationNote|null - */ - public function getDsseAttestation() - { - return $this->readOneof(19); - } - - public function hasDsseAttestation() - { - return $this->hasOneof(19); - } - - /** - * A note describing a dsse attestation note. - * - * Generated from protobuf field .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - * @param \Grafeas\V1\DSSEAttestationNote $var - * @return $this - */ - public function setDsseAttestation($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\DSSEAttestationNote::class); - $this->writeOneof(19, $var); - - return $this; - } - - /** - * A note describing a vulnerability assessment. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; - * @return \Grafeas\V1\VulnerabilityAssessmentNote|null - */ - public function getVulnerabilityAssessment() - { - return $this->readOneof(20); - } - - public function hasVulnerabilityAssessment() - { - return $this->hasOneof(20); - } - - /** - * A note describing a vulnerability assessment. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20; - * @param \Grafeas\V1\VulnerabilityAssessmentNote $var - * @return $this - */ - public function setVulnerabilityAssessment($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\VulnerabilityAssessmentNote::class); - $this->writeOneof(20, $var); - - return $this; - } - - /** - * A note describing an SBOM reference. - * - * Generated from protobuf field .grafeas.v1.SBOMReferenceNote sbom_reference = 21; - * @return \Grafeas\V1\SBOMReferenceNote|null - */ - public function getSbomReference() - { - return $this->readOneof(21); - } - - public function hasSbomReference() - { - return $this->hasOneof(21); - } - - /** - * A note describing an SBOM reference. - * - * Generated from protobuf field .grafeas.v1.SBOMReferenceNote sbom_reference = 21; - * @param \Grafeas\V1\SBOMReferenceNote $var - * @return $this - */ - public function setSbomReference($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SBOMReferenceNote::class); - $this->writeOneof(21, $var); - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/NoteKind.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/NoteKind.php deleted file mode 100644 index 594ef406552f..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/NoteKind.php +++ /dev/null @@ -1,131 +0,0 @@ -grafeas.v1.NoteKind - */ -class NoteKind -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum NOTE_KIND_UNSPECIFIED = 0; - */ - const NOTE_KIND_UNSPECIFIED = 0; - /** - * The note and occurrence represent a package vulnerability. - * - * Generated from protobuf enum VULNERABILITY = 1; - */ - const VULNERABILITY = 1; - /** - * The note and occurrence assert build provenance. - * - * Generated from protobuf enum BUILD = 2; - */ - const BUILD = 2; - /** - * This represents an image basis relationship. - * - * Generated from protobuf enum IMAGE = 3; - */ - const IMAGE = 3; - /** - * This represents a package installed via a package manager. - * - * Generated from protobuf enum PACKAGE = 4; - */ - const PACKAGE = 4; - /** - * The note and occurrence track deployment events. - * - * Generated from protobuf enum DEPLOYMENT = 5; - */ - const DEPLOYMENT = 5; - /** - * The note and occurrence track the initial discovery status of a resource. - * - * Generated from protobuf enum DISCOVERY = 6; - */ - const DISCOVERY = 6; - /** - * This represents a logical "role" that can attest to artifacts. - * - * Generated from protobuf enum ATTESTATION = 7; - */ - const ATTESTATION = 7; - /** - * This represents an available package upgrade. - * - * Generated from protobuf enum UPGRADE = 8; - */ - const UPGRADE = 8; - /** - * This represents a Compliance Note - * - * Generated from protobuf enum COMPLIANCE = 9; - */ - const COMPLIANCE = 9; - /** - * This represents a DSSE attestation Note - * - * Generated from protobuf enum DSSE_ATTESTATION = 10; - */ - const DSSE_ATTESTATION = 10; - /** - * This represents a Vulnerability Assessment. - * - * Generated from protobuf enum VULNERABILITY_ASSESSMENT = 11; - */ - const VULNERABILITY_ASSESSMENT = 11; - /** - * This represents an SBOM Reference. - * - * Generated from protobuf enum SBOM_REFERENCE = 12; - */ - const SBOM_REFERENCE = 12; - - private static $valueToName = [ - self::NOTE_KIND_UNSPECIFIED => 'NOTE_KIND_UNSPECIFIED', - self::VULNERABILITY => 'VULNERABILITY', - self::BUILD => 'BUILD', - self::IMAGE => 'IMAGE', - self::PACKAGE => 'PACKAGE', - self::DEPLOYMENT => 'DEPLOYMENT', - self::DISCOVERY => 'DISCOVERY', - self::ATTESTATION => 'ATTESTATION', - self::UPGRADE => 'UPGRADE', - self::COMPLIANCE => 'COMPLIANCE', - self::DSSE_ATTESTATION => 'DSSE_ATTESTATION', - self::VULNERABILITY_ASSESSMENT => 'VULNERABILITY_ASSESSMENT', - self::SBOM_REFERENCE => 'SBOM_REFERENCE', - ]; - - 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/Grafeas/v1/proto/src/Grafeas/V1/Occurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Occurrence.php deleted file mode 100644 index e8dfa64396fd..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Occurrence.php +++ /dev/null @@ -1,734 +0,0 @@ -grafeas.v1.Occurrence - */ -class Occurrence extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. Immutable. A URI that represents the resource for which the - * occurrence applies. For example, - * `https://gcr.io/project/image@sha256:123abc` for a Docker image. - * - * Generated from protobuf field string resource_uri = 2; - */ - protected $resource_uri = ''; - /** - * Required. Immutable. The analysis note associated with this occurrence, in - * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be - * used as a filter in list requests. - * - * Generated from protobuf field string note_name = 3; - */ - protected $note_name = ''; - /** - * Output only. This explicitly denotes which of the occurrence details are - * specified. This field can be used as a filter in list requests. - * - * Generated from protobuf field .grafeas.v1.NoteKind kind = 4; - */ - protected $kind = 0; - /** - * A description of actions that can be taken to remedy the note. - * - * Generated from protobuf field string remediation = 5; - */ - protected $remediation = ''; - /** - * Output only. The time this occurrence was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; - */ - protected $create_time = null; - /** - * Output only. The time this occurrence was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7; - */ - protected $update_time = null; - /** - * https://github.com/secure-systems-lab/dsse - * - * Generated from protobuf field .grafeas.v1.Envelope envelope = 18; - */ - protected $envelope = null; - protected $details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * @type string $resource_uri - * Required. Immutable. A URI that represents the resource for which the - * occurrence applies. For example, - * `https://gcr.io/project/image@sha256:123abc` for a Docker image. - * @type string $note_name - * Required. Immutable. The analysis note associated with this occurrence, in - * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be - * used as a filter in list requests. - * @type int $kind - * Output only. This explicitly denotes which of the occurrence details are - * specified. This field can be used as a filter in list requests. - * @type string $remediation - * A description of actions that can be taken to remedy the note. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time this occurrence was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time this occurrence was last updated. - * @type \Grafeas\V1\VulnerabilityOccurrence $vulnerability - * Describes a security vulnerability. - * @type \Grafeas\V1\BuildOccurrence $build - * Describes a verifiable build. - * @type \Grafeas\V1\ImageOccurrence $image - * Describes how this resource derives from the basis in the associated - * note. - * @type \Grafeas\V1\PackageOccurrence $package - * Describes the installation of a package on the linked resource. - * @type \Grafeas\V1\DeploymentOccurrence $deployment - * Describes the deployment of an artifact on a runtime. - * @type \Grafeas\V1\DiscoveryOccurrence $discovery - * Describes when a resource was discovered. - * @type \Grafeas\V1\AttestationOccurrence $attestation - * Describes an attestation of an artifact. - * @type \Grafeas\V1\UpgradeOccurrence $upgrade - * Describes an available package upgrade on the linked resource. - * @type \Grafeas\V1\ComplianceOccurrence $compliance - * Describes a compliance violation on a linked resource. - * @type \Grafeas\V1\DSSEAttestationOccurrence $dsse_attestation - * Describes an attestation of an artifact using dsse. - * @type \Grafeas\V1\SBOMReferenceOccurrence $sbom_reference - * Describes a specific SBOM reference occurrences. - * @type \Grafeas\V1\Envelope $envelope - * https://github.com/secure-systems-lab/dsse - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * - * 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; - } - - /** - * Required. Immutable. A URI that represents the resource for which the - * occurrence applies. For example, - * `https://gcr.io/project/image@sha256:123abc` for a Docker image. - * - * Generated from protobuf field string resource_uri = 2; - * @return string - */ - public function getResourceUri() - { - return $this->resource_uri; - } - - /** - * Required. Immutable. A URI that represents the resource for which the - * occurrence applies. For example, - * `https://gcr.io/project/image@sha256:123abc` for a Docker image. - * - * Generated from protobuf field string resource_uri = 2; - * @param string $var - * @return $this - */ - public function setResourceUri($var) - { - GPBUtil::checkString($var, True); - $this->resource_uri = $var; - - return $this; - } - - /** - * Required. Immutable. The analysis note associated with this occurrence, in - * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be - * used as a filter in list requests. - * - * Generated from protobuf field string note_name = 3; - * @return string - */ - public function getNoteName() - { - return $this->note_name; - } - - /** - * Required. Immutable. The analysis note associated with this occurrence, in - * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be - * used as a filter in list requests. - * - * Generated from protobuf field string note_name = 3; - * @param string $var - * @return $this - */ - public function setNoteName($var) - { - GPBUtil::checkString($var, True); - $this->note_name = $var; - - return $this; - } - - /** - * Output only. This explicitly denotes which of the occurrence details are - * specified. This field can be used as a filter in list requests. - * - * Generated from protobuf field .grafeas.v1.NoteKind kind = 4; - * @return int - */ - public function getKind() - { - return $this->kind; - } - - /** - * Output only. This explicitly denotes which of the occurrence details are - * specified. This field can be used as a filter in list requests. - * - * Generated from protobuf field .grafeas.v1.NoteKind kind = 4; - * @param int $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\NoteKind::class); - $this->kind = $var; - - return $this; - } - - /** - * A description of actions that can be taken to remedy the note. - * - * Generated from protobuf field string remediation = 5; - * @return string - */ - public function getRemediation() - { - return $this->remediation; - } - - /** - * A description of actions that can be taken to remedy the note. - * - * Generated from protobuf field string remediation = 5; - * @param string $var - * @return $this - */ - public function setRemediation($var) - { - GPBUtil::checkString($var, True); - $this->remediation = $var; - - return $this; - } - - /** - * Output only. The time this occurrence was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; - * @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 this occurrence was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; - * @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 occurrence was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time this occurrence was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Describes a security vulnerability. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - * @return \Grafeas\V1\VulnerabilityOccurrence|null - */ - public function getVulnerability() - { - return $this->readOneof(8); - } - - public function hasVulnerability() - { - return $this->hasOneof(8); - } - - /** - * Describes a security vulnerability. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - * @param \Grafeas\V1\VulnerabilityOccurrence $var - * @return $this - */ - public function setVulnerability($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\VulnerabilityOccurrence::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Describes a verifiable build. - * - * Generated from protobuf field .grafeas.v1.BuildOccurrence build = 9; - * @return \Grafeas\V1\BuildOccurrence|null - */ - public function getBuild() - { - return $this->readOneof(9); - } - - public function hasBuild() - { - return $this->hasOneof(9); - } - - /** - * Describes a verifiable build. - * - * Generated from protobuf field .grafeas.v1.BuildOccurrence build = 9; - * @param \Grafeas\V1\BuildOccurrence $var - * @return $this - */ - public function setBuild($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\BuildOccurrence::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Describes how this resource derives from the basis in the associated - * note. - * - * Generated from protobuf field .grafeas.v1.ImageOccurrence image = 10; - * @return \Grafeas\V1\ImageOccurrence|null - */ - public function getImage() - { - return $this->readOneof(10); - } - - public function hasImage() - { - return $this->hasOneof(10); - } - - /** - * Describes how this resource derives from the basis in the associated - * note. - * - * Generated from protobuf field .grafeas.v1.ImageOccurrence image = 10; - * @param \Grafeas\V1\ImageOccurrence $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\ImageOccurrence::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Describes the installation of a package on the linked resource. - * - * Generated from protobuf field .grafeas.v1.PackageOccurrence package = 11; - * @return \Grafeas\V1\PackageOccurrence|null - */ - public function getPackage() - { - return $this->readOneof(11); - } - - public function hasPackage() - { - return $this->hasOneof(11); - } - - /** - * Describes the installation of a package on the linked resource. - * - * Generated from protobuf field .grafeas.v1.PackageOccurrence package = 11; - * @param \Grafeas\V1\PackageOccurrence $var - * @return $this - */ - public function setPackage($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\PackageOccurrence::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Describes the deployment of an artifact on a runtime. - * - * Generated from protobuf field .grafeas.v1.DeploymentOccurrence deployment = 12; - * @return \Grafeas\V1\DeploymentOccurrence|null - */ - public function getDeployment() - { - return $this->readOneof(12); - } - - public function hasDeployment() - { - return $this->hasOneof(12); - } - - /** - * Describes the deployment of an artifact on a runtime. - * - * Generated from protobuf field .grafeas.v1.DeploymentOccurrence deployment = 12; - * @param \Grafeas\V1\DeploymentOccurrence $var - * @return $this - */ - public function setDeployment($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\DeploymentOccurrence::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Describes when a resource was discovered. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence discovery = 13; - * @return \Grafeas\V1\DiscoveryOccurrence|null - */ - public function getDiscovery() - { - return $this->readOneof(13); - } - - public function hasDiscovery() - { - return $this->hasOneof(13); - } - - /** - * Describes when a resource was discovered. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence discovery = 13; - * @param \Grafeas\V1\DiscoveryOccurrence $var - * @return $this - */ - public function setDiscovery($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\DiscoveryOccurrence::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * Describes an attestation of an artifact. - * - * Generated from protobuf field .grafeas.v1.AttestationOccurrence attestation = 14; - * @return \Grafeas\V1\AttestationOccurrence|null - */ - public function getAttestation() - { - return $this->readOneof(14); - } - - public function hasAttestation() - { - return $this->hasOneof(14); - } - - /** - * Describes an attestation of an artifact. - * - * Generated from protobuf field .grafeas.v1.AttestationOccurrence attestation = 14; - * @param \Grafeas\V1\AttestationOccurrence $var - * @return $this - */ - public function setAttestation($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\AttestationOccurrence::class); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * Describes an available package upgrade on the linked resource. - * - * Generated from protobuf field .grafeas.v1.UpgradeOccurrence upgrade = 15; - * @return \Grafeas\V1\UpgradeOccurrence|null - */ - public function getUpgrade() - { - return $this->readOneof(15); - } - - public function hasUpgrade() - { - return $this->hasOneof(15); - } - - /** - * Describes an available package upgrade on the linked resource. - * - * Generated from protobuf field .grafeas.v1.UpgradeOccurrence upgrade = 15; - * @param \Grafeas\V1\UpgradeOccurrence $var - * @return $this - */ - public function setUpgrade($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\UpgradeOccurrence::class); - $this->writeOneof(15, $var); - - return $this; - } - - /** - * Describes a compliance violation on a linked resource. - * - * Generated from protobuf field .grafeas.v1.ComplianceOccurrence compliance = 16; - * @return \Grafeas\V1\ComplianceOccurrence|null - */ - public function getCompliance() - { - return $this->readOneof(16); - } - - public function hasCompliance() - { - return $this->hasOneof(16); - } - - /** - * Describes a compliance violation on a linked resource. - * - * Generated from protobuf field .grafeas.v1.ComplianceOccurrence compliance = 16; - * @param \Grafeas\V1\ComplianceOccurrence $var - * @return $this - */ - public function setCompliance($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\ComplianceOccurrence::class); - $this->writeOneof(16, $var); - - return $this; - } - - /** - * Describes an attestation of an artifact using dsse. - * - * Generated from protobuf field .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - * @return \Grafeas\V1\DSSEAttestationOccurrence|null - */ - public function getDsseAttestation() - { - return $this->readOneof(17); - } - - public function hasDsseAttestation() - { - return $this->hasOneof(17); - } - - /** - * Describes an attestation of an artifact using dsse. - * - * Generated from protobuf field .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - * @param \Grafeas\V1\DSSEAttestationOccurrence $var - * @return $this - */ - public function setDsseAttestation($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\DSSEAttestationOccurrence::class); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * Describes a specific SBOM reference occurrences. - * - * Generated from protobuf field .grafeas.v1.SBOMReferenceOccurrence sbom_reference = 19; - * @return \Grafeas\V1\SBOMReferenceOccurrence|null - */ - public function getSbomReference() - { - return $this->readOneof(19); - } - - public function hasSbomReference() - { - return $this->hasOneof(19); - } - - /** - * Describes a specific SBOM reference occurrences. - * - * Generated from protobuf field .grafeas.v1.SBOMReferenceOccurrence sbom_reference = 19; - * @param \Grafeas\V1\SBOMReferenceOccurrence $var - * @return $this - */ - public function setSbomReference($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SBOMReferenceOccurrence::class); - $this->writeOneof(19, $var); - - return $this; - } - - /** - * https://github.com/secure-systems-lab/dsse - * - * Generated from protobuf field .grafeas.v1.Envelope envelope = 18; - * @return \Grafeas\V1\Envelope|null - */ - public function getEnvelope() - { - return $this->envelope; - } - - public function hasEnvelope() - { - return isset($this->envelope); - } - - public function clearEnvelope() - { - unset($this->envelope); - } - - /** - * https://github.com/secure-systems-lab/dsse - * - * Generated from protobuf field .grafeas.v1.Envelope envelope = 18; - * @param \Grafeas\V1\Envelope $var - * @return $this - */ - public function setEnvelope($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Envelope::class); - $this->envelope = $var; - - return $this; - } - - /** - * @return string - */ - public function getDetails() - { - return $this->whichOneof("details"); - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/PackageNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/PackageNote.php deleted file mode 100644 index a7295d29168a..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/PackageNote.php +++ /dev/null @@ -1,451 +0,0 @@ -grafeas.v1.PackageNote - */ -class PackageNote extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the package. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Deprecated. - * The various channels by which a package is distributed. - * - * Generated from protobuf field repeated .grafeas.v1.Distribution distribution = 10; - */ - private $distribution; - /** - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * - * Generated from protobuf field string package_type = 11; - */ - protected $package_type = ''; - /** - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * The cpe_uri will be blank for language packages. - * - * Generated from protobuf field string cpe_uri = 12; - */ - protected $cpe_uri = ''; - /** - * The CPU architecture for which packages in this distribution channel were - * built. Architecture will be blank for language packages. - * - * Generated from protobuf field .grafeas.v1.Architecture architecture = 13; - */ - protected $architecture = 0; - /** - * The version of the package. - * - * Generated from protobuf field .grafeas.v1.Version version = 14; - */ - protected $version = null; - /** - * A freeform text denoting the maintainer of this package. - * - * Generated from protobuf field string maintainer = 15; - */ - protected $maintainer = ''; - /** - * The homepage for this package. - * - * Generated from protobuf field string url = 16; - */ - protected $url = ''; - /** - * The description of this package. - * - * Generated from protobuf field string description = 17; - */ - protected $description = ''; - /** - * Licenses that have been declared by the authors of the package. - * - * Generated from protobuf field .grafeas.v1.License license = 18; - */ - protected $license = null; - /** - * Hash value, typically a file digest, that allows unique - * identification a specific package. - * - * Generated from protobuf field repeated .grafeas.v1.Digest digest = 19; - */ - private $digest; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the package. - * @type array<\Grafeas\V1\Distribution>|\Google\Protobuf\Internal\RepeatedField $distribution - * Deprecated. - * The various channels by which a package is distributed. - * @type string $package_type - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * @type string $cpe_uri - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * The cpe_uri will be blank for language packages. - * @type int $architecture - * The CPU architecture for which packages in this distribution channel were - * built. Architecture will be blank for language packages. - * @type \Grafeas\V1\Version $version - * The version of the package. - * @type string $maintainer - * A freeform text denoting the maintainer of this package. - * @type string $url - * The homepage for this package. - * @type string $description - * The description of this package. - * @type \Grafeas\V1\License $license - * Licenses that have been declared by the authors of the package. - * @type array<\Grafeas\V1\Digest>|\Google\Protobuf\Internal\RepeatedField $digest - * Hash value, typically a file digest, that allows unique - * identification a specific package. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Package::initOnce(); - parent::__construct($data); - } - - /** - * The name of the package. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the package. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Deprecated. - * The various channels by which a package is distributed. - * - * Generated from protobuf field repeated .grafeas.v1.Distribution distribution = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDistribution() - { - return $this->distribution; - } - - /** - * Deprecated. - * The various channels by which a package is distributed. - * - * Generated from protobuf field repeated .grafeas.v1.Distribution distribution = 10; - * @param array<\Grafeas\V1\Distribution>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDistribution($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Distribution::class); - $this->distribution = $arr; - - return $this; - } - - /** - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * - * Generated from protobuf field string package_type = 11; - * @return string - */ - public function getPackageType() - { - return $this->package_type; - } - - /** - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * - * Generated from protobuf field string package_type = 11; - * @param string $var - * @return $this - */ - public function setPackageType($var) - { - GPBUtil::checkString($var, True); - $this->package_type = $var; - - return $this; - } - - /** - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * The cpe_uri will be blank for language packages. - * - * Generated from protobuf field string cpe_uri = 12; - * @return string - */ - public function getCpeUri() - { - return $this->cpe_uri; - } - - /** - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * The cpe_uri will be blank for language packages. - * - * Generated from protobuf field string cpe_uri = 12; - * @param string $var - * @return $this - */ - public function setCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->cpe_uri = $var; - - return $this; - } - - /** - * The CPU architecture for which packages in this distribution channel were - * built. Architecture will be blank for language packages. - * - * Generated from protobuf field .grafeas.v1.Architecture architecture = 13; - * @return int - */ - public function getArchitecture() - { - return $this->architecture; - } - - /** - * The CPU architecture for which packages in this distribution channel were - * built. Architecture will be blank for language packages. - * - * Generated from protobuf field .grafeas.v1.Architecture architecture = 13; - * @param int $var - * @return $this - */ - public function setArchitecture($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\Architecture::class); - $this->architecture = $var; - - return $this; - } - - /** - * The version of the package. - * - * Generated from protobuf field .grafeas.v1.Version version = 14; - * @return \Grafeas\V1\Version|null - */ - public function getVersion() - { - return $this->version; - } - - public function hasVersion() - { - return isset($this->version); - } - - public function clearVersion() - { - unset($this->version); - } - - /** - * The version of the package. - * - * Generated from protobuf field .grafeas.v1.Version version = 14; - * @param \Grafeas\V1\Version $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); - $this->version = $var; - - return $this; - } - - /** - * A freeform text denoting the maintainer of this package. - * - * Generated from protobuf field string maintainer = 15; - * @return string - */ - public function getMaintainer() - { - return $this->maintainer; - } - - /** - * A freeform text denoting the maintainer of this package. - * - * Generated from protobuf field string maintainer = 15; - * @param string $var - * @return $this - */ - public function setMaintainer($var) - { - GPBUtil::checkString($var, True); - $this->maintainer = $var; - - return $this; - } - - /** - * The homepage for this package. - * - * Generated from protobuf field string url = 16; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * The homepage for this package. - * - * Generated from protobuf field string url = 16; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - - /** - * The description of this package. - * - * Generated from protobuf field string description = 17; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description of this package. - * - * Generated from protobuf field string description = 17; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Licenses that have been declared by the authors of the package. - * - * Generated from protobuf field .grafeas.v1.License license = 18; - * @return \Grafeas\V1\License|null - */ - public function getLicense() - { - return $this->license; - } - - public function hasLicense() - { - return isset($this->license); - } - - public function clearLicense() - { - unset($this->license); - } - - /** - * Licenses that have been declared by the authors of the package. - * - * Generated from protobuf field .grafeas.v1.License license = 18; - * @param \Grafeas\V1\License $var - * @return $this - */ - public function setLicense($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\License::class); - $this->license = $var; - - return $this; - } - - /** - * Hash value, typically a file digest, that allows unique - * identification a specific package. - * - * Generated from protobuf field repeated .grafeas.v1.Digest digest = 19; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDigest() - { - return $this->digest; - } - - /** - * Hash value, typically a file digest, that allows unique - * identification a specific package. - * - * Generated from protobuf field repeated .grafeas.v1.Digest digest = 19; - * @param array<\Grafeas\V1\Digest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDigest($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Digest::class); - $this->digest = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/PackageOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/PackageOccurrence.php deleted file mode 100644 index dafa0769a930..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/PackageOccurrence.php +++ /dev/null @@ -1,311 +0,0 @@ -grafeas.v1.PackageOccurrence - */ -class PackageOccurrence extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the installed package. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * All of the places within the filesystem versions of this package - * have been found. - * - * Generated from protobuf field repeated .grafeas.v1.Location location = 2; - */ - private $location; - /** - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * - * Generated from protobuf field string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $package_type = ''; - /** - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * The cpe_uri will be blank for language packages. - * - * Generated from protobuf field string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cpe_uri = ''; - /** - * The CPU architecture for which packages in this distribution channel were - * built. Architecture will be blank for language packages. - * - * Generated from protobuf field .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $architecture = 0; - /** - * Licenses that have been declared by the authors of the package. - * - * Generated from protobuf field .grafeas.v1.License license = 6; - */ - protected $license = null; - /** - * The version of the package. - * - * Generated from protobuf field .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $version = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the installed package. - * @type array<\Grafeas\V1\Location>|\Google\Protobuf\Internal\RepeatedField $location - * All of the places within the filesystem versions of this package - * have been found. - * @type string $package_type - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * @type string $cpe_uri - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * The cpe_uri will be blank for language packages. - * @type int $architecture - * The CPU architecture for which packages in this distribution channel were - * built. Architecture will be blank for language packages. - * @type \Grafeas\V1\License $license - * Licenses that have been declared by the authors of the package. - * @type \Grafeas\V1\Version $version - * The version of the package. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Package::initOnce(); - parent::__construct($data); - } - - /** - * The name of the installed package. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the installed package. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * All of the places within the filesystem versions of this package - * have been found. - * - * Generated from protobuf field repeated .grafeas.v1.Location location = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLocation() - { - return $this->location; - } - - /** - * All of the places within the filesystem versions of this package - * have been found. - * - * Generated from protobuf field repeated .grafeas.v1.Location location = 2; - * @param array<\Grafeas\V1\Location>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLocation($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Location::class); - $this->location = $arr; - - return $this; - } - - /** - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * - * Generated from protobuf field string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPackageType() - { - return $this->package_type; - } - - /** - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * - * Generated from protobuf field string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPackageType($var) - { - GPBUtil::checkString($var, True); - $this->package_type = $var; - - return $this; - } - - /** - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * The cpe_uri will be blank for language packages. - * - * Generated from protobuf field string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCpeUri() - { - return $this->cpe_uri; - } - - /** - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * The cpe_uri will be blank for language packages. - * - * Generated from protobuf field string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->cpe_uri = $var; - - return $this; - } - - /** - * The CPU architecture for which packages in this distribution channel were - * built. Architecture will be blank for language packages. - * - * Generated from protobuf field .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getArchitecture() - { - return $this->architecture; - } - - /** - * The CPU architecture for which packages in this distribution channel were - * built. Architecture will be blank for language packages. - * - * Generated from protobuf field .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setArchitecture($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\Architecture::class); - $this->architecture = $var; - - return $this; - } - - /** - * Licenses that have been declared by the authors of the package. - * - * Generated from protobuf field .grafeas.v1.License license = 6; - * @return \Grafeas\V1\License|null - */ - public function getLicense() - { - return $this->license; - } - - public function hasLicense() - { - return isset($this->license); - } - - public function clearLicense() - { - unset($this->license); - } - - /** - * Licenses that have been declared by the authors of the package. - * - * Generated from protobuf field .grafeas.v1.License license = 6; - * @param \Grafeas\V1\License $var - * @return $this - */ - public function setLicense($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\License::class); - $this->license = $var; - - return $this; - } - - /** - * The version of the package. - * - * Generated from protobuf field .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Grafeas\V1\Version|null - */ - public function getVersion() - { - return $this->version; - } - - public function hasVersion() - { - return isset($this->version); - } - - public function clearVersion() - { - unset($this->version); - } - - /** - * The version of the package. - * - * Generated from protobuf field .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Grafeas\V1\Version $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ProjectRepoId.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ProjectRepoId.php deleted file mode 100644 index d2c9475a063e..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ProjectRepoId.php +++ /dev/null @@ -1,102 +0,0 @@ -grafeas.v1.ProjectRepoId - */ -class ProjectRepoId extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of the project. - * - * Generated from protobuf field string project_id = 1; - */ - protected $project_id = ''; - /** - * The name of the repo. Leave empty for the default repo. - * - * Generated from protobuf field string repo_name = 2; - */ - protected $repo_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * The ID of the project. - * @type string $repo_name - * The name of the repo. Leave empty for the default repo. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * The ID of the project. - * - * Generated from protobuf field string project_id = 1; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * The ID of the project. - * - * Generated from protobuf field string project_id = 1; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * The name of the repo. Leave empty for the default repo. - * - * Generated from protobuf field string repo_name = 2; - * @return string - */ - public function getRepoName() - { - return $this->repo_name; - } - - /** - * The name of the repo. Leave empty for the default repo. - * - * Generated from protobuf field string repo_name = 2; - * @param string $var - * @return $this - */ - public function setRepoName($var) - { - GPBUtil::checkString($var, True); - $this->repo_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Recipe.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Recipe.php deleted file mode 100644 index 0806a1ed630b..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Recipe.php +++ /dev/null @@ -1,273 +0,0 @@ -grafeas.v1.Recipe - */ -class Recipe extends \Google\Protobuf\Internal\Message -{ - /** - * URI indicating what type of recipe was performed. It determines the meaning - * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials. - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - /** - * Index in materials containing the recipe steps that are not implied by - * recipe.type. For example, if the recipe type were "make", then this would - * point to the source containing the Makefile, not the make program itself. - * Set to -1 if the recipe doesn't come from a material, as zero is default - * unset value for int64. - * - * Generated from protobuf field int64 defined_in_material = 2; - */ - protected $defined_in_material = 0; - /** - * String identifying the entry point into the build. - * This is often a path to a configuration file and/or a target label within - * that file. The syntax and meaning are defined by recipe.type. For example, - * if the recipe type were "make", then this would reference the directory in - * which to run make as well as which target to use. - * - * Generated from protobuf field string entry_point = 3; - */ - protected $entry_point = ''; - /** - * Collection of all external inputs that influenced the build on top of - * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe - * type were "make", then this might be the flags passed to make aside from - * the target, which is captured in recipe.entryPoint. Since the arguments - * field can greatly vary in structure, depending on the builder and recipe - * type, this is of form "Any". - * - * Generated from protobuf field repeated .google.protobuf.Any arguments = 4; - */ - private $arguments; - /** - * Any other builder-controlled inputs necessary for correctly evaluating the - * recipe. Usually only needed for reproducing the build but not evaluated as - * part of policy. Since the environment field can greatly vary in structure, - * depending on the builder and recipe type, this is of form "Any". - * - * Generated from protobuf field repeated .google.protobuf.Any environment = 5; - */ - private $environment; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * URI indicating what type of recipe was performed. It determines the meaning - * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials. - * @type int|string $defined_in_material - * Index in materials containing the recipe steps that are not implied by - * recipe.type. For example, if the recipe type were "make", then this would - * point to the source containing the Makefile, not the make program itself. - * Set to -1 if the recipe doesn't come from a material, as zero is default - * unset value for int64. - * @type string $entry_point - * String identifying the entry point into the build. - * This is often a path to a configuration file and/or a target label within - * that file. The syntax and meaning are defined by recipe.type. For example, - * if the recipe type were "make", then this would reference the directory in - * which to run make as well as which target to use. - * @type array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $arguments - * Collection of all external inputs that influenced the build on top of - * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe - * type were "make", then this might be the flags passed to make aside from - * the target, which is captured in recipe.entryPoint. Since the arguments - * field can greatly vary in structure, depending on the builder and recipe - * type, this is of form "Any". - * @type array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $environment - * Any other builder-controlled inputs necessary for correctly evaluating the - * recipe. Usually only needed for reproducing the build but not evaluated as - * part of policy. Since the environment field can greatly vary in structure, - * depending on the builder and recipe type, this is of form "Any". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\IntotoProvenance::initOnce(); - parent::__construct($data); - } - - /** - * URI indicating what type of recipe was performed. It determines the meaning - * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials. - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * URI indicating what type of recipe was performed. It determines the meaning - * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials. - * - * Generated from protobuf field string type = 1; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Index in materials containing the recipe steps that are not implied by - * recipe.type. For example, if the recipe type were "make", then this would - * point to the source containing the Makefile, not the make program itself. - * Set to -1 if the recipe doesn't come from a material, as zero is default - * unset value for int64. - * - * Generated from protobuf field int64 defined_in_material = 2; - * @return int|string - */ - public function getDefinedInMaterial() - { - return $this->defined_in_material; - } - - /** - * Index in materials containing the recipe steps that are not implied by - * recipe.type. For example, if the recipe type were "make", then this would - * point to the source containing the Makefile, not the make program itself. - * Set to -1 if the recipe doesn't come from a material, as zero is default - * unset value for int64. - * - * Generated from protobuf field int64 defined_in_material = 2; - * @param int|string $var - * @return $this - */ - public function setDefinedInMaterial($var) - { - GPBUtil::checkInt64($var); - $this->defined_in_material = $var; - - return $this; - } - - /** - * String identifying the entry point into the build. - * This is often a path to a configuration file and/or a target label within - * that file. The syntax and meaning are defined by recipe.type. For example, - * if the recipe type were "make", then this would reference the directory in - * which to run make as well as which target to use. - * - * Generated from protobuf field string entry_point = 3; - * @return string - */ - public function getEntryPoint() - { - return $this->entry_point; - } - - /** - * String identifying the entry point into the build. - * This is often a path to a configuration file and/or a target label within - * that file. The syntax and meaning are defined by recipe.type. For example, - * if the recipe type were "make", then this would reference the directory in - * which to run make as well as which target to use. - * - * Generated from protobuf field string entry_point = 3; - * @param string $var - * @return $this - */ - public function setEntryPoint($var) - { - GPBUtil::checkString($var, True); - $this->entry_point = $var; - - return $this; - } - - /** - * Collection of all external inputs that influenced the build on top of - * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe - * type were "make", then this might be the flags passed to make aside from - * the target, which is captured in recipe.entryPoint. Since the arguments - * field can greatly vary in structure, depending on the builder and recipe - * type, this is of form "Any". - * - * Generated from protobuf field repeated .google.protobuf.Any arguments = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArguments() - { - return $this->arguments; - } - - /** - * Collection of all external inputs that influenced the build on top of - * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe - * type were "make", then this might be the flags passed to make aside from - * the target, which is captured in recipe.entryPoint. Since the arguments - * field can greatly vary in structure, depending on the builder and recipe - * type, this is of form "Any". - * - * Generated from protobuf field repeated .google.protobuf.Any arguments = 4; - * @param array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArguments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class); - $this->arguments = $arr; - - return $this; - } - - /** - * Any other builder-controlled inputs necessary for correctly evaluating the - * recipe. Usually only needed for reproducing the build but not evaluated as - * part of policy. Since the environment field can greatly vary in structure, - * depending on the builder and recipe type, this is of form "Any". - * - * Generated from protobuf field repeated .google.protobuf.Any environment = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * Any other builder-controlled inputs necessary for correctly evaluating the - * recipe. Usually only needed for reproducing the build but not evaluated as - * part of policy. Since the environment field can greatly vary in structure, - * depending on the builder and recipe type, this is of form "Any". - * - * Generated from protobuf field repeated .google.protobuf.Any environment = 5; - * @param array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEnvironment($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class); - $this->environment = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/RelatedUrl.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/RelatedUrl.php deleted file mode 100644 index c407db0064b9..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/RelatedUrl.php +++ /dev/null @@ -1,101 +0,0 @@ -grafeas.v1.RelatedUrl - */ -class RelatedUrl extends \Google\Protobuf\Internal\Message -{ - /** - * Specific URL associated with the resource. - * - * Generated from protobuf field string url = 1; - */ - protected $url = ''; - /** - * Label to describe usage of the URL. - * - * Generated from protobuf field string label = 2; - */ - protected $label = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $url - * Specific URL associated with the resource. - * @type string $label - * Label to describe usage of the URL. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Specific URL associated with the resource. - * - * Generated from protobuf field string url = 1; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * Specific URL associated with the resource. - * - * Generated from protobuf field string url = 1; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - - /** - * Label to describe usage of the URL. - * - * Generated from protobuf field string label = 2; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * Label to describe usage of the URL. - * - * Generated from protobuf field string label = 2; - * @param string $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkString($var, True); - $this->label = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/RepoId.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/RepoId.php deleted file mode 100644 index 5643c66c7c24..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/RepoId.php +++ /dev/null @@ -1,108 +0,0 @@ -grafeas.v1.RepoId - */ -class RepoId extends \Google\Protobuf\Internal\Message -{ - protected $id; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\ProjectRepoId $project_repo_id - * A combination of a project ID and a repo name. - * @type string $uid - * A server-assigned, globally unique identifier. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * A combination of a project ID and a repo name. - * - * Generated from protobuf field .grafeas.v1.ProjectRepoId project_repo_id = 1; - * @return \Grafeas\V1\ProjectRepoId|null - */ - public function getProjectRepoId() - { - return $this->readOneof(1); - } - - public function hasProjectRepoId() - { - return $this->hasOneof(1); - } - - /** - * A combination of a project ID and a repo name. - * - * Generated from protobuf field .grafeas.v1.ProjectRepoId project_repo_id = 1; - * @param \Grafeas\V1\ProjectRepoId $var - * @return $this - */ - public function setProjectRepoId($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\ProjectRepoId::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A server-assigned, globally unique identifier. - * - * Generated from protobuf field string uid = 2; - * @return string - */ - public function getUid() - { - return $this->readOneof(2); - } - - public function hasUid() - { - return $this->hasOneof(2); - } - - /** - * A server-assigned, globally unique identifier. - * - * Generated from protobuf field string uid = 2; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getId() - { - return $this->whichOneof("id"); - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SBOMReferenceNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SBOMReferenceNote.php deleted file mode 100644 index bb58886d3a3d..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SBOMReferenceNote.php +++ /dev/null @@ -1,105 +0,0 @@ -grafeas.v1.SBOMReferenceNote - */ -class SBOMReferenceNote extends \Google\Protobuf\Internal\Message -{ - /** - * The format that SBOM takes. E.g. may be spdx, cyclonedx, etc... - * - * Generated from protobuf field string format = 1; - */ - protected $format = ''; - /** - * The version of the format that the SBOM takes. E.g. if the format - * is spdx, the version may be 2.3. - * - * Generated from protobuf field string version = 2; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $format - * The format that SBOM takes. E.g. may be spdx, cyclonedx, etc... - * @type string $version - * The version of the format that the SBOM takes. E.g. if the format - * is spdx, the version may be 2.3. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Sbom::initOnce(); - parent::__construct($data); - } - - /** - * The format that SBOM takes. E.g. may be spdx, cyclonedx, etc... - * - * Generated from protobuf field string format = 1; - * @return string - */ - public function getFormat() - { - return $this->format; - } - - /** - * The format that SBOM takes. E.g. may be spdx, cyclonedx, etc... - * - * Generated from protobuf field string format = 1; - * @param string $var - * @return $this - */ - public function setFormat($var) - { - GPBUtil::checkString($var, True); - $this->format = $var; - - return $this; - } - - /** - * The version of the format that the SBOM takes. E.g. if the format - * is spdx, the version may be 2.3. - * - * Generated from protobuf field string version = 2; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The version of the format that the SBOM takes. E.g. if the format - * is spdx, the version may be 2.3. - * - * Generated from protobuf field string version = 2; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SBOMReferenceOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SBOMReferenceOccurrence.php deleted file mode 100644 index 4d4d0daa7670..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SBOMReferenceOccurrence.php +++ /dev/null @@ -1,156 +0,0 @@ -grafeas.v1.SBOMReferenceOccurrence - */ -class SBOMReferenceOccurrence extends \Google\Protobuf\Internal\Message -{ - /** - * The actual payload that contains the SBOM reference data. - * - * Generated from protobuf field .grafeas.v1.SbomReferenceIntotoPayload payload = 1; - */ - protected $payload = null; - /** - * The kind of payload that SbomReferenceIntotoPayload takes. Since it's in - * the intoto format, this value is expected to be - * 'application/vnd.in-toto+json'. - * - * Generated from protobuf field string payload_type = 2; - */ - protected $payload_type = ''; - /** - * The signatures over the payload. - * - * Generated from protobuf field repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - private $signatures; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\SbomReferenceIntotoPayload $payload - * The actual payload that contains the SBOM reference data. - * @type string $payload_type - * The kind of payload that SbomReferenceIntotoPayload takes. Since it's in - * the intoto format, this value is expected to be - * 'application/vnd.in-toto+json'. - * @type array<\Grafeas\V1\EnvelopeSignature>|\Google\Protobuf\Internal\RepeatedField $signatures - * The signatures over the payload. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Sbom::initOnce(); - parent::__construct($data); - } - - /** - * The actual payload that contains the SBOM reference data. - * - * Generated from protobuf field .grafeas.v1.SbomReferenceIntotoPayload payload = 1; - * @return \Grafeas\V1\SbomReferenceIntotoPayload|null - */ - public function getPayload() - { - return $this->payload; - } - - public function hasPayload() - { - return isset($this->payload); - } - - public function clearPayload() - { - unset($this->payload); - } - - /** - * The actual payload that contains the SBOM reference data. - * - * Generated from protobuf field .grafeas.v1.SbomReferenceIntotoPayload payload = 1; - * @param \Grafeas\V1\SbomReferenceIntotoPayload $var - * @return $this - */ - public function setPayload($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SbomReferenceIntotoPayload::class); - $this->payload = $var; - - return $this; - } - - /** - * The kind of payload that SbomReferenceIntotoPayload takes. Since it's in - * the intoto format, this value is expected to be - * 'application/vnd.in-toto+json'. - * - * Generated from protobuf field string payload_type = 2; - * @return string - */ - public function getPayloadType() - { - return $this->payload_type; - } - - /** - * The kind of payload that SbomReferenceIntotoPayload takes. Since it's in - * the intoto format, this value is expected to be - * 'application/vnd.in-toto+json'. - * - * Generated from protobuf field string payload_type = 2; - * @param string $var - * @return $this - */ - public function setPayloadType($var) - { - GPBUtil::checkString($var, True); - $this->payload_type = $var; - - return $this; - } - - /** - * The signatures over the payload. - * - * Generated from protobuf field repeated .grafeas.v1.EnvelopeSignature signatures = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSignatures() - { - return $this->signatures; - } - - /** - * The signatures over the payload. - * - * Generated from protobuf field repeated .grafeas.v1.EnvelopeSignature signatures = 3; - * @param array<\Grafeas\V1\EnvelopeSignature>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSignatures($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\EnvelopeSignature::class); - $this->signatures = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SbomReferenceIntotoPayload.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SbomReferenceIntotoPayload.php deleted file mode 100644 index 929614e5e836..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SbomReferenceIntotoPayload.php +++ /dev/null @@ -1,190 +0,0 @@ -grafeas.v1.SbomReferenceIntotoPayload - */ -class SbomReferenceIntotoPayload extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier for the schema of the Statement. - * - * Generated from protobuf field string type = 1 [json_name = "_type"]; - */ - protected $type = ''; - /** - * URI identifying the type of the Predicate. - * - * Generated from protobuf field string predicate_type = 2; - */ - protected $predicate_type = ''; - /** - * Set of software artifacts that the attestation applies to. Each element - * represents a single software artifact. - * - * Generated from protobuf field repeated .grafeas.v1.Subject subject = 3; - */ - private $subject; - /** - * Additional parameters of the Predicate. Includes the actual data about the - * SBOM. - * - * Generated from protobuf field .grafeas.v1.SbomReferenceIntotoPredicate predicate = 4; - */ - protected $predicate = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * Identifier for the schema of the Statement. - * @type string $predicate_type - * URI identifying the type of the Predicate. - * @type array<\Grafeas\V1\Subject>|\Google\Protobuf\Internal\RepeatedField $subject - * Set of software artifacts that the attestation applies to. Each element - * represents a single software artifact. - * @type \Grafeas\V1\SbomReferenceIntotoPredicate $predicate - * Additional parameters of the Predicate. Includes the actual data about the - * SBOM. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Sbom::initOnce(); - parent::__construct($data); - } - - /** - * Identifier for the schema of the Statement. - * - * Generated from protobuf field string type = 1 [json_name = "_type"]; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Identifier for the schema of the Statement. - * - * Generated from protobuf field string type = 1 [json_name = "_type"]; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * URI identifying the type of the Predicate. - * - * Generated from protobuf field string predicate_type = 2; - * @return string - */ - public function getPredicateType() - { - return $this->predicate_type; - } - - /** - * URI identifying the type of the Predicate. - * - * Generated from protobuf field string predicate_type = 2; - * @param string $var - * @return $this - */ - public function setPredicateType($var) - { - GPBUtil::checkString($var, True); - $this->predicate_type = $var; - - return $this; - } - - /** - * Set of software artifacts that the attestation applies to. Each element - * represents a single software artifact. - * - * Generated from protobuf field repeated .grafeas.v1.Subject subject = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSubject() - { - return $this->subject; - } - - /** - * Set of software artifacts that the attestation applies to. Each element - * represents a single software artifact. - * - * Generated from protobuf field repeated .grafeas.v1.Subject subject = 3; - * @param array<\Grafeas\V1\Subject>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSubject($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Subject::class); - $this->subject = $arr; - - return $this; - } - - /** - * Additional parameters of the Predicate. Includes the actual data about the - * SBOM. - * - * Generated from protobuf field .grafeas.v1.SbomReferenceIntotoPredicate predicate = 4; - * @return \Grafeas\V1\SbomReferenceIntotoPredicate|null - */ - public function getPredicate() - { - return $this->predicate; - } - - public function hasPredicate() - { - return isset($this->predicate); - } - - public function clearPredicate() - { - unset($this->predicate); - } - - /** - * Additional parameters of the Predicate. Includes the actual data about the - * SBOM. - * - * Generated from protobuf field .grafeas.v1.SbomReferenceIntotoPredicate predicate = 4; - * @param \Grafeas\V1\SbomReferenceIntotoPredicate $var - * @return $this - */ - public function setPredicate($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SbomReferenceIntotoPredicate::class); - $this->predicate = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SbomReferenceIntotoPredicate.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SbomReferenceIntotoPredicate.php deleted file mode 100644 index 6a25f561f69e..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SbomReferenceIntotoPredicate.php +++ /dev/null @@ -1,169 +0,0 @@ -grafeas.v1.SbomReferenceIntotoPredicate - */ -class SbomReferenceIntotoPredicate extends \Google\Protobuf\Internal\Message -{ - /** - * The person or system referring this predicate to the consumer. - * - * Generated from protobuf field string referrer_id = 1; - */ - protected $referrer_id = ''; - /** - * The location of the SBOM. - * - * Generated from protobuf field string location = 2; - */ - protected $location = ''; - /** - * The mime type of the SBOM. - * - * Generated from protobuf field string mime_type = 3; - */ - protected $mime_type = ''; - /** - * A map of algorithm to digest of the contents of the SBOM. - * - * Generated from protobuf field map digest = 4; - */ - private $digest; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $referrer_id - * The person or system referring this predicate to the consumer. - * @type string $location - * The location of the SBOM. - * @type string $mime_type - * The mime type of the SBOM. - * @type array|\Google\Protobuf\Internal\MapField $digest - * A map of algorithm to digest of the contents of the SBOM. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Sbom::initOnce(); - parent::__construct($data); - } - - /** - * The person or system referring this predicate to the consumer. - * - * Generated from protobuf field string referrer_id = 1; - * @return string - */ - public function getReferrerId() - { - return $this->referrer_id; - } - - /** - * The person or system referring this predicate to the consumer. - * - * Generated from protobuf field string referrer_id = 1; - * @param string $var - * @return $this - */ - public function setReferrerId($var) - { - GPBUtil::checkString($var, True); - $this->referrer_id = $var; - - return $this; - } - - /** - * The location of the SBOM. - * - * Generated from protobuf field string location = 2; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * The location of the SBOM. - * - * Generated from protobuf field string location = 2; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * The mime type of the SBOM. - * - * Generated from protobuf field string mime_type = 3; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * The mime type of the SBOM. - * - * Generated from protobuf field string mime_type = 3; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * A map of algorithm to digest of the contents of the SBOM. - * - * Generated from protobuf field map digest = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getDigest() - { - return $this->digest; - } - - /** - * A map of algorithm to digest of the contents of the SBOM. - * - * Generated from protobuf field map digest = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setDigest($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->digest = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Severity.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Severity.php deleted file mode 100644 index 698112c5460e..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Severity.php +++ /dev/null @@ -1,82 +0,0 @@ -grafeas.v1.Severity - */ -class Severity -{ - /** - * Unknown. - * - * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; - */ - const SEVERITY_UNSPECIFIED = 0; - /** - * Minimal severity. - * - * Generated from protobuf enum MINIMAL = 1; - */ - const MINIMAL = 1; - /** - * Low severity. - * - * Generated from protobuf enum LOW = 2; - */ - const LOW = 2; - /** - * Medium severity. - * - * Generated from protobuf enum MEDIUM = 3; - */ - const MEDIUM = 3; - /** - * High severity. - * - * Generated from protobuf enum HIGH = 4; - */ - const HIGH = 4; - /** - * Critical severity. - * - * Generated from protobuf enum CRITICAL = 5; - */ - const CRITICAL = 5; - - private static $valueToName = [ - self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', - self::MINIMAL => 'MINIMAL', - self::LOW => 'LOW', - self::MEDIUM => 'MEDIUM', - self::HIGH => 'HIGH', - self::CRITICAL => 'CRITICAL', - ]; - - 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/Grafeas/v1/proto/src/Grafeas/V1/Signature.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Signature.php deleted file mode 100644 index de57d7bfe087..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Signature.php +++ /dev/null @@ -1,192 +0,0 @@ -grafeas.v1.Signature - */ -class Signature extends \Google\Protobuf\Internal\Message -{ - /** - * The content of the signature, an opaque bytestring. - * The payload that this signature verifies MUST be unambiguously provided - * with the Signature during verification. A wrapper message might provide - * the payload explicitly. Alternatively, a message might have a canonical - * serialization that can always be unambiguously computed to derive the - * payload. - * - * Generated from protobuf field bytes signature = 1; - */ - protected $signature = ''; - /** - * The identifier for the public key that verifies this signature. - * * The `public_key_id` is required. - * * The `public_key_id` SHOULD be an RFC3986 conformant URI. - * * When possible, the `public_key_id` SHOULD be an immutable reference, - * such as a cryptographic digest. - * Examples of valid `public_key_id`s: - * OpenPGP V4 public key fingerprint: - * * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" - * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more - * details on this scheme. - * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER - * serialization): - * * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" - * * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" - * - * Generated from protobuf field string public_key_id = 2; - */ - protected $public_key_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $signature - * The content of the signature, an opaque bytestring. - * The payload that this signature verifies MUST be unambiguously provided - * with the Signature during verification. A wrapper message might provide - * the payload explicitly. Alternatively, a message might have a canonical - * serialization that can always be unambiguously computed to derive the - * payload. - * @type string $public_key_id - * The identifier for the public key that verifies this signature. - * * The `public_key_id` is required. - * * The `public_key_id` SHOULD be an RFC3986 conformant URI. - * * When possible, the `public_key_id` SHOULD be an immutable reference, - * such as a cryptographic digest. - * Examples of valid `public_key_id`s: - * OpenPGP V4 public key fingerprint: - * * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" - * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more - * details on this scheme. - * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER - * serialization): - * * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" - * * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The content of the signature, an opaque bytestring. - * The payload that this signature verifies MUST be unambiguously provided - * with the Signature during verification. A wrapper message might provide - * the payload explicitly. Alternatively, a message might have a canonical - * serialization that can always be unambiguously computed to derive the - * payload. - * - * Generated from protobuf field bytes signature = 1; - * @return string - */ - public function getSignature() - { - return $this->signature; - } - - /** - * The content of the signature, an opaque bytestring. - * The payload that this signature verifies MUST be unambiguously provided - * with the Signature during verification. A wrapper message might provide - * the payload explicitly. Alternatively, a message might have a canonical - * serialization that can always be unambiguously computed to derive the - * payload. - * - * 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; - } - - /** - * The identifier for the public key that verifies this signature. - * * The `public_key_id` is required. - * * The `public_key_id` SHOULD be an RFC3986 conformant URI. - * * When possible, the `public_key_id` SHOULD be an immutable reference, - * such as a cryptographic digest. - * Examples of valid `public_key_id`s: - * OpenPGP V4 public key fingerprint: - * * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" - * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more - * details on this scheme. - * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER - * serialization): - * * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" - * * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" - * - * Generated from protobuf field string public_key_id = 2; - * @return string - */ - public function getPublicKeyId() - { - return $this->public_key_id; - } - - /** - * The identifier for the public key that verifies this signature. - * * The `public_key_id` is required. - * * The `public_key_id` SHOULD be an RFC3986 conformant URI. - * * When possible, the `public_key_id` SHOULD be an immutable reference, - * such as a cryptographic digest. - * Examples of valid `public_key_id`s: - * OpenPGP V4 public key fingerprint: - * * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" - * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more - * details on this scheme. - * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER - * serialization): - * * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" - * * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" - * - * Generated from protobuf field string public_key_id = 2; - * @param string $var - * @return $this - */ - public function setPublicKeyId($var) - { - GPBUtil::checkString($var, True); - $this->public_key_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance.php deleted file mode 100644 index 0113d091326d..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance.php +++ /dev/null @@ -1,214 +0,0 @@ -grafeas.v1.SlsaProvenance - */ -class SlsaProvenance extends \Google\Protobuf\Internal\Message -{ - /** - * required - * - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - */ - protected $builder = null; - /** - * Identifies the configuration used for the build. - * When combined with materials, this SHOULD fully describe the build, - * such that re-running this recipe results in bit-for-bit identical output - * (if the build is reproducible). - * - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - */ - protected $recipe = null; - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - */ - protected $metadata = null; - /** - * The collection of artifacts that influenced the build including sources, - * dependencies, build tools, base images, and so on. This is considered to be - * incomplete unless metadata.completeness.materials is true. Unset or null is - * equivalent to empty. - * - * Generated from protobuf field repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - private $materials; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\SlsaProvenance\SlsaBuilder $builder - * required - * @type \Grafeas\V1\SlsaProvenance\SlsaRecipe $recipe - * Identifies the configuration used for the build. - * When combined with materials, this SHOULD fully describe the build, - * such that re-running this recipe results in bit-for-bit identical output - * (if the build is reproducible). - * @type \Grafeas\V1\SlsaProvenance\SlsaMetadata $metadata - * @type array<\Grafeas\V1\SlsaProvenance\Material>|\Google\Protobuf\Internal\RepeatedField $materials - * The collection of artifacts that influenced the build including sources, - * dependencies, build tools, base images, and so on. This is considered to be - * incomplete unless metadata.completeness.materials is true. Unset or null is - * equivalent to empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenance::initOnce(); - parent::__construct($data); - } - - /** - * required - * - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - * @return \Grafeas\V1\SlsaProvenance\SlsaBuilder|null - */ - public function getBuilder() - { - return $this->builder; - } - - public function hasBuilder() - { - return isset($this->builder); - } - - public function clearBuilder() - { - unset($this->builder); - } - - /** - * required - * - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - * @param \Grafeas\V1\SlsaProvenance\SlsaBuilder $var - * @return $this - */ - public function setBuilder($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenance\SlsaBuilder::class); - $this->builder = $var; - - return $this; - } - - /** - * Identifies the configuration used for the build. - * When combined with materials, this SHOULD fully describe the build, - * such that re-running this recipe results in bit-for-bit identical output - * (if the build is reproducible). - * - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - * @return \Grafeas\V1\SlsaProvenance\SlsaRecipe|null - */ - public function getRecipe() - { - return $this->recipe; - } - - public function hasRecipe() - { - return isset($this->recipe); - } - - public function clearRecipe() - { - unset($this->recipe); - } - - /** - * Identifies the configuration used for the build. - * When combined with materials, this SHOULD fully describe the build, - * such that re-running this recipe results in bit-for-bit identical output - * (if the build is reproducible). - * - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - * @param \Grafeas\V1\SlsaProvenance\SlsaRecipe $var - * @return $this - */ - public function setRecipe($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenance\SlsaRecipe::class); - $this->recipe = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - * @return \Grafeas\V1\SlsaProvenance\SlsaMetadata|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - * @param \Grafeas\V1\SlsaProvenance\SlsaMetadata $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenance\SlsaMetadata::class); - $this->metadata = $var; - - return $this; - } - - /** - * The collection of artifacts that influenced the build including sources, - * dependencies, build tools, base images, and so on. This is considered to be - * incomplete unless metadata.completeness.materials is true. Unset or null is - * equivalent to empty. - * - * Generated from protobuf field repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMaterials() - { - return $this->materials; - } - - /** - * The collection of artifacts that influenced the build including sources, - * dependencies, build tools, base images, and so on. This is considered to be - * incomplete unless metadata.completeness.materials is true. Unset or null is - * equivalent to empty. - * - * Generated from protobuf field repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - * @param array<\Grafeas\V1\SlsaProvenance\Material>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMaterials($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\SlsaProvenance\Material::class); - $this->materials = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/Material.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/Material.php deleted file mode 100644 index d2165056a94b..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/Material.php +++ /dev/null @@ -1,88 +0,0 @@ -grafeas.v1.SlsaProvenance.Material - */ -class Material extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - /** - * Generated from protobuf field map digest = 2; - */ - private $digest; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * @type array|\Google\Protobuf\Internal\MapField $digest - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenance::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Generated from protobuf field string uri = 1; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Generated from protobuf field map digest = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getDigest() - { - return $this->digest; - } - - /** - * Generated from protobuf field map digest = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setDigest($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->digest = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Material::class, \Grafeas\V1\SlsaProvenance_Material::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaBuilder.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaBuilder.php deleted file mode 100644 index 455fa4993f05..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaBuilder.php +++ /dev/null @@ -1,61 +0,0 @@ -grafeas.v1.SlsaProvenance.SlsaBuilder - */ -class SlsaBuilder extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenance::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SlsaBuilder::class, \Grafeas\V1\SlsaProvenance_SlsaBuilder::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaCompleteness.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaCompleteness.php deleted file mode 100644 index 15d1ba478108..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaCompleteness.php +++ /dev/null @@ -1,151 +0,0 @@ -grafeas.v1.SlsaProvenance.SlsaCompleteness - */ -class SlsaCompleteness extends \Google\Protobuf\Internal\Message -{ - /** - * If true, the builder claims that recipe.arguments is complete, meaning - * that all external inputs are properly captured in the recipe. - * - * Generated from protobuf field bool arguments = 1; - */ - protected $arguments = false; - /** - * If true, the builder claims that recipe.environment is claimed to be - * complete. - * - * Generated from protobuf field bool environment = 2; - */ - protected $environment = false; - /** - * If true, the builder claims that materials are complete, usually through - * some controls to prevent network access. Sometimes called "hermetic". - * - * Generated from protobuf field bool materials = 3; - */ - protected $materials = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $arguments - * If true, the builder claims that recipe.arguments is complete, meaning - * that all external inputs are properly captured in the recipe. - * @type bool $environment - * If true, the builder claims that recipe.environment is claimed to be - * complete. - * @type bool $materials - * If true, the builder claims that materials are complete, usually through - * some controls to prevent network access. Sometimes called "hermetic". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenance::initOnce(); - parent::__construct($data); - } - - /** - * If true, the builder claims that recipe.arguments is complete, meaning - * that all external inputs are properly captured in the recipe. - * - * Generated from protobuf field bool arguments = 1; - * @return bool - */ - public function getArguments() - { - return $this->arguments; - } - - /** - * If true, the builder claims that recipe.arguments is complete, meaning - * that all external inputs are properly captured in the recipe. - * - * Generated from protobuf field bool arguments = 1; - * @param bool $var - * @return $this - */ - public function setArguments($var) - { - GPBUtil::checkBool($var); - $this->arguments = $var; - - return $this; - } - - /** - * If true, the builder claims that recipe.environment is claimed to be - * complete. - * - * Generated from protobuf field bool environment = 2; - * @return bool - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * If true, the builder claims that recipe.environment is claimed to be - * complete. - * - * Generated from protobuf field bool environment = 2; - * @param bool $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkBool($var); - $this->environment = $var; - - return $this; - } - - /** - * If true, the builder claims that materials are complete, usually through - * some controls to prevent network access. Sometimes called "hermetic". - * - * Generated from protobuf field bool materials = 3; - * @return bool - */ - public function getMaterials() - { - return $this->materials; - } - - /** - * If true, the builder claims that materials are complete, usually through - * some controls to prevent network access. Sometimes called "hermetic". - * - * Generated from protobuf field bool materials = 3; - * @param bool $var - * @return $this - */ - public function setMaterials($var) - { - GPBUtil::checkBool($var); - $this->materials = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SlsaCompleteness::class, \Grafeas\V1\SlsaProvenance_SlsaCompleteness::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaMetadata.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaMetadata.php deleted file mode 100644 index 05447be11b5c..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaMetadata.php +++ /dev/null @@ -1,252 +0,0 @@ -grafeas.v1.SlsaProvenance.SlsaMetadata - */ -class SlsaMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Identifies the particular build invocation, which can be useful for - * finding associated logs or other ad-hoc analysis. The value SHOULD be - * globally unique, per in-toto Provenance spec. - * - * Generated from protobuf field string build_invocation_id = 1; - */ - protected $build_invocation_id = ''; - /** - * The timestamp of when the build started. - * - * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; - */ - protected $build_started_on = null; - /** - * The timestamp of when the build completed. - * - * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; - */ - protected $build_finished_on = null; - /** - * Indicates that the builder claims certain fields in this message to be - * complete. - * - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - */ - protected $completeness = null; - /** - * If true, the builder claims that running the recipe on materials will - * produce bit-for-bit identical output. - * - * Generated from protobuf field bool reproducible = 5; - */ - protected $reproducible = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $build_invocation_id - * Identifies the particular build invocation, which can be useful for - * finding associated logs or other ad-hoc analysis. The value SHOULD be - * globally unique, per in-toto Provenance spec. - * @type \Google\Protobuf\Timestamp $build_started_on - * The timestamp of when the build started. - * @type \Google\Protobuf\Timestamp $build_finished_on - * The timestamp of when the build completed. - * @type \Grafeas\V1\SlsaProvenance\SlsaCompleteness $completeness - * Indicates that the builder claims certain fields in this message to be - * complete. - * @type bool $reproducible - * If true, the builder claims that running the recipe on materials will - * produce bit-for-bit identical output. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenance::initOnce(); - parent::__construct($data); - } - - /** - * Identifies the particular build invocation, which can be useful for - * finding associated logs or other ad-hoc analysis. The value SHOULD be - * globally unique, per in-toto Provenance spec. - * - * Generated from protobuf field string build_invocation_id = 1; - * @return string - */ - public function getBuildInvocationId() - { - return $this->build_invocation_id; - } - - /** - * Identifies the particular build invocation, which can be useful for - * finding associated logs or other ad-hoc analysis. The value SHOULD be - * globally unique, per in-toto Provenance spec. - * - * Generated from protobuf field string build_invocation_id = 1; - * @param string $var - * @return $this - */ - public function setBuildInvocationId($var) - { - GPBUtil::checkString($var, True); - $this->build_invocation_id = $var; - - return $this; - } - - /** - * The timestamp of when the build started. - * - * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getBuildStartedOn() - { - return $this->build_started_on; - } - - public function hasBuildStartedOn() - { - return isset($this->build_started_on); - } - - public function clearBuildStartedOn() - { - unset($this->build_started_on); - } - - /** - * The timestamp of when the build started. - * - * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setBuildStartedOn($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->build_started_on = $var; - - return $this; - } - - /** - * The timestamp of when the build completed. - * - * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getBuildFinishedOn() - { - return $this->build_finished_on; - } - - public function hasBuildFinishedOn() - { - return isset($this->build_finished_on); - } - - public function clearBuildFinishedOn() - { - unset($this->build_finished_on); - } - - /** - * The timestamp of when the build completed. - * - * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setBuildFinishedOn($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->build_finished_on = $var; - - return $this; - } - - /** - * Indicates that the builder claims certain fields in this message to be - * complete. - * - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - * @return \Grafeas\V1\SlsaProvenance\SlsaCompleteness|null - */ - public function getCompleteness() - { - return $this->completeness; - } - - public function hasCompleteness() - { - return isset($this->completeness); - } - - public function clearCompleteness() - { - unset($this->completeness); - } - - /** - * Indicates that the builder claims certain fields in this message to be - * complete. - * - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - * @param \Grafeas\V1\SlsaProvenance\SlsaCompleteness $var - * @return $this - */ - public function setCompleteness($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenance\SlsaCompleteness::class); - $this->completeness = $var; - - return $this; - } - - /** - * If true, the builder claims that running the recipe on materials will - * produce bit-for-bit identical output. - * - * Generated from protobuf field bool reproducible = 5; - * @return bool - */ - public function getReproducible() - { - return $this->reproducible; - } - - /** - * If true, the builder claims that running the recipe on materials will - * produce bit-for-bit identical output. - * - * Generated from protobuf field bool reproducible = 5; - * @param bool $var - * @return $this - */ - public function setReproducible($var) - { - GPBUtil::checkBool($var); - $this->reproducible = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SlsaMetadata::class, \Grafeas\V1\SlsaProvenance_SlsaMetadata::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaRecipe.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaRecipe.php deleted file mode 100644 index a448a91e95fb..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaRecipe.php +++ /dev/null @@ -1,296 +0,0 @@ -grafeas.v1.SlsaProvenance.SlsaRecipe - */ -class SlsaRecipe extends \Google\Protobuf\Internal\Message -{ - /** - * URI indicating what type of recipe was performed. It determines the - * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and - * materials. - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - /** - * Index in materials containing the recipe steps that are not implied by - * recipe.type. For example, if the recipe type were "make", then this would - * point to the source containing the Makefile, not the make program itself. - * Set to -1 if the recipe doesn't come from a material, as zero is default - * unset value for int64. - * - * Generated from protobuf field int64 defined_in_material = 2; - */ - protected $defined_in_material = 0; - /** - * String identifying the entry point into the build. - * This is often a path to a configuration file and/or a target label within - * that file. The syntax and meaning are defined by recipe.type. For - * example, if the recipe type were "make", then this would reference the - * directory in which to run make as well as which target to use. - * - * Generated from protobuf field string entry_point = 3; - */ - protected $entry_point = ''; - /** - * Collection of all external inputs that influenced the build on top of - * recipe.definedInMaterial and recipe.entryPoint. For example, if the - * recipe type were "make", then this might be the flags passed to make - * aside from the target, which is captured in recipe.entryPoint. Depending - * on the recipe Type, the structure may be different. - * - * Generated from protobuf field .google.protobuf.Any arguments = 4; - */ - protected $arguments = null; - /** - * Any other builder-controlled inputs necessary for correctly evaluating - * the recipe. Usually only needed for reproducing the build but not - * evaluated as part of policy. Depending on the recipe Type, the structure - * may be different. - * - * Generated from protobuf field .google.protobuf.Any environment = 5; - */ - protected $environment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * URI indicating what type of recipe was performed. It determines the - * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and - * materials. - * @type int|string $defined_in_material - * Index in materials containing the recipe steps that are not implied by - * recipe.type. For example, if the recipe type were "make", then this would - * point to the source containing the Makefile, not the make program itself. - * Set to -1 if the recipe doesn't come from a material, as zero is default - * unset value for int64. - * @type string $entry_point - * String identifying the entry point into the build. - * This is often a path to a configuration file and/or a target label within - * that file. The syntax and meaning are defined by recipe.type. For - * example, if the recipe type were "make", then this would reference the - * directory in which to run make as well as which target to use. - * @type \Google\Protobuf\Any $arguments - * Collection of all external inputs that influenced the build on top of - * recipe.definedInMaterial and recipe.entryPoint. For example, if the - * recipe type were "make", then this might be the flags passed to make - * aside from the target, which is captured in recipe.entryPoint. Depending - * on the recipe Type, the structure may be different. - * @type \Google\Protobuf\Any $environment - * Any other builder-controlled inputs necessary for correctly evaluating - * the recipe. Usually only needed for reproducing the build but not - * evaluated as part of policy. Depending on the recipe Type, the structure - * may be different. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenance::initOnce(); - parent::__construct($data); - } - - /** - * URI indicating what type of recipe was performed. It determines the - * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and - * materials. - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * URI indicating what type of recipe was performed. It determines the - * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and - * materials. - * - * Generated from protobuf field string type = 1; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Index in materials containing the recipe steps that are not implied by - * recipe.type. For example, if the recipe type were "make", then this would - * point to the source containing the Makefile, not the make program itself. - * Set to -1 if the recipe doesn't come from a material, as zero is default - * unset value for int64. - * - * Generated from protobuf field int64 defined_in_material = 2; - * @return int|string - */ - public function getDefinedInMaterial() - { - return $this->defined_in_material; - } - - /** - * Index in materials containing the recipe steps that are not implied by - * recipe.type. For example, if the recipe type were "make", then this would - * point to the source containing the Makefile, not the make program itself. - * Set to -1 if the recipe doesn't come from a material, as zero is default - * unset value for int64. - * - * Generated from protobuf field int64 defined_in_material = 2; - * @param int|string $var - * @return $this - */ - public function setDefinedInMaterial($var) - { - GPBUtil::checkInt64($var); - $this->defined_in_material = $var; - - return $this; - } - - /** - * String identifying the entry point into the build. - * This is often a path to a configuration file and/or a target label within - * that file. The syntax and meaning are defined by recipe.type. For - * example, if the recipe type were "make", then this would reference the - * directory in which to run make as well as which target to use. - * - * Generated from protobuf field string entry_point = 3; - * @return string - */ - public function getEntryPoint() - { - return $this->entry_point; - } - - /** - * String identifying the entry point into the build. - * This is often a path to a configuration file and/or a target label within - * that file. The syntax and meaning are defined by recipe.type. For - * example, if the recipe type were "make", then this would reference the - * directory in which to run make as well as which target to use. - * - * Generated from protobuf field string entry_point = 3; - * @param string $var - * @return $this - */ - public function setEntryPoint($var) - { - GPBUtil::checkString($var, True); - $this->entry_point = $var; - - return $this; - } - - /** - * Collection of all external inputs that influenced the build on top of - * recipe.definedInMaterial and recipe.entryPoint. For example, if the - * recipe type were "make", then this might be the flags passed to make - * aside from the target, which is captured in recipe.entryPoint. Depending - * on the recipe Type, the structure may be different. - * - * Generated from protobuf field .google.protobuf.Any arguments = 4; - * @return \Google\Protobuf\Any|null - */ - public function getArguments() - { - return $this->arguments; - } - - public function hasArguments() - { - return isset($this->arguments); - } - - public function clearArguments() - { - unset($this->arguments); - } - - /** - * Collection of all external inputs that influenced the build on top of - * recipe.definedInMaterial and recipe.entryPoint. For example, if the - * recipe type were "make", then this might be the flags passed to make - * aside from the target, which is captured in recipe.entryPoint. Depending - * on the recipe Type, the structure may be different. - * - * Generated from protobuf field .google.protobuf.Any arguments = 4; - * @param \Google\Protobuf\Any $var - * @return $this - */ - public function setArguments($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); - $this->arguments = $var; - - return $this; - } - - /** - * Any other builder-controlled inputs necessary for correctly evaluating - * the recipe. Usually only needed for reproducing the build but not - * evaluated as part of policy. Depending on the recipe Type, the structure - * may be different. - * - * Generated from protobuf field .google.protobuf.Any environment = 5; - * @return \Google\Protobuf\Any|null - */ - public function getEnvironment() - { - return $this->environment; - } - - public function hasEnvironment() - { - return isset($this->environment); - } - - public function clearEnvironment() - { - unset($this->environment); - } - - /** - * Any other builder-controlled inputs necessary for correctly evaluating - * the recipe. Usually only needed for reproducing the build but not - * evaluated as part of policy. Depending on the recipe Type, the structure - * may be different. - * - * Generated from protobuf field .google.protobuf.Any environment = 5; - * @param \Google\Protobuf\Any $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); - $this->environment = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SlsaRecipe::class, \Grafeas\V1\SlsaProvenance_SlsaRecipe::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo.php deleted file mode 100644 index c066b7a6521b..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo.php +++ /dev/null @@ -1,235 +0,0 @@ -grafeas.v1.SlsaProvenanceZeroTwo - */ -class SlsaProvenanceZeroTwo extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - */ - protected $builder = null; - /** - * Generated from protobuf field string build_type = 2; - */ - protected $build_type = ''; - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - */ - protected $invocation = null; - /** - * Generated from protobuf field .google.protobuf.Struct build_config = 4; - */ - protected $build_config = null; - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - */ - protected $metadata = null; - /** - * Generated from protobuf field repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - private $materials; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaBuilder $builder - * @type string $build_type - * @type \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaInvocation $invocation - * @type \Google\Protobuf\Struct $build_config - * @type \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMetadata $metadata - * @type array<\Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMaterial>|\Google\Protobuf\Internal\RepeatedField $materials - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenanceZeroTwo::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - * @return \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaBuilder|null - */ - public function getBuilder() - { - return $this->builder; - } - - public function hasBuilder() - { - return isset($this->builder); - } - - public function clearBuilder() - { - unset($this->builder); - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - * @param \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaBuilder $var - * @return $this - */ - public function setBuilder($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaBuilder::class); - $this->builder = $var; - - return $this; - } - - /** - * Generated from protobuf field string build_type = 2; - * @return string - */ - public function getBuildType() - { - return $this->build_type; - } - - /** - * Generated from protobuf field string build_type = 2; - * @param string $var - * @return $this - */ - public function setBuildType($var) - { - GPBUtil::checkString($var, True); - $this->build_type = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - * @return \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaInvocation|null - */ - public function getInvocation() - { - return $this->invocation; - } - - public function hasInvocation() - { - return isset($this->invocation); - } - - public function clearInvocation() - { - unset($this->invocation); - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - * @param \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaInvocation $var - * @return $this - */ - public function setInvocation($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaInvocation::class); - $this->invocation = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.protobuf.Struct build_config = 4; - * @return \Google\Protobuf\Struct|null - */ - public function getBuildConfig() - { - return $this->build_config; - } - - public function hasBuildConfig() - { - return isset($this->build_config); - } - - public function clearBuildConfig() - { - unset($this->build_config); - } - - /** - * Generated from protobuf field .google.protobuf.Struct build_config = 4; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setBuildConfig($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->build_config = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - * @return \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMetadata|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - * @param \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMetadata $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMetadata::class); - $this->metadata = $var; - - return $this; - } - - /** - * Generated from protobuf field repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMaterials() - { - return $this->materials; - } - - /** - * Generated from protobuf field repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - * @param array<\Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMaterial>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMaterials($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMaterial::class); - $this->materials = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaBuilder.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaBuilder.php deleted file mode 100644 index 8029c7d4c110..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaBuilder.php +++ /dev/null @@ -1,64 +0,0 @@ -grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder - */ -class SlsaBuilder extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenanceZeroTwo::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SlsaBuilder::class, \Grafeas\V1\SlsaProvenanceZeroTwo_SlsaBuilder::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaCompleteness.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaCompleteness.php deleted file mode 100644 index dcb6e0a819c6..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaCompleteness.php +++ /dev/null @@ -1,118 +0,0 @@ -grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness - */ -class SlsaCompleteness extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field bool parameters = 1; - */ - protected $parameters = false; - /** - * Generated from protobuf field bool environment = 2; - */ - protected $environment = false; - /** - * Generated from protobuf field bool materials = 3; - */ - protected $materials = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $parameters - * @type bool $environment - * @type bool $materials - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenanceZeroTwo::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field bool parameters = 1; - * @return bool - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * Generated from protobuf field bool parameters = 1; - * @param bool $var - * @return $this - */ - public function setParameters($var) - { - GPBUtil::checkBool($var); - $this->parameters = $var; - - return $this; - } - - /** - * Generated from protobuf field bool environment = 2; - * @return bool - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * Generated from protobuf field bool environment = 2; - * @param bool $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkBool($var); - $this->environment = $var; - - return $this; - } - - /** - * Generated from protobuf field bool materials = 3; - * @return bool - */ - public function getMaterials() - { - return $this->materials; - } - - /** - * Generated from protobuf field bool materials = 3; - * @param bool $var - * @return $this - */ - public function setMaterials($var) - { - GPBUtil::checkBool($var); - $this->materials = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SlsaCompleteness::class, \Grafeas\V1\SlsaProvenanceZeroTwo_SlsaCompleteness::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaConfigSource.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaConfigSource.php deleted file mode 100644 index 236b9d685397..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaConfigSource.php +++ /dev/null @@ -1,118 +0,0 @@ -grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource - */ -class SlsaConfigSource extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - /** - * Generated from protobuf field map digest = 2; - */ - private $digest; - /** - * Generated from protobuf field string entry_point = 3; - */ - protected $entry_point = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * @type array|\Google\Protobuf\Internal\MapField $digest - * @type string $entry_point - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenanceZeroTwo::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Generated from protobuf field string uri = 1; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Generated from protobuf field map digest = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getDigest() - { - return $this->digest; - } - - /** - * Generated from protobuf field map digest = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setDigest($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->digest = $arr; - - return $this; - } - - /** - * Generated from protobuf field string entry_point = 3; - * @return string - */ - public function getEntryPoint() - { - return $this->entry_point; - } - - /** - * Generated from protobuf field string entry_point = 3; - * @param string $var - * @return $this - */ - public function setEntryPoint($var) - { - GPBUtil::checkString($var, True); - $this->entry_point = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SlsaConfigSource::class, \Grafeas\V1\SlsaProvenanceZeroTwo_SlsaConfigSource::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaInvocation.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaInvocation.php deleted file mode 100644 index 14076ccc4655..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaInvocation.php +++ /dev/null @@ -1,147 +0,0 @@ -grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation - */ -class SlsaInvocation extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - */ - protected $config_source = null; - /** - * Generated from protobuf field .google.protobuf.Struct parameters = 2; - */ - protected $parameters = null; - /** - * Generated from protobuf field .google.protobuf.Struct environment = 3; - */ - protected $environment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaConfigSource $config_source - * @type \Google\Protobuf\Struct $parameters - * @type \Google\Protobuf\Struct $environment - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenanceZeroTwo::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - * @return \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaConfigSource|null - */ - public function getConfigSource() - { - return $this->config_source; - } - - public function hasConfigSource() - { - return isset($this->config_source); - } - - public function clearConfigSource() - { - unset($this->config_source); - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - * @param \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaConfigSource $var - * @return $this - */ - public function setConfigSource($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaConfigSource::class); - $this->config_source = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.protobuf.Struct parameters = 2; - * @return \Google\Protobuf\Struct|null - */ - public function getParameters() - { - return $this->parameters; - } - - public function hasParameters() - { - return isset($this->parameters); - } - - public function clearParameters() - { - unset($this->parameters); - } - - /** - * Generated from protobuf field .google.protobuf.Struct parameters = 2; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setParameters($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->parameters = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.protobuf.Struct environment = 3; - * @return \Google\Protobuf\Struct|null - */ - public function getEnvironment() - { - return $this->environment; - } - - public function hasEnvironment() - { - return isset($this->environment); - } - - public function clearEnvironment() - { - unset($this->environment); - } - - /** - * Generated from protobuf field .google.protobuf.Struct environment = 3; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->environment = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SlsaInvocation::class, \Grafeas\V1\SlsaProvenanceZeroTwo_SlsaInvocation::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaMaterial.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaMaterial.php deleted file mode 100644 index e25c459a24c4..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaMaterial.php +++ /dev/null @@ -1,91 +0,0 @@ -grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial - */ -class SlsaMaterial extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - /** - * Generated from protobuf field map digest = 2; - */ - private $digest; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * @type array|\Google\Protobuf\Internal\MapField $digest - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenanceZeroTwo::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Generated from protobuf field string uri = 1; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Generated from protobuf field map digest = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getDigest() - { - return $this->digest; - } - - /** - * Generated from protobuf field map digest = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setDigest($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->digest = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SlsaMaterial::class, \Grafeas\V1\SlsaProvenanceZeroTwo_SlsaMaterial::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaMetadata.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaMetadata.php deleted file mode 100644 index 611a1e272054..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaMetadata.php +++ /dev/null @@ -1,201 +0,0 @@ -grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata - */ -class SlsaMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string build_invocation_id = 1; - */ - protected $build_invocation_id = ''; - /** - * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; - */ - protected $build_started_on = null; - /** - * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; - */ - protected $build_finished_on = null; - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - */ - protected $completeness = null; - /** - * Generated from protobuf field bool reproducible = 5; - */ - protected $reproducible = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $build_invocation_id - * @type \Google\Protobuf\Timestamp $build_started_on - * @type \Google\Protobuf\Timestamp $build_finished_on - * @type \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaCompleteness $completeness - * @type bool $reproducible - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenanceZeroTwo::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string build_invocation_id = 1; - * @return string - */ - public function getBuildInvocationId() - { - return $this->build_invocation_id; - } - - /** - * Generated from protobuf field string build_invocation_id = 1; - * @param string $var - * @return $this - */ - public function setBuildInvocationId($var) - { - GPBUtil::checkString($var, True); - $this->build_invocation_id = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getBuildStartedOn() - { - return $this->build_started_on; - } - - public function hasBuildStartedOn() - { - return isset($this->build_started_on); - } - - public function clearBuildStartedOn() - { - unset($this->build_started_on); - } - - /** - * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setBuildStartedOn($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->build_started_on = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getBuildFinishedOn() - { - return $this->build_finished_on; - } - - public function hasBuildFinishedOn() - { - return isset($this->build_finished_on); - } - - public function clearBuildFinishedOn() - { - unset($this->build_finished_on); - } - - /** - * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setBuildFinishedOn($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->build_finished_on = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - * @return \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaCompleteness|null - */ - public function getCompleteness() - { - return $this->completeness; - } - - public function hasCompleteness() - { - return isset($this->completeness); - } - - public function clearCompleteness() - { - unset($this->completeness); - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - * @param \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaCompleteness $var - * @return $this - */ - public function setCompleteness($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaCompleteness::class); - $this->completeness = $var; - - return $this; - } - - /** - * Generated from protobuf field bool reproducible = 5; - * @return bool - */ - public function getReproducible() - { - return $this->reproducible; - } - - /** - * Generated from protobuf field bool reproducible = 5; - * @param bool $var - * @return $this - */ - public function setReproducible($var) - { - GPBUtil::checkBool($var); - $this->reproducible = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SlsaMetadata::class, \Grafeas\V1\SlsaProvenanceZeroTwo_SlsaMetadata::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Source.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Source.php deleted file mode 100644 index 6006031e2e69..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Source.php +++ /dev/null @@ -1,215 +0,0 @@ -grafeas.v1.Source - */ -class Source extends \Google\Protobuf\Internal\Message -{ - /** - * If provided, the input binary artifacts for the build came from this - * location. - * - * Generated from protobuf field string artifact_storage_source_uri = 1; - */ - protected $artifact_storage_source_uri = ''; - /** - * Hash(es) of the build source, which can be used to verify that the original - * source integrity was maintained in the build. - * The keys to this map are file paths used as build source and the values - * contain the hash values for those files. - * If the build source came in a single package such as a gzipped tarfile - * (.tar.gz), the FileHash will be for the single path to that file. - * - * Generated from protobuf field map file_hashes = 2; - */ - private $file_hashes; - /** - * If provided, the source code used for the build came from this location. - * - * Generated from protobuf field .grafeas.v1.SourceContext context = 3; - */ - protected $context = null; - /** - * If provided, some of the source code used for the build may be found in - * these locations, in the case where the source repository had multiple - * remotes or submodules. This list will not include the context specified in - * the context field. - * - * Generated from protobuf field repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - private $additional_contexts; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $artifact_storage_source_uri - * If provided, the input binary artifacts for the build came from this - * location. - * @type array|\Google\Protobuf\Internal\MapField $file_hashes - * Hash(es) of the build source, which can be used to verify that the original - * source integrity was maintained in the build. - * The keys to this map are file paths used as build source and the values - * contain the hash values for those files. - * If the build source came in a single package such as a gzipped tarfile - * (.tar.gz), the FileHash will be for the single path to that file. - * @type \Grafeas\V1\SourceContext $context - * If provided, the source code used for the build came from this location. - * @type array<\Grafeas\V1\SourceContext>|\Google\Protobuf\Internal\RepeatedField $additional_contexts - * If provided, some of the source code used for the build may be found in - * these locations, in the case where the source repository had multiple - * remotes or submodules. This list will not include the context specified in - * the context field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * If provided, the input binary artifacts for the build came from this - * location. - * - * Generated from protobuf field string artifact_storage_source_uri = 1; - * @return string - */ - public function getArtifactStorageSourceUri() - { - return $this->artifact_storage_source_uri; - } - - /** - * If provided, the input binary artifacts for the build came from this - * location. - * - * Generated from protobuf field string artifact_storage_source_uri = 1; - * @param string $var - * @return $this - */ - public function setArtifactStorageSourceUri($var) - { - GPBUtil::checkString($var, True); - $this->artifact_storage_source_uri = $var; - - return $this; - } - - /** - * Hash(es) of the build source, which can be used to verify that the original - * source integrity was maintained in the build. - * The keys to this map are file paths used as build source and the values - * contain the hash values for those files. - * If the build source came in a single package such as a gzipped tarfile - * (.tar.gz), the FileHash will be for the single path to that file. - * - * Generated from protobuf field map file_hashes = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getFileHashes() - { - return $this->file_hashes; - } - - /** - * Hash(es) of the build source, which can be used to verify that the original - * source integrity was maintained in the build. - * The keys to this map are file paths used as build source and the values - * contain the hash values for those files. - * If the build source came in a single package such as a gzipped tarfile - * (.tar.gz), the FileHash will be for the single path to that file. - * - * Generated from protobuf field map file_hashes = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setFileHashes($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\FileHashes::class); - $this->file_hashes = $arr; - - return $this; - } - - /** - * If provided, the source code used for the build came from this location. - * - * Generated from protobuf field .grafeas.v1.SourceContext context = 3; - * @return \Grafeas\V1\SourceContext|null - */ - public function getContext() - { - return $this->context; - } - - public function hasContext() - { - return isset($this->context); - } - - public function clearContext() - { - unset($this->context); - } - - /** - * If provided, the source code used for the build came from this location. - * - * Generated from protobuf field .grafeas.v1.SourceContext context = 3; - * @param \Grafeas\V1\SourceContext $var - * @return $this - */ - public function setContext($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SourceContext::class); - $this->context = $var; - - return $this; - } - - /** - * If provided, some of the source code used for the build may be found in - * these locations, in the case where the source repository had multiple - * remotes or submodules. This list will not include the context specified in - * the context field. - * - * Generated from protobuf field repeated .grafeas.v1.SourceContext additional_contexts = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdditionalContexts() - { - return $this->additional_contexts; - } - - /** - * If provided, some of the source code used for the build may be found in - * these locations, in the case where the source repository had multiple - * remotes or submodules. This list will not include the context specified in - * the context field. - * - * Generated from protobuf field repeated .grafeas.v1.SourceContext additional_contexts = 4; - * @param array<\Grafeas\V1\SourceContext>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdditionalContexts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\SourceContext::class); - $this->additional_contexts = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SourceContext.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SourceContext.php deleted file mode 100644 index fced17b0d002..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SourceContext.php +++ /dev/null @@ -1,176 +0,0 @@ -grafeas.v1.SourceContext - */ -class SourceContext extends \Google\Protobuf\Internal\Message -{ - /** - * Labels with user defined metadata. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - protected $context; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\CloudRepoSourceContext $cloud_repo - * A SourceContext referring to a revision in a Google Cloud Source Repo. - * @type \Grafeas\V1\GerritSourceContext $gerrit - * A SourceContext referring to a Gerrit project. - * @type \Grafeas\V1\GitSourceContext $git - * A SourceContext referring to any third party Git repo (e.g., GitHub). - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels with user defined metadata. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * A SourceContext referring to a revision in a Google Cloud Source Repo. - * - * Generated from protobuf field .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - * @return \Grafeas\V1\CloudRepoSourceContext|null - */ - public function getCloudRepo() - { - return $this->readOneof(1); - } - - public function hasCloudRepo() - { - return $this->hasOneof(1); - } - - /** - * A SourceContext referring to a revision in a Google Cloud Source Repo. - * - * Generated from protobuf field .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - * @param \Grafeas\V1\CloudRepoSourceContext $var - * @return $this - */ - public function setCloudRepo($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\CloudRepoSourceContext::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A SourceContext referring to a Gerrit project. - * - * Generated from protobuf field .grafeas.v1.GerritSourceContext gerrit = 2; - * @return \Grafeas\V1\GerritSourceContext|null - */ - public function getGerrit() - { - return $this->readOneof(2); - } - - public function hasGerrit() - { - return $this->hasOneof(2); - } - - /** - * A SourceContext referring to a Gerrit project. - * - * Generated from protobuf field .grafeas.v1.GerritSourceContext gerrit = 2; - * @param \Grafeas\V1\GerritSourceContext $var - * @return $this - */ - public function setGerrit($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\GerritSourceContext::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A SourceContext referring to any third party Git repo (e.g., GitHub). - * - * Generated from protobuf field .grafeas.v1.GitSourceContext git = 3; - * @return \Grafeas\V1\GitSourceContext|null - */ - public function getGit() - { - return $this->readOneof(3); - } - - public function hasGit() - { - return $this->hasOneof(3); - } - - /** - * A SourceContext referring to any third party Git repo (e.g., GitHub). - * - * Generated from protobuf field .grafeas.v1.GitSourceContext git = 3; - * @param \Grafeas\V1\GitSourceContext $var - * @return $this - */ - public function setGit($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\GitSourceContext::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Labels with user defined metadata. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels with user defined metadata. - * - * Generated from protobuf field map labels = 4; - * @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; - } - - /** - * @return string - */ - public function getContext() - { - return $this->whichOneof("context"); - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Subject.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Subject.php deleted file mode 100644 index 14d4fa6fe2e7..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Subject.php +++ /dev/null @@ -1,104 +0,0 @@ -grafeas.v1.Subject - */ -class Subject extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * `"": ""` - * Algorithms can be e.g. sha256, sha512 - * See - * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet - * - * Generated from protobuf field map digest = 2; - */ - private $digest; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * @type array|\Google\Protobuf\Internal\MapField $digest - * `"": ""` - * Algorithms can be e.g. sha256, sha512 - * See - * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\IntotoStatement::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * 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; - } - - /** - * `"": ""` - * Algorithms can be e.g. sha256, sha512 - * See - * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet - * - * Generated from protobuf field map digest = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getDigest() - { - return $this->digest; - } - - /** - * `"": ""` - * Algorithms can be e.g. sha256, sha512 - * See - * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet - * - * Generated from protobuf field map digest = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setDigest($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->digest = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpdateNoteRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpdateNoteRequest.php deleted file mode 100644 index e12623cfcdf4..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpdateNoteRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -grafeas.v1.UpdateNoteRequest - */ -class UpdateNoteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The updated note. - * - * Generated from protobuf field .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $note = null; - /** - * The fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - */ - protected $update_mask = null; - - /** - * @param string $name The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. Please see - * {@see GrafeasClient::noteName()} for help formatting this field. - * @param \Grafeas\V1\Note $note The updated note. - * @param \Google\Protobuf\FieldMask $updateMask The fields to update. - * - * @return \Grafeas\V1\UpdateNoteRequest - * - * @experimental - */ - public static function build(string $name, \Grafeas\V1\Note $note, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setName($name) - ->setNote($note) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @type \Grafeas\V1\Note $note - * The updated note. - * @type \Google\Protobuf\FieldMask $update_mask - * The fields to update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_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; - } - - /** - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_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; - } - - /** - * The updated note. - * - * Generated from protobuf field .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Grafeas\V1\Note|null - */ - public function getNote() - { - return $this->note; - } - - public function hasNote() - { - return isset($this->note); - } - - public function clearNote() - { - unset($this->note); - } - - /** - * The updated note. - * - * Generated from protobuf field .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Grafeas\V1\Note $var - * @return $this - */ - public function setNote($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Note::class); - $this->note = $var; - - return $this; - } - - /** - * The fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - * @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); - } - - /** - * The fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - * @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/Grafeas/v1/proto/src/Grafeas/V1/UpdateOccurrenceRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpdateOccurrenceRequest.php deleted file mode 100644 index 0d87112304a1..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpdateOccurrenceRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -grafeas.v1.UpdateOccurrenceRequest - */ -class UpdateOccurrenceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The updated occurrence. - * - * Generated from protobuf field .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $occurrence = null; - /** - * The fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - */ - protected $update_mask = null; - - /** - * @param string $name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. Please see - * {@see GrafeasClient::occurrenceName()} for help formatting this field. - * @param \Grafeas\V1\Occurrence $occurrence The updated occurrence. - * @param \Google\Protobuf\FieldMask $updateMask The fields to update. - * - * @return \Grafeas\V1\UpdateOccurrenceRequest - * - * @experimental - */ - public static function build(string $name, \Grafeas\V1\Occurrence $occurrence, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setName($name) - ->setOccurrence($occurrence) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * @type \Grafeas\V1\Occurrence $occurrence - * The updated occurrence. - * @type \Google\Protobuf\FieldMask $update_mask - * The fields to update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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; - } - - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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; - } - - /** - * The updated occurrence. - * - * Generated from protobuf field .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Grafeas\V1\Occurrence|null - */ - public function getOccurrence() - { - return $this->occurrence; - } - - public function hasOccurrence() - { - return isset($this->occurrence); - } - - public function clearOccurrence() - { - unset($this->occurrence); - } - - /** - * The updated occurrence. - * - * Generated from protobuf field .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Grafeas\V1\Occurrence $var - * @return $this - */ - public function setOccurrence($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Occurrence::class); - $this->occurrence = $var; - - return $this; - } - - /** - * The fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - * @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); - } - - /** - * The fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - * @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/Grafeas/v1/proto/src/Grafeas/V1/UpgradeDistribution.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeDistribution.php deleted file mode 100644 index b5b16a112b02..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeDistribution.php +++ /dev/null @@ -1,187 +0,0 @@ -grafeas.v1.UpgradeDistribution - */ -class UpgradeDistribution extends \Google\Protobuf\Internal\Message -{ - /** - * Required - The specific operating system this metadata applies to. See - * https://cpe.mitre.org/specification/. - * - * Generated from protobuf field string cpe_uri = 1; - */ - protected $cpe_uri = ''; - /** - * The operating system classification of this Upgrade, as specified by the - * upstream operating system upgrade feed. For Windows the classification is - * one of the category_ids listed at - * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85) - * - * Generated from protobuf field string classification = 2; - */ - protected $classification = ''; - /** - * The severity as specified by the upstream operating system. - * - * Generated from protobuf field string severity = 3; - */ - protected $severity = ''; - /** - * The cve tied to this Upgrade. - * - * Generated from protobuf field repeated string cve = 4; - */ - private $cve; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cpe_uri - * Required - The specific operating system this metadata applies to. See - * https://cpe.mitre.org/specification/. - * @type string $classification - * The operating system classification of this Upgrade, as specified by the - * upstream operating system upgrade feed. For Windows the classification is - * one of the category_ids listed at - * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85) - * @type string $severity - * The severity as specified by the upstream operating system. - * @type array|\Google\Protobuf\Internal\RepeatedField $cve - * The cve tied to this Upgrade. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Upgrade::initOnce(); - parent::__construct($data); - } - - /** - * Required - The specific operating system this metadata applies to. See - * https://cpe.mitre.org/specification/. - * - * Generated from protobuf field string cpe_uri = 1; - * @return string - */ - public function getCpeUri() - { - return $this->cpe_uri; - } - - /** - * Required - The specific operating system this metadata applies to. See - * https://cpe.mitre.org/specification/. - * - * Generated from protobuf field string cpe_uri = 1; - * @param string $var - * @return $this - */ - public function setCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->cpe_uri = $var; - - return $this; - } - - /** - * The operating system classification of this Upgrade, as specified by the - * upstream operating system upgrade feed. For Windows the classification is - * one of the category_ids listed at - * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85) - * - * Generated from protobuf field string classification = 2; - * @return string - */ - public function getClassification() - { - return $this->classification; - } - - /** - * The operating system classification of this Upgrade, as specified by the - * upstream operating system upgrade feed. For Windows the classification is - * one of the category_ids listed at - * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85) - * - * Generated from protobuf field string classification = 2; - * @param string $var - * @return $this - */ - public function setClassification($var) - { - GPBUtil::checkString($var, True); - $this->classification = $var; - - return $this; - } - - /** - * The severity as specified by the upstream operating system. - * - * Generated from protobuf field string severity = 3; - * @return string - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * The severity as specified by the upstream operating system. - * - * Generated from protobuf field string severity = 3; - * @param string $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkString($var, True); - $this->severity = $var; - - return $this; - } - - /** - * The cve tied to this Upgrade. - * - * Generated from protobuf field repeated string cve = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCve() - { - return $this->cve; - } - - /** - * The cve tied to this Upgrade. - * - * Generated from protobuf field repeated string cve = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCve($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->cve = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeNote.php deleted file mode 100644 index b91b637b0c3b..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeNote.php +++ /dev/null @@ -1,196 +0,0 @@ -grafeas.v1.UpgradeNote - */ -class UpgradeNote extends \Google\Protobuf\Internal\Message -{ - /** - * Required for non-Windows OS. The package this Upgrade is for. - * - * Generated from protobuf field string package = 1; - */ - protected $package = ''; - /** - * Required for non-Windows OS. The version of the package in machine + human - * readable form. - * - * Generated from protobuf field .grafeas.v1.Version version = 2; - */ - protected $version = null; - /** - * Metadata about the upgrade for each specific operating system. - * - * Generated from protobuf field repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - private $distributions; - /** - * Required for Windows OS. Represents the metadata about the Windows update. - * - * Generated from protobuf field .grafeas.v1.WindowsUpdate windows_update = 4; - */ - protected $windows_update = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $package - * Required for non-Windows OS. The package this Upgrade is for. - * @type \Grafeas\V1\Version $version - * Required for non-Windows OS. The version of the package in machine + human - * readable form. - * @type array<\Grafeas\V1\UpgradeDistribution>|\Google\Protobuf\Internal\RepeatedField $distributions - * Metadata about the upgrade for each specific operating system. - * @type \Grafeas\V1\WindowsUpdate $windows_update - * Required for Windows OS. Represents the metadata about the Windows update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Upgrade::initOnce(); - parent::__construct($data); - } - - /** - * Required for non-Windows OS. The package this Upgrade is for. - * - * Generated from protobuf field string package = 1; - * @return string - */ - public function getPackage() - { - return $this->package; - } - - /** - * Required for non-Windows OS. The package this Upgrade is for. - * - * Generated from protobuf field string package = 1; - * @param string $var - * @return $this - */ - public function setPackage($var) - { - GPBUtil::checkString($var, True); - $this->package = $var; - - return $this; - } - - /** - * Required for non-Windows OS. The version of the package in machine + human - * readable form. - * - * Generated from protobuf field .grafeas.v1.Version version = 2; - * @return \Grafeas\V1\Version|null - */ - public function getVersion() - { - return $this->version; - } - - public function hasVersion() - { - return isset($this->version); - } - - public function clearVersion() - { - unset($this->version); - } - - /** - * Required for non-Windows OS. The version of the package in machine + human - * readable form. - * - * Generated from protobuf field .grafeas.v1.Version version = 2; - * @param \Grafeas\V1\Version $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); - $this->version = $var; - - return $this; - } - - /** - * Metadata about the upgrade for each specific operating system. - * - * Generated from protobuf field repeated .grafeas.v1.UpgradeDistribution distributions = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDistributions() - { - return $this->distributions; - } - - /** - * Metadata about the upgrade for each specific operating system. - * - * Generated from protobuf field repeated .grafeas.v1.UpgradeDistribution distributions = 3; - * @param array<\Grafeas\V1\UpgradeDistribution>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDistributions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\UpgradeDistribution::class); - $this->distributions = $arr; - - return $this; - } - - /** - * Required for Windows OS. Represents the metadata about the Windows update. - * - * Generated from protobuf field .grafeas.v1.WindowsUpdate windows_update = 4; - * @return \Grafeas\V1\WindowsUpdate|null - */ - public function getWindowsUpdate() - { - return $this->windows_update; - } - - public function hasWindowsUpdate() - { - return isset($this->windows_update); - } - - public function clearWindowsUpdate() - { - unset($this->windows_update); - } - - /** - * Required for Windows OS. Represents the metadata about the Windows update. - * - * Generated from protobuf field .grafeas.v1.WindowsUpdate windows_update = 4; - * @param \Grafeas\V1\WindowsUpdate $var - * @return $this - */ - public function setWindowsUpdate($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\WindowsUpdate::class); - $this->windows_update = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeOccurrence.php deleted file mode 100644 index 15c700918d0f..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeOccurrence.php +++ /dev/null @@ -1,215 +0,0 @@ -grafeas.v1.UpgradeOccurrence - */ -class UpgradeOccurrence extends \Google\Protobuf\Internal\Message -{ - /** - * Required for non-Windows OS. The package this Upgrade is for. - * - * Generated from protobuf field string package = 1; - */ - protected $package = ''; - /** - * Required for non-Windows OS. The version of the package in a machine + - * human readable form. - * - * Generated from protobuf field .grafeas.v1.Version parsed_version = 3; - */ - protected $parsed_version = null; - /** - * Metadata about the upgrade for available for the specific operating system - * for the resource_url. This allows efficient filtering, as well as - * making it easier to use the occurrence. - * - * Generated from protobuf field .grafeas.v1.UpgradeDistribution distribution = 4; - */ - protected $distribution = null; - /** - * Required for Windows OS. Represents the metadata about the Windows update. - * - * Generated from protobuf field .grafeas.v1.WindowsUpdate windows_update = 5; - */ - protected $windows_update = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $package - * Required for non-Windows OS. The package this Upgrade is for. - * @type \Grafeas\V1\Version $parsed_version - * Required for non-Windows OS. The version of the package in a machine + - * human readable form. - * @type \Grafeas\V1\UpgradeDistribution $distribution - * Metadata about the upgrade for available for the specific operating system - * for the resource_url. This allows efficient filtering, as well as - * making it easier to use the occurrence. - * @type \Grafeas\V1\WindowsUpdate $windows_update - * Required for Windows OS. Represents the metadata about the Windows update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Upgrade::initOnce(); - parent::__construct($data); - } - - /** - * Required for non-Windows OS. The package this Upgrade is for. - * - * Generated from protobuf field string package = 1; - * @return string - */ - public function getPackage() - { - return $this->package; - } - - /** - * Required for non-Windows OS. The package this Upgrade is for. - * - * Generated from protobuf field string package = 1; - * @param string $var - * @return $this - */ - public function setPackage($var) - { - GPBUtil::checkString($var, True); - $this->package = $var; - - return $this; - } - - /** - * Required for non-Windows OS. The version of the package in a machine + - * human readable form. - * - * Generated from protobuf field .grafeas.v1.Version parsed_version = 3; - * @return \Grafeas\V1\Version|null - */ - public function getParsedVersion() - { - return $this->parsed_version; - } - - public function hasParsedVersion() - { - return isset($this->parsed_version); - } - - public function clearParsedVersion() - { - unset($this->parsed_version); - } - - /** - * Required for non-Windows OS. The version of the package in a machine + - * human readable form. - * - * Generated from protobuf field .grafeas.v1.Version parsed_version = 3; - * @param \Grafeas\V1\Version $var - * @return $this - */ - public function setParsedVersion($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); - $this->parsed_version = $var; - - return $this; - } - - /** - * Metadata about the upgrade for available for the specific operating system - * for the resource_url. This allows efficient filtering, as well as - * making it easier to use the occurrence. - * - * Generated from protobuf field .grafeas.v1.UpgradeDistribution distribution = 4; - * @return \Grafeas\V1\UpgradeDistribution|null - */ - public function getDistribution() - { - return $this->distribution; - } - - public function hasDistribution() - { - return isset($this->distribution); - } - - public function clearDistribution() - { - unset($this->distribution); - } - - /** - * Metadata about the upgrade for available for the specific operating system - * for the resource_url. This allows efficient filtering, as well as - * making it easier to use the occurrence. - * - * Generated from protobuf field .grafeas.v1.UpgradeDistribution distribution = 4; - * @param \Grafeas\V1\UpgradeDistribution $var - * @return $this - */ - public function setDistribution($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\UpgradeDistribution::class); - $this->distribution = $var; - - return $this; - } - - /** - * Required for Windows OS. Represents the metadata about the Windows update. - * - * Generated from protobuf field .grafeas.v1.WindowsUpdate windows_update = 5; - * @return \Grafeas\V1\WindowsUpdate|null - */ - public function getWindowsUpdate() - { - return $this->windows_update; - } - - public function hasWindowsUpdate() - { - return isset($this->windows_update); - } - - public function clearWindowsUpdate() - { - unset($this->windows_update); - } - - /** - * Required for Windows OS. Represents the metadata about the Windows update. - * - * Generated from protobuf field .grafeas.v1.WindowsUpdate windows_update = 5; - * @param \Grafeas\V1\WindowsUpdate $var - * @return $this - */ - public function setWindowsUpdate($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\WindowsUpdate::class); - $this->windows_update = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version.php deleted file mode 100644 index ed635362b2f0..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version.php +++ /dev/null @@ -1,269 +0,0 @@ -grafeas.v1.Version - */ -class Version extends \Google\Protobuf\Internal\Message -{ - /** - * Used to correct mistakes in the version numbering scheme. - * - * Generated from protobuf field int32 epoch = 1; - */ - protected $epoch = 0; - /** - * Required only when version kind is NORMAL. The main part of the version - * name. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - /** - * The iteration of the package build from the above version. - * - * Generated from protobuf field string revision = 3; - */ - protected $revision = ''; - /** - * Whether this version is specifying part of an inclusive range. Grafeas - * does not have the capability to specify version ranges; instead we have - * fields that specify start version and end versions. At times this is - * insufficient - we also need to specify whether the version is included in - * the range or is excluded from the range. This boolean is expected to be set - * to true when the version is included in a range. - * - * Generated from protobuf field bool inclusive = 6; - */ - protected $inclusive = false; - /** - * Required. Distinguishes between sentinel MIN/MAX versions and normal - * versions. - * - * Generated from protobuf field .grafeas.v1.Version.VersionKind kind = 4; - */ - protected $kind = 0; - /** - * Human readable version string. This string is of the form - * :- and is only set when kind is NORMAL. - * - * Generated from protobuf field string full_name = 5; - */ - protected $full_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $epoch - * Used to correct mistakes in the version numbering scheme. - * @type string $name - * Required only when version kind is NORMAL. The main part of the version - * name. - * @type string $revision - * The iteration of the package build from the above version. - * @type bool $inclusive - * Whether this version is specifying part of an inclusive range. Grafeas - * does not have the capability to specify version ranges; instead we have - * fields that specify start version and end versions. At times this is - * insufficient - we also need to specify whether the version is included in - * the range or is excluded from the range. This boolean is expected to be set - * to true when the version is included in a range. - * @type int $kind - * Required. Distinguishes between sentinel MIN/MAX versions and normal - * versions. - * @type string $full_name - * Human readable version string. This string is of the form - * :- and is only set when kind is NORMAL. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Package::initOnce(); - parent::__construct($data); - } - - /** - * Used to correct mistakes in the version numbering scheme. - * - * Generated from protobuf field int32 epoch = 1; - * @return int - */ - public function getEpoch() - { - return $this->epoch; - } - - /** - * Used to correct mistakes in the version numbering scheme. - * - * Generated from protobuf field int32 epoch = 1; - * @param int $var - * @return $this - */ - public function setEpoch($var) - { - GPBUtil::checkInt32($var); - $this->epoch = $var; - - return $this; - } - - /** - * Required only when version kind is NORMAL. The main part of the version - * name. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required only when version kind is NORMAL. The main part of the version - * name. - * - * Generated from protobuf field string name = 2; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The iteration of the package build from the above version. - * - * Generated from protobuf field string revision = 3; - * @return string - */ - public function getRevision() - { - return $this->revision; - } - - /** - * The iteration of the package build from the above version. - * - * Generated from protobuf field string revision = 3; - * @param string $var - * @return $this - */ - public function setRevision($var) - { - GPBUtil::checkString($var, True); - $this->revision = $var; - - return $this; - } - - /** - * Whether this version is specifying part of an inclusive range. Grafeas - * does not have the capability to specify version ranges; instead we have - * fields that specify start version and end versions. At times this is - * insufficient - we also need to specify whether the version is included in - * the range or is excluded from the range. This boolean is expected to be set - * to true when the version is included in a range. - * - * Generated from protobuf field bool inclusive = 6; - * @return bool - */ - public function getInclusive() - { - return $this->inclusive; - } - - /** - * Whether this version is specifying part of an inclusive range. Grafeas - * does not have the capability to specify version ranges; instead we have - * fields that specify start version and end versions. At times this is - * insufficient - we also need to specify whether the version is included in - * the range or is excluded from the range. This boolean is expected to be set - * to true when the version is included in a range. - * - * Generated from protobuf field bool inclusive = 6; - * @param bool $var - * @return $this - */ - public function setInclusive($var) - { - GPBUtil::checkBool($var); - $this->inclusive = $var; - - return $this; - } - - /** - * Required. Distinguishes between sentinel MIN/MAX versions and normal - * versions. - * - * Generated from protobuf field .grafeas.v1.Version.VersionKind kind = 4; - * @return int - */ - public function getKind() - { - return $this->kind; - } - - /** - * Required. Distinguishes between sentinel MIN/MAX versions and normal - * versions. - * - * Generated from protobuf field .grafeas.v1.Version.VersionKind kind = 4; - * @param int $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\Version\VersionKind::class); - $this->kind = $var; - - return $this; - } - - /** - * Human readable version string. This string is of the form - * :- and is only set when kind is NORMAL. - * - * Generated from protobuf field string full_name = 5; - * @return string - */ - public function getFullName() - { - return $this->full_name; - } - - /** - * Human readable version string. This string is of the form - * :- and is only set when kind is NORMAL. - * - * Generated from protobuf field string full_name = 5; - * @param string $var - * @return $this - */ - public function setFullName($var) - { - GPBUtil::checkString($var, True); - $this->full_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version/VersionKind.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version/VersionKind.php deleted file mode 100644 index d978c7d44cf5..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version/VersionKind.php +++ /dev/null @@ -1,71 +0,0 @@ -grafeas.v1.Version.VersionKind - */ -class VersionKind -{ - /** - * Unknown. - * - * Generated from protobuf enum VERSION_KIND_UNSPECIFIED = 0; - */ - const VERSION_KIND_UNSPECIFIED = 0; - /** - * A standard package version. - * - * Generated from protobuf enum NORMAL = 1; - */ - const NORMAL = 1; - /** - * A special version representing negative infinity. - * - * Generated from protobuf enum MINIMUM = 2; - */ - const MINIMUM = 2; - /** - * A special version representing positive infinity. - * - * Generated from protobuf enum MAXIMUM = 3; - */ - const MAXIMUM = 3; - - private static $valueToName = [ - self::VERSION_KIND_UNSPECIFIED => 'VERSION_KIND_UNSPECIFIED', - self::NORMAL => 'NORMAL', - self::MINIMUM => 'MINIMUM', - self::MAXIMUM => 'MAXIMUM', - ]; - - 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(VersionKind::class, \Grafeas\V1\Version_VersionKind::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote.php deleted file mode 100644 index b0b4b7cd0c34..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote.php +++ /dev/null @@ -1,306 +0,0 @@ -grafeas.v1.VulnerabilityAssessmentNote - */ -class VulnerabilityAssessmentNote extends \Google\Protobuf\Internal\Message -{ - /** - * The title of the note. E.g. `Vex-Debian-11.4` - * - * Generated from protobuf field string title = 1; - */ - protected $title = ''; - /** - * A one sentence description of this Vex. - * - * Generated from protobuf field string short_description = 2; - */ - protected $short_description = ''; - /** - * A detailed description of this Vex. - * - * Generated from protobuf field string long_description = 3; - */ - protected $long_description = ''; - /** - * Identifies the language used by this document, - * corresponding to IETF BCP 47 / RFC 5646. - * - * Generated from protobuf field string language_code = 4; - */ - protected $language_code = ''; - /** - * Publisher details of this Note. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; - */ - protected $publisher = null; - /** - * The product affected by this vex. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; - */ - protected $product = null; - /** - * Represents a vulnerability assessment for the product. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; - */ - protected $assessment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $title - * The title of the note. E.g. `Vex-Debian-11.4` - * @type string $short_description - * A one sentence description of this Vex. - * @type string $long_description - * A detailed description of this Vex. - * @type string $language_code - * Identifies the language used by this document, - * corresponding to IETF BCP 47 / RFC 5646. - * @type \Grafeas\V1\VulnerabilityAssessmentNote\Publisher $publisher - * Publisher details of this Note. - * @type \Grafeas\V1\VulnerabilityAssessmentNote\Product $product - * The product affected by this vex. - * @type \Grafeas\V1\VulnerabilityAssessmentNote\Assessment $assessment - * Represents a vulnerability assessment for the product. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Vex::initOnce(); - parent::__construct($data); - } - - /** - * The title of the note. E.g. `Vex-Debian-11.4` - * - * Generated from protobuf field string title = 1; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * The title of the note. E.g. `Vex-Debian-11.4` - * - * Generated from protobuf field string title = 1; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * A one sentence description of this Vex. - * - * Generated from protobuf field string short_description = 2; - * @return string - */ - public function getShortDescription() - { - return $this->short_description; - } - - /** - * A one sentence description of this Vex. - * - * Generated from protobuf field string short_description = 2; - * @param string $var - * @return $this - */ - public function setShortDescription($var) - { - GPBUtil::checkString($var, True); - $this->short_description = $var; - - return $this; - } - - /** - * A detailed description of this Vex. - * - * Generated from protobuf field string long_description = 3; - * @return string - */ - public function getLongDescription() - { - return $this->long_description; - } - - /** - * A detailed description of this Vex. - * - * Generated from protobuf field string long_description = 3; - * @param string $var - * @return $this - */ - public function setLongDescription($var) - { - GPBUtil::checkString($var, True); - $this->long_description = $var; - - return $this; - } - - /** - * Identifies the language used by this document, - * corresponding to IETF BCP 47 / RFC 5646. - * - * Generated from protobuf field string language_code = 4; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Identifies the language used by this document, - * corresponding to IETF BCP 47 / RFC 5646. - * - * Generated from protobuf field string language_code = 4; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Publisher details of this Note. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; - * @return \Grafeas\V1\VulnerabilityAssessmentNote\Publisher|null - */ - public function getPublisher() - { - return $this->publisher; - } - - public function hasPublisher() - { - return isset($this->publisher); - } - - public function clearPublisher() - { - unset($this->publisher); - } - - /** - * Publisher details of this Note. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Publisher publisher = 5; - * @param \Grafeas\V1\VulnerabilityAssessmentNote\Publisher $var - * @return $this - */ - public function setPublisher($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\VulnerabilityAssessmentNote\Publisher::class); - $this->publisher = $var; - - return $this; - } - - /** - * The product affected by this vex. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; - * @return \Grafeas\V1\VulnerabilityAssessmentNote\Product|null - */ - public function getProduct() - { - return $this->product; - } - - public function hasProduct() - { - return isset($this->product); - } - - public function clearProduct() - { - unset($this->product); - } - - /** - * The product affected by this vex. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Product product = 6; - * @param \Grafeas\V1\VulnerabilityAssessmentNote\Product $var - * @return $this - */ - public function setProduct($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\VulnerabilityAssessmentNote\Product::class); - $this->product = $var; - - return $this; - } - - /** - * Represents a vulnerability assessment for the product. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; - * @return \Grafeas\V1\VulnerabilityAssessmentNote\Assessment|null - */ - public function getAssessment() - { - return $this->assessment; - } - - public function hasAssessment() - { - return isset($this->assessment); - } - - public function clearAssessment() - { - unset($this->assessment); - } - - /** - * Represents a vulnerability assessment for the product. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Assessment assessment = 7; - * @param \Grafeas\V1\VulnerabilityAssessmentNote\Assessment $var - * @return $this - */ - public function setAssessment($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\VulnerabilityAssessmentNote\Assessment::class); - $this->assessment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Assessment.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Assessment.php deleted file mode 100644 index d96d664fff19..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Assessment.php +++ /dev/null @@ -1,390 +0,0 @@ -grafeas.v1.VulnerabilityAssessmentNote.Assessment - */ -class Assessment extends \Google\Protobuf\Internal\Message -{ - /** - * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) - * tracking number for the vulnerability. - * Deprecated: Use vulnerability_id instead to denote CVEs. - * - * Generated from protobuf field string cve = 1 [deprecated = true]; - * @deprecated - */ - protected $cve = ''; - /** - * The vulnerability identifier for this Assessment. Will hold one of - * common identifiers e.g. CVE, GHSA etc. - * - * Generated from protobuf field string vulnerability_id = 9; - */ - protected $vulnerability_id = ''; - /** - * A one sentence description of this Vex. - * - * Generated from protobuf field string short_description = 2; - */ - protected $short_description = ''; - /** - * A detailed description of this Vex. - * - * Generated from protobuf field string long_description = 3; - */ - protected $long_description = ''; - /** - * Holds a list of references associated with this vulnerability item and - * assessment. These uris have additional information about the - * vulnerability and the assessment itself. E.g. Link to a document which - * details how this assessment concluded the state of this vulnerability. - * - * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_uris = 4; - */ - private $related_uris; - /** - * Provides the state of this Vulnerability assessment. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; - */ - protected $state = 0; - /** - * Contains information about the impact of this vulnerability, - * this will change with time. - * - * Generated from protobuf field repeated string impacts = 6; - */ - private $impacts; - /** - * Justification provides the justification when the state of the - * assessment if NOT_AFFECTED. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; - */ - protected $justification = null; - /** - * Specifies details on how to handle (and presumably, fix) a vulnerability. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; - */ - private $remediations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cve - * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) - * tracking number for the vulnerability. - * Deprecated: Use vulnerability_id instead to denote CVEs. - * @type string $vulnerability_id - * The vulnerability identifier for this Assessment. Will hold one of - * common identifiers e.g. CVE, GHSA etc. - * @type string $short_description - * A one sentence description of this Vex. - * @type string $long_description - * A detailed description of this Vex. - * @type array<\Grafeas\V1\RelatedUrl>|\Google\Protobuf\Internal\RepeatedField $related_uris - * Holds a list of references associated with this vulnerability item and - * assessment. These uris have additional information about the - * vulnerability and the assessment itself. E.g. Link to a document which - * details how this assessment concluded the state of this vulnerability. - * @type int $state - * Provides the state of this Vulnerability assessment. - * @type array|\Google\Protobuf\Internal\RepeatedField $impacts - * Contains information about the impact of this vulnerability, - * this will change with time. - * @type \Grafeas\V1\VulnerabilityAssessmentNote\Assessment\Justification $justification - * Justification provides the justification when the state of the - * assessment if NOT_AFFECTED. - * @type array<\Grafeas\V1\VulnerabilityAssessmentNote\Assessment\Remediation>|\Google\Protobuf\Internal\RepeatedField $remediations - * Specifies details on how to handle (and presumably, fix) a vulnerability. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Vex::initOnce(); - parent::__construct($data); - } - - /** - * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) - * tracking number for the vulnerability. - * Deprecated: Use vulnerability_id instead to denote CVEs. - * - * Generated from protobuf field string cve = 1 [deprecated = true]; - * @return string - * @deprecated - */ - public function getCve() - { - @trigger_error('cve is deprecated.', E_USER_DEPRECATED); - return $this->cve; - } - - /** - * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) - * tracking number for the vulnerability. - * Deprecated: Use vulnerability_id instead to denote CVEs. - * - * Generated from protobuf field string cve = 1 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setCve($var) - { - @trigger_error('cve is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->cve = $var; - - return $this; - } - - /** - * The vulnerability identifier for this Assessment. Will hold one of - * common identifiers e.g. CVE, GHSA etc. - * - * Generated from protobuf field string vulnerability_id = 9; - * @return string - */ - public function getVulnerabilityId() - { - return $this->vulnerability_id; - } - - /** - * The vulnerability identifier for this Assessment. Will hold one of - * common identifiers e.g. CVE, GHSA etc. - * - * Generated from protobuf field string vulnerability_id = 9; - * @param string $var - * @return $this - */ - public function setVulnerabilityId($var) - { - GPBUtil::checkString($var, True); - $this->vulnerability_id = $var; - - return $this; - } - - /** - * A one sentence description of this Vex. - * - * Generated from protobuf field string short_description = 2; - * @return string - */ - public function getShortDescription() - { - return $this->short_description; - } - - /** - * A one sentence description of this Vex. - * - * Generated from protobuf field string short_description = 2; - * @param string $var - * @return $this - */ - public function setShortDescription($var) - { - GPBUtil::checkString($var, True); - $this->short_description = $var; - - return $this; - } - - /** - * A detailed description of this Vex. - * - * Generated from protobuf field string long_description = 3; - * @return string - */ - public function getLongDescription() - { - return $this->long_description; - } - - /** - * A detailed description of this Vex. - * - * Generated from protobuf field string long_description = 3; - * @param string $var - * @return $this - */ - public function setLongDescription($var) - { - GPBUtil::checkString($var, True); - $this->long_description = $var; - - return $this; - } - - /** - * Holds a list of references associated with this vulnerability item and - * assessment. These uris have additional information about the - * vulnerability and the assessment itself. E.g. Link to a document which - * details how this assessment concluded the state of this vulnerability. - * - * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_uris = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRelatedUris() - { - return $this->related_uris; - } - - /** - * Holds a list of references associated with this vulnerability item and - * assessment. These uris have additional information about the - * vulnerability and the assessment itself. E.g. Link to a document which - * details how this assessment concluded the state of this vulnerability. - * - * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_uris = 4; - * @param array<\Grafeas\V1\RelatedUrl>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRelatedUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\RelatedUrl::class); - $this->related_uris = $arr; - - return $this; - } - - /** - * Provides the state of this Vulnerability assessment. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Provides the state of this Vulnerability assessment. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 5; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\VulnerabilityAssessmentNote\Assessment\State::class); - $this->state = $var; - - return $this; - } - - /** - * Contains information about the impact of this vulnerability, - * this will change with time. - * - * Generated from protobuf field repeated string impacts = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getImpacts() - { - return $this->impacts; - } - - /** - * Contains information about the impact of this vulnerability, - * this will change with time. - * - * Generated from protobuf field repeated string impacts = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setImpacts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->impacts = $arr; - - return $this; - } - - /** - * Justification provides the justification when the state of the - * assessment if NOT_AFFECTED. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; - * @return \Grafeas\V1\VulnerabilityAssessmentNote\Assessment\Justification|null - */ - public function getJustification() - { - return $this->justification; - } - - public function hasJustification() - { - return isset($this->justification); - } - - public function clearJustification() - { - unset($this->justification); - } - - /** - * Justification provides the justification when the state of the - * assessment if NOT_AFFECTED. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; - * @param \Grafeas\V1\VulnerabilityAssessmentNote\Assessment\Justification $var - * @return $this - */ - public function setJustification($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\VulnerabilityAssessmentNote\Assessment\Justification::class); - $this->justification = $var; - - return $this; - } - - /** - * Specifies details on how to handle (and presumably, fix) a vulnerability. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRemediations() - { - return $this->remediations; - } - - /** - * Specifies details on how to handle (and presumably, fix) a vulnerability. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 8; - * @param array<\Grafeas\V1\VulnerabilityAssessmentNote\Assessment\Remediation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRemediations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\VulnerabilityAssessmentNote\Assessment\Remediation::class); - $this->remediations = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Assessment::class, \Grafeas\V1\VulnerabilityAssessmentNote_Assessment::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Assessment/Justification.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Assessment/Justification.php deleted file mode 100644 index fdb666012d62..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Assessment/Justification.php +++ /dev/null @@ -1,105 +0,0 @@ -grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification - */ -class Justification extends \Google\Protobuf\Internal\Message -{ - /** - * The justification type for this vulnerability. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; - */ - protected $justification_type = 0; - /** - * Additional details on why this justification was chosen. - * - * Generated from protobuf field string details = 2; - */ - protected $details = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $justification_type - * The justification type for this vulnerability. - * @type string $details - * Additional details on why this justification was chosen. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Vex::initOnce(); - parent::__construct($data); - } - - /** - * The justification type for this vulnerability. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; - * @return int - */ - public function getJustificationType() - { - return $this->justification_type; - } - - /** - * The justification type for this vulnerability. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType justification_type = 1; - * @param int $var - * @return $this - */ - public function setJustificationType($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\VulnerabilityAssessmentNote\Assessment\Justification\JustificationType::class); - $this->justification_type = $var; - - return $this; - } - - /** - * Additional details on why this justification was chosen. - * - * Generated from protobuf field string details = 2; - * @return string - */ - public function getDetails() - { - return $this->details; - } - - /** - * Additional details on why this justification was chosen. - * - * Generated from protobuf field string details = 2; - * @param string $var - * @return $this - */ - public function setDetails($var) - { - GPBUtil::checkString($var, True); - $this->details = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Justification::class, \Grafeas\V1\VulnerabilityAssessmentNote_Assessment_Justification::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Assessment/Justification/JustificationType.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Assessment/Justification/JustificationType.php deleted file mode 100644 index 8d0a24170835..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Assessment/Justification/JustificationType.php +++ /dev/null @@ -1,94 +0,0 @@ -grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType - */ -class JustificationType -{ - /** - * JUSTIFICATION_TYPE_UNSPECIFIED. - * - * Generated from protobuf enum JUSTIFICATION_TYPE_UNSPECIFIED = 0; - */ - const JUSTIFICATION_TYPE_UNSPECIFIED = 0; - /** - * The vulnerable component is not present in the product. - * - * Generated from protobuf enum COMPONENT_NOT_PRESENT = 1; - */ - const COMPONENT_NOT_PRESENT = 1; - /** - * The vulnerable code is not present. Typically this case - * occurs when source code is configured or built in a way that excludes - * the vulnerable code. - * - * Generated from protobuf enum VULNERABLE_CODE_NOT_PRESENT = 2; - */ - const VULNERABLE_CODE_NOT_PRESENT = 2; - /** - * The vulnerable code can not be executed. - * Typically this case occurs when the product includes the vulnerable - * code but does not call or use the vulnerable code. - * - * Generated from protobuf enum VULNERABLE_CODE_NOT_IN_EXECUTE_PATH = 3; - */ - const VULNERABLE_CODE_NOT_IN_EXECUTE_PATH = 3; - /** - * The vulnerable code cannot be controlled by an attacker to exploit - * the vulnerability. - * - * Generated from protobuf enum VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY = 4; - */ - const VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY = 4; - /** - * The product includes built-in protections or features that prevent - * exploitation of the vulnerability. These built-in protections cannot - * be subverted by the attacker and cannot be configured or disabled by - * the user. These mitigations completely prevent exploitation based on - * known attack vectors. - * - * Generated from protobuf enum INLINE_MITIGATIONS_ALREADY_EXIST = 5; - */ - const INLINE_MITIGATIONS_ALREADY_EXIST = 5; - - private static $valueToName = [ - self::JUSTIFICATION_TYPE_UNSPECIFIED => 'JUSTIFICATION_TYPE_UNSPECIFIED', - self::COMPONENT_NOT_PRESENT => 'COMPONENT_NOT_PRESENT', - self::VULNERABLE_CODE_NOT_PRESENT => 'VULNERABLE_CODE_NOT_PRESENT', - self::VULNERABLE_CODE_NOT_IN_EXECUTE_PATH => 'VULNERABLE_CODE_NOT_IN_EXECUTE_PATH', - self::VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY => 'VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY', - self::INLINE_MITIGATIONS_ALREADY_EXIST => 'INLINE_MITIGATIONS_ALREADY_EXIST', - ]; - - 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(JustificationType::class, \Grafeas\V1\VulnerabilityAssessmentNote_Assessment_Justification_JustificationType::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Assessment/Remediation.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Assessment/Remediation.php deleted file mode 100644 index 43bea6f40ecc..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Assessment/Remediation.php +++ /dev/null @@ -1,148 +0,0 @@ -grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation - */ -class Remediation extends \Google\Protobuf\Internal\Message -{ - /** - * The type of remediation that can be applied. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; - */ - protected $remediation_type = 0; - /** - * Contains a comprehensive human-readable discussion of the remediation. - * - * Generated from protobuf field string details = 2; - */ - protected $details = ''; - /** - * Contains the URL where to obtain the remediation. - * - * Generated from protobuf field .grafeas.v1.RelatedUrl remediation_uri = 3; - */ - protected $remediation_uri = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $remediation_type - * The type of remediation that can be applied. - * @type string $details - * Contains a comprehensive human-readable discussion of the remediation. - * @type \Grafeas\V1\RelatedUrl $remediation_uri - * Contains the URL where to obtain the remediation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Vex::initOnce(); - parent::__construct($data); - } - - /** - * The type of remediation that can be applied. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; - * @return int - */ - public function getRemediationType() - { - return $this->remediation_type; - } - - /** - * The type of remediation that can be applied. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType remediation_type = 1; - * @param int $var - * @return $this - */ - public function setRemediationType($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\VulnerabilityAssessmentNote\Assessment\Remediation\RemediationType::class); - $this->remediation_type = $var; - - return $this; - } - - /** - * Contains a comprehensive human-readable discussion of the remediation. - * - * Generated from protobuf field string details = 2; - * @return string - */ - public function getDetails() - { - return $this->details; - } - - /** - * Contains a comprehensive human-readable discussion of the remediation. - * - * Generated from protobuf field string details = 2; - * @param string $var - * @return $this - */ - public function setDetails($var) - { - GPBUtil::checkString($var, True); - $this->details = $var; - - return $this; - } - - /** - * Contains the URL where to obtain the remediation. - * - * Generated from protobuf field .grafeas.v1.RelatedUrl remediation_uri = 3; - * @return \Grafeas\V1\RelatedUrl|null - */ - public function getRemediationUri() - { - return $this->remediation_uri; - } - - public function hasRemediationUri() - { - return isset($this->remediation_uri); - } - - public function clearRemediationUri() - { - unset($this->remediation_uri); - } - - /** - * Contains the URL where to obtain the remediation. - * - * Generated from protobuf field .grafeas.v1.RelatedUrl remediation_uri = 3; - * @param \Grafeas\V1\RelatedUrl $var - * @return $this - */ - public function setRemediationUri($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\RelatedUrl::class); - $this->remediation_uri = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Remediation::class, \Grafeas\V1\VulnerabilityAssessmentNote_Assessment_Remediation::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Assessment/Remediation/RemediationType.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Assessment/Remediation/RemediationType.php deleted file mode 100644 index 66c51c0be9f9..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Assessment/Remediation/RemediationType.php +++ /dev/null @@ -1,85 +0,0 @@ -grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType - */ -class RemediationType -{ - /** - * No remediation type specified. - * - * Generated from protobuf enum REMEDIATION_TYPE_UNSPECIFIED = 0; - */ - const REMEDIATION_TYPE_UNSPECIFIED = 0; - /** - * A MITIGATION is available. - * - * Generated from protobuf enum MITIGATION = 1; - */ - const MITIGATION = 1; - /** - * No fix is planned. - * - * Generated from protobuf enum NO_FIX_PLANNED = 2; - */ - const NO_FIX_PLANNED = 2; - /** - * Not available. - * - * Generated from protobuf enum NONE_AVAILABLE = 3; - */ - const NONE_AVAILABLE = 3; - /** - * A vendor fix is available. - * - * Generated from protobuf enum VENDOR_FIX = 4; - */ - const VENDOR_FIX = 4; - /** - * A workaround is available. - * - * Generated from protobuf enum WORKAROUND = 5; - */ - const WORKAROUND = 5; - - private static $valueToName = [ - self::REMEDIATION_TYPE_UNSPECIFIED => 'REMEDIATION_TYPE_UNSPECIFIED', - self::MITIGATION => 'MITIGATION', - self::NO_FIX_PLANNED => 'NO_FIX_PLANNED', - self::NONE_AVAILABLE => 'NONE_AVAILABLE', - self::VENDOR_FIX => 'VENDOR_FIX', - self::WORKAROUND => 'WORKAROUND', - ]; - - 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(RemediationType::class, \Grafeas\V1\VulnerabilityAssessmentNote_Assessment_Remediation_RemediationType::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Assessment/State.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Assessment/State.php deleted file mode 100644 index 69b81a30cd45..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Assessment/State.php +++ /dev/null @@ -1,79 +0,0 @@ -grafeas.v1.VulnerabilityAssessmentNote.Assessment.State - */ -class State -{ - /** - * No state is specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * This product is known to be affected by this vulnerability. - * - * Generated from protobuf enum AFFECTED = 1; - */ - const AFFECTED = 1; - /** - * This product is known to be not affected by this vulnerability. - * - * Generated from protobuf enum NOT_AFFECTED = 2; - */ - const NOT_AFFECTED = 2; - /** - * This product contains a fix for this vulnerability. - * - * Generated from protobuf enum FIXED = 3; - */ - const FIXED = 3; - /** - * It is not known yet whether these versions are or are not affected - * by the vulnerability. However, it is still under investigation. - * - * Generated from protobuf enum UNDER_INVESTIGATION = 4; - */ - const UNDER_INVESTIGATION = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::AFFECTED => 'AFFECTED', - self::NOT_AFFECTED => 'NOT_AFFECTED', - self::FIXED => 'FIXED', - self::UNDER_INVESTIGATION => 'UNDER_INVESTIGATION', - ]; - - 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, \Grafeas\V1\VulnerabilityAssessmentNote_Assessment_State::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Product.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Product.php deleted file mode 100644 index a7fad624e32d..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Product.php +++ /dev/null @@ -1,160 +0,0 @@ -grafeas.v1.VulnerabilityAssessmentNote.Product - */ -class Product extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the product. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Token that identifies a product so that it can be referred to from other - * parts in the document. There is no predefined format as long as it - * uniquely identifies a group in the context of the current document. - * - * Generated from protobuf field string id = 2; - */ - protected $id = ''; - protected $identifier; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the product. - * @type string $id - * Token that identifies a product so that it can be referred to from other - * parts in the document. There is no predefined format as long as it - * uniquely identifies a group in the context of the current document. - * @type string $generic_uri - * Contains a URI which is vendor-specific. - * Example: The artifact repository URL of an image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Vex::initOnce(); - parent::__construct($data); - } - - /** - * Name of the product. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the product. - * - * 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; - } - - /** - * Token that identifies a product so that it can be referred to from other - * parts in the document. There is no predefined format as long as it - * uniquely identifies a group in the context of the current document. - * - * Generated from protobuf field string id = 2; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Token that identifies a product so that it can be referred to from other - * parts in the document. There is no predefined format as long as it - * uniquely identifies a group in the context of the current document. - * - * Generated from protobuf field string id = 2; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Contains a URI which is vendor-specific. - * Example: The artifact repository URL of an image. - * - * Generated from protobuf field string generic_uri = 3; - * @return string - */ - public function getGenericUri() - { - return $this->readOneof(3); - } - - public function hasGenericUri() - { - return $this->hasOneof(3); - } - - /** - * Contains a URI which is vendor-specific. - * Example: The artifact repository URL of an image. - * - * Generated from protobuf field string generic_uri = 3; - * @param string $var - * @return $this - */ - public function setGenericUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getIdentifier() - { - return $this->whichOneof("identifier"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Product::class, \Grafeas\V1\VulnerabilityAssessmentNote_Product::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Publisher.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Publisher.php deleted file mode 100644 index 2801fd5a85c2..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityAssessmentNote/Publisher.php +++ /dev/null @@ -1,165 +0,0 @@ -grafeas.v1.VulnerabilityAssessmentNote.Publisher - */ -class Publisher extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the publisher. - * Examples: 'Google', 'Google Cloud Platform'. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Provides information about the authority of the issuing party to - * release the document, in particular, the party's constituency and - * responsibilities or other obligations. - * - * Generated from protobuf field string issuing_authority = 2; - */ - protected $issuing_authority = ''; - /** - * The context or namespace. - * Contains a URL which is under control of the issuing party and can - * be used as a globally unique identifier for that issuing party. - * Example: https://csaf.io - * - * Generated from protobuf field string publisher_namespace = 3; - */ - protected $publisher_namespace = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the publisher. - * Examples: 'Google', 'Google Cloud Platform'. - * @type string $issuing_authority - * Provides information about the authority of the issuing party to - * release the document, in particular, the party's constituency and - * responsibilities or other obligations. - * @type string $publisher_namespace - * The context or namespace. - * Contains a URL which is under control of the issuing party and can - * be used as a globally unique identifier for that issuing party. - * Example: https://csaf.io - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Vex::initOnce(); - parent::__construct($data); - } - - /** - * Name of the publisher. - * Examples: 'Google', 'Google Cloud Platform'. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the publisher. - * Examples: 'Google', 'Google Cloud Platform'. - * - * 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; - } - - /** - * Provides information about the authority of the issuing party to - * release the document, in particular, the party's constituency and - * responsibilities or other obligations. - * - * Generated from protobuf field string issuing_authority = 2; - * @return string - */ - public function getIssuingAuthority() - { - return $this->issuing_authority; - } - - /** - * Provides information about the authority of the issuing party to - * release the document, in particular, the party's constituency and - * responsibilities or other obligations. - * - * Generated from protobuf field string issuing_authority = 2; - * @param string $var - * @return $this - */ - public function setIssuingAuthority($var) - { - GPBUtil::checkString($var, True); - $this->issuing_authority = $var; - - return $this; - } - - /** - * The context or namespace. - * Contains a URL which is under control of the issuing party and can - * be used as a globally unique identifier for that issuing party. - * Example: https://csaf.io - * - * Generated from protobuf field string publisher_namespace = 3; - * @return string - */ - public function getPublisherNamespace() - { - return $this->publisher_namespace; - } - - /** - * The context or namespace. - * Contains a URL which is under control of the issuing party and can - * be used as a globally unique identifier for that issuing party. - * Example: https://csaf.io - * - * Generated from protobuf field string publisher_namespace = 3; - * @param string $var - * @return $this - */ - public function setPublisherNamespace($var) - { - GPBUtil::checkString($var, True); - $this->publisher_namespace = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Publisher::class, \Grafeas\V1\VulnerabilityAssessmentNote_Publisher::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote.php deleted file mode 100644 index 0565c30c64ab..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote.php +++ /dev/null @@ -1,359 +0,0 @@ -grafeas.v1.VulnerabilityNote - */ -class VulnerabilityNote extends \Google\Protobuf\Internal\Message -{ - /** - * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 - * where 0 indicates low severity and 10 indicates high severity. - * - * Generated from protobuf field float cvss_score = 1; - */ - protected $cvss_score = 0.0; - /** - * The note provider assigned severity of this vulnerability. - * - * Generated from protobuf field .grafeas.v1.Severity severity = 2; - */ - protected $severity = 0; - /** - * Details of all known distros and packages affected by this vulnerability. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - private $details; - /** - * The full description of the CVSSv3 for this vulnerability. - * - * Generated from protobuf field .grafeas.v1.CVSSv3 cvss_v3 = 4; - */ - protected $cvss_v3 = null; - /** - * Windows details get their own format because the information format and - * model don't match a normal detail. Specifically Windows updates are done as - * patches, thus Windows vulnerabilities really are a missing package, rather - * than a package being at an incorrect version. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - private $windows_details; - /** - * The time this information was last changed at the source. This is an - * upstream timestamp from the underlying information source - e.g. Ubuntu - * security tracker. - * - * Generated from protobuf field .google.protobuf.Timestamp source_update_time = 6; - */ - protected $source_update_time = null; - /** - * CVSS version used to populate cvss_score and severity. - * - * Generated from protobuf field .grafeas.v1.CVSSVersion cvss_version = 7; - */ - protected $cvss_version = 0; - /** - * The full description of the v2 CVSS for this vulnerability. - * - * Generated from protobuf field .grafeas.v1.CVSS cvss_v2 = 8; - */ - protected $cvss_v2 = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $cvss_score - * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 - * where 0 indicates low severity and 10 indicates high severity. - * @type int $severity - * The note provider assigned severity of this vulnerability. - * @type array<\Grafeas\V1\VulnerabilityNote\Detail>|\Google\Protobuf\Internal\RepeatedField $details - * Details of all known distros and packages affected by this vulnerability. - * @type \Grafeas\V1\CVSSv3 $cvss_v3 - * The full description of the CVSSv3 for this vulnerability. - * @type array<\Grafeas\V1\VulnerabilityNote\WindowsDetail>|\Google\Protobuf\Internal\RepeatedField $windows_details - * Windows details get their own format because the information format and - * model don't match a normal detail. Specifically Windows updates are done as - * patches, thus Windows vulnerabilities really are a missing package, rather - * than a package being at an incorrect version. - * @type \Google\Protobuf\Timestamp $source_update_time - * The time this information was last changed at the source. This is an - * upstream timestamp from the underlying information source - e.g. Ubuntu - * security tracker. - * @type int $cvss_version - * CVSS version used to populate cvss_score and severity. - * @type \Grafeas\V1\CVSS $cvss_v2 - * The full description of the v2 CVSS for this vulnerability. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 - * where 0 indicates low severity and 10 indicates high severity. - * - * Generated from protobuf field float cvss_score = 1; - * @return float - */ - public function getCvssScore() - { - return $this->cvss_score; - } - - /** - * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 - * where 0 indicates low severity and 10 indicates high severity. - * - * Generated from protobuf field float cvss_score = 1; - * @param float $var - * @return $this - */ - public function setCvssScore($var) - { - GPBUtil::checkFloat($var); - $this->cvss_score = $var; - - return $this; - } - - /** - * The note provider assigned severity of this vulnerability. - * - * Generated from protobuf field .grafeas.v1.Severity severity = 2; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * The note provider assigned severity of this vulnerability. - * - * Generated from protobuf field .grafeas.v1.Severity severity = 2; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\Severity::class); - $this->severity = $var; - - return $this; - } - - /** - * Details of all known distros and packages affected by this vulnerability. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDetails() - { - return $this->details; - } - - /** - * Details of all known distros and packages affected by this vulnerability. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - * @param array<\Grafeas\V1\VulnerabilityNote\Detail>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\VulnerabilityNote\Detail::class); - $this->details = $arr; - - return $this; - } - - /** - * The full description of the CVSSv3 for this vulnerability. - * - * Generated from protobuf field .grafeas.v1.CVSSv3 cvss_v3 = 4; - * @return \Grafeas\V1\CVSSv3|null - */ - public function getCvssV3() - { - return $this->cvss_v3; - } - - public function hasCvssV3() - { - return isset($this->cvss_v3); - } - - public function clearCvssV3() - { - unset($this->cvss_v3); - } - - /** - * The full description of the CVSSv3 for this vulnerability. - * - * Generated from protobuf field .grafeas.v1.CVSSv3 cvss_v3 = 4; - * @param \Grafeas\V1\CVSSv3 $var - * @return $this - */ - public function setCvssV3($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\CVSSv3::class); - $this->cvss_v3 = $var; - - return $this; - } - - /** - * Windows details get their own format because the information format and - * model don't match a normal detail. Specifically Windows updates are done as - * patches, thus Windows vulnerabilities really are a missing package, rather - * than a package being at an incorrect version. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWindowsDetails() - { - return $this->windows_details; - } - - /** - * Windows details get their own format because the information format and - * model don't match a normal detail. Specifically Windows updates are done as - * patches, thus Windows vulnerabilities really are a missing package, rather - * than a package being at an incorrect version. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - * @param array<\Grafeas\V1\VulnerabilityNote\WindowsDetail>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWindowsDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\VulnerabilityNote\WindowsDetail::class); - $this->windows_details = $arr; - - return $this; - } - - /** - * The time this information was last changed at the source. This is an - * upstream timestamp from the underlying information source - e.g. Ubuntu - * security tracker. - * - * Generated from protobuf field .google.protobuf.Timestamp source_update_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSourceUpdateTime() - { - return $this->source_update_time; - } - - public function hasSourceUpdateTime() - { - return isset($this->source_update_time); - } - - public function clearSourceUpdateTime() - { - unset($this->source_update_time); - } - - /** - * The time this information was last changed at the source. This is an - * upstream timestamp from the underlying information source - e.g. Ubuntu - * security tracker. - * - * Generated from protobuf field .google.protobuf.Timestamp source_update_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSourceUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->source_update_time = $var; - - return $this; - } - - /** - * CVSS version used to populate cvss_score and severity. - * - * Generated from protobuf field .grafeas.v1.CVSSVersion cvss_version = 7; - * @return int - */ - public function getCvssVersion() - { - return $this->cvss_version; - } - - /** - * CVSS version used to populate cvss_score and severity. - * - * Generated from protobuf field .grafeas.v1.CVSSVersion cvss_version = 7; - * @param int $var - * @return $this - */ - public function setCvssVersion($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSSVersion::class); - $this->cvss_version = $var; - - return $this; - } - - /** - * The full description of the v2 CVSS for this vulnerability. - * - * Generated from protobuf field .grafeas.v1.CVSS cvss_v2 = 8; - * @return \Grafeas\V1\CVSS|null - */ - public function getCvssV2() - { - return $this->cvss_v2; - } - - public function hasCvssV2() - { - return isset($this->cvss_v2); - } - - public function clearCvssV2() - { - unset($this->cvss_v2); - } - - /** - * The full description of the v2 CVSS for this vulnerability. - * - * Generated from protobuf field .grafeas.v1.CVSS cvss_v2 = 8; - * @param \Grafeas\V1\CVSS $var - * @return $this - */ - public function setCvssV2($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\CVSS::class); - $this->cvss_v2 = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/Detail.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/Detail.php deleted file mode 100644 index 8bd53ea558d3..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/Detail.php +++ /dev/null @@ -1,645 +0,0 @@ -grafeas.v1.VulnerabilityNote.Detail - */ -class Detail extends \Google\Protobuf\Internal\Message -{ - /** - * The distro assigned severity of this vulnerability. - * - * Generated from protobuf field string severity_name = 1; - */ - protected $severity_name = ''; - /** - * A vendor-specific description of this vulnerability. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * - * Generated from protobuf field string package_type = 3; - */ - protected $package_type = ''; - /** - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability affects. - * - * Generated from protobuf field string affected_cpe_uri = 4; - */ - protected $affected_cpe_uri = ''; - /** - * Required. The package this vulnerability affects. - * - * Generated from protobuf field string affected_package = 5; - */ - protected $affected_package = ''; - /** - * The version number at the start of an interval in which this - * vulnerability exists. A vulnerability can affect a package between - * version numbers that are disjoint sets of intervals (example: - * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be - * represented in its own Detail. If a specific affected version is provided - * by a vulnerability database, affected_version_start and - * affected_version_end will be the same in that Detail. - * - * Generated from protobuf field .grafeas.v1.Version affected_version_start = 6; - */ - protected $affected_version_start = null; - /** - * The version number at the end of an interval in which this vulnerability - * exists. A vulnerability can affect a package between version numbers - * that are disjoint sets of intervals (example: [1.0.0-1.1.0], - * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its - * own Detail. If a specific affected version is provided by a vulnerability - * database, affected_version_start and affected_version_end will be the - * same in that Detail. - * - * Generated from protobuf field .grafeas.v1.Version affected_version_end = 7; - */ - protected $affected_version_end = null; - /** - * The distro recommended [CPE URI](https://cpe.mitre.org/specification/) - * to update to that contains a fix for this vulnerability. It is possible - * for this to be different from the affected_cpe_uri. - * - * Generated from protobuf field string fixed_cpe_uri = 8; - */ - protected $fixed_cpe_uri = ''; - /** - * The distro recommended package to update to that contains a fix for this - * vulnerability. It is possible for this to be different from the - * affected_package. - * - * Generated from protobuf field string fixed_package = 9; - */ - protected $fixed_package = ''; - /** - * The distro recommended version to update to that contains a - * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no - * such version is yet available. - * - * Generated from protobuf field .grafeas.v1.Version fixed_version = 10; - */ - protected $fixed_version = null; - /** - * Whether this detail is obsolete. Occurrences are expected not to point to - * obsolete details. - * - * Generated from protobuf field bool is_obsolete = 11; - */ - protected $is_obsolete = false; - /** - * The time this information was last changed at the source. This is an - * upstream timestamp from the underlying information source - e.g. Ubuntu - * security tracker. - * - * Generated from protobuf field .google.protobuf.Timestamp source_update_time = 12; - */ - protected $source_update_time = null; - /** - * The source from which the information in this Detail was obtained. - * - * Generated from protobuf field string source = 13; - */ - protected $source = ''; - /** - * The name of the vendor of the product. - * - * Generated from protobuf field string vendor = 14; - */ - protected $vendor = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $severity_name - * The distro assigned severity of this vulnerability. - * @type string $description - * A vendor-specific description of this vulnerability. - * @type string $package_type - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * @type string $affected_cpe_uri - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability affects. - * @type string $affected_package - * Required. The package this vulnerability affects. - * @type \Grafeas\V1\Version $affected_version_start - * The version number at the start of an interval in which this - * vulnerability exists. A vulnerability can affect a package between - * version numbers that are disjoint sets of intervals (example: - * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be - * represented in its own Detail. If a specific affected version is provided - * by a vulnerability database, affected_version_start and - * affected_version_end will be the same in that Detail. - * @type \Grafeas\V1\Version $affected_version_end - * The version number at the end of an interval in which this vulnerability - * exists. A vulnerability can affect a package between version numbers - * that are disjoint sets of intervals (example: [1.0.0-1.1.0], - * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its - * own Detail. If a specific affected version is provided by a vulnerability - * database, affected_version_start and affected_version_end will be the - * same in that Detail. - * @type string $fixed_cpe_uri - * The distro recommended [CPE URI](https://cpe.mitre.org/specification/) - * to update to that contains a fix for this vulnerability. It is possible - * for this to be different from the affected_cpe_uri. - * @type string $fixed_package - * The distro recommended package to update to that contains a fix for this - * vulnerability. It is possible for this to be different from the - * affected_package. - * @type \Grafeas\V1\Version $fixed_version - * The distro recommended version to update to that contains a - * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no - * such version is yet available. - * @type bool $is_obsolete - * Whether this detail is obsolete. Occurrences are expected not to point to - * obsolete details. - * @type \Google\Protobuf\Timestamp $source_update_time - * The time this information was last changed at the source. This is an - * upstream timestamp from the underlying information source - e.g. Ubuntu - * security tracker. - * @type string $source - * The source from which the information in this Detail was obtained. - * @type string $vendor - * The name of the vendor of the product. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * The distro assigned severity of this vulnerability. - * - * Generated from protobuf field string severity_name = 1; - * @return string - */ - public function getSeverityName() - { - return $this->severity_name; - } - - /** - * The distro assigned severity of this vulnerability. - * - * Generated from protobuf field string severity_name = 1; - * @param string $var - * @return $this - */ - public function setSeverityName($var) - { - GPBUtil::checkString($var, True); - $this->severity_name = $var; - - return $this; - } - - /** - * A vendor-specific description of this vulnerability. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A vendor-specific description of this vulnerability. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * - * Generated from protobuf field string package_type = 3; - * @return string - */ - public function getPackageType() - { - return $this->package_type; - } - - /** - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * - * Generated from protobuf field string package_type = 3; - * @param string $var - * @return $this - */ - public function setPackageType($var) - { - GPBUtil::checkString($var, True); - $this->package_type = $var; - - return $this; - } - - /** - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability affects. - * - * Generated from protobuf field string affected_cpe_uri = 4; - * @return string - */ - public function getAffectedCpeUri() - { - return $this->affected_cpe_uri; - } - - /** - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability affects. - * - * Generated from protobuf field string affected_cpe_uri = 4; - * @param string $var - * @return $this - */ - public function setAffectedCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->affected_cpe_uri = $var; - - return $this; - } - - /** - * Required. The package this vulnerability affects. - * - * Generated from protobuf field string affected_package = 5; - * @return string - */ - public function getAffectedPackage() - { - return $this->affected_package; - } - - /** - * Required. The package this vulnerability affects. - * - * Generated from protobuf field string affected_package = 5; - * @param string $var - * @return $this - */ - public function setAffectedPackage($var) - { - GPBUtil::checkString($var, True); - $this->affected_package = $var; - - return $this; - } - - /** - * The version number at the start of an interval in which this - * vulnerability exists. A vulnerability can affect a package between - * version numbers that are disjoint sets of intervals (example: - * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be - * represented in its own Detail. If a specific affected version is provided - * by a vulnerability database, affected_version_start and - * affected_version_end will be the same in that Detail. - * - * Generated from protobuf field .grafeas.v1.Version affected_version_start = 6; - * @return \Grafeas\V1\Version|null - */ - public function getAffectedVersionStart() - { - return $this->affected_version_start; - } - - public function hasAffectedVersionStart() - { - return isset($this->affected_version_start); - } - - public function clearAffectedVersionStart() - { - unset($this->affected_version_start); - } - - /** - * The version number at the start of an interval in which this - * vulnerability exists. A vulnerability can affect a package between - * version numbers that are disjoint sets of intervals (example: - * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be - * represented in its own Detail. If a specific affected version is provided - * by a vulnerability database, affected_version_start and - * affected_version_end will be the same in that Detail. - * - * Generated from protobuf field .grafeas.v1.Version affected_version_start = 6; - * @param \Grafeas\V1\Version $var - * @return $this - */ - public function setAffectedVersionStart($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); - $this->affected_version_start = $var; - - return $this; - } - - /** - * The version number at the end of an interval in which this vulnerability - * exists. A vulnerability can affect a package between version numbers - * that are disjoint sets of intervals (example: [1.0.0-1.1.0], - * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its - * own Detail. If a specific affected version is provided by a vulnerability - * database, affected_version_start and affected_version_end will be the - * same in that Detail. - * - * Generated from protobuf field .grafeas.v1.Version affected_version_end = 7; - * @return \Grafeas\V1\Version|null - */ - public function getAffectedVersionEnd() - { - return $this->affected_version_end; - } - - public function hasAffectedVersionEnd() - { - return isset($this->affected_version_end); - } - - public function clearAffectedVersionEnd() - { - unset($this->affected_version_end); - } - - /** - * The version number at the end of an interval in which this vulnerability - * exists. A vulnerability can affect a package between version numbers - * that are disjoint sets of intervals (example: [1.0.0-1.1.0], - * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its - * own Detail. If a specific affected version is provided by a vulnerability - * database, affected_version_start and affected_version_end will be the - * same in that Detail. - * - * Generated from protobuf field .grafeas.v1.Version affected_version_end = 7; - * @param \Grafeas\V1\Version $var - * @return $this - */ - public function setAffectedVersionEnd($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); - $this->affected_version_end = $var; - - return $this; - } - - /** - * The distro recommended [CPE URI](https://cpe.mitre.org/specification/) - * to update to that contains a fix for this vulnerability. It is possible - * for this to be different from the affected_cpe_uri. - * - * Generated from protobuf field string fixed_cpe_uri = 8; - * @return string - */ - public function getFixedCpeUri() - { - return $this->fixed_cpe_uri; - } - - /** - * The distro recommended [CPE URI](https://cpe.mitre.org/specification/) - * to update to that contains a fix for this vulnerability. It is possible - * for this to be different from the affected_cpe_uri. - * - * Generated from protobuf field string fixed_cpe_uri = 8; - * @param string $var - * @return $this - */ - public function setFixedCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->fixed_cpe_uri = $var; - - return $this; - } - - /** - * The distro recommended package to update to that contains a fix for this - * vulnerability. It is possible for this to be different from the - * affected_package. - * - * Generated from protobuf field string fixed_package = 9; - * @return string - */ - public function getFixedPackage() - { - return $this->fixed_package; - } - - /** - * The distro recommended package to update to that contains a fix for this - * vulnerability. It is possible for this to be different from the - * affected_package. - * - * Generated from protobuf field string fixed_package = 9; - * @param string $var - * @return $this - */ - public function setFixedPackage($var) - { - GPBUtil::checkString($var, True); - $this->fixed_package = $var; - - return $this; - } - - /** - * The distro recommended version to update to that contains a - * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no - * such version is yet available. - * - * Generated from protobuf field .grafeas.v1.Version fixed_version = 10; - * @return \Grafeas\V1\Version|null - */ - public function getFixedVersion() - { - return $this->fixed_version; - } - - public function hasFixedVersion() - { - return isset($this->fixed_version); - } - - public function clearFixedVersion() - { - unset($this->fixed_version); - } - - /** - * The distro recommended version to update to that contains a - * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no - * such version is yet available. - * - * Generated from protobuf field .grafeas.v1.Version fixed_version = 10; - * @param \Grafeas\V1\Version $var - * @return $this - */ - public function setFixedVersion($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); - $this->fixed_version = $var; - - return $this; - } - - /** - * Whether this detail is obsolete. Occurrences are expected not to point to - * obsolete details. - * - * Generated from protobuf field bool is_obsolete = 11; - * @return bool - */ - public function getIsObsolete() - { - return $this->is_obsolete; - } - - /** - * Whether this detail is obsolete. Occurrences are expected not to point to - * obsolete details. - * - * Generated from protobuf field bool is_obsolete = 11; - * @param bool $var - * @return $this - */ - public function setIsObsolete($var) - { - GPBUtil::checkBool($var); - $this->is_obsolete = $var; - - return $this; - } - - /** - * The time this information was last changed at the source. This is an - * upstream timestamp from the underlying information source - e.g. Ubuntu - * security tracker. - * - * Generated from protobuf field .google.protobuf.Timestamp source_update_time = 12; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSourceUpdateTime() - { - return $this->source_update_time; - } - - public function hasSourceUpdateTime() - { - return isset($this->source_update_time); - } - - public function clearSourceUpdateTime() - { - unset($this->source_update_time); - } - - /** - * The time this information was last changed at the source. This is an - * upstream timestamp from the underlying information source - e.g. Ubuntu - * security tracker. - * - * Generated from protobuf field .google.protobuf.Timestamp source_update_time = 12; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSourceUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->source_update_time = $var; - - return $this; - } - - /** - * The source from which the information in this Detail was obtained. - * - * Generated from protobuf field string source = 13; - * @return string - */ - public function getSource() - { - return $this->source; - } - - /** - * The source from which the information in this Detail was obtained. - * - * Generated from protobuf field string source = 13; - * @param string $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkString($var, True); - $this->source = $var; - - return $this; - } - - /** - * The name of the vendor of the product. - * - * Generated from protobuf field string vendor = 14; - * @return string - */ - public function getVendor() - { - return $this->vendor; - } - - /** - * The name of the vendor of the product. - * - * Generated from protobuf field string vendor = 14; - * @param string $var - * @return $this - */ - public function setVendor($var) - { - GPBUtil::checkString($var, True); - $this->vendor = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Detail::class, \Grafeas\V1\VulnerabilityNote_Detail::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/WindowsDetail.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/WindowsDetail.php deleted file mode 100644 index e20cc151c87d..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/WindowsDetail.php +++ /dev/null @@ -1,186 +0,0 @@ -grafeas.v1.VulnerabilityNote.WindowsDetail - */ -class WindowsDetail extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability affects. - * - * Generated from protobuf field string cpe_uri = 1; - */ - protected $cpe_uri = ''; - /** - * Required. The name of this vulnerability. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - /** - * The description of this vulnerability. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Required. The names of the KBs which have hotfixes to mitigate this - * vulnerability. Note that there may be multiple hotfixes (and thus - * multiple KBs) that mitigate a given vulnerability. Currently any listed - * KBs presence is considered a fix. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - private $fixing_kbs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cpe_uri - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability affects. - * @type string $name - * Required. The name of this vulnerability. - * @type string $description - * The description of this vulnerability. - * @type array<\Grafeas\V1\VulnerabilityNote\WindowsDetail\KnowledgeBase>|\Google\Protobuf\Internal\RepeatedField $fixing_kbs - * Required. The names of the KBs which have hotfixes to mitigate this - * vulnerability. Note that there may be multiple hotfixes (and thus - * multiple KBs) that mitigate a given vulnerability. Currently any listed - * KBs presence is considered a fix. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability affects. - * - * Generated from protobuf field string cpe_uri = 1; - * @return string - */ - public function getCpeUri() - { - return $this->cpe_uri; - } - - /** - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability affects. - * - * Generated from protobuf field string cpe_uri = 1; - * @param string $var - * @return $this - */ - public function setCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->cpe_uri = $var; - - return $this; - } - - /** - * Required. The name of this vulnerability. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of this vulnerability. - * - * Generated from protobuf field string name = 2; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The description of this vulnerability. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description of this vulnerability. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. The names of the KBs which have hotfixes to mitigate this - * vulnerability. Note that there may be multiple hotfixes (and thus - * multiple KBs) that mitigate a given vulnerability. Currently any listed - * KBs presence is considered a fix. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFixingKbs() - { - return $this->fixing_kbs; - } - - /** - * Required. The names of the KBs which have hotfixes to mitigate this - * vulnerability. Note that there may be multiple hotfixes (and thus - * multiple KBs) that mitigate a given vulnerability. Currently any listed - * KBs presence is considered a fix. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - * @param array<\Grafeas\V1\VulnerabilityNote\WindowsDetail\KnowledgeBase>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFixingKbs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\VulnerabilityNote\WindowsDetail\KnowledgeBase::class); - $this->fixing_kbs = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WindowsDetail::class, \Grafeas\V1\VulnerabilityNote_WindowsDetail::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/WindowsDetail/KnowledgeBase.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/WindowsDetail/KnowledgeBase.php deleted file mode 100644 index 26ec0c58b2f6..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/WindowsDetail/KnowledgeBase.php +++ /dev/null @@ -1,106 +0,0 @@ -grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase - */ -class KnowledgeBase extends \Google\Protobuf\Internal\Message -{ - /** - * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)). - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * A link to the KB in the [Windows update catalog] - * (https://www.catalog.update.microsoft.com/). - * - * Generated from protobuf field string url = 2; - */ - protected $url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)). - * @type string $url - * A link to the KB in the [Windows update catalog] - * (https://www.catalog.update.microsoft.com/). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)). - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)). - * - * 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; - } - - /** - * A link to the KB in the [Windows update catalog] - * (https://www.catalog.update.microsoft.com/). - * - * Generated from protobuf field string url = 2; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * A link to the KB in the [Windows update catalog] - * (https://www.catalog.update.microsoft.com/). - * - * Generated from protobuf field string url = 2; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(KnowledgeBase::class, \Grafeas\V1\VulnerabilityNote_WindowsDetail_KnowledgeBase::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence.php deleted file mode 100644 index a35619159c20..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence.php +++ /dev/null @@ -1,584 +0,0 @@ -grafeas.v1.VulnerabilityOccurrence - */ -class VulnerabilityOccurrence extends \Google\Protobuf\Internal\Message -{ - /** - * The type of package; whether native or non native (e.g., ruby gems, node.js - * packages, etc.). - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - /** - * Output only. The note provider assigned severity of this vulnerability. - * - * Generated from protobuf field .grafeas.v1.Severity severity = 2; - */ - protected $severity = 0; - /** - * Output only. The CVSS score of this vulnerability. CVSS score is on a - * scale of 0 - 10 where 0 indicates low severity and 10 indicates high - * severity. - * - * Generated from protobuf field float cvss_score = 3; - */ - protected $cvss_score = 0.0; - /** - * The cvss v3 score for the vulnerability. - * - * Generated from protobuf field .grafeas.v1.CVSS cvssv3 = 10; - */ - protected $cvssv3 = null; - /** - * Required. The set of affected locations and their fixes (if available) - * within the associated resource. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - private $package_issue; - /** - * Output only. A one sentence description of this vulnerability. - * - * Generated from protobuf field string short_description = 5; - */ - protected $short_description = ''; - /** - * Output only. A detailed description of this vulnerability. - * - * Generated from protobuf field string long_description = 6; - */ - protected $long_description = ''; - /** - * Output only. URLs related to this vulnerability. - * - * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - private $related_urls; - /** - * The distro assigned severity for this vulnerability when it is available, - * otherwise this is the note provider assigned severity. - * When there are multiple PackageIssues for this vulnerability, they can have - * different effective severities because some might be provided by the distro - * while others are provided by the language ecosystem for a language pack. - * For this reason, it is advised to use the effective severity on the - * PackageIssue level. In the case where multiple PackageIssues have differing - * effective severities, this field should be the highest severity for any of - * the PackageIssues. - * - * Generated from protobuf field .grafeas.v1.Severity effective_severity = 8; - */ - protected $effective_severity = 0; - /** - * Output only. Whether at least one of the affected packages has a fix - * available. - * - * Generated from protobuf field bool fix_available = 9; - */ - protected $fix_available = false; - /** - * Output only. CVSS version used to populate cvss_score and severity. - * - * Generated from protobuf field .grafeas.v1.CVSSVersion cvss_version = 11; - */ - protected $cvss_version = 0; - /** - * The cvss v2 score for the vulnerability. - * - * Generated from protobuf field .grafeas.v1.CVSS cvss_v2 = 12; - */ - protected $cvss_v2 = null; - /** - * Generated from protobuf field .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; - */ - protected $vex_assessment = null; - /** - * Occurrence-specific extra details about the vulnerability. - * - * Generated from protobuf field string extra_details = 14; - */ - protected $extra_details = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * The type of package; whether native or non native (e.g., ruby gems, node.js - * packages, etc.). - * @type int $severity - * Output only. The note provider assigned severity of this vulnerability. - * @type float $cvss_score - * Output only. The CVSS score of this vulnerability. CVSS score is on a - * scale of 0 - 10 where 0 indicates low severity and 10 indicates high - * severity. - * @type \Grafeas\V1\CVSS $cvssv3 - * The cvss v3 score for the vulnerability. - * @type array<\Grafeas\V1\VulnerabilityOccurrence\PackageIssue>|\Google\Protobuf\Internal\RepeatedField $package_issue - * Required. The set of affected locations and their fixes (if available) - * within the associated resource. - * @type string $short_description - * Output only. A one sentence description of this vulnerability. - * @type string $long_description - * Output only. A detailed description of this vulnerability. - * @type array<\Grafeas\V1\RelatedUrl>|\Google\Protobuf\Internal\RepeatedField $related_urls - * Output only. URLs related to this vulnerability. - * @type int $effective_severity - * The distro assigned severity for this vulnerability when it is available, - * otherwise this is the note provider assigned severity. - * When there are multiple PackageIssues for this vulnerability, they can have - * different effective severities because some might be provided by the distro - * while others are provided by the language ecosystem for a language pack. - * For this reason, it is advised to use the effective severity on the - * PackageIssue level. In the case where multiple PackageIssues have differing - * effective severities, this field should be the highest severity for any of - * the PackageIssues. - * @type bool $fix_available - * Output only. Whether at least one of the affected packages has a fix - * available. - * @type int $cvss_version - * Output only. CVSS version used to populate cvss_score and severity. - * @type \Grafeas\V1\CVSS $cvss_v2 - * The cvss v2 score for the vulnerability. - * @type \Grafeas\V1\VulnerabilityOccurrence\VexAssessment $vex_assessment - * @type string $extra_details - * Occurrence-specific extra details about the vulnerability. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * The type of package; whether native or non native (e.g., ruby gems, node.js - * packages, etc.). - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The type of package; whether native or non native (e.g., ruby gems, node.js - * packages, etc.). - * - * Generated from protobuf field string type = 1; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Output only. The note provider assigned severity of this vulnerability. - * - * Generated from protobuf field .grafeas.v1.Severity severity = 2; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * Output only. The note provider assigned severity of this vulnerability. - * - * Generated from protobuf field .grafeas.v1.Severity severity = 2; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\Severity::class); - $this->severity = $var; - - return $this; - } - - /** - * Output only. The CVSS score of this vulnerability. CVSS score is on a - * scale of 0 - 10 where 0 indicates low severity and 10 indicates high - * severity. - * - * Generated from protobuf field float cvss_score = 3; - * @return float - */ - public function getCvssScore() - { - return $this->cvss_score; - } - - /** - * Output only. The CVSS score of this vulnerability. CVSS score is on a - * scale of 0 - 10 where 0 indicates low severity and 10 indicates high - * severity. - * - * Generated from protobuf field float cvss_score = 3; - * @param float $var - * @return $this - */ - public function setCvssScore($var) - { - GPBUtil::checkFloat($var); - $this->cvss_score = $var; - - return $this; - } - - /** - * The cvss v3 score for the vulnerability. - * - * Generated from protobuf field .grafeas.v1.CVSS cvssv3 = 10; - * @return \Grafeas\V1\CVSS|null - */ - public function getCvssv3() - { - return $this->cvssv3; - } - - public function hasCvssv3() - { - return isset($this->cvssv3); - } - - public function clearCvssv3() - { - unset($this->cvssv3); - } - - /** - * The cvss v3 score for the vulnerability. - * - * Generated from protobuf field .grafeas.v1.CVSS cvssv3 = 10; - * @param \Grafeas\V1\CVSS $var - * @return $this - */ - public function setCvssv3($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\CVSS::class); - $this->cvssv3 = $var; - - return $this; - } - - /** - * Required. The set of affected locations and their fixes (if available) - * within the associated resource. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPackageIssue() - { - return $this->package_issue; - } - - /** - * Required. The set of affected locations and their fixes (if available) - * within the associated resource. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - * @param array<\Grafeas\V1\VulnerabilityOccurrence\PackageIssue>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPackageIssue($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\VulnerabilityOccurrence\PackageIssue::class); - $this->package_issue = $arr; - - return $this; - } - - /** - * Output only. A one sentence description of this vulnerability. - * - * Generated from protobuf field string short_description = 5; - * @return string - */ - public function getShortDescription() - { - return $this->short_description; - } - - /** - * Output only. A one sentence description of this vulnerability. - * - * Generated from protobuf field string short_description = 5; - * @param string $var - * @return $this - */ - public function setShortDescription($var) - { - GPBUtil::checkString($var, True); - $this->short_description = $var; - - return $this; - } - - /** - * Output only. A detailed description of this vulnerability. - * - * Generated from protobuf field string long_description = 6; - * @return string - */ - public function getLongDescription() - { - return $this->long_description; - } - - /** - * Output only. A detailed description of this vulnerability. - * - * Generated from protobuf field string long_description = 6; - * @param string $var - * @return $this - */ - public function setLongDescription($var) - { - GPBUtil::checkString($var, True); - $this->long_description = $var; - - return $this; - } - - /** - * Output only. URLs related to this vulnerability. - * - * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_urls = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRelatedUrls() - { - return $this->related_urls; - } - - /** - * Output only. URLs related to this vulnerability. - * - * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_urls = 7; - * @param array<\Grafeas\V1\RelatedUrl>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRelatedUrls($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\RelatedUrl::class); - $this->related_urls = $arr; - - return $this; - } - - /** - * The distro assigned severity for this vulnerability when it is available, - * otherwise this is the note provider assigned severity. - * When there are multiple PackageIssues for this vulnerability, they can have - * different effective severities because some might be provided by the distro - * while others are provided by the language ecosystem for a language pack. - * For this reason, it is advised to use the effective severity on the - * PackageIssue level. In the case where multiple PackageIssues have differing - * effective severities, this field should be the highest severity for any of - * the PackageIssues. - * - * Generated from protobuf field .grafeas.v1.Severity effective_severity = 8; - * @return int - */ - public function getEffectiveSeverity() - { - return $this->effective_severity; - } - - /** - * The distro assigned severity for this vulnerability when it is available, - * otherwise this is the note provider assigned severity. - * When there are multiple PackageIssues for this vulnerability, they can have - * different effective severities because some might be provided by the distro - * while others are provided by the language ecosystem for a language pack. - * For this reason, it is advised to use the effective severity on the - * PackageIssue level. In the case where multiple PackageIssues have differing - * effective severities, this field should be the highest severity for any of - * the PackageIssues. - * - * Generated from protobuf field .grafeas.v1.Severity effective_severity = 8; - * @param int $var - * @return $this - */ - public function setEffectiveSeverity($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\Severity::class); - $this->effective_severity = $var; - - return $this; - } - - /** - * Output only. Whether at least one of the affected packages has a fix - * available. - * - * Generated from protobuf field bool fix_available = 9; - * @return bool - */ - public function getFixAvailable() - { - return $this->fix_available; - } - - /** - * Output only. Whether at least one of the affected packages has a fix - * available. - * - * Generated from protobuf field bool fix_available = 9; - * @param bool $var - * @return $this - */ - public function setFixAvailable($var) - { - GPBUtil::checkBool($var); - $this->fix_available = $var; - - return $this; - } - - /** - * Output only. CVSS version used to populate cvss_score and severity. - * - * Generated from protobuf field .grafeas.v1.CVSSVersion cvss_version = 11; - * @return int - */ - public function getCvssVersion() - { - return $this->cvss_version; - } - - /** - * Output only. CVSS version used to populate cvss_score and severity. - * - * Generated from protobuf field .grafeas.v1.CVSSVersion cvss_version = 11; - * @param int $var - * @return $this - */ - public function setCvssVersion($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSSVersion::class); - $this->cvss_version = $var; - - return $this; - } - - /** - * The cvss v2 score for the vulnerability. - * - * Generated from protobuf field .grafeas.v1.CVSS cvss_v2 = 12; - * @return \Grafeas\V1\CVSS|null - */ - public function getCvssV2() - { - return $this->cvss_v2; - } - - public function hasCvssV2() - { - return isset($this->cvss_v2); - } - - public function clearCvssV2() - { - unset($this->cvss_v2); - } - - /** - * The cvss v2 score for the vulnerability. - * - * Generated from protobuf field .grafeas.v1.CVSS cvss_v2 = 12; - * @param \Grafeas\V1\CVSS $var - * @return $this - */ - public function setCvssV2($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\CVSS::class); - $this->cvss_v2 = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; - * @return \Grafeas\V1\VulnerabilityOccurrence\VexAssessment|null - */ - public function getVexAssessment() - { - return $this->vex_assessment; - } - - public function hasVexAssessment() - { - return isset($this->vex_assessment); - } - - public function clearVexAssessment() - { - unset($this->vex_assessment); - } - - /** - * Generated from protobuf field .grafeas.v1.VulnerabilityOccurrence.VexAssessment vex_assessment = 13; - * @param \Grafeas\V1\VulnerabilityOccurrence\VexAssessment $var - * @return $this - */ - public function setVexAssessment($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\VulnerabilityOccurrence\VexAssessment::class); - $this->vex_assessment = $var; - - return $this; - } - - /** - * Occurrence-specific extra details about the vulnerability. - * - * Generated from protobuf field string extra_details = 14; - * @return string - */ - public function getExtraDetails() - { - return $this->extra_details; - } - - /** - * Occurrence-specific extra details about the vulnerability. - * - * Generated from protobuf field string extra_details = 14; - * @param string $var - * @return $this - */ - public function setExtraDetails($var) - { - GPBUtil::checkString($var, True); - $this->extra_details = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence/PackageIssue.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence/PackageIssue.php deleted file mode 100644 index 50eb18f7d2f5..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence/PackageIssue.php +++ /dev/null @@ -1,429 +0,0 @@ -grafeas.v1.VulnerabilityOccurrence.PackageIssue - */ -class PackageIssue extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability was found in. - * - * Generated from protobuf field string affected_cpe_uri = 1; - */ - protected $affected_cpe_uri = ''; - /** - * Required. The package this vulnerability was found in. - * - * Generated from protobuf field string affected_package = 2; - */ - protected $affected_package = ''; - /** - * Required. The version of the package that is installed on the resource - * affected by this vulnerability. - * - * Generated from protobuf field .grafeas.v1.Version affected_version = 3; - */ - protected $affected_version = null; - /** - * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability - * was fixed in. It is possible for this to be different from the - * affected_cpe_uri. - * - * Generated from protobuf field string fixed_cpe_uri = 4; - */ - protected $fixed_cpe_uri = ''; - /** - * The package this vulnerability was fixed in. It is possible for this to - * be different from the affected_package. - * - * Generated from protobuf field string fixed_package = 5; - */ - protected $fixed_package = ''; - /** - * Required. The version of the package this vulnerability was fixed in. - * Setting this to VersionKind.MAXIMUM means no fix is yet available. - * - * Generated from protobuf field .grafeas.v1.Version fixed_version = 6; - */ - protected $fixed_version = null; - /** - * Output only. Whether a fix is available for this package. - * - * Generated from protobuf field bool fix_available = 7; - */ - protected $fix_available = false; - /** - * The type of package (e.g. OS, MAVEN, GO). - * - * Generated from protobuf field string package_type = 8; - */ - protected $package_type = ''; - /** - * The distro or language system assigned severity for this vulnerability - * when that is available and note provider assigned severity when it is not - * available. - * - * Generated from protobuf field .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $effective_severity = 0; - /** - * The location at which this package was found. - * - * Generated from protobuf field repeated .grafeas.v1.FileLocation file_location = 10; - */ - private $file_location; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $affected_cpe_uri - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability was found in. - * @type string $affected_package - * Required. The package this vulnerability was found in. - * @type \Grafeas\V1\Version $affected_version - * Required. The version of the package that is installed on the resource - * affected by this vulnerability. - * @type string $fixed_cpe_uri - * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability - * was fixed in. It is possible for this to be different from the - * affected_cpe_uri. - * @type string $fixed_package - * The package this vulnerability was fixed in. It is possible for this to - * be different from the affected_package. - * @type \Grafeas\V1\Version $fixed_version - * Required. The version of the package this vulnerability was fixed in. - * Setting this to VersionKind.MAXIMUM means no fix is yet available. - * @type bool $fix_available - * Output only. Whether a fix is available for this package. - * @type string $package_type - * The type of package (e.g. OS, MAVEN, GO). - * @type int $effective_severity - * The distro or language system assigned severity for this vulnerability - * when that is available and note provider assigned severity when it is not - * available. - * @type array<\Grafeas\V1\FileLocation>|\Google\Protobuf\Internal\RepeatedField $file_location - * The location at which this package was found. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability was found in. - * - * Generated from protobuf field string affected_cpe_uri = 1; - * @return string - */ - public function getAffectedCpeUri() - { - return $this->affected_cpe_uri; - } - - /** - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability was found in. - * - * Generated from protobuf field string affected_cpe_uri = 1; - * @param string $var - * @return $this - */ - public function setAffectedCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->affected_cpe_uri = $var; - - return $this; - } - - /** - * Required. The package this vulnerability was found in. - * - * Generated from protobuf field string affected_package = 2; - * @return string - */ - public function getAffectedPackage() - { - return $this->affected_package; - } - - /** - * Required. The package this vulnerability was found in. - * - * Generated from protobuf field string affected_package = 2; - * @param string $var - * @return $this - */ - public function setAffectedPackage($var) - { - GPBUtil::checkString($var, True); - $this->affected_package = $var; - - return $this; - } - - /** - * Required. The version of the package that is installed on the resource - * affected by this vulnerability. - * - * Generated from protobuf field .grafeas.v1.Version affected_version = 3; - * @return \Grafeas\V1\Version|null - */ - public function getAffectedVersion() - { - return $this->affected_version; - } - - public function hasAffectedVersion() - { - return isset($this->affected_version); - } - - public function clearAffectedVersion() - { - unset($this->affected_version); - } - - /** - * Required. The version of the package that is installed on the resource - * affected by this vulnerability. - * - * Generated from protobuf field .grafeas.v1.Version affected_version = 3; - * @param \Grafeas\V1\Version $var - * @return $this - */ - public function setAffectedVersion($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); - $this->affected_version = $var; - - return $this; - } - - /** - * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability - * was fixed in. It is possible for this to be different from the - * affected_cpe_uri. - * - * Generated from protobuf field string fixed_cpe_uri = 4; - * @return string - */ - public function getFixedCpeUri() - { - return $this->fixed_cpe_uri; - } - - /** - * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability - * was fixed in. It is possible for this to be different from the - * affected_cpe_uri. - * - * Generated from protobuf field string fixed_cpe_uri = 4; - * @param string $var - * @return $this - */ - public function setFixedCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->fixed_cpe_uri = $var; - - return $this; - } - - /** - * The package this vulnerability was fixed in. It is possible for this to - * be different from the affected_package. - * - * Generated from protobuf field string fixed_package = 5; - * @return string - */ - public function getFixedPackage() - { - return $this->fixed_package; - } - - /** - * The package this vulnerability was fixed in. It is possible for this to - * be different from the affected_package. - * - * Generated from protobuf field string fixed_package = 5; - * @param string $var - * @return $this - */ - public function setFixedPackage($var) - { - GPBUtil::checkString($var, True); - $this->fixed_package = $var; - - return $this; - } - - /** - * Required. The version of the package this vulnerability was fixed in. - * Setting this to VersionKind.MAXIMUM means no fix is yet available. - * - * Generated from protobuf field .grafeas.v1.Version fixed_version = 6; - * @return \Grafeas\V1\Version|null - */ - public function getFixedVersion() - { - return $this->fixed_version; - } - - public function hasFixedVersion() - { - return isset($this->fixed_version); - } - - public function clearFixedVersion() - { - unset($this->fixed_version); - } - - /** - * Required. The version of the package this vulnerability was fixed in. - * Setting this to VersionKind.MAXIMUM means no fix is yet available. - * - * Generated from protobuf field .grafeas.v1.Version fixed_version = 6; - * @param \Grafeas\V1\Version $var - * @return $this - */ - public function setFixedVersion($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); - $this->fixed_version = $var; - - return $this; - } - - /** - * Output only. Whether a fix is available for this package. - * - * Generated from protobuf field bool fix_available = 7; - * @return bool - */ - public function getFixAvailable() - { - return $this->fix_available; - } - - /** - * Output only. Whether a fix is available for this package. - * - * Generated from protobuf field bool fix_available = 7; - * @param bool $var - * @return $this - */ - public function setFixAvailable($var) - { - GPBUtil::checkBool($var); - $this->fix_available = $var; - - return $this; - } - - /** - * The type of package (e.g. OS, MAVEN, GO). - * - * Generated from protobuf field string package_type = 8; - * @return string - */ - public function getPackageType() - { - return $this->package_type; - } - - /** - * The type of package (e.g. OS, MAVEN, GO). - * - * Generated from protobuf field string package_type = 8; - * @param string $var - * @return $this - */ - public function setPackageType($var) - { - GPBUtil::checkString($var, True); - $this->package_type = $var; - - return $this; - } - - /** - * The distro or language system assigned severity for this vulnerability - * when that is available and note provider assigned severity when it is not - * available. - * - * Generated from protobuf field .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getEffectiveSeverity() - { - return $this->effective_severity; - } - - /** - * The distro or language system assigned severity for this vulnerability - * when that is available and note provider assigned severity when it is not - * available. - * - * Generated from protobuf field .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setEffectiveSeverity($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\Severity::class); - $this->effective_severity = $var; - - return $this; - } - - /** - * The location at which this package was found. - * - * Generated from protobuf field repeated .grafeas.v1.FileLocation file_location = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFileLocation() - { - return $this->file_location; - } - - /** - * The location at which this package was found. - * - * Generated from protobuf field repeated .grafeas.v1.FileLocation file_location = 10; - * @param array<\Grafeas\V1\FileLocation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFileLocation($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\FileLocation::class); - $this->file_location = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PackageIssue::class, \Grafeas\V1\VulnerabilityOccurrence_PackageIssue::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence/VexAssessment.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence/VexAssessment.php deleted file mode 100644 index 8aebd58952c4..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence/VexAssessment.php +++ /dev/null @@ -1,364 +0,0 @@ -grafeas.v1.VulnerabilityOccurrence.VexAssessment - */ -class VexAssessment extends \Google\Protobuf\Internal\Message -{ - /** - * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) - * tracking number for the vulnerability. - * Deprecated: Use vulnerability_id instead to denote CVEs. - * - * Generated from protobuf field string cve = 1 [deprecated = true]; - * @deprecated - */ - protected $cve = ''; - /** - * The vulnerability identifier for this Assessment. Will hold one of - * common identifiers e.g. CVE, GHSA etc. - * - * Generated from protobuf field string vulnerability_id = 8; - */ - protected $vulnerability_id = ''; - /** - * Holds a list of references associated with this vulnerability item and - * assessment. - * - * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_uris = 2; - */ - private $related_uris; - /** - * The VulnerabilityAssessment note from which this VexAssessment was - * generated. - * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`. - * (-- api-linter: core::0122::name-suffix=disabled - * aip.dev/not-precedent: The suffix is kept for consistency. --) - * - * Generated from protobuf field string note_name = 3; - */ - protected $note_name = ''; - /** - * Provides the state of this Vulnerability assessment. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; - */ - protected $state = 0; - /** - * Contains information about the impact of this vulnerability, - * this will change with time. - * - * Generated from protobuf field repeated string impacts = 5; - */ - private $impacts; - /** - * Specifies details on how to handle (and presumably, fix) a vulnerability. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - */ - private $remediations; - /** - * Justification provides the justification when the state of the - * assessment if NOT_AFFECTED. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; - */ - protected $justification = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cve - * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) - * tracking number for the vulnerability. - * Deprecated: Use vulnerability_id instead to denote CVEs. - * @type string $vulnerability_id - * The vulnerability identifier for this Assessment. Will hold one of - * common identifiers e.g. CVE, GHSA etc. - * @type array<\Grafeas\V1\RelatedUrl>|\Google\Protobuf\Internal\RepeatedField $related_uris - * Holds a list of references associated with this vulnerability item and - * assessment. - * @type string $note_name - * The VulnerabilityAssessment note from which this VexAssessment was - * generated. - * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`. - * (-- api-linter: core::0122::name-suffix=disabled - * aip.dev/not-precedent: The suffix is kept for consistency. --) - * @type int $state - * Provides the state of this Vulnerability assessment. - * @type array|\Google\Protobuf\Internal\RepeatedField $impacts - * Contains information about the impact of this vulnerability, - * this will change with time. - * @type array<\Grafeas\V1\VulnerabilityAssessmentNote\Assessment\Remediation>|\Google\Protobuf\Internal\RepeatedField $remediations - * Specifies details on how to handle (and presumably, fix) a vulnerability. - * @type \Grafeas\V1\VulnerabilityAssessmentNote\Assessment\Justification $justification - * Justification provides the justification when the state of the - * assessment if NOT_AFFECTED. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) - * tracking number for the vulnerability. - * Deprecated: Use vulnerability_id instead to denote CVEs. - * - * Generated from protobuf field string cve = 1 [deprecated = true]; - * @return string - * @deprecated - */ - public function getCve() - { - @trigger_error('cve is deprecated.', E_USER_DEPRECATED); - return $this->cve; - } - - /** - * Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) - * tracking number for the vulnerability. - * Deprecated: Use vulnerability_id instead to denote CVEs. - * - * Generated from protobuf field string cve = 1 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setCve($var) - { - @trigger_error('cve is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->cve = $var; - - return $this; - } - - /** - * The vulnerability identifier for this Assessment. Will hold one of - * common identifiers e.g. CVE, GHSA etc. - * - * Generated from protobuf field string vulnerability_id = 8; - * @return string - */ - public function getVulnerabilityId() - { - return $this->vulnerability_id; - } - - /** - * The vulnerability identifier for this Assessment. Will hold one of - * common identifiers e.g. CVE, GHSA etc. - * - * Generated from protobuf field string vulnerability_id = 8; - * @param string $var - * @return $this - */ - public function setVulnerabilityId($var) - { - GPBUtil::checkString($var, True); - $this->vulnerability_id = $var; - - return $this; - } - - /** - * Holds a list of references associated with this vulnerability item and - * assessment. - * - * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_uris = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRelatedUris() - { - return $this->related_uris; - } - - /** - * Holds a list of references associated with this vulnerability item and - * assessment. - * - * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_uris = 2; - * @param array<\Grafeas\V1\RelatedUrl>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRelatedUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\RelatedUrl::class); - $this->related_uris = $arr; - - return $this; - } - - /** - * The VulnerabilityAssessment note from which this VexAssessment was - * generated. - * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`. - * (-- api-linter: core::0122::name-suffix=disabled - * aip.dev/not-precedent: The suffix is kept for consistency. --) - * - * Generated from protobuf field string note_name = 3; - * @return string - */ - public function getNoteName() - { - return $this->note_name; - } - - /** - * The VulnerabilityAssessment note from which this VexAssessment was - * generated. - * This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`. - * (-- api-linter: core::0122::name-suffix=disabled - * aip.dev/not-precedent: The suffix is kept for consistency. --) - * - * Generated from protobuf field string note_name = 3; - * @param string $var - * @return $this - */ - public function setNoteName($var) - { - GPBUtil::checkString($var, True); - $this->note_name = $var; - - return $this; - } - - /** - * Provides the state of this Vulnerability assessment. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Provides the state of this Vulnerability assessment. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Assessment.State state = 4; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\VulnerabilityAssessmentNote\Assessment\State::class); - $this->state = $var; - - return $this; - } - - /** - * Contains information about the impact of this vulnerability, - * this will change with time. - * - * Generated from protobuf field repeated string impacts = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getImpacts() - { - return $this->impacts; - } - - /** - * Contains information about the impact of this vulnerability, - * this will change with time. - * - * Generated from protobuf field repeated string impacts = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setImpacts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->impacts = $arr; - - return $this; - } - - /** - * Specifies details on how to handle (and presumably, fix) a vulnerability. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRemediations() - { - return $this->remediations; - } - - /** - * Specifies details on how to handle (and presumably, fix) a vulnerability. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation remediations = 6; - * @param array<\Grafeas\V1\VulnerabilityAssessmentNote\Assessment\Remediation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRemediations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\VulnerabilityAssessmentNote\Assessment\Remediation::class); - $this->remediations = $arr; - - return $this; - } - - /** - * Justification provides the justification when the state of the - * assessment if NOT_AFFECTED. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; - * @return \Grafeas\V1\VulnerabilityAssessmentNote\Assessment\Justification|null - */ - public function getJustification() - { - return $this->justification; - } - - public function hasJustification() - { - return isset($this->justification); - } - - public function clearJustification() - { - unset($this->justification); - } - - /** - * Justification provides the justification when the state of the - * assessment if NOT_AFFECTED. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification justification = 7; - * @param \Grafeas\V1\VulnerabilityAssessmentNote\Assessment\Justification $var - * @return $this - */ - public function setJustification($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\VulnerabilityAssessmentNote\Assessment\Justification::class); - $this->justification = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VexAssessment::class, \Grafeas\V1\VulnerabilityOccurrence_VexAssessment::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate.php deleted file mode 100644 index 49f8fd4e9db6..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate.php +++ /dev/null @@ -1,298 +0,0 @@ -grafeas.v1.WindowsUpdate - */ -class WindowsUpdate extends \Google\Protobuf\Internal\Message -{ - /** - * Required - The unique identifier for the update. - * - * Generated from protobuf field .grafeas.v1.WindowsUpdate.Identity identity = 1; - */ - protected $identity = null; - /** - * The localized title of the update. - * - * Generated from protobuf field string title = 2; - */ - protected $title = ''; - /** - * The localized description of the update. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * The list of categories to which the update belongs. - * - * Generated from protobuf field repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - private $categories; - /** - * The Microsoft Knowledge Base article IDs that are associated with the - * update. - * - * Generated from protobuf field repeated string kb_article_ids = 5; - */ - private $kb_article_ids; - /** - * The hyperlink to the support information for the update. - * - * Generated from protobuf field string support_url = 6; - */ - protected $support_url = ''; - /** - * The last published timestamp of the update. - * - * Generated from protobuf field .google.protobuf.Timestamp last_published_timestamp = 7; - */ - protected $last_published_timestamp = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\WindowsUpdate\Identity $identity - * Required - The unique identifier for the update. - * @type string $title - * The localized title of the update. - * @type string $description - * The localized description of the update. - * @type array<\Grafeas\V1\WindowsUpdate\Category>|\Google\Protobuf\Internal\RepeatedField $categories - * The list of categories to which the update belongs. - * @type array|\Google\Protobuf\Internal\RepeatedField $kb_article_ids - * The Microsoft Knowledge Base article IDs that are associated with the - * update. - * @type string $support_url - * The hyperlink to the support information for the update. - * @type \Google\Protobuf\Timestamp $last_published_timestamp - * The last published timestamp of the update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Upgrade::initOnce(); - parent::__construct($data); - } - - /** - * Required - The unique identifier for the update. - * - * Generated from protobuf field .grafeas.v1.WindowsUpdate.Identity identity = 1; - * @return \Grafeas\V1\WindowsUpdate\Identity|null - */ - public function getIdentity() - { - return $this->identity; - } - - public function hasIdentity() - { - return isset($this->identity); - } - - public function clearIdentity() - { - unset($this->identity); - } - - /** - * Required - The unique identifier for the update. - * - * Generated from protobuf field .grafeas.v1.WindowsUpdate.Identity identity = 1; - * @param \Grafeas\V1\WindowsUpdate\Identity $var - * @return $this - */ - public function setIdentity($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\WindowsUpdate\Identity::class); - $this->identity = $var; - - return $this; - } - - /** - * The localized title of the update. - * - * Generated from protobuf field string title = 2; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * The localized title of the update. - * - * Generated from protobuf field string title = 2; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * The localized description of the update. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The localized description of the update. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The list of categories to which the update belongs. - * - * Generated from protobuf field repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCategories() - { - return $this->categories; - } - - /** - * The list of categories to which the update belongs. - * - * Generated from protobuf field repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - * @param array<\Grafeas\V1\WindowsUpdate\Category>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\WindowsUpdate\Category::class); - $this->categories = $arr; - - return $this; - } - - /** - * The Microsoft Knowledge Base article IDs that are associated with the - * update. - * - * Generated from protobuf field repeated string kb_article_ids = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getKbArticleIds() - { - return $this->kb_article_ids; - } - - /** - * The Microsoft Knowledge Base article IDs that are associated with the - * update. - * - * Generated from protobuf field repeated string kb_article_ids = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setKbArticleIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->kb_article_ids = $arr; - - return $this; - } - - /** - * The hyperlink to the support information for the update. - * - * Generated from protobuf field string support_url = 6; - * @return string - */ - public function getSupportUrl() - { - return $this->support_url; - } - - /** - * The hyperlink to the support information for the update. - * - * Generated from protobuf field string support_url = 6; - * @param string $var - * @return $this - */ - public function setSupportUrl($var) - { - GPBUtil::checkString($var, True); - $this->support_url = $var; - - return $this; - } - - /** - * The last published timestamp of the update. - * - * Generated from protobuf field .google.protobuf.Timestamp last_published_timestamp = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastPublishedTimestamp() - { - return $this->last_published_timestamp; - } - - public function hasLastPublishedTimestamp() - { - return isset($this->last_published_timestamp); - } - - public function clearLastPublishedTimestamp() - { - unset($this->last_published_timestamp); - } - - /** - * The last published timestamp of the update. - * - * Generated from protobuf field .google.protobuf.Timestamp last_published_timestamp = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastPublishedTimestamp($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_published_timestamp = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate/Category.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate/Category.php deleted file mode 100644 index f3fc03d57a42..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate/Category.php +++ /dev/null @@ -1,104 +0,0 @@ -grafeas.v1.WindowsUpdate.Category - */ -class Category extends \Google\Protobuf\Internal\Message -{ - /** - * The identifier of the category. - * - * Generated from protobuf field string category_id = 1; - */ - protected $category_id = ''; - /** - * The localized name of the category. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $category_id - * The identifier of the category. - * @type string $name - * The localized name of the category. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Upgrade::initOnce(); - parent::__construct($data); - } - - /** - * The identifier of the category. - * - * Generated from protobuf field string category_id = 1; - * @return string - */ - public function getCategoryId() - { - return $this->category_id; - } - - /** - * The identifier of the category. - * - * Generated from protobuf field string category_id = 1; - * @param string $var - * @return $this - */ - public function setCategoryId($var) - { - GPBUtil::checkString($var, True); - $this->category_id = $var; - - return $this; - } - - /** - * The localized name of the category. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The localized name of the category. - * - * Generated from protobuf field string name = 2; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Category::class, \Grafeas\V1\WindowsUpdate_Category::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate/Identity.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate/Identity.php deleted file mode 100644 index 8d4340a93fc8..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate/Identity.php +++ /dev/null @@ -1,104 +0,0 @@ -grafeas.v1.WindowsUpdate.Identity - */ -class Identity extends \Google\Protobuf\Internal\Message -{ - /** - * The revision independent identifier of the update. - * - * Generated from protobuf field string update_id = 1; - */ - protected $update_id = ''; - /** - * The revision number of the update. - * - * Generated from protobuf field int32 revision = 2; - */ - protected $revision = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $update_id - * The revision independent identifier of the update. - * @type int $revision - * The revision number of the update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Upgrade::initOnce(); - parent::__construct($data); - } - - /** - * The revision independent identifier of the update. - * - * Generated from protobuf field string update_id = 1; - * @return string - */ - public function getUpdateId() - { - return $this->update_id; - } - - /** - * The revision independent identifier of the update. - * - * Generated from protobuf field string update_id = 1; - * @param string $var - * @return $this - */ - public function setUpdateId($var) - { - GPBUtil::checkString($var, True); - $this->update_id = $var; - - return $this; - } - - /** - * The revision number of the update. - * - * Generated from protobuf field int32 revision = 2; - * @return int - */ - public function getRevision() - { - return $this->revision; - } - - /** - * The revision number of the update. - * - * Generated from protobuf field int32 revision = 2; - * @param int $var - * @return $this - */ - public function setRevision($var) - { - GPBUtil::checkInt32($var); - $this->revision = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Identity::class, \Grafeas\V1\WindowsUpdate_Identity::class); - diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/batch_create_notes.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/batch_create_notes.php deleted file mode 100644 index 9595249530f1..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/batch_create_notes.php +++ /dev/null @@ -1,74 +0,0 @@ -setParent($formattedParent) - ->setNotes($notes); - - // Call the API and handle any network failures. - try { - /** @var BatchCreateNotesResponse $response */ - $response = $grafeasClient->batchCreateNotes($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 = GrafeasClient::projectName('[PROJECT]'); - - batch_create_notes_sample($formattedParent); -} -// [END containeranalysis_v1_generated_Grafeas_BatchCreateNotes_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/batch_create_occurrences.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/batch_create_occurrences.php deleted file mode 100644 index 7767733a8242..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/batch_create_occurrences.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($formattedParent) - ->setOccurrences($occurrences); - - // Call the API and handle any network failures. - try { - /** @var BatchCreateOccurrencesResponse $response */ - $response = $grafeasClient->batchCreateOccurrences($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 = GrafeasClient::projectName('[PROJECT]'); - - batch_create_occurrences_sample($formattedParent); -} -// [END containeranalysis_v1_generated_Grafeas_BatchCreateOccurrences_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/create_note.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/create_note.php deleted file mode 100644 index a3ed4e536c0c..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/create_note.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent) - ->setNoteId($noteId) - ->setNote($note); - - // Call the API and handle any network failures. - try { - /** @var Note $response */ - $response = $grafeasClient->createNote($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 = GrafeasClient::projectName('[PROJECT]'); - $noteId = '[NOTE_ID]'; - - create_note_sample($formattedParent, $noteId); -} -// [END containeranalysis_v1_generated_Grafeas_CreateNote_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/create_occurrence.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/create_occurrence.php deleted file mode 100644 index 20e588caced8..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/create_occurrence.php +++ /dev/null @@ -1,74 +0,0 @@ -setParent($formattedParent) - ->setOccurrence($occurrence); - - // Call the API and handle any network failures. - try { - /** @var Occurrence $response */ - $response = $grafeasClient->createOccurrence($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 = GrafeasClient::projectName('[PROJECT]'); - - create_occurrence_sample($formattedParent); -} -// [END containeranalysis_v1_generated_Grafeas_CreateOccurrence_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/delete_note.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/delete_note.php deleted file mode 100644 index bfb1c08aca1c..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/delete_note.php +++ /dev/null @@ -1,70 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $grafeasClient->deleteNote($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 = GrafeasClient::noteName('[PROJECT]', '[NOTE]'); - - delete_note_sample($formattedName); -} -// [END containeranalysis_v1_generated_Grafeas_DeleteNote_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/delete_occurrence.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/delete_occurrence.php deleted file mode 100644 index f3793978d5b1..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/delete_occurrence.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $grafeasClient->deleteOccurrence($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 = GrafeasClient::occurrenceName('[PROJECT]', '[OCCURRENCE]'); - - delete_occurrence_sample($formattedName); -} -// [END containeranalysis_v1_generated_Grafeas_DeleteOccurrence_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_note.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_note.php deleted file mode 100644 index 890a456f7697..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_note.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Note $response */ - $response = $grafeasClient->getNote($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 = GrafeasClient::noteName('[PROJECT]', '[NOTE]'); - - get_note_sample($formattedName); -} -// [END containeranalysis_v1_generated_Grafeas_GetNote_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_occurrence.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_occurrence.php deleted file mode 100644 index f306e253225b..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_occurrence.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Occurrence $response */ - $response = $grafeasClient->getOccurrence($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 = GrafeasClient::occurrenceName('[PROJECT]', '[OCCURRENCE]'); - - get_occurrence_sample($formattedName); -} -// [END containeranalysis_v1_generated_Grafeas_GetOccurrence_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_occurrence_note.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_occurrence_note.php deleted file mode 100644 index 9bc18a530f08..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_occurrence_note.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Note $response */ - $response = $grafeasClient->getOccurrenceNote($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 = GrafeasClient::occurrenceName('[PROJECT]', '[OCCURRENCE]'); - - get_occurrence_note_sample($formattedName); -} -// [END containeranalysis_v1_generated_Grafeas_GetOccurrenceNote_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_note_occurrences.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_note_occurrences.php deleted file mode 100644 index afbd66d61987..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_note_occurrences.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $grafeasClient->listNoteOccurrences($request); - - /** @var Occurrence $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 -{ - $formattedName = GrafeasClient::noteName('[PROJECT]', '[NOTE]'); - - list_note_occurrences_sample($formattedName); -} -// [END containeranalysis_v1_generated_Grafeas_ListNoteOccurrences_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_notes.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_notes.php deleted file mode 100644 index 952bf7f735d6..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_notes.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $grafeasClient->listNotes($request); - - /** @var Note $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 = GrafeasClient::projectName('[PROJECT]'); - - list_notes_sample($formattedParent); -} -// [END containeranalysis_v1_generated_Grafeas_ListNotes_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_occurrences.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_occurrences.php deleted file mode 100644 index 5ac0efe876e5..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_occurrences.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $grafeasClient->listOccurrences($request); - - /** @var Occurrence $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 = GrafeasClient::projectName('[PROJECT]'); - - list_occurrences_sample($formattedParent); -} -// [END containeranalysis_v1_generated_Grafeas_ListOccurrences_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/update_note.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/update_note.php deleted file mode 100644 index c0be63117ddb..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/update_note.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName) - ->setNote($note); - - // Call the API and handle any network failures. - try { - /** @var Note $response */ - $response = $grafeasClient->updateNote($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 = GrafeasClient::noteName('[PROJECT]', '[NOTE]'); - - update_note_sample($formattedName); -} -// [END containeranalysis_v1_generated_Grafeas_UpdateNote_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/update_occurrence.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/update_occurrence.php deleted file mode 100644 index ebd25989cc00..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/update_occurrence.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName) - ->setOccurrence($occurrence); - - // Call the API and handle any network failures. - try { - /** @var Occurrence $response */ - $response = $grafeasClient->updateOccurrence($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 = GrafeasClient::occurrenceName('[PROJECT]', '[OCCURRENCE]'); - - update_occurrence_sample($formattedName); -} -// [END containeranalysis_v1_generated_Grafeas_UpdateOccurrence_sync] diff --git a/owl-bot-staging/Grafeas/v1/src/V1/Client/GrafeasClient.php b/owl-bot-staging/Grafeas/v1/src/V1/Client/GrafeasClient.php deleted file mode 100644 index 78d7ae623831..000000000000 --- a/owl-bot-staging/Grafeas/v1/src/V1/Client/GrafeasClient.php +++ /dev/null @@ -1,655 +0,0 @@ - batchCreateNotesAsync(BatchCreateNotesRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchCreateOccurrencesAsync(BatchCreateOccurrencesRequest $request, array $optionalArgs = []) - * @method PromiseInterface createNoteAsync(CreateNoteRequest $request, array $optionalArgs = []) - * @method PromiseInterface createOccurrenceAsync(CreateOccurrenceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteNoteAsync(DeleteNoteRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteOccurrenceAsync(DeleteOccurrenceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getNoteAsync(GetNoteRequest $request, array $optionalArgs = []) - * @method PromiseInterface getOccurrenceAsync(GetOccurrenceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getOccurrenceNoteAsync(GetOccurrenceNoteRequest $request, array $optionalArgs = []) - * @method PromiseInterface listNoteOccurrencesAsync(ListNoteOccurrencesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listNotesAsync(ListNotesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listOccurrencesAsync(ListOccurrencesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateNoteAsync(UpdateNoteRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateOccurrenceAsync(UpdateOccurrenceRequest $request, array $optionalArgs = []) - */ -final class GrafeasClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'grafeas.v1.Grafeas'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'containeranalysis.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'containeranalysis.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 = []; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/grafeas_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/grafeas_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/grafeas_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/grafeas_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a note - * resource. - * - * @param string $project - * @param string $note - * - * @return string The formatted note resource. - */ - public static function noteName(string $project, string $note): string - { - return self::getPathTemplate('note')->render([ - 'project' => $project, - 'note' => $note, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a occurrence - * resource. - * - * @param string $project - * @param string $occurrence - * - * @return string The formatted occurrence resource. - */ - public static function occurrenceName(string $project, string $occurrence): string - { - return self::getPathTemplate('occurrence')->render([ - 'project' => $project, - 'occurrence' => $occurrence, - ]); - } - - /** - * 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, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - note: projects/{project}/notes/{note} - * - occurrence: projects/{project}/occurrences/{occurrence} - * - project: projects/{project} - * - * 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 $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 'containeranalysis.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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 new notes in batch. - * - * The async variant is {@see GrafeasClient::batchCreateNotesAsync()} . - * - * @example samples/V1/GrafeasClient/batch_create_notes.php - * - * @param BatchCreateNotesRequest $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 BatchCreateNotesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchCreateNotes(BatchCreateNotesRequest $request, array $callOptions = []): BatchCreateNotesResponse - { - return $this->startApiCall('BatchCreateNotes', $request, $callOptions)->wait(); - } - - /** - * Creates new occurrences in batch. - * - * The async variant is {@see GrafeasClient::batchCreateOccurrencesAsync()} . - * - * @example samples/V1/GrafeasClient/batch_create_occurrences.php - * - * @param BatchCreateOccurrencesRequest $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 BatchCreateOccurrencesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchCreateOccurrences(BatchCreateOccurrencesRequest $request, array $callOptions = []): BatchCreateOccurrencesResponse - { - return $this->startApiCall('BatchCreateOccurrences', $request, $callOptions)->wait(); - } - - /** - * Creates a new note. - * - * The async variant is {@see GrafeasClient::createNoteAsync()} . - * - * @example samples/V1/GrafeasClient/create_note.php - * - * @param CreateNoteRequest $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 Note - * - * @throws ApiException Thrown if the API call fails. - */ - public function createNote(CreateNoteRequest $request, array $callOptions = []): Note - { - return $this->startApiCall('CreateNote', $request, $callOptions)->wait(); - } - - /** - * Creates a new occurrence. - * - * The async variant is {@see GrafeasClient::createOccurrenceAsync()} . - * - * @example samples/V1/GrafeasClient/create_occurrence.php - * - * @param CreateOccurrenceRequest $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 Occurrence - * - * @throws ApiException Thrown if the API call fails. - */ - public function createOccurrence(CreateOccurrenceRequest $request, array $callOptions = []): Occurrence - { - return $this->startApiCall('CreateOccurrence', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified note. - * - * The async variant is {@see GrafeasClient::deleteNoteAsync()} . - * - * @example samples/V1/GrafeasClient/delete_note.php - * - * @param DeleteNoteRequest $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 deleteNote(DeleteNoteRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteNote', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified occurrence. For example, use this method to delete an - * occurrence when the occurrence is no longer applicable for the given - * resource. - * - * The async variant is {@see GrafeasClient::deleteOccurrenceAsync()} . - * - * @example samples/V1/GrafeasClient/delete_occurrence.php - * - * @param DeleteOccurrenceRequest $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 deleteOccurrence(DeleteOccurrenceRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteOccurrence', $request, $callOptions)->wait(); - } - - /** - * Gets the specified note. - * - * The async variant is {@see GrafeasClient::getNoteAsync()} . - * - * @example samples/V1/GrafeasClient/get_note.php - * - * @param GetNoteRequest $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 Note - * - * @throws ApiException Thrown if the API call fails. - */ - public function getNote(GetNoteRequest $request, array $callOptions = []): Note - { - return $this->startApiCall('GetNote', $request, $callOptions)->wait(); - } - - /** - * Gets the specified occurrence. - * - * The async variant is {@see GrafeasClient::getOccurrenceAsync()} . - * - * @example samples/V1/GrafeasClient/get_occurrence.php - * - * @param GetOccurrenceRequest $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 Occurrence - * - * @throws ApiException Thrown if the API call fails. - */ - public function getOccurrence(GetOccurrenceRequest $request, array $callOptions = []): Occurrence - { - return $this->startApiCall('GetOccurrence', $request, $callOptions)->wait(); - } - - /** - * Gets the note attached to the specified occurrence. Consumer projects can - * use this method to get a note that belongs to a provider project. - * - * The async variant is {@see GrafeasClient::getOccurrenceNoteAsync()} . - * - * @example samples/V1/GrafeasClient/get_occurrence_note.php - * - * @param GetOccurrenceNoteRequest $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 Note - * - * @throws ApiException Thrown if the API call fails. - */ - public function getOccurrenceNote(GetOccurrenceNoteRequest $request, array $callOptions = []): Note - { - return $this->startApiCall('GetOccurrenceNote', $request, $callOptions)->wait(); - } - - /** - * Lists occurrences referencing the specified note. Provider projects can use - * this method to get all occurrences across consumer projects referencing the - * specified note. - * - * The async variant is {@see GrafeasClient::listNoteOccurrencesAsync()} . - * - * @example samples/V1/GrafeasClient/list_note_occurrences.php - * - * @param ListNoteOccurrencesRequest $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 listNoteOccurrences(ListNoteOccurrencesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListNoteOccurrences', $request, $callOptions); - } - - /** - * Lists notes for the specified project. - * - * The async variant is {@see GrafeasClient::listNotesAsync()} . - * - * @example samples/V1/GrafeasClient/list_notes.php - * - * @param ListNotesRequest $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 listNotes(ListNotesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListNotes', $request, $callOptions); - } - - /** - * Lists occurrences for the specified project. - * - * The async variant is {@see GrafeasClient::listOccurrencesAsync()} . - * - * @example samples/V1/GrafeasClient/list_occurrences.php - * - * @param ListOccurrencesRequest $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 listOccurrences(ListOccurrencesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListOccurrences', $request, $callOptions); - } - - /** - * Updates the specified note. - * - * The async variant is {@see GrafeasClient::updateNoteAsync()} . - * - * @example samples/V1/GrafeasClient/update_note.php - * - * @param UpdateNoteRequest $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 Note - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateNote(UpdateNoteRequest $request, array $callOptions = []): Note - { - return $this->startApiCall('UpdateNote', $request, $callOptions)->wait(); - } - - /** - * Updates the specified occurrence. - * - * The async variant is {@see GrafeasClient::updateOccurrenceAsync()} . - * - * @example samples/V1/GrafeasClient/update_occurrence.php - * - * @param UpdateOccurrenceRequest $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 Occurrence - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateOccurrence(UpdateOccurrenceRequest $request, array $callOptions = []): Occurrence - { - return $this->startApiCall('UpdateOccurrence', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Grafeas/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Grafeas/v1/src/V1/gapic_metadata.json deleted file mode 100644 index c113418d85c6..000000000000 --- a/owl-bot-staging/Grafeas/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "grafeas.v1", - "libraryPackage": "Grafeas\\V1", - "services": { - "Grafeas": { - "clients": { - "grpc": { - "libraryClient": "GrafeasGapicClient", - "rpcs": { - "BatchCreateNotes": { - "methods": [ - "batchCreateNotes" - ] - }, - "BatchCreateOccurrences": { - "methods": [ - "batchCreateOccurrences" - ] - }, - "CreateNote": { - "methods": [ - "createNote" - ] - }, - "CreateOccurrence": { - "methods": [ - "createOccurrence" - ] - }, - "DeleteNote": { - "methods": [ - "deleteNote" - ] - }, - "DeleteOccurrence": { - "methods": [ - "deleteOccurrence" - ] - }, - "GetNote": { - "methods": [ - "getNote" - ] - }, - "GetOccurrence": { - "methods": [ - "getOccurrence" - ] - }, - "GetOccurrenceNote": { - "methods": [ - "getOccurrenceNote" - ] - }, - "ListNoteOccurrences": { - "methods": [ - "listNoteOccurrences" - ] - }, - "ListNotes": { - "methods": [ - "listNotes" - ] - }, - "ListOccurrences": { - "methods": [ - "listOccurrences" - ] - }, - "UpdateNote": { - "methods": [ - "updateNote" - ] - }, - "UpdateOccurrence": { - "methods": [ - "updateOccurrence" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Grafeas/v1/src/V1/resources/grafeas_client_config.json b/owl-bot-staging/Grafeas/v1/src/V1/resources/grafeas_client_config.json deleted file mode 100644 index 5cb46837e7a6..000000000000 --- a/owl-bot-staging/Grafeas/v1/src/V1/resources/grafeas_client_config.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "interfaces": { - "grafeas.v1.Grafeas": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "DEADLINE_EXCEEDED" - ], - "no_retry_1_codes": [] - }, - "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": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - } - }, - "methods": { - "BatchCreateNotes": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "BatchCreateOccurrences": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateNote": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateOccurrence": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteNote": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteOccurrence": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetNote": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetOccurrence": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetOccurrenceNote": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListNoteOccurrences": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListNotes": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListOccurrences": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateNote": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateOccurrence": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Grafeas/v1/src/V1/resources/grafeas_descriptor_config.php b/owl-bot-staging/Grafeas/v1/src/V1/resources/grafeas_descriptor_config.php deleted file mode 100644 index af5136b942c8..000000000000 --- a/owl-bot-staging/Grafeas/v1/src/V1/resources/grafeas_descriptor_config.php +++ /dev/null @@ -1,225 +0,0 @@ - [ - 'grafeas.v1.Grafeas' => [ - 'BatchCreateNotes' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Grafeas\V1\BatchCreateNotesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'BatchCreateOccurrences' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Grafeas\V1\BatchCreateOccurrencesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateNote' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Grafeas\V1\Note', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateOccurrence' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Grafeas\V1\Occurrence', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteNote' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOccurrence' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetNote' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Grafeas\V1\Note', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetOccurrence' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Grafeas\V1\Occurrence', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetOccurrenceNote' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Grafeas\V1\Note', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListNoteOccurrences' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getOccurrences', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Grafeas\V1\ListNoteOccurrencesResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListNotes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getNotes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Grafeas\V1\ListNotesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListOccurrences' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getOccurrences', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Grafeas\V1\ListOccurrencesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateNote' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Grafeas\V1\Note', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateOccurrence' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Grafeas\V1\Occurrence', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'note' => 'projects/{project}/notes/{note}', - 'occurrence' => 'projects/{project}/occurrences/{occurrence}', - 'project' => 'projects/{project}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Grafeas/v1/src/V1/resources/grafeas_rest_client_config.php b/owl-bot-staging/Grafeas/v1/src/V1/resources/grafeas_rest_client_config.php deleted file mode 100644 index 101f65b6390b..000000000000 --- a/owl-bot-staging/Grafeas/v1/src/V1/resources/grafeas_rest_client_config.php +++ /dev/null @@ -1,285 +0,0 @@ - [ - 'grafeas.v1.Grafeas' => [ - 'BatchCreateNotes' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/notes:batchCreate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/notes:batchCreate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'BatchCreateOccurrences' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/occurrences:batchCreate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/occurrences:batchCreate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateNote' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/notes', - 'body' => 'note', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/notes', - 'body' => 'note', - 'queryParams' => [ - 'note_id', - ], - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'note_id', - ], - ], - 'CreateOccurrence' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/occurrences', - 'body' => 'occurrence', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/occurrences', - 'body' => 'occurrence', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteNote' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/notes/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/notes/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOccurrence' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/occurrences/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/occurrences/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetNote' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/notes/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/notes/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOccurrence' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/occurrences/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/occurrences/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOccurrenceNote' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/occurrences/*}/notes', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/occurrences/*}/notes', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListNoteOccurrences' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/notes/*}/occurrences', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/notes/*}/occurrences', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListNotes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/notes', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/notes', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListOccurrences' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/occurrences', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/occurrences', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateNote' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{name=projects/*/notes/*}', - 'body' => 'note', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/notes/*}', - 'body' => 'note', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateOccurrence' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{name=projects/*/occurrences/*}', - 'body' => 'occurrence', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/occurrences/*}', - 'body' => 'occurrence', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Grafeas/v1/tests/Unit/V1/Client/GrafeasClientTest.php b/owl-bot-staging/Grafeas/v1/tests/Unit/V1/Client/GrafeasClientTest.php deleted file mode 100644 index c946762afabb..000000000000 --- a/owl-bot-staging/Grafeas/v1/tests/Unit/V1/Client/GrafeasClientTest.php +++ /dev/null @@ -1,1108 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return GrafeasClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new GrafeasClient($options); - } - - /** @test */ - public function batchCreateNotesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchCreateNotesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $notesValue = new Note(); - $notes = [ - 'notesKey' => $notesValue, - ]; - $request = (new BatchCreateNotesRequest()) - ->setParent($formattedParent) - ->setNotes($notes); - $response = $gapicClient->batchCreateNotes($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/BatchCreateNotes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getNotes(); - $this->assertProtobufEquals($notes, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchCreateNotesExceptionTest() - { - $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]'); - $notesValue = new Note(); - $notes = [ - 'notesKey' => $notesValue, - ]; - $request = (new BatchCreateNotesRequest()) - ->setParent($formattedParent) - ->setNotes($notes); - try { - $gapicClient->batchCreateNotes($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 batchCreateOccurrencesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchCreateOccurrencesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $occurrences = []; - $request = (new BatchCreateOccurrencesRequest()) - ->setParent($formattedParent) - ->setOccurrences($occurrences); - $response = $gapicClient->batchCreateOccurrences($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/BatchCreateOccurrences', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getOccurrences(); - $this->assertProtobufEquals($occurrences, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchCreateOccurrencesExceptionTest() - { - $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]'); - $occurrences = []; - $request = (new BatchCreateOccurrencesRequest()) - ->setParent($formattedParent) - ->setOccurrences($occurrences); - try { - $gapicClient->batchCreateOccurrences($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 createNoteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $shortDescription = 'shortDescription-235369287'; - $longDescription = 'longDescription-1747792199'; - $expectedResponse = new Note(); - $expectedResponse->setName($name); - $expectedResponse->setShortDescription($shortDescription); - $expectedResponse->setLongDescription($longDescription); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $noteId = 'noteId2129224840'; - $note = new Note(); - $request = (new CreateNoteRequest()) - ->setParent($formattedParent) - ->setNoteId($noteId) - ->setNote($note); - $response = $gapicClient->createNote($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/CreateNote', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getNoteId(); - $this->assertProtobufEquals($noteId, $actualValue); - $actualValue = $actualRequestObject->getNote(); - $this->assertProtobufEquals($note, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createNoteExceptionTest() - { - $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]'); - $noteId = 'noteId2129224840'; - $note = new Note(); - $request = (new CreateNoteRequest()) - ->setParent($formattedParent) - ->setNoteId($noteId) - ->setNote($note); - try { - $gapicClient->createNote($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 createOccurrenceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $resourceUri = 'resourceUri-384040517'; - $noteName = 'noteName1780787896'; - $remediation = 'remediation779381797'; - $expectedResponse = new Occurrence(); - $expectedResponse->setName($name); - $expectedResponse->setResourceUri($resourceUri); - $expectedResponse->setNoteName($noteName); - $expectedResponse->setRemediation($remediation); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $occurrence = new Occurrence(); - $request = (new CreateOccurrenceRequest()) - ->setParent($formattedParent) - ->setOccurrence($occurrence); - $response = $gapicClient->createOccurrence($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/CreateOccurrence', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getOccurrence(); - $this->assertProtobufEquals($occurrence, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createOccurrenceExceptionTest() - { - $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]'); - $occurrence = new Occurrence(); - $request = (new CreateOccurrenceRequest()) - ->setParent($formattedParent) - ->setOccurrence($occurrence); - try { - $gapicClient->createOccurrence($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 deleteNoteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->noteName('[PROJECT]', '[NOTE]'); - $request = (new DeleteNoteRequest()) - ->setName($formattedName); - $gapicClient->deleteNote($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/DeleteNote', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteNoteExceptionTest() - { - $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->noteName('[PROJECT]', '[NOTE]'); - $request = (new DeleteNoteRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteNote($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 deleteOccurrenceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); - $request = (new DeleteOccurrenceRequest()) - ->setName($formattedName); - $gapicClient->deleteOccurrence($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/DeleteOccurrence', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteOccurrenceExceptionTest() - { - $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->occurrenceName('[PROJECT]', '[OCCURRENCE]'); - $request = (new DeleteOccurrenceRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteOccurrence($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 getNoteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $shortDescription = 'shortDescription-235369287'; - $longDescription = 'longDescription-1747792199'; - $expectedResponse = new Note(); - $expectedResponse->setName($name2); - $expectedResponse->setShortDescription($shortDescription); - $expectedResponse->setLongDescription($longDescription); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->noteName('[PROJECT]', '[NOTE]'); - $request = (new GetNoteRequest()) - ->setName($formattedName); - $response = $gapicClient->getNote($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/GetNote', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNoteExceptionTest() - { - $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->noteName('[PROJECT]', '[NOTE]'); - $request = (new GetNoteRequest()) - ->setName($formattedName); - try { - $gapicClient->getNote($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 getOccurrenceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $resourceUri = 'resourceUri-384040517'; - $noteName = 'noteName1780787896'; - $remediation = 'remediation779381797'; - $expectedResponse = new Occurrence(); - $expectedResponse->setName($name2); - $expectedResponse->setResourceUri($resourceUri); - $expectedResponse->setNoteName($noteName); - $expectedResponse->setRemediation($remediation); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); - $request = (new GetOccurrenceRequest()) - ->setName($formattedName); - $response = $gapicClient->getOccurrence($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/GetOccurrence', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getOccurrenceExceptionTest() - { - $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->occurrenceName('[PROJECT]', '[OCCURRENCE]'); - $request = (new GetOccurrenceRequest()) - ->setName($formattedName); - try { - $gapicClient->getOccurrence($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 getOccurrenceNoteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $shortDescription = 'shortDescription-235369287'; - $longDescription = 'longDescription-1747792199'; - $expectedResponse = new Note(); - $expectedResponse->setName($name2); - $expectedResponse->setShortDescription($shortDescription); - $expectedResponse->setLongDescription($longDescription); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); - $request = (new GetOccurrenceNoteRequest()) - ->setName($formattedName); - $response = $gapicClient->getOccurrenceNote($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/GetOccurrenceNote', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getOccurrenceNoteExceptionTest() - { - $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->occurrenceName('[PROJECT]', '[OCCURRENCE]'); - $request = (new GetOccurrenceNoteRequest()) - ->setName($formattedName); - try { - $gapicClient->getOccurrenceNote($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 listNoteOccurrencesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $occurrencesElement = new Occurrence(); - $occurrences = [ - $occurrencesElement, - ]; - $expectedResponse = new ListNoteOccurrencesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setOccurrences($occurrences); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->noteName('[PROJECT]', '[NOTE]'); - $request = (new ListNoteOccurrencesRequest()) - ->setName($formattedName); - $response = $gapicClient->listNoteOccurrences($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getOccurrences()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/ListNoteOccurrences', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNoteOccurrencesExceptionTest() - { - $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->noteName('[PROJECT]', '[NOTE]'); - $request = (new ListNoteOccurrencesRequest()) - ->setName($formattedName); - try { - $gapicClient->listNoteOccurrences($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 listNotesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $notesElement = new Note(); - $notes = [ - $notesElement, - ]; - $expectedResponse = new ListNotesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setNotes($notes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListNotesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listNotes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getNotes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/ListNotes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNotesExceptionTest() - { - $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 ListNotesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listNotes($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 listOccurrencesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $occurrencesElement = new Occurrence(); - $occurrences = [ - $occurrencesElement, - ]; - $expectedResponse = new ListOccurrencesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setOccurrences($occurrences); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListOccurrencesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listOccurrences($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getOccurrences()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/ListOccurrences', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOccurrencesExceptionTest() - { - $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 ListOccurrencesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listOccurrences($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 updateNoteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $shortDescription = 'shortDescription-235369287'; - $longDescription = 'longDescription-1747792199'; - $expectedResponse = new Note(); - $expectedResponse->setName($name2); - $expectedResponse->setShortDescription($shortDescription); - $expectedResponse->setLongDescription($longDescription); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->noteName('[PROJECT]', '[NOTE]'); - $note = new Note(); - $request = (new UpdateNoteRequest()) - ->setName($formattedName) - ->setNote($note); - $response = $gapicClient->updateNote($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/UpdateNote', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getNote(); - $this->assertProtobufEquals($note, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateNoteExceptionTest() - { - $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->noteName('[PROJECT]', '[NOTE]'); - $note = new Note(); - $request = (new UpdateNoteRequest()) - ->setName($formattedName) - ->setNote($note); - try { - $gapicClient->updateNote($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 updateOccurrenceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $resourceUri = 'resourceUri-384040517'; - $noteName = 'noteName1780787896'; - $remediation = 'remediation779381797'; - $expectedResponse = new Occurrence(); - $expectedResponse->setName($name2); - $expectedResponse->setResourceUri($resourceUri); - $expectedResponse->setNoteName($noteName); - $expectedResponse->setRemediation($remediation); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); - $occurrence = new Occurrence(); - $request = (new UpdateOccurrenceRequest()) - ->setName($formattedName) - ->setOccurrence($occurrence); - $response = $gapicClient->updateOccurrence($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/UpdateOccurrence', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getOccurrence(); - $this->assertProtobufEquals($occurrence, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateOccurrenceExceptionTest() - { - $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->occurrenceName('[PROJECT]', '[OCCURRENCE]'); - $occurrence = new Occurrence(); - $request = (new UpdateOccurrenceRequest()) - ->setName($formattedName) - ->setOccurrence($occurrence); - try { - $gapicClient->updateOccurrence($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 batchCreateNotesAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchCreateNotesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $notesValue = new Note(); - $notes = [ - 'notesKey' => $notesValue, - ]; - $request = (new BatchCreateNotesRequest()) - ->setParent($formattedParent) - ->setNotes($notes); - $response = $gapicClient->batchCreateNotesAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/BatchCreateNotes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getNotes(); - $this->assertProtobufEquals($notes, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Iam/v2/proto/src/GPBMetadata/Google/Iam/V2/Deny.php b/owl-bot-staging/Iam/v2/proto/src/GPBMetadata/Google/Iam/V2/Deny.php deleted file mode 100644 index 6be0cb28fd34..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/GPBMetadata/Google/Iam/V2/Deny.php +++ /dev/null @@ -1,34 +0,0 @@ -internalAddGeneratedFile( - ' -Ü -google/iam/v2/deny.proto google.iam.v2"« -DenyRule -denied_principals (  -exception_principals (  -denied_permissions (  -exception_permissions ( + -denial_condition ( 2.google.type.ExprB{ -com.google.iam.v2B DenyRuleProtoPZ)cloud.google.com/go/iam/apiv2/iampb;iampbªGoogle.Cloud.Iam.V2ÊGoogle\\Cloud\\Iam\\V2bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Iam/v2/proto/src/GPBMetadata/Google/Iam/V2/Policy.php b/owl-bot-staging/Iam/v2/proto/src/GPBMetadata/Google/Iam/V2/Policy.php deleted file mode 100644 index 1b89a9292d93..000000000000 Binary files a/owl-bot-staging/Iam/v2/proto/src/GPBMetadata/Google/Iam/V2/Policy.php and /dev/null differ diff --git a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/CreatePolicyRequest.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/CreatePolicyRequest.php deleted file mode 100644 index 867ca9679740..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/CreatePolicyRequest.php +++ /dev/null @@ -1,215 +0,0 @@ -google.iam.v2.CreatePolicyRequest - */ -class CreatePolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource that the policy is attached to, along with the kind of policy - * to create. Format: `policies/{attachment_point}/denypolicies` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. The policy to create. - * - * Generated from protobuf field .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $policy = null; - /** - * The ID to use for this policy, which will become the final component of - * the policy's resource name. The ID must contain 3 to 63 characters. It can - * contain lowercase letters and numbers, as well as dashes (`-`) and periods - * (`.`). The first character must be a lowercase letter. - * - * Generated from protobuf field string policy_id = 3; - */ - protected $policy_id = ''; - - /** - * @param string $parent Required. The resource that the policy is attached to, along with the kind of policy - * to create. Format: `policies/{attachment_point}/denypolicies` - * - * - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - * - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * @param \Google\Cloud\Iam\V2\Policy $policy Required. The policy to create. - * @param string $policyId The ID to use for this policy, which will become the final component of - * the policy's resource name. The ID must contain 3 to 63 characters. It can - * contain lowercase letters and numbers, as well as dashes (`-`) and periods - * (`.`). The first character must be a lowercase letter. - * - * @return \Google\Cloud\Iam\V2\CreatePolicyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Iam\V2\Policy $policy, string $policyId): self - { - return (new self()) - ->setParent($parent) - ->setPolicy($policy) - ->setPolicyId($policyId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource that the policy is attached to, along with the kind of policy - * to create. Format: `policies/{attachment_point}/denypolicies` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * @type \Google\Cloud\Iam\V2\Policy $policy - * Required. The policy to create. - * @type string $policy_id - * The ID to use for this policy, which will become the final component of - * the policy's resource name. The ID must contain 3 to 63 characters. It can - * contain lowercase letters and numbers, as well as dashes (`-`) and periods - * (`.`). The first character must be a lowercase letter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\V2\Policy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource that the policy is attached to, along with the kind of policy - * to create. Format: `policies/{attachment_point}/denypolicies` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource that the policy is attached to, along with the kind of policy - * to create. Format: `policies/{attachment_point}/denypolicies` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The policy to create. - * - * Generated from protobuf field .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Iam\V2\Policy|null - */ - public function getPolicy() - { - return $this->policy; - } - - public function hasPolicy() - { - return isset($this->policy); - } - - public function clearPolicy() - { - unset($this->policy); - } - - /** - * Required. The policy to create. - * - * Generated from protobuf field .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Iam\V2\Policy $var - * @return $this - */ - public function setPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iam\V2\Policy::class); - $this->policy = $var; - - return $this; - } - - /** - * The ID to use for this policy, which will become the final component of - * the policy's resource name. The ID must contain 3 to 63 characters. It can - * contain lowercase letters and numbers, as well as dashes (`-`) and periods - * (`.`). The first character must be a lowercase letter. - * - * Generated from protobuf field string policy_id = 3; - * @return string - */ - public function getPolicyId() - { - return $this->policy_id; - } - - /** - * The ID to use for this policy, which will become the final component of - * the policy's resource name. The ID must contain 3 to 63 characters. It can - * contain lowercase letters and numbers, as well as dashes (`-`) and periods - * (`.`). The first character must be a lowercase letter. - * - * Generated from protobuf field string policy_id = 3; - * @param string $var - * @return $this - */ - public function setPolicyId($var) - { - GPBUtil::checkString($var, True); - $this->policy_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/DeletePolicyRequest.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/DeletePolicyRequest.php deleted file mode 100644 index 20271807b00b..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/DeletePolicyRequest.php +++ /dev/null @@ -1,163 +0,0 @@ -google.iam.v2.DeletePolicyRequest - */ -class DeletePolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the policy to delete. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * Use the URL-encoded full resource name, which means that the forward-slash - * character, `/`, must be written as `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. The expected `etag` of the policy to delete. If the value does not match - * the value that is stored in IAM, the request fails with a `409` error code - * and `ABORTED` status. - * If you omit this field, the policy is deleted regardless of its current - * `etag`. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name of the policy to delete. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * - * - * Use the URL-encoded full resource name, which means that the forward-slash - * character, `/`, must be written as `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - * - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * @return \Google\Cloud\Iam\V2\DeletePolicyRequest - * - * @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 policy to delete. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * Use the URL-encoded full resource name, which means that the forward-slash - * character, `/`, must be written as `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * @type string $etag - * Optional. The expected `etag` of the policy to delete. If the value does not match - * the value that is stored in IAM, the request fails with a `409` error code - * and `ABORTED` status. - * If you omit this field, the policy is deleted regardless of its current - * `etag`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\V2\Policy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the policy to delete. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * Use the URL-encoded full resource name, which means that the forward-slash - * character, `/`, must be written as `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * 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 policy to delete. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * Use the URL-encoded full resource name, which means that the forward-slash - * character, `/`, must be written as `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * 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; - } - - /** - * Optional. The expected `etag` of the policy to delete. If the value does not match - * the value that is stored in IAM, the request fails with a `409` error code - * and `ABORTED` status. - * If you omit this field, the policy is deleted regardless of its current - * `etag`. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. The expected `etag` of the policy to delete. If the value does not match - * the value that is stored in IAM, the request fails with a `409` error code - * and `ABORTED` status. - * If you omit this field, the policy is deleted regardless of its current - * `etag`. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/DenyRule.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/DenyRule.php deleted file mode 100644 index c53d85f881f6..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/DenyRule.php +++ /dev/null @@ -1,425 +0,0 @@ -google.iam.v2.DenyRule - */ -class DenyRule extends \Google\Protobuf\Internal\Message -{ - /** - * The identities that are prevented from using one or more permissions on - * Google Cloud resources. This field can contain the following values: - * * `principalSet://goog/public:all`: A special identifier that represents - * any principal that is on the internet, even if they do not have a Google - * Account or are not logged in. - * * `principal://goog/subject/{email_id}`: A specific Google Account. - * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For - * example, `principal://goog/subject/alice@example.com`. - * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific - * Google Account that was deleted recently. For example, - * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If - * the Google Account is recovered, this identifier reverts to the standard - * identifier for a Google Account. - * * `principalSet://goog/group/{group_id}`: A Google group. For example, - * `principalSet://goog/group/admins@example.com`. - * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group - * that was deleted recently. For example, - * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If - * the Google group is restored, this identifier reverts to the standard - * identifier for a Google group. - * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: - * A Google Cloud service account. For example, - * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. - * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: - * A Google Cloud service account that was deleted recently. For example, - * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. - * If the service account is undeleted, this identifier reverts to the - * standard identifier for a service account. - * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the - * principals associated with the specified Google Workspace or Cloud - * Identity customer ID. For example, - * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. - * - * Generated from protobuf field repeated string denied_principals = 1; - */ - private $denied_principals; - /** - * The identities that are excluded from the deny rule, even if they are - * listed in the `denied_principals`. For example, you could add a Google - * group to the `denied_principals`, then exclude specific users who belong to - * that group. - * This field can contain the same values as the `denied_principals` field, - * excluding `principalSet://goog/public:all`, which represents all users on - * the internet. - * - * Generated from protobuf field repeated string exception_principals = 2; - */ - private $exception_principals; - /** - * The permissions that are explicitly denied by this rule. Each permission - * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}` - * is the fully qualified domain name for the service. For example, - * `iam.googleapis.com/roles.list`. - * - * Generated from protobuf field repeated string denied_permissions = 3; - */ - private $denied_permissions; - /** - * Specifies the permissions that this rule excludes from the set of denied - * permissions given by `denied_permissions`. If a permission appears in - * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be - * denied. - * The excluded permissions can be specified using the same syntax as - * `denied_permissions`. - * - * Generated from protobuf field repeated string exception_permissions = 4; - */ - private $exception_permissions; - /** - * The condition that determines whether this deny rule applies to a request. - * If the condition expression evaluates to `true`, then the deny rule is - * applied; otherwise, the deny rule is not applied. - * Each deny rule is evaluated independently. If this deny rule does not apply - * to a request, other deny rules might still apply. - * The condition can use CEL functions that evaluate - * [resource - * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other - * functions and operators are not supported. - * - * Generated from protobuf field .google.type.Expr denial_condition = 5; - */ - protected $denial_condition = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $denied_principals - * The identities that are prevented from using one or more permissions on - * Google Cloud resources. This field can contain the following values: - * * `principalSet://goog/public:all`: A special identifier that represents - * any principal that is on the internet, even if they do not have a Google - * Account or are not logged in. - * * `principal://goog/subject/{email_id}`: A specific Google Account. - * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For - * example, `principal://goog/subject/alice@example.com`. - * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific - * Google Account that was deleted recently. For example, - * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If - * the Google Account is recovered, this identifier reverts to the standard - * identifier for a Google Account. - * * `principalSet://goog/group/{group_id}`: A Google group. For example, - * `principalSet://goog/group/admins@example.com`. - * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group - * that was deleted recently. For example, - * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If - * the Google group is restored, this identifier reverts to the standard - * identifier for a Google group. - * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: - * A Google Cloud service account. For example, - * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. - * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: - * A Google Cloud service account that was deleted recently. For example, - * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. - * If the service account is undeleted, this identifier reverts to the - * standard identifier for a service account. - * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the - * principals associated with the specified Google Workspace or Cloud - * Identity customer ID. For example, - * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. - * @type array|\Google\Protobuf\Internal\RepeatedField $exception_principals - * The identities that are excluded from the deny rule, even if they are - * listed in the `denied_principals`. For example, you could add a Google - * group to the `denied_principals`, then exclude specific users who belong to - * that group. - * This field can contain the same values as the `denied_principals` field, - * excluding `principalSet://goog/public:all`, which represents all users on - * the internet. - * @type array|\Google\Protobuf\Internal\RepeatedField $denied_permissions - * The permissions that are explicitly denied by this rule. Each permission - * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}` - * is the fully qualified domain name for the service. For example, - * `iam.googleapis.com/roles.list`. - * @type array|\Google\Protobuf\Internal\RepeatedField $exception_permissions - * Specifies the permissions that this rule excludes from the set of denied - * permissions given by `denied_permissions`. If a permission appears in - * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be - * denied. - * The excluded permissions can be specified using the same syntax as - * `denied_permissions`. - * @type \Google\Type\Expr $denial_condition - * The condition that determines whether this deny rule applies to a request. - * If the condition expression evaluates to `true`, then the deny rule is - * applied; otherwise, the deny rule is not applied. - * Each deny rule is evaluated independently. If this deny rule does not apply - * to a request, other deny rules might still apply. - * The condition can use CEL functions that evaluate - * [resource - * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other - * functions and operators are not supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\V2\Deny::initOnce(); - parent::__construct($data); - } - - /** - * The identities that are prevented from using one or more permissions on - * Google Cloud resources. This field can contain the following values: - * * `principalSet://goog/public:all`: A special identifier that represents - * any principal that is on the internet, even if they do not have a Google - * Account or are not logged in. - * * `principal://goog/subject/{email_id}`: A specific Google Account. - * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For - * example, `principal://goog/subject/alice@example.com`. - * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific - * Google Account that was deleted recently. For example, - * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If - * the Google Account is recovered, this identifier reverts to the standard - * identifier for a Google Account. - * * `principalSet://goog/group/{group_id}`: A Google group. For example, - * `principalSet://goog/group/admins@example.com`. - * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group - * that was deleted recently. For example, - * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If - * the Google group is restored, this identifier reverts to the standard - * identifier for a Google group. - * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: - * A Google Cloud service account. For example, - * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. - * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: - * A Google Cloud service account that was deleted recently. For example, - * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. - * If the service account is undeleted, this identifier reverts to the - * standard identifier for a service account. - * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the - * principals associated with the specified Google Workspace or Cloud - * Identity customer ID. For example, - * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. - * - * Generated from protobuf field repeated string denied_principals = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeniedPrincipals() - { - return $this->denied_principals; - } - - /** - * The identities that are prevented from using one or more permissions on - * Google Cloud resources. This field can contain the following values: - * * `principalSet://goog/public:all`: A special identifier that represents - * any principal that is on the internet, even if they do not have a Google - * Account or are not logged in. - * * `principal://goog/subject/{email_id}`: A specific Google Account. - * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For - * example, `principal://goog/subject/alice@example.com`. - * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific - * Google Account that was deleted recently. For example, - * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If - * the Google Account is recovered, this identifier reverts to the standard - * identifier for a Google Account. - * * `principalSet://goog/group/{group_id}`: A Google group. For example, - * `principalSet://goog/group/admins@example.com`. - * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group - * that was deleted recently. For example, - * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If - * the Google group is restored, this identifier reverts to the standard - * identifier for a Google group. - * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: - * A Google Cloud service account. For example, - * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. - * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: - * A Google Cloud service account that was deleted recently. For example, - * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. - * If the service account is undeleted, this identifier reverts to the - * standard identifier for a service account. - * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the - * principals associated with the specified Google Workspace or Cloud - * Identity customer ID. For example, - * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. - * - * Generated from protobuf field repeated string denied_principals = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeniedPrincipals($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->denied_principals = $arr; - - return $this; - } - - /** - * The identities that are excluded from the deny rule, even if they are - * listed in the `denied_principals`. For example, you could add a Google - * group to the `denied_principals`, then exclude specific users who belong to - * that group. - * This field can contain the same values as the `denied_principals` field, - * excluding `principalSet://goog/public:all`, which represents all users on - * the internet. - * - * Generated from protobuf field repeated string exception_principals = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExceptionPrincipals() - { - return $this->exception_principals; - } - - /** - * The identities that are excluded from the deny rule, even if they are - * listed in the `denied_principals`. For example, you could add a Google - * group to the `denied_principals`, then exclude specific users who belong to - * that group. - * This field can contain the same values as the `denied_principals` field, - * excluding `principalSet://goog/public:all`, which represents all users on - * the internet. - * - * Generated from protobuf field repeated string exception_principals = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExceptionPrincipals($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->exception_principals = $arr; - - return $this; - } - - /** - * The permissions that are explicitly denied by this rule. Each permission - * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}` - * is the fully qualified domain name for the service. For example, - * `iam.googleapis.com/roles.list`. - * - * Generated from protobuf field repeated string denied_permissions = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeniedPermissions() - { - return $this->denied_permissions; - } - - /** - * The permissions that are explicitly denied by this rule. Each permission - * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}` - * is the fully qualified domain name for the service. For example, - * `iam.googleapis.com/roles.list`. - * - * Generated from protobuf field repeated string denied_permissions = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeniedPermissions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->denied_permissions = $arr; - - return $this; - } - - /** - * Specifies the permissions that this rule excludes from the set of denied - * permissions given by `denied_permissions`. If a permission appears in - * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be - * denied. - * The excluded permissions can be specified using the same syntax as - * `denied_permissions`. - * - * Generated from protobuf field repeated string exception_permissions = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExceptionPermissions() - { - return $this->exception_permissions; - } - - /** - * Specifies the permissions that this rule excludes from the set of denied - * permissions given by `denied_permissions`. If a permission appears in - * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be - * denied. - * The excluded permissions can be specified using the same syntax as - * `denied_permissions`. - * - * Generated from protobuf field repeated string exception_permissions = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExceptionPermissions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->exception_permissions = $arr; - - return $this; - } - - /** - * The condition that determines whether this deny rule applies to a request. - * If the condition expression evaluates to `true`, then the deny rule is - * applied; otherwise, the deny rule is not applied. - * Each deny rule is evaluated independently. If this deny rule does not apply - * to a request, other deny rules might still apply. - * The condition can use CEL functions that evaluate - * [resource - * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other - * functions and operators are not supported. - * - * Generated from protobuf field .google.type.Expr denial_condition = 5; - * @return \Google\Type\Expr|null - */ - public function getDenialCondition() - { - return $this->denial_condition; - } - - public function hasDenialCondition() - { - return isset($this->denial_condition); - } - - public function clearDenialCondition() - { - unset($this->denial_condition); - } - - /** - * The condition that determines whether this deny rule applies to a request. - * If the condition expression evaluates to `true`, then the deny rule is - * applied; otherwise, the deny rule is not applied. - * Each deny rule is evaluated independently. If this deny rule does not apply - * to a request, other deny rules might still apply. - * The condition can use CEL functions that evaluate - * [resource - * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other - * functions and operators are not supported. - * - * Generated from protobuf field .google.type.Expr denial_condition = 5; - * @param \Google\Type\Expr $var - * @return $this - */ - public function setDenialCondition($var) - { - GPBUtil::checkMessage($var, \Google\Type\Expr::class); - $this->denial_condition = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/GetPolicyRequest.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/GetPolicyRequest.php deleted file mode 100644 index 36d1bb72c6f0..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/GetPolicyRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.iam.v2.GetPolicyRequest - */ -class GetPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the policy to retrieve. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * Use the URL-encoded full resource name, which means that the forward-slash - * character, `/`, must be written as `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the policy to retrieve. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * - * - * Use the URL-encoded full resource name, which means that the forward-slash - * character, `/`, must be written as `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - * - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * @return \Google\Cloud\Iam\V2\GetPolicyRequest - * - * @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 policy to retrieve. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * Use the URL-encoded full resource name, which means that the forward-slash - * character, `/`, must be written as `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\V2\Policy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the policy to retrieve. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * Use the URL-encoded full resource name, which means that the forward-slash - * character, `/`, must be written as `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * 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 policy to retrieve. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * Use the URL-encoded full resource name, which means that the forward-slash - * character, `/`, must be written as `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/ListPoliciesRequest.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/ListPoliciesRequest.php deleted file mode 100644 index c21c8d14af02..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/ListPoliciesRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.iam.v2.ListPoliciesRequest - */ -class ListPoliciesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource that the policy is attached to, along with the kind of policy - * to list. Format: - * `policies/{attachment_point}/denypolicies` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * The maximum number of policies to return. IAM ignores this value and uses - * the value 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to - * retrieve the next page. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource that the policy is attached to, along with the kind of policy - * to list. Format: - * `policies/{attachment_point}/denypolicies` - * - * - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - * - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * @return \Google\Cloud\Iam\V2\ListPoliciesRequest - * - * @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 that the policy is attached to, along with the kind of policy - * to list. Format: - * `policies/{attachment_point}/denypolicies` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * @type int $page_size - * The maximum number of policies to return. IAM ignores this value and uses - * the value 1000. - * @type string $page_token - * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to - * retrieve the next page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\V2\Policy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource that the policy is attached to, along with the kind of policy - * to list. Format: - * `policies/{attachment_point}/denypolicies` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource that the policy is attached to, along with the kind of policy - * to list. Format: - * `policies/{attachment_point}/denypolicies` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of policies to return. IAM ignores this value and uses - * the value 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of policies to return. IAM ignores this value and uses - * the value 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to - * retrieve the next page. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to - * retrieve the next page. - * - * Generated from protobuf field string page_token = 3; - * @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/Iam/v2/proto/src/Google/Cloud/Iam/V2/ListPoliciesResponse.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/ListPoliciesResponse.php deleted file mode 100644 index c2749f099b28..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/ListPoliciesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.iam.v2.ListPoliciesResponse - */ -class ListPoliciesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Metadata for the policies that are attached to the resource. - * - * Generated from protobuf field repeated .google.iam.v2.Policy policies = 1; - */ - private $policies; - /** - * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the - * next page. If this field is omitted, there are no additional pages. - * - * 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\Iam\V2\Policy>|\Google\Protobuf\Internal\RepeatedField $policies - * Metadata for the policies that are attached to the resource. - * @type string $next_page_token - * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the - * next page. If this field is omitted, there are no additional pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\V2\Policy::initOnce(); - parent::__construct($data); - } - - /** - * Metadata for the policies that are attached to the resource. - * - * Generated from protobuf field repeated .google.iam.v2.Policy policies = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPolicies() - { - return $this->policies; - } - - /** - * Metadata for the policies that are attached to the resource. - * - * Generated from protobuf field repeated .google.iam.v2.Policy policies = 1; - * @param array<\Google\Cloud\Iam\V2\Policy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPolicies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iam\V2\Policy::class); - $this->policies = $arr; - - return $this; - } - - /** - * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the - * next page. If this field is omitted, there are no additional pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the - * next page. If this field is omitted, there are no additional pages. - * - * 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/Iam/v2/proto/src/Google/Cloud/Iam/V2/Policy.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/Policy.php deleted file mode 100644 index 79dfa8b27141..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/Policy.php +++ /dev/null @@ -1,505 +0,0 @@ -google.iam.v2.Policy - */ -class Policy extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The resource name of the `Policy`, which must be unique. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, requests can use the alphanumeric or the numeric ID. - * Responses always contain the numeric ID. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the - * `Policy` is created. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $uid = ''; - /** - * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. - * - * Generated from protobuf field string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $kind = ''; - /** - * A user-specified description of the `Policy`. This value can be up to 63 - * characters. - * - * Generated from protobuf field string display_name = 4; - */ - protected $display_name = ''; - /** - * A key-value map to store arbitrary metadata for the `Policy`. Keys - * can be up to 63 characters. Values can be up to 255 characters. - * - * Generated from protobuf field map annotations = 5; - */ - private $annotations; - /** - * An opaque tag that identifies the current version of the `Policy`. IAM uses - * this value to help manage concurrent updates, so they do not cause one - * update to be overwritten by another. - * If this field is present in a [CreatePolicy][] request, the value is - * ignored. - * - * Generated from protobuf field string etag = 6; - */ - protected $etag = ''; - /** - * Output only. The time when the `Policy` was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the `Policy` was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * A list of rules that specify the behavior of the `Policy`. All of the rules - * should be of the `kind` specified in the `Policy`. - * - * Generated from protobuf field repeated .google.iam.v2.PolicyRule rules = 10; - */ - private $rules; - /** - * Immutable. Specifies that this policy is managed by an authority and can only be - * modified by that authority. Usage is restricted. - * - * Generated from protobuf field string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $managing_authority = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Immutable. The resource name of the `Policy`, which must be unique. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, requests can use the alphanumeric or the numeric ID. - * Responses always contain the numeric ID. - * @type string $uid - * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the - * `Policy` is created. - * @type string $kind - * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. - * @type string $display_name - * A user-specified description of the `Policy`. This value can be up to 63 - * characters. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * A key-value map to store arbitrary metadata for the `Policy`. Keys - * can be up to 63 characters. Values can be up to 255 characters. - * @type string $etag - * An opaque tag that identifies the current version of the `Policy`. IAM uses - * this value to help manage concurrent updates, so they do not cause one - * update to be overwritten by another. - * If this field is present in a [CreatePolicy][] request, the value is - * ignored. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the `Policy` was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the `Policy` was last updated. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. - * @type array<\Google\Cloud\Iam\V2\PolicyRule>|\Google\Protobuf\Internal\RepeatedField $rules - * A list of rules that specify the behavior of the `Policy`. All of the rules - * should be of the `kind` specified in the `Policy`. - * @type string $managing_authority - * Immutable. Specifies that this policy is managed by an authority and can only be - * modified by that authority. Usage is restricted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\V2\Policy::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The resource name of the `Policy`, which must be unique. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, requests can use the alphanumeric or the numeric ID. - * Responses always contain the numeric ID. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Immutable. The resource name of the `Policy`, which must be unique. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, requests can use the alphanumeric or the numeric ID. - * Responses always contain the numeric ID. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the - * `Policy` is created. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the - * `Policy` is created. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. - * - * Generated from protobuf field string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. - * - * Generated from protobuf field string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * A user-specified description of the `Policy`. This value can be up to 63 - * characters. - * - * Generated from protobuf field string display_name = 4; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * A user-specified description of the `Policy`. This value can be up to 63 - * characters. - * - * Generated from protobuf field string display_name = 4; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * A key-value map to store arbitrary metadata for the `Policy`. Keys - * can be up to 63 characters. Values can be up to 255 characters. - * - * Generated from protobuf field map annotations = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * A key-value map to store arbitrary metadata for the `Policy`. Keys - * can be up to 63 characters. Values can be up to 255 characters. - * - * Generated from protobuf field map annotations = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * An opaque tag that identifies the current version of the `Policy`. IAM uses - * this value to help manage concurrent updates, so they do not cause one - * update to be overwritten by another. - * If this field is present in a [CreatePolicy][] request, the value is - * ignored. - * - * Generated from protobuf field string etag = 6; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * An opaque tag that identifies the current version of the `Policy`. IAM uses - * this value to help manage concurrent updates, so they do not cause one - * update to be overwritten by another. - * If this field is present in a [CreatePolicy][] request, the value is - * ignored. - * - * Generated from protobuf field string etag = 6; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Output only. The time when the `Policy` was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.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 when the `Policy` was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.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 when the `Policy` was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the `Policy` was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.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 when the `Policy` was deleted. Empty if the policy is not deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.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; - } - - /** - * A list of rules that specify the behavior of the `Policy`. All of the rules - * should be of the `kind` specified in the `Policy`. - * - * Generated from protobuf field repeated .google.iam.v2.PolicyRule rules = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRules() - { - return $this->rules; - } - - /** - * A list of rules that specify the behavior of the `Policy`. All of the rules - * should be of the `kind` specified in the `Policy`. - * - * Generated from protobuf field repeated .google.iam.v2.PolicyRule rules = 10; - * @param array<\Google\Cloud\Iam\V2\PolicyRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iam\V2\PolicyRule::class); - $this->rules = $arr; - - return $this; - } - - /** - * Immutable. Specifies that this policy is managed by an authority and can only be - * modified by that authority. Usage is restricted. - * - * Generated from protobuf field string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getManagingAuthority() - { - return $this->managing_authority; - } - - /** - * Immutable. Specifies that this policy is managed by an authority and can only be - * modified by that authority. Usage is restricted. - * - * Generated from protobuf field string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setManagingAuthority($var) - { - GPBUtil::checkString($var, True); - $this->managing_authority = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PolicyOperationMetadata.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PolicyOperationMetadata.php deleted file mode 100644 index bcaa57148115..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PolicyOperationMetadata.php +++ /dev/null @@ -1,77 +0,0 @@ -google.iam.v2.PolicyOperationMetadata - */ -class PolicyOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Timestamp when the `google.longrunning.Operation` was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Timestamp when the `google.longrunning.Operation` was created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\V2\Policy::initOnce(); - parent::__construct($data); - } - - /** - * Timestamp when the `google.longrunning.Operation` was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @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); - } - - /** - * Timestamp when the `google.longrunning.Operation` was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @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/Iam/v2/proto/src/Google/Cloud/Iam/V2/PolicyRule.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PolicyRule.php deleted file mode 100644 index 2691d8de2f72..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PolicyRule.php +++ /dev/null @@ -1,113 +0,0 @@ -google.iam.v2.PolicyRule - */ -class PolicyRule extends \Google\Protobuf\Internal\Message -{ - /** - * A user-specified description of the rule. This value can be up to 256 - * characters. - * - * Generated from protobuf field string description = 1; - */ - protected $description = ''; - protected $kind; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Iam\V2\DenyRule $deny_rule - * A rule for a deny policy. - * @type string $description - * A user-specified description of the rule. This value can be up to 256 - * characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\V2\Policy::initOnce(); - parent::__construct($data); - } - - /** - * A rule for a deny policy. - * - * Generated from protobuf field .google.iam.v2.DenyRule deny_rule = 2; - * @return \Google\Cloud\Iam\V2\DenyRule|null - */ - public function getDenyRule() - { - return $this->readOneof(2); - } - - public function hasDenyRule() - { - return $this->hasOneof(2); - } - - /** - * A rule for a deny policy. - * - * Generated from protobuf field .google.iam.v2.DenyRule deny_rule = 2; - * @param \Google\Cloud\Iam\V2\DenyRule $var - * @return $this - */ - public function setDenyRule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iam\V2\DenyRule::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A user-specified description of the rule. This value can be up to 256 - * characters. - * - * Generated from protobuf field string description = 1; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A user-specified description of the rule. This value can be up to 256 - * characters. - * - * Generated from protobuf field string description = 1; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * @return string - */ - public function getKind() - { - return $this->whichOneof("kind"); - } - -} - diff --git a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/UpdatePolicyRequest.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/UpdatePolicyRequest.php deleted file mode 100644 index da476fab3dce..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/UpdatePolicyRequest.php +++ /dev/null @@ -1,89 +0,0 @@ -google.iam.v2.UpdatePolicyRequest - */ -class UpdatePolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The policy to update. - * To prevent conflicting updates, the `etag` value must match the value that - * is stored in IAM. If the `etag` values do not match, the request fails with - * a `409` error code and `ABORTED` status. - * - * Generated from protobuf field .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $policy = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Iam\V2\Policy $policy - * Required. The policy to update. - * To prevent conflicting updates, the `etag` value must match the value that - * is stored in IAM. If the `etag` values do not match, the request fails with - * a `409` error code and `ABORTED` status. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\V2\Policy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The policy to update. - * To prevent conflicting updates, the `etag` value must match the value that - * is stored in IAM. If the `etag` values do not match, the request fails with - * a `409` error code and `ABORTED` status. - * - * Generated from protobuf field .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Iam\V2\Policy|null - */ - public function getPolicy() - { - return $this->policy; - } - - public function hasPolicy() - { - return isset($this->policy); - } - - public function clearPolicy() - { - unset($this->policy); - } - - /** - * Required. The policy to update. - * To prevent conflicting updates, the `etag` value must match the value that - * is stored in IAM. If the `etag` values do not match, the request fails with - * a `409` error code and `ABORTED` status. - * - * Generated from protobuf field .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Iam\V2\Policy $var - * @return $this - */ - public function setPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iam\V2\Policy::class); - $this->policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/create_policy.php b/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/create_policy.php deleted file mode 100644 index fd35cc3a4c10..000000000000 --- a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/create_policy.php +++ /dev/null @@ -1,94 +0,0 @@ -setParent($parent) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $policiesClient->createPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Policy $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 -{ - $parent = '[PARENT]'; - - create_policy_sample($parent); -} -// [END iam_v2_generated_Policies_CreatePolicy_sync] diff --git a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/delete_policy.php b/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/delete_policy.php deleted file mode 100644 index 6120f7247b48..000000000000 --- a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/delete_policy.php +++ /dev/null @@ -1,91 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $policiesClient->deletePolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Policy $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 -{ - $name = '[NAME]'; - - delete_policy_sample($name); -} -// [END iam_v2_generated_Policies_DeletePolicy_sync] diff --git a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/get_policy.php b/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/get_policy.php deleted file mode 100644 index 5cf980da3205..000000000000 --- a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/get_policy.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $policiesClient->getPolicy($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]'; - - get_policy_sample($name); -} -// [END iam_v2_generated_Policies_GetPolicy_sync] diff --git a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/list_policies.php b/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/list_policies.php deleted file mode 100644 index 4a9d083a18b4..000000000000 --- a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/list_policies.php +++ /dev/null @@ -1,90 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $policiesClient->listPolicies($request); - - /** @var Policy $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 -{ - $parent = '[PARENT]'; - - list_policies_sample($parent); -} -// [END iam_v2_generated_Policies_ListPolicies_sync] diff --git a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/update_policy.php b/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/update_policy.php deleted file mode 100644 index a81dfcb0ee43..000000000000 --- a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/update_policy.php +++ /dev/null @@ -1,81 +0,0 @@ -setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $policiesClient->updatePolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Policy $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()); - } -} -// [END iam_v2_generated_Policies_UpdatePolicy_sync] diff --git a/owl-bot-staging/Iam/v2/src/V2/Client/PoliciesClient.php b/owl-bot-staging/Iam/v2/src/V2/Client/PoliciesClient.php deleted file mode 100644 index 61cb3dbe0442..000000000000 --- a/owl-bot-staging/Iam/v2/src/V2/Client/PoliciesClient.php +++ /dev/null @@ -1,374 +0,0 @@ - createPolicyAsync(CreatePolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deletePolicyAsync(DeletePolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getPolicyAsync(GetPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPoliciesAsync(ListPoliciesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updatePolicyAsync(UpdatePolicyRequest $request, array $optionalArgs = []) - */ -final class PoliciesClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.iam.v2.Policies'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'iam.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'iam.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', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/policies_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/policies_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/policies_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/policies_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 = isset($this->descriptors[$methodName]['longRunning']) ? $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); - } - - /** - * Constructor. - * - * @param array $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 'iam.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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 policy. - * - * The async variant is {@see PoliciesClient::createPolicyAsync()} . - * - * @example samples/V2/PoliciesClient/create_policy.php - * - * @param CreatePolicyRequest $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 createPolicy(CreatePolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreatePolicy', $request, $callOptions)->wait(); - } - - /** - * Deletes a policy. This action is permanent. - * - * The async variant is {@see PoliciesClient::deletePolicyAsync()} . - * - * @example samples/V2/PoliciesClient/delete_policy.php - * - * @param DeletePolicyRequest $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 deletePolicy(DeletePolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeletePolicy', $request, $callOptions)->wait(); - } - - /** - * Gets a policy. - * - * The async variant is {@see PoliciesClient::getPolicyAsync()} . - * - * @example samples/V2/PoliciesClient/get_policy.php - * - * @param GetPolicyRequest $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 getPolicy(GetPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetPolicy', $request, $callOptions)->wait(); - } - - /** - * Retrieves the policies of the specified kind that are attached to a - * resource. - * - * The response lists only policy metadata. In particular, policy rules are - * omitted. - * - * The async variant is {@see PoliciesClient::listPoliciesAsync()} . - * - * @example samples/V2/PoliciesClient/list_policies.php - * - * @param ListPoliciesRequest $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 listPolicies(ListPoliciesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPolicies', $request, $callOptions); - } - - /** - * Updates the specified policy. - * - * You can update only the rules and the display name for the policy. - * - * To update a policy, you should use a read-modify-write loop: - * - * 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy. - * 2. Modify the policy as needed. - * 3. Use `UpdatePolicy` to write the updated policy. - * - * This pattern helps prevent conflicts between concurrent updates. - * - * The async variant is {@see PoliciesClient::updatePolicyAsync()} . - * - * @example samples/V2/PoliciesClient/update_policy.php - * - * @param UpdatePolicyRequest $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 updatePolicy(UpdatePolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdatePolicy', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Iam/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Iam/v2/src/V2/gapic_metadata.json deleted file mode 100644 index bd8561eeeb0f..000000000000 --- a/owl-bot-staging/Iam/v2/src/V2/gapic_metadata.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.iam.v2", - "libraryPackage": "Google\\Cloud\\Iam\\V2", - "services": { - "Policies": { - "clients": { - "grpc": { - "libraryClient": "PoliciesGapicClient", - "rpcs": { - "CreatePolicy": { - "methods": [ - "createPolicy" - ] - }, - "DeletePolicy": { - "methods": [ - "deletePolicy" - ] - }, - "GetPolicy": { - "methods": [ - "getPolicy" - ] - }, - "ListPolicies": { - "methods": [ - "listPolicies" - ] - }, - "UpdatePolicy": { - "methods": [ - "updatePolicy" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Iam/v2/src/V2/resources/policies_client_config.json b/owl-bot-staging/Iam/v2/src/V2/resources/policies_client_config.json deleted file mode 100644 index 6c0ff38b0fc5..000000000000 --- a/owl-bot-staging/Iam/v2/src/V2/resources/policies_client_config.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "interfaces": { - "google.iam.v2.Policies": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ] - }, - "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": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreatePolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeletePolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListPolicies": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdatePolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Iam/v2/src/V2/resources/policies_descriptor_config.php b/owl-bot-staging/Iam/v2/src/V2/resources/policies_descriptor_config.php deleted file mode 100644 index e42aa7f01836..000000000000 --- a/owl-bot-staging/Iam/v2/src/V2/resources/policies_descriptor_config.php +++ /dev/null @@ -1,118 +0,0 @@ - [ - 'google.iam.v2.Policies' => [ - 'CreatePolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Iam\V2\Policy', - 'metadataReturnType' => '\Google\Cloud\Iam\V2\PolicyOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeletePolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Iam\V2\Policy', - 'metadataReturnType' => '\Google\Cloud\Iam\V2\PolicyOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdatePolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Iam\V2\Policy', - 'metadataReturnType' => '\Google\Cloud\Iam\V2\PolicyOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'policy.name', - 'fieldAccessors' => [ - 'getPolicy', - 'getName', - ], - ], - ], - ], - 'GetPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V2\Policy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListPolicies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPolicies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Iam\V2\ListPoliciesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Iam/v2/src/V2/resources/policies_rest_client_config.php b/owl-bot-staging/Iam/v2/src/V2/resources/policies_rest_client_config.php deleted file mode 100644 index 68eb8b51b229..000000000000 --- a/owl-bot-staging/Iam/v2/src/V2/resources/policies_rest_client_config.php +++ /dev/null @@ -1,100 +0,0 @@ - [ - 'google.iam.v2.Policies' => [ - 'CreatePolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=policies/*/*}', - 'body' => 'policy', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeletePolicy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=policies/*/*/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=policies/*/*/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListPolicies' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=policies/*/*}', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdatePolicy' => [ - 'method' => 'put', - 'uriTemplate' => '/v2/{policy.name=policies/*/*/*}', - 'body' => 'policy', - 'placeholders' => [ - 'policy.name' => [ - 'getters' => [ - 'getPolicy', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=policies/*/*/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Iam/v2/tests/Unit/V2/Client/PoliciesClientTest.php b/owl-bot-staging/Iam/v2/tests/Unit/V2/Client/PoliciesClientTest.php deleted file mode 100644 index 7759df2bd4c4..000000000000 --- a/owl-bot-staging/Iam/v2/tests/Unit/V2/Client/PoliciesClientTest.php +++ /dev/null @@ -1,702 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return PoliciesClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new PoliciesClient($options); - } - - /** @test */ - public function createPolicyTest() - { - $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/createPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $kind = 'kind3292052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $managingAuthority = 'managingAuthority617792550'; - $expectedResponse = new Policy(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setKind($kind); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setManagingAuthority($managingAuthority); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $parent = 'parent-995424086'; - $policy = new Policy(); - $request = (new CreatePolicyRequest()) - ->setParent($parent) - ->setPolicy($policy); - $response = $gapicClient->createPolicy($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.iam.v2.Policies/CreatePolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualApiRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPolicyTest'); - $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 createPolicyExceptionTest() - { - $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/createPolicyTest'); - $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 - $parent = 'parent-995424086'; - $policy = new Policy(); - $request = (new CreatePolicyRequest()) - ->setParent($parent) - ->setPolicy($policy); - $response = $gapicClient->createPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPolicyTest'); - 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 deletePolicyTest() - { - $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/deletePolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $kind = 'kind3292052'; - $displayName = 'displayName1615086568'; - $etag2 = 'etag2-1293302904'; - $managingAuthority = 'managingAuthority617792550'; - $expectedResponse = new Policy(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setKind($kind); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag2); - $expectedResponse->setManagingAuthority($managingAuthority); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deletePolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new DeletePolicyRequest()) - ->setName($name); - $response = $gapicClient->deletePolicy($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.iam.v2.Policies/DeletePolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deletePolicyTest'); - $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 deletePolicyExceptionTest() - { - $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/deletePolicyTest'); - $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 - $name = 'name3373707'; - $request = (new DeletePolicyRequest()) - ->setName($name); - $response = $gapicClient->deletePolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deletePolicyTest'); - 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 getPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $kind = 'kind3292052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $managingAuthority = 'managingAuthority617792550'; - $expectedResponse = new Policy(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setKind($kind); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setManagingAuthority($managingAuthority); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new GetPolicyRequest()) - ->setName($name); - $response = $gapicClient->getPolicy($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.v2.Policies/GetPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPolicyExceptionTest() - { - $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'; - $request = (new GetPolicyRequest()) - ->setName($name); - try { - $gapicClient->getPolicy($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 listPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $policiesElement = new Policy(); - $policies = [ - $policiesElement, - ]; - $expectedResponse = new ListPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPolicies($policies); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new ListPoliciesRequest()) - ->setParent($parent); - $response = $gapicClient->listPolicies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v2.Policies/ListPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPoliciesExceptionTest() - { - $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 - $parent = 'parent-995424086'; - $request = (new ListPoliciesRequest()) - ->setParent($parent); - try { - $gapicClient->listPolicies($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 updatePolicyTest() - { - $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/updatePolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $kind = 'kind3292052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $managingAuthority = 'managingAuthority617792550'; - $expectedResponse = new Policy(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setKind($kind); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setManagingAuthority($managingAuthority); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updatePolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $policy = new Policy(); - $request = (new UpdatePolicyRequest()) - ->setPolicy($policy); - $response = $gapicClient->updatePolicy($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.iam.v2.Policies/UpdatePolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updatePolicyTest'); - $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 updatePolicyExceptionTest() - { - $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/updatePolicyTest'); - $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 - $policy = new Policy(); - $request = (new UpdatePolicyRequest()) - ->setPolicy($policy); - $response = $gapicClient->updatePolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updatePolicyTest'); - 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 createPolicyAsyncTest() - { - $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/createPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $kind = 'kind3292052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $managingAuthority = 'managingAuthority617792550'; - $expectedResponse = new Policy(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setKind($kind); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setManagingAuthority($managingAuthority); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $parent = 'parent-995424086'; - $policy = new Policy(); - $request = (new CreatePolicyRequest()) - ->setParent($parent) - ->setPolicy($policy); - $response = $gapicClient->createPolicyAsync($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.iam.v2.Policies/CreatePolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualApiRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPolicyTest'); - $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/IamCredentials/v1/proto/src/GPBMetadata/Google/Iam/Credentials/V1/Common.php b/owl-bot-staging/IamCredentials/v1/proto/src/GPBMetadata/Google/Iam/Credentials/V1/Common.php deleted file mode 100644 index 96b5065b8b1a..000000000000 --- a/owl-bot-staging/IamCredentials/v1/proto/src/GPBMetadata/Google/Iam/Credentials/V1/Common.php +++ /dev/null @@ -1,67 +0,0 @@ -internalAddGeneratedFile( - ' -€ - -&google/iam/credentials/v1/common.protogoogle.iam.credentials.v1google/api/resource.protogoogle/protobuf/duration.protogoogle/protobuf/timestamp.proto"© -GenerateAccessTokenRequest7 -name ( B)àAúA# -!iam.googleapis.com/ServiceAccount - delegates (  -scope ( BàA+ -lifetime ( 2.google.protobuf.Duration"d -GenerateAccessTokenResponse - access_token ( / - expire_time ( 2.google.protobuf.Timestamp"s -SignBlobRequest7 -name ( B)àAúA# -!iam.googleapis.com/ServiceAccount - delegates (  -payload ( BàA"7 -SignBlobResponse -key_id (  - signed_blob ( "r -SignJwtRequest7 -name ( B)àAúA# -!iam.googleapis.com/ServiceAccount - delegates (  -payload ( BàA"5 -SignJwtResponse -key_id (  - -signed_jwt ( "’ -GenerateIdTokenRequest7 -name ( B)àAúA# -!iam.googleapis.com/ServiceAccount - delegates (  -audience ( BàA - include_email ("( -GenerateIdTokenResponse -token ( B¬ -#com.google.cloud.iam.credentials.v1BIAMCredentialsCommonProtoPZEcloud.google.com/go/iam/credentials/apiv1/credentialspb;credentialspbøªGoogle.Cloud.Iam.Credentials.V1ÊGoogle\\Cloud\\Iam\\Credentials\\V1êAY -!iam.googleapis.com/ServiceAccount4projects/{project}/serviceAccounts/{service_account}bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/GPBMetadata/Google/Iam/Credentials/V1/Iamcredentials.php b/owl-bot-staging/IamCredentials/v1/proto/src/GPBMetadata/Google/Iam/Credentials/V1/Iamcredentials.php deleted file mode 100644 index 6cb16eaf0fee..000000000000 --- a/owl-bot-staging/IamCredentials/v1/proto/src/GPBMetadata/Google/Iam/Credentials/V1/Iamcredentials.php +++ /dev/null @@ -1,36 +0,0 @@ -internalAddGeneratedFile( - ' -‘ - -.google/iam/credentials/v1/iamcredentials.protogoogle.iam.credentials.v1google/api/client.proto&google/iam/credentials/v1/common.proto2­ -IAMCredentialsì -GenerateAccessToken5.google.iam.credentials.v1.GenerateAccessTokenRequest6.google.iam.credentials.v1.GenerateAccessTokenResponse"fÚAname,delegates,scope,lifetime‚Óä“@";/v1/{name=projects/*/serviceAccounts/*}:generateAccessToken:*ä -GenerateIdToken1.google.iam.credentials.v1.GenerateIdTokenRequest2.google.iam.credentials.v1.GenerateIdTokenResponse"jÚA%name,delegates,audience,include_email‚Óä“<"7/v1/{name=projects/*/serviceAccounts/*}:generateIdToken:*¹ -SignBlob*.google.iam.credentials.v1.SignBlobRequest+.google.iam.credentials.v1.SignBlobResponse"TÚAname,delegates,payload‚Óä“5"0/v1/{name=projects/*/serviceAccounts/*}:signBlob:*µ -SignJwt).google.iam.credentials.v1.SignJwtRequest*.google.iam.credentials.v1.SignJwtResponse"SÚAname,delegates,payload‚Óä“4"//v1/{name=projects/*/serviceAccounts/*}:signJwt:*QÊAiamcredentials.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÊ -#com.google.cloud.iam.credentials.v1BIAMCredentialsProtoPZEcloud.google.com/go/iam/credentials/apiv1/credentialspb;credentialspbøªGoogle.Cloud.Iam.Credentials.V1ÊGoogle\\Cloud\\Iam\\Credentials\\V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateAccessTokenRequest.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateAccessTokenRequest.php deleted file mode 100644 index cdce6724319b..000000000000 --- a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateAccessTokenRequest.php +++ /dev/null @@ -1,283 +0,0 @@ -google.iam.credentials.v1.GenerateAccessTokenRequest - */ -class GenerateAccessTokenRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 2; - */ - private $delegates; - /** - * Required. Code to identify the scopes to be included in the OAuth 2.0 access token. - * See https://developers.google.com/identity/protocols/googlescopes for more - * information. - * At least one value required. - * - * Generated from protobuf field repeated string scope = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private $scope; - /** - * The desired lifetime duration of the access token in seconds. - * Must be set to a value less than or equal to 3600 (1 hour). If a value is - * not specified, the token's lifetime will be set to a default value of one - * hour. - * - * Generated from protobuf field .google.protobuf.Duration lifetime = 7; - */ - protected $lifetime = null; - - /** - * @param string $name Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. Please see - * {@see IAMCredentialsClient::serviceAccountName()} for help formatting this field. - * @param string[] $delegates The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @param string[] $scope Required. Code to identify the scopes to be included in the OAuth 2.0 access token. - * See https://developers.google.com/identity/protocols/googlescopes for more - * information. - * At least one value required. - * @param \Google\Protobuf\Duration $lifetime The desired lifetime duration of the access token in seconds. - * Must be set to a value less than or equal to 3600 (1 hour). If a value is - * not specified, the token's lifetime will be set to a default value of one - * hour. - * - * @return \Google\Cloud\Iam\Credentials\V1\GenerateAccessTokenRequest - * - * @experimental - */ - public static function build(string $name, array $delegates, array $scope, \Google\Protobuf\Duration $lifetime): self - { - return (new self()) - ->setName($name) - ->setDelegates($delegates) - ->setScope($scope) - ->setLifetime($lifetime); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @type array|\Google\Protobuf\Internal\RepeatedField $delegates - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @type array|\Google\Protobuf\Internal\RepeatedField $scope - * Required. Code to identify the scopes to be included in the OAuth 2.0 access token. - * See https://developers.google.com/identity/protocols/googlescopes for more - * information. - * At least one value required. - * @type \Google\Protobuf\Duration $lifetime - * The desired lifetime duration of the access token in seconds. - * Must be set to a value less than or equal to 3600 (1 hour). If a value is - * not specified, the token's lifetime will be set to a default value of one - * hour. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\Credentials\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * 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 service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * 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; - } - - /** - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDelegates() - { - return $this->delegates; - } - - /** - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDelegates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->delegates = $arr; - - return $this; - } - - /** - * Required. Code to identify the scopes to be included in the OAuth 2.0 access token. - * See https://developers.google.com/identity/protocols/googlescopes for more - * information. - * At least one value required. - * - * Generated from protobuf field repeated string scope = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getScope() - { - return $this->scope; - } - - /** - * Required. Code to identify the scopes to be included in the OAuth 2.0 access token. - * See https://developers.google.com/identity/protocols/googlescopes for more - * information. - * At least one value required. - * - * Generated from protobuf field repeated string scope = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setScope($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->scope = $arr; - - return $this; - } - - /** - * The desired lifetime duration of the access token in seconds. - * Must be set to a value less than or equal to 3600 (1 hour). If a value is - * not specified, the token's lifetime will be set to a default value of one - * hour. - * - * Generated from protobuf field .google.protobuf.Duration lifetime = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getLifetime() - { - return $this->lifetime; - } - - public function hasLifetime() - { - return isset($this->lifetime); - } - - public function clearLifetime() - { - unset($this->lifetime); - } - - /** - * The desired lifetime duration of the access token in seconds. - * Must be set to a value less than or equal to 3600 (1 hour). If a value is - * not specified, the token's lifetime will be set to a default value of one - * hour. - * - * Generated from protobuf field .google.protobuf.Duration lifetime = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setLifetime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->lifetime = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateAccessTokenResponse.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateAccessTokenResponse.php deleted file mode 100644 index d9cc2fe9f2d5..000000000000 --- a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateAccessTokenResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.iam.credentials.v1.GenerateAccessTokenResponse - */ -class GenerateAccessTokenResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The OAuth 2.0 access token. - * - * Generated from protobuf field string access_token = 1; - */ - protected $access_token = ''; - /** - * Token expiration time. - * The expiration time is always set. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3; - */ - protected $expire_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $access_token - * The OAuth 2.0 access token. - * @type \Google\Protobuf\Timestamp $expire_time - * Token expiration time. - * The expiration time is always set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\Credentials\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The OAuth 2.0 access token. - * - * Generated from protobuf field string access_token = 1; - * @return string - */ - public function getAccessToken() - { - return $this->access_token; - } - - /** - * The OAuth 2.0 access token. - * - * Generated from protobuf field string access_token = 1; - * @param string $var - * @return $this - */ - public function setAccessToken($var) - { - GPBUtil::checkString($var, True); - $this->access_token = $var; - - return $this; - } - - /** - * Token expiration time. - * The expiration time is always set. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3; - * @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); - } - - /** - * Token expiration time. - * The expiration time is always set. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateIdTokenRequest.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateIdTokenRequest.php deleted file mode 100644 index be0b797c35d1..000000000000 --- a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateIdTokenRequest.php +++ /dev/null @@ -1,253 +0,0 @@ -google.iam.credentials.v1.GenerateIdTokenRequest - */ -class GenerateIdTokenRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 2; - */ - private $delegates; - /** - * Required. The audience for the token, such as the API or account that this token - * grants access to. - * - * Generated from protobuf field string audience = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $audience = ''; - /** - * Include the service account email in the token. If set to `true`, the - * token will contain `email` and `email_verified` claims. - * - * Generated from protobuf field bool include_email = 4; - */ - protected $include_email = false; - - /** - * @param string $name Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. Please see - * {@see IAMCredentialsClient::serviceAccountName()} for help formatting this field. - * @param string[] $delegates The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @param string $audience Required. The audience for the token, such as the API or account that this token - * grants access to. - * @param bool $includeEmail Include the service account email in the token. If set to `true`, the - * token will contain `email` and `email_verified` claims. - * - * @return \Google\Cloud\Iam\Credentials\V1\GenerateIdTokenRequest - * - * @experimental - */ - public static function build(string $name, array $delegates, string $audience, bool $includeEmail): self - { - return (new self()) - ->setName($name) - ->setDelegates($delegates) - ->setAudience($audience) - ->setIncludeEmail($includeEmail); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @type array|\Google\Protobuf\Internal\RepeatedField $delegates - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @type string $audience - * Required. The audience for the token, such as the API or account that this token - * grants access to. - * @type bool $include_email - * Include the service account email in the token. If set to `true`, the - * token will contain `email` and `email_verified` claims. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\Credentials\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * 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 service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * 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; - } - - /** - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDelegates() - { - return $this->delegates; - } - - /** - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDelegates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->delegates = $arr; - - return $this; - } - - /** - * Required. The audience for the token, such as the API or account that this token - * grants access to. - * - * Generated from protobuf field string audience = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAudience() - { - return $this->audience; - } - - /** - * Required. The audience for the token, such as the API or account that this token - * grants access to. - * - * Generated from protobuf field string audience = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAudience($var) - { - GPBUtil::checkString($var, True); - $this->audience = $var; - - return $this; - } - - /** - * Include the service account email in the token. If set to `true`, the - * token will contain `email` and `email_verified` claims. - * - * Generated from protobuf field bool include_email = 4; - * @return bool - */ - public function getIncludeEmail() - { - return $this->include_email; - } - - /** - * Include the service account email in the token. If set to `true`, the - * token will contain `email` and `email_verified` claims. - * - * Generated from protobuf field bool include_email = 4; - * @param bool $var - * @return $this - */ - public function setIncludeEmail($var) - { - GPBUtil::checkBool($var); - $this->include_email = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateIdTokenResponse.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateIdTokenResponse.php deleted file mode 100644 index 17171c522436..000000000000 --- a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateIdTokenResponse.php +++ /dev/null @@ -1,65 +0,0 @@ -google.iam.credentials.v1.GenerateIdTokenResponse - */ -class GenerateIdTokenResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The OpenId Connect ID token. - * - * Generated from protobuf field string token = 1; - */ - protected $token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $token - * The OpenId Connect ID token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\Credentials\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The OpenId Connect ID token. - * - * Generated from protobuf field string token = 1; - * @return string - */ - public function getToken() - { - return $this->token; - } - - /** - * The OpenId Connect ID token. - * - * Generated from protobuf field string token = 1; - * @param string $var - * @return $this - */ - public function setToken($var) - { - GPBUtil::checkString($var, True); - $this->token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignBlobRequest.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignBlobRequest.php deleted file mode 100644 index d0685403f25f..000000000000 --- a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignBlobRequest.php +++ /dev/null @@ -1,207 +0,0 @@ -google.iam.credentials.v1.SignBlobRequest - */ -class SignBlobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 3; - */ - private $delegates; - /** - * Required. The bytes to sign. - * - * Generated from protobuf field bytes payload = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $payload = ''; - - /** - * @param string $name Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. Please see - * {@see IAMCredentialsClient::serviceAccountName()} for help formatting this field. - * @param string[] $delegates The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @param string $payload Required. The bytes to sign. - * - * @return \Google\Cloud\Iam\Credentials\V1\SignBlobRequest - * - * @experimental - */ - public static function build(string $name, array $delegates, string $payload): self - { - return (new self()) - ->setName($name) - ->setDelegates($delegates) - ->setPayload($payload); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @type array|\Google\Protobuf\Internal\RepeatedField $delegates - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @type string $payload - * Required. The bytes to sign. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\Credentials\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * 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 service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * 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; - } - - /** - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDelegates() - { - return $this->delegates; - } - - /** - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDelegates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->delegates = $arr; - - return $this; - } - - /** - * Required. The bytes to sign. - * - * Generated from protobuf field bytes payload = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPayload() - { - return $this->payload; - } - - /** - * Required. The bytes to sign. - * - * Generated from protobuf field bytes payload = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPayload($var) - { - GPBUtil::checkString($var, False); - $this->payload = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignBlobResponse.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignBlobResponse.php deleted file mode 100644 index b416997364ea..000000000000 --- a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignBlobResponse.php +++ /dev/null @@ -1,99 +0,0 @@ -google.iam.credentials.v1.SignBlobResponse - */ -class SignBlobResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of the key used to sign the blob. - * - * Generated from protobuf field string key_id = 1; - */ - protected $key_id = ''; - /** - * The signed blob. - * - * Generated from protobuf field bytes signed_blob = 4; - */ - protected $signed_blob = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key_id - * The ID of the key used to sign the blob. - * @type string $signed_blob - * The signed blob. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\Credentials\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The ID of the key used to sign the blob. - * - * Generated from protobuf field string key_id = 1; - * @return string - */ - public function getKeyId() - { - return $this->key_id; - } - - /** - * The ID of the key used to sign the blob. - * - * Generated from protobuf field string key_id = 1; - * @param string $var - * @return $this - */ - public function setKeyId($var) - { - GPBUtil::checkString($var, True); - $this->key_id = $var; - - return $this; - } - - /** - * The signed blob. - * - * Generated from protobuf field bytes signed_blob = 4; - * @return string - */ - public function getSignedBlob() - { - return $this->signed_blob; - } - - /** - * The signed blob. - * - * Generated from protobuf field bytes signed_blob = 4; - * @param string $var - * @return $this - */ - public function setSignedBlob($var) - { - GPBUtil::checkString($var, False); - $this->signed_blob = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignJwtRequest.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignJwtRequest.php deleted file mode 100644 index c673f85c0575..000000000000 --- a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignJwtRequest.php +++ /dev/null @@ -1,207 +0,0 @@ -google.iam.credentials.v1.SignJwtRequest - */ -class SignJwtRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 3; - */ - private $delegates; - /** - * Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. - * - * Generated from protobuf field string payload = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $payload = ''; - - /** - * @param string $name Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. Please see - * {@see IAMCredentialsClient::serviceAccountName()} for help formatting this field. - * @param string[] $delegates The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @param string $payload Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. - * - * @return \Google\Cloud\Iam\Credentials\V1\SignJwtRequest - * - * @experimental - */ - public static function build(string $name, array $delegates, string $payload): self - { - return (new self()) - ->setName($name) - ->setDelegates($delegates) - ->setPayload($payload); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @type array|\Google\Protobuf\Internal\RepeatedField $delegates - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @type string $payload - * Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\Credentials\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * 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 service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * 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; - } - - /** - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDelegates() - { - return $this->delegates; - } - - /** - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDelegates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->delegates = $arr; - - return $this; - } - - /** - * Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. - * - * Generated from protobuf field string payload = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPayload() - { - return $this->payload; - } - - /** - * Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. - * - * Generated from protobuf field string payload = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPayload($var) - { - GPBUtil::checkString($var, True); - $this->payload = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignJwtResponse.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignJwtResponse.php deleted file mode 100644 index 637ea731569e..000000000000 --- a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignJwtResponse.php +++ /dev/null @@ -1,99 +0,0 @@ -google.iam.credentials.v1.SignJwtResponse - */ -class SignJwtResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of the key used to sign the JWT. - * - * Generated from protobuf field string key_id = 1; - */ - protected $key_id = ''; - /** - * The signed JWT. - * - * Generated from protobuf field string signed_jwt = 2; - */ - protected $signed_jwt = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key_id - * The ID of the key used to sign the JWT. - * @type string $signed_jwt - * The signed JWT. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\Credentials\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The ID of the key used to sign the JWT. - * - * Generated from protobuf field string key_id = 1; - * @return string - */ - public function getKeyId() - { - return $this->key_id; - } - - /** - * The ID of the key used to sign the JWT. - * - * Generated from protobuf field string key_id = 1; - * @param string $var - * @return $this - */ - public function setKeyId($var) - { - GPBUtil::checkString($var, True); - $this->key_id = $var; - - return $this; - } - - /** - * The signed JWT. - * - * Generated from protobuf field string signed_jwt = 2; - * @return string - */ - public function getSignedJwt() - { - return $this->signed_jwt; - } - - /** - * The signed JWT. - * - * Generated from protobuf field string signed_jwt = 2; - * @param string $var - * @return $this - */ - public function setSignedJwt($var) - { - GPBUtil::checkString($var, True); - $this->signed_jwt = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/generate_access_token.php b/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/generate_access_token.php deleted file mode 100644 index 41c4e726e3e9..000000000000 --- a/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/generate_access_token.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName) - ->setScope($scope); - - // Call the API and handle any network failures. - try { - /** @var GenerateAccessTokenResponse $response */ - $response = $iAMCredentialsClient->generateAccessToken($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 = IAMCredentialsClient::serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $scopeElement = '[SCOPE]'; - - generate_access_token_sample($formattedName, $scopeElement); -} -// [END iamcredentials_v1_generated_IAMCredentials_GenerateAccessToken_sync] diff --git a/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/generate_id_token.php b/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/generate_id_token.php deleted file mode 100644 index dc155b3fcb55..000000000000 --- a/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/generate_id_token.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName) - ->setAudience($audience); - - // Call the API and handle any network failures. - try { - /** @var GenerateIdTokenResponse $response */ - $response = $iAMCredentialsClient->generateIdToken($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 = IAMCredentialsClient::serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $audience = '[AUDIENCE]'; - - generate_id_token_sample($formattedName, $audience); -} -// [END iamcredentials_v1_generated_IAMCredentials_GenerateIdToken_sync] diff --git a/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/sign_blob.php b/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/sign_blob.php deleted file mode 100644 index 02ec4efa043b..000000000000 --- a/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/sign_blob.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName) - ->setPayload($payload); - - // Call the API and handle any network failures. - try { - /** @var SignBlobResponse $response */ - $response = $iAMCredentialsClient->signBlob($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 = IAMCredentialsClient::serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $payload = '...'; - - sign_blob_sample($formattedName, $payload); -} -// [END iamcredentials_v1_generated_IAMCredentials_SignBlob_sync] diff --git a/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/sign_jwt.php b/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/sign_jwt.php deleted file mode 100644 index d0ca8576d706..000000000000 --- a/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/sign_jwt.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName) - ->setPayload($payload); - - // Call the API and handle any network failures. - try { - /** @var SignJwtResponse $response */ - $response = $iAMCredentialsClient->signJwt($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 = IAMCredentialsClient::serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $payload = '[PAYLOAD]'; - - sign_jwt_sample($formattedName, $payload); -} -// [END iamcredentials_v1_generated_IAMCredentials_SignJwt_sync] diff --git a/owl-bot-staging/IamCredentials/v1/src/V1/Client/IAMCredentialsClient.php b/owl-bot-staging/IamCredentials/v1/src/V1/Client/IAMCredentialsClient.php deleted file mode 100644 index fbafbc9a3d8c..000000000000 --- a/owl-bot-staging/IamCredentials/v1/src/V1/Client/IAMCredentialsClient.php +++ /dev/null @@ -1,336 +0,0 @@ - generateAccessTokenAsync(GenerateAccessTokenRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateIdTokenAsync(GenerateIdTokenRequest $request, array $optionalArgs = []) - * @method PromiseInterface signBlobAsync(SignBlobRequest $request, array $optionalArgs = []) - * @method PromiseInterface signJwtAsync(SignJwtRequest $request, array $optionalArgs = []) - */ -final class IAMCredentialsClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.iam.credentials.v1.IAMCredentials'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'iamcredentials.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'iamcredentials.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', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/iam_credentials_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/iam_credentials_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/iam_credentials_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/iam_credentials_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * service_account resource. - * - * @param string $project - * @param string $serviceAccount - * - * @return string The formatted service_account resource. - */ - public static function serviceAccountName(string $project, string $serviceAccount): string - { - return self::getPathTemplate('serviceAccount')->render([ - 'project' => $project, - 'service_account' => $serviceAccount, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - serviceAccount: projects/{project}/serviceAccounts/{service_account} - * - * 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 $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 'iamcredentials.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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); - } - - /** - * Generates an OAuth 2.0 access token for a service account. - * - * The async variant is {@see IAMCredentialsClient::generateAccessTokenAsync()} . - * - * @example samples/V1/IAMCredentialsClient/generate_access_token.php - * - * @param GenerateAccessTokenRequest $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 GenerateAccessTokenResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateAccessToken(GenerateAccessTokenRequest $request, array $callOptions = []): GenerateAccessTokenResponse - { - return $this->startApiCall('GenerateAccessToken', $request, $callOptions)->wait(); - } - - /** - * Generates an OpenID Connect ID token for a service account. - * - * The async variant is {@see IAMCredentialsClient::generateIdTokenAsync()} . - * - * @example samples/V1/IAMCredentialsClient/generate_id_token.php - * - * @param GenerateIdTokenRequest $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 GenerateIdTokenResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateIdToken(GenerateIdTokenRequest $request, array $callOptions = []): GenerateIdTokenResponse - { - return $this->startApiCall('GenerateIdToken', $request, $callOptions)->wait(); - } - - /** - * Signs a blob using a service account's system-managed private key. - * - * The async variant is {@see IAMCredentialsClient::signBlobAsync()} . - * - * @example samples/V1/IAMCredentialsClient/sign_blob.php - * - * @param SignBlobRequest $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 SignBlobResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function signBlob(SignBlobRequest $request, array $callOptions = []): SignBlobResponse - { - return $this->startApiCall('SignBlob', $request, $callOptions)->wait(); - } - - /** - * Signs a JWT using a service account's system-managed private key. - * - * The async variant is {@see IAMCredentialsClient::signJwtAsync()} . - * - * @example samples/V1/IAMCredentialsClient/sign_jwt.php - * - * @param SignJwtRequest $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 SignJwtResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function signJwt(SignJwtRequest $request, array $callOptions = []): SignJwtResponse - { - return $this->startApiCall('SignJwt', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/IamCredentials/v1/src/V1/gapic_metadata.json b/owl-bot-staging/IamCredentials/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 1b3b6563af15..000000000000 --- a/owl-bot-staging/IamCredentials/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.iam.credentials.v1", - "libraryPackage": "Google\\Cloud\\Iam\\Credentials\\V1", - "services": { - "IAMCredentials": { - "clients": { - "grpc": { - "libraryClient": "IAMCredentialsGapicClient", - "rpcs": { - "GenerateAccessToken": { - "methods": [ - "generateAccessToken" - ] - }, - "GenerateIdToken": { - "methods": [ - "generateIdToken" - ] - }, - "SignBlob": { - "methods": [ - "signBlob" - ] - }, - "SignJwt": { - "methods": [ - "signJwt" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/IamCredentials/v1/src/V1/resources/iam_credentials_client_config.json b/owl-bot-staging/IamCredentials/v1/src/V1/resources/iam_credentials_client_config.json deleted file mode 100644 index 243c0042e040..000000000000 --- a/owl-bot-staging/IamCredentials/v1/src/V1/resources/iam_credentials_client_config.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "interfaces": { - "google.iam.credentials.v1.IAMCredentials": { - "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": { - "GenerateAccessToken": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GenerateIdToken": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SignBlob": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SignJwt": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/IamCredentials/v1/src/V1/resources/iam_credentials_descriptor_config.php b/owl-bot-staging/IamCredentials/v1/src/V1/resources/iam_credentials_descriptor_config.php deleted file mode 100644 index 66b7383f2c8b..000000000000 --- a/owl-bot-staging/IamCredentials/v1/src/V1/resources/iam_credentials_descriptor_config.php +++ /dev/null @@ -1,79 +0,0 @@ - [ - 'google.iam.credentials.v1.IAMCredentials' => [ - 'GenerateAccessToken' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\Credentials\V1\GenerateAccessTokenResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GenerateIdToken' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\Credentials\V1\GenerateIdTokenResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'SignBlob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\Credentials\V1\SignBlobResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'SignJwt' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\Credentials\V1\SignJwtResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'serviceAccount' => 'projects/{project}/serviceAccounts/{service_account}', - ], - ], - ], -]; diff --git a/owl-bot-staging/IamCredentials/v1/src/V1/resources/iam_credentials_rest_client_config.php b/owl-bot-staging/IamCredentials/v1/src/V1/resources/iam_credentials_rest_client_config.php deleted file mode 100644 index f857a1d60dd3..000000000000 --- a/owl-bot-staging/IamCredentials/v1/src/V1/resources/iam_credentials_rest_client_config.php +++ /dev/null @@ -1,77 +0,0 @@ - [ - 'google.iam.credentials.v1.IAMCredentials' => [ - 'GenerateAccessToken' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/serviceAccounts/*}:generateAccessToken', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateIdToken' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/serviceAccounts/*}:generateIdToken', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SignBlob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/serviceAccounts/*}:signBlob', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SignJwt' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/serviceAccounts/*}:signJwt', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/IamCredentials/v1/tests/Unit/V1/Client/IAMCredentialsClientTest.php b/owl-bot-staging/IamCredentials/v1/tests/Unit/V1/Client/IAMCredentialsClientTest.php deleted file mode 100644 index 7ab0e8197d26..000000000000 --- a/owl-bot-staging/IamCredentials/v1/tests/Unit/V1/Client/IAMCredentialsClientTest.php +++ /dev/null @@ -1,385 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return IAMCredentialsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new IAMCredentialsClient($options); - } - - /** @test */ - public function generateAccessTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $accessToken = 'accessToken-1938933922'; - $expectedResponse = new GenerateAccessTokenResponse(); - $expectedResponse->setAccessToken($accessToken); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $scope = []; - $request = (new GenerateAccessTokenRequest()) - ->setName($formattedName) - ->setScope($scope); - $response = $gapicClient->generateAccessToken($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.credentials.v1.IAMCredentials/GenerateAccessToken', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getScope(); - $this->assertProtobufEquals($scope, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAccessTokenExceptionTest() - { - $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->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $scope = []; - $request = (new GenerateAccessTokenRequest()) - ->setName($formattedName) - ->setScope($scope); - try { - $gapicClient->generateAccessToken($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 generateIdTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $token = 'token110541305'; - $expectedResponse = new GenerateIdTokenResponse(); - $expectedResponse->setToken($token); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $audience = 'audience975628804'; - $request = (new GenerateIdTokenRequest()) - ->setName($formattedName) - ->setAudience($audience); - $response = $gapicClient->generateIdToken($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.credentials.v1.IAMCredentials/GenerateIdToken', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getAudience(); - $this->assertProtobufEquals($audience, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateIdTokenExceptionTest() - { - $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->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $audience = 'audience975628804'; - $request = (new GenerateIdTokenRequest()) - ->setName($formattedName) - ->setAudience($audience); - try { - $gapicClient->generateIdToken($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 signBlobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $keyId = 'keyId-1134673157'; - $signedBlob = '-32'; - $expectedResponse = new SignBlobResponse(); - $expectedResponse->setKeyId($keyId); - $expectedResponse->setSignedBlob($signedBlob); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $payload = '-114'; - $request = (new SignBlobRequest()) - ->setName($formattedName) - ->setPayload($payload); - $response = $gapicClient->signBlob($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.credentials.v1.IAMCredentials/SignBlob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getPayload(); - $this->assertProtobufEquals($payload, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function signBlobExceptionTest() - { - $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->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $payload = '-114'; - $request = (new SignBlobRequest()) - ->setName($formattedName) - ->setPayload($payload); - try { - $gapicClient->signBlob($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 signJwtTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $keyId = 'keyId-1134673157'; - $signedJwt = 'signedJwt-979546844'; - $expectedResponse = new SignJwtResponse(); - $expectedResponse->setKeyId($keyId); - $expectedResponse->setSignedJwt($signedJwt); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $payload = 'payload-786701938'; - $request = (new SignJwtRequest()) - ->setName($formattedName) - ->setPayload($payload); - $response = $gapicClient->signJwt($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.credentials.v1.IAMCredentials/SignJwt', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getPayload(); - $this->assertProtobufEquals($payload, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function signJwtExceptionTest() - { - $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->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $payload = 'payload-786701938'; - $request = (new SignJwtRequest()) - ->setName($formattedName) - ->setPayload($payload); - try { - $gapicClient->signJwt($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 generateAccessTokenAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $accessToken = 'accessToken-1938933922'; - $expectedResponse = new GenerateAccessTokenResponse(); - $expectedResponse->setAccessToken($accessToken); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $scope = []; - $request = (new GenerateAccessTokenRequest()) - ->setName($formattedName) - ->setScope($scope); - $response = $gapicClient->generateAccessTokenAsync($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.iam.credentials.v1.IAMCredentials/GenerateAccessToken', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getScope(); - $this->assertProtobufEquals($scope, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Iap/v1/proto/src/GPBMetadata/Google/Cloud/Iap/V1/Service.php b/owl-bot-staging/Iap/v1/proto/src/GPBMetadata/Google/Cloud/Iap/V1/Service.php deleted file mode 100644 index 6d35b293ba1a..000000000000 Binary files a/owl-bot-staging/Iap/v1/proto/src/GPBMetadata/Google/Cloud/Iap/V1/Service.php and /dev/null differ diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AccessDeniedPageSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AccessDeniedPageSettings.php deleted file mode 100644 index 867e592fa1cd..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AccessDeniedPageSettings.php +++ /dev/null @@ -1,261 +0,0 @@ -google.cloud.iap.v1.AccessDeniedPageSettings - */ -class AccessDeniedPageSettings extends \Google\Protobuf\Internal\Message -{ - /** - * The URI to be redirected to when access is denied. - * - * Generated from protobuf field .google.protobuf.StringValue access_denied_page_uri = 1; - */ - protected $access_denied_page_uri = null; - /** - * Whether to generate a troubleshooting URL on access denied events to this - * application. - * - * Generated from protobuf field .google.protobuf.BoolValue generate_troubleshooting_uri = 2; - */ - protected $generate_troubleshooting_uri = null; - /** - * Whether to generate remediation token on access denied events to this - * application. - * - * Generated from protobuf field optional .google.protobuf.BoolValue remediation_token_generation_enabled = 3; - */ - protected $remediation_token_generation_enabled = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\StringValue $access_denied_page_uri - * The URI to be redirected to when access is denied. - * @type \Google\Protobuf\BoolValue $generate_troubleshooting_uri - * Whether to generate a troubleshooting URL on access denied events to this - * application. - * @type \Google\Protobuf\BoolValue $remediation_token_generation_enabled - * Whether to generate remediation token on access denied events to this - * application. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The URI to be redirected to when access is denied. - * - * Generated from protobuf field .google.protobuf.StringValue access_denied_page_uri = 1; - * @return \Google\Protobuf\StringValue|null - */ - public function getAccessDeniedPageUri() - { - return $this->access_denied_page_uri; - } - - public function hasAccessDeniedPageUri() - { - return isset($this->access_denied_page_uri); - } - - public function clearAccessDeniedPageUri() - { - unset($this->access_denied_page_uri); - } - - /** - * Returns the unboxed value from getAccessDeniedPageUri() - - * The URI to be redirected to when access is denied. - * - * Generated from protobuf field .google.protobuf.StringValue access_denied_page_uri = 1; - * @return string|null - */ - public function getAccessDeniedPageUriUnwrapped() - { - return $this->readWrapperValue("access_denied_page_uri"); - } - - /** - * The URI to be redirected to when access is denied. - * - * Generated from protobuf field .google.protobuf.StringValue access_denied_page_uri = 1; - * @param \Google\Protobuf\StringValue $var - * @return $this - */ - public function setAccessDeniedPageUri($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); - $this->access_denied_page_uri = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. - - * The URI to be redirected to when access is denied. - * - * Generated from protobuf field .google.protobuf.StringValue access_denied_page_uri = 1; - * @param string|null $var - * @return $this - */ - public function setAccessDeniedPageUriUnwrapped($var) - { - $this->writeWrapperValue("access_denied_page_uri", $var); - return $this;} - - /** - * Whether to generate a troubleshooting URL on access denied events to this - * application. - * - * Generated from protobuf field .google.protobuf.BoolValue generate_troubleshooting_uri = 2; - * @return \Google\Protobuf\BoolValue|null - */ - public function getGenerateTroubleshootingUri() - { - return $this->generate_troubleshooting_uri; - } - - public function hasGenerateTroubleshootingUri() - { - return isset($this->generate_troubleshooting_uri); - } - - public function clearGenerateTroubleshootingUri() - { - unset($this->generate_troubleshooting_uri); - } - - /** - * Returns the unboxed value from getGenerateTroubleshootingUri() - - * Whether to generate a troubleshooting URL on access denied events to this - * application. - * - * Generated from protobuf field .google.protobuf.BoolValue generate_troubleshooting_uri = 2; - * @return bool|null - */ - public function getGenerateTroubleshootingUriUnwrapped() - { - return $this->readWrapperValue("generate_troubleshooting_uri"); - } - - /** - * Whether to generate a troubleshooting URL on access denied events to this - * application. - * - * Generated from protobuf field .google.protobuf.BoolValue generate_troubleshooting_uri = 2; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setGenerateTroubleshootingUri($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->generate_troubleshooting_uri = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Whether to generate a troubleshooting URL on access denied events to this - * application. - * - * Generated from protobuf field .google.protobuf.BoolValue generate_troubleshooting_uri = 2; - * @param bool|null $var - * @return $this - */ - public function setGenerateTroubleshootingUriUnwrapped($var) - { - $this->writeWrapperValue("generate_troubleshooting_uri", $var); - return $this;} - - /** - * Whether to generate remediation token on access denied events to this - * application. - * - * Generated from protobuf field optional .google.protobuf.BoolValue remediation_token_generation_enabled = 3; - * @return \Google\Protobuf\BoolValue|null - */ - public function getRemediationTokenGenerationEnabled() - { - return $this->remediation_token_generation_enabled; - } - - public function hasRemediationTokenGenerationEnabled() - { - return isset($this->remediation_token_generation_enabled); - } - - public function clearRemediationTokenGenerationEnabled() - { - unset($this->remediation_token_generation_enabled); - } - - /** - * Returns the unboxed value from getRemediationTokenGenerationEnabled() - - * Whether to generate remediation token on access denied events to this - * application. - * - * Generated from protobuf field optional .google.protobuf.BoolValue remediation_token_generation_enabled = 3; - * @return bool|null - */ - public function getRemediationTokenGenerationEnabledUnwrapped() - { - return $this->readWrapperValue("remediation_token_generation_enabled"); - } - - /** - * Whether to generate remediation token on access denied events to this - * application. - * - * Generated from protobuf field optional .google.protobuf.BoolValue remediation_token_generation_enabled = 3; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setRemediationTokenGenerationEnabled($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->remediation_token_generation_enabled = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Whether to generate remediation token on access denied events to this - * application. - * - * Generated from protobuf field optional .google.protobuf.BoolValue remediation_token_generation_enabled = 3; - * @param bool|null $var - * @return $this - */ - public function setRemediationTokenGenerationEnabledUnwrapped($var) - { - $this->writeWrapperValue("remediation_token_generation_enabled", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AccessSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AccessSettings.php deleted file mode 100644 index 36658c877255..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AccessSettings.php +++ /dev/null @@ -1,253 +0,0 @@ -google.cloud.iap.v1.AccessSettings - */ -class AccessSettings extends \Google\Protobuf\Internal\Message -{ - /** - * GCIP claims and endpoint configurations for 3p identity providers. - * - * Generated from protobuf field .google.cloud.iap.v1.GcipSettings gcip_settings = 1; - */ - protected $gcip_settings = null; - /** - * Configuration to allow cross-origin requests via IAP. - * - * Generated from protobuf field .google.cloud.iap.v1.CorsSettings cors_settings = 2; - */ - protected $cors_settings = null; - /** - * Settings to configure IAP's OAuth behavior. - * - * Generated from protobuf field .google.cloud.iap.v1.OAuthSettings oauth_settings = 3; - */ - protected $oauth_settings = null; - /** - * Settings to configure reauthentication policies in IAP. - * - * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings reauth_settings = 6; - */ - protected $reauth_settings = null; - /** - * Settings to configure and enable allowed domains. - * - * Generated from protobuf field .google.cloud.iap.v1.AllowedDomainsSettings allowed_domains_settings = 7; - */ - protected $allowed_domains_settings = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Iap\V1\GcipSettings $gcip_settings - * GCIP claims and endpoint configurations for 3p identity providers. - * @type \Google\Cloud\Iap\V1\CorsSettings $cors_settings - * Configuration to allow cross-origin requests via IAP. - * @type \Google\Cloud\Iap\V1\OAuthSettings $oauth_settings - * Settings to configure IAP's OAuth behavior. - * @type \Google\Cloud\Iap\V1\ReauthSettings $reauth_settings - * Settings to configure reauthentication policies in IAP. - * @type \Google\Cloud\Iap\V1\AllowedDomainsSettings $allowed_domains_settings - * Settings to configure and enable allowed domains. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * GCIP claims and endpoint configurations for 3p identity providers. - * - * Generated from protobuf field .google.cloud.iap.v1.GcipSettings gcip_settings = 1; - * @return \Google\Cloud\Iap\V1\GcipSettings|null - */ - public function getGcipSettings() - { - return $this->gcip_settings; - } - - public function hasGcipSettings() - { - return isset($this->gcip_settings); - } - - public function clearGcipSettings() - { - unset($this->gcip_settings); - } - - /** - * GCIP claims and endpoint configurations for 3p identity providers. - * - * Generated from protobuf field .google.cloud.iap.v1.GcipSettings gcip_settings = 1; - * @param \Google\Cloud\Iap\V1\GcipSettings $var - * @return $this - */ - public function setGcipSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\GcipSettings::class); - $this->gcip_settings = $var; - - return $this; - } - - /** - * Configuration to allow cross-origin requests via IAP. - * - * Generated from protobuf field .google.cloud.iap.v1.CorsSettings cors_settings = 2; - * @return \Google\Cloud\Iap\V1\CorsSettings|null - */ - public function getCorsSettings() - { - return $this->cors_settings; - } - - public function hasCorsSettings() - { - return isset($this->cors_settings); - } - - public function clearCorsSettings() - { - unset($this->cors_settings); - } - - /** - * Configuration to allow cross-origin requests via IAP. - * - * Generated from protobuf field .google.cloud.iap.v1.CorsSettings cors_settings = 2; - * @param \Google\Cloud\Iap\V1\CorsSettings $var - * @return $this - */ - public function setCorsSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\CorsSettings::class); - $this->cors_settings = $var; - - return $this; - } - - /** - * Settings to configure IAP's OAuth behavior. - * - * Generated from protobuf field .google.cloud.iap.v1.OAuthSettings oauth_settings = 3; - * @return \Google\Cloud\Iap\V1\OAuthSettings|null - */ - public function getOauthSettings() - { - return $this->oauth_settings; - } - - public function hasOauthSettings() - { - return isset($this->oauth_settings); - } - - public function clearOauthSettings() - { - unset($this->oauth_settings); - } - - /** - * Settings to configure IAP's OAuth behavior. - * - * Generated from protobuf field .google.cloud.iap.v1.OAuthSettings oauth_settings = 3; - * @param \Google\Cloud\Iap\V1\OAuthSettings $var - * @return $this - */ - public function setOauthSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\OAuthSettings::class); - $this->oauth_settings = $var; - - return $this; - } - - /** - * Settings to configure reauthentication policies in IAP. - * - * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings reauth_settings = 6; - * @return \Google\Cloud\Iap\V1\ReauthSettings|null - */ - public function getReauthSettings() - { - return $this->reauth_settings; - } - - public function hasReauthSettings() - { - return isset($this->reauth_settings); - } - - public function clearReauthSettings() - { - unset($this->reauth_settings); - } - - /** - * Settings to configure reauthentication policies in IAP. - * - * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings reauth_settings = 6; - * @param \Google\Cloud\Iap\V1\ReauthSettings $var - * @return $this - */ - public function setReauthSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\ReauthSettings::class); - $this->reauth_settings = $var; - - return $this; - } - - /** - * Settings to configure and enable allowed domains. - * - * Generated from protobuf field .google.cloud.iap.v1.AllowedDomainsSettings allowed_domains_settings = 7; - * @return \Google\Cloud\Iap\V1\AllowedDomainsSettings|null - */ - public function getAllowedDomainsSettings() - { - return $this->allowed_domains_settings; - } - - public function hasAllowedDomainsSettings() - { - return isset($this->allowed_domains_settings); - } - - public function clearAllowedDomainsSettings() - { - unset($this->allowed_domains_settings); - } - - /** - * Settings to configure and enable allowed domains. - * - * Generated from protobuf field .google.cloud.iap.v1.AllowedDomainsSettings allowed_domains_settings = 7; - * @param \Google\Cloud\Iap\V1\AllowedDomainsSettings $var - * @return $this - */ - public function setAllowedDomainsSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\AllowedDomainsSettings::class); - $this->allowed_domains_settings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AllowedDomainsSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AllowedDomainsSettings.php deleted file mode 100644 index 982a8e503ad5..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AllowedDomainsSettings.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.iap.v1.AllowedDomainsSettings - */ -class AllowedDomainsSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Configuration for customers to opt in for the feature. - * - * Generated from protobuf field optional bool enable = 1; - */ - protected $enable = null; - /** - * List of trusted domains. - * - * Generated from protobuf field repeated string domains = 2; - */ - private $domains; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable - * Configuration for customers to opt in for the feature. - * @type array|\Google\Protobuf\Internal\RepeatedField $domains - * List of trusted domains. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Configuration for customers to opt in for the feature. - * - * Generated from protobuf field optional bool enable = 1; - * @return bool - */ - public function getEnable() - { - return isset($this->enable) ? $this->enable : false; - } - - public function hasEnable() - { - return isset($this->enable); - } - - public function clearEnable() - { - unset($this->enable); - } - - /** - * Configuration for customers to opt in for the feature. - * - * Generated from protobuf field optional bool enable = 1; - * @param bool $var - * @return $this - */ - public function setEnable($var) - { - GPBUtil::checkBool($var); - $this->enable = $var; - - return $this; - } - - /** - * List of trusted domains. - * - * Generated from protobuf field repeated string domains = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDomains() - { - return $this->domains; - } - - /** - * List of trusted domains. - * - * Generated from protobuf field repeated string domains = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDomains($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->domains = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ApplicationSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ApplicationSettings.php deleted file mode 100644 index cc9b3ad24e6a..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ApplicationSettings.php +++ /dev/null @@ -1,242 +0,0 @@ -google.cloud.iap.v1.ApplicationSettings - */ -class ApplicationSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Settings to configure IAP's behavior for a service mesh. - * - * Generated from protobuf field .google.cloud.iap.v1.CsmSettings csm_settings = 1; - */ - protected $csm_settings = null; - /** - * Customization for Access Denied page. - * - * Generated from protobuf field .google.cloud.iap.v1.AccessDeniedPageSettings access_denied_page_settings = 2; - */ - protected $access_denied_page_settings = null; - /** - * The Domain value to set for cookies generated by IAP. This value is not - * validated by the API, but will be ignored at runtime if invalid. - * - * Generated from protobuf field .google.protobuf.StringValue cookie_domain = 3; - */ - protected $cookie_domain = null; - /** - * Settings to configure attribute propagation. - * - * Generated from protobuf field .google.cloud.iap.v1.AttributePropagationSettings attribute_propagation_settings = 4; - */ - protected $attribute_propagation_settings = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Iap\V1\CsmSettings $csm_settings - * Settings to configure IAP's behavior for a service mesh. - * @type \Google\Cloud\Iap\V1\AccessDeniedPageSettings $access_denied_page_settings - * Customization for Access Denied page. - * @type \Google\Protobuf\StringValue $cookie_domain - * The Domain value to set for cookies generated by IAP. This value is not - * validated by the API, but will be ignored at runtime if invalid. - * @type \Google\Cloud\Iap\V1\AttributePropagationSettings $attribute_propagation_settings - * Settings to configure attribute propagation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Settings to configure IAP's behavior for a service mesh. - * - * Generated from protobuf field .google.cloud.iap.v1.CsmSettings csm_settings = 1; - * @return \Google\Cloud\Iap\V1\CsmSettings|null - */ - public function getCsmSettings() - { - return $this->csm_settings; - } - - public function hasCsmSettings() - { - return isset($this->csm_settings); - } - - public function clearCsmSettings() - { - unset($this->csm_settings); - } - - /** - * Settings to configure IAP's behavior for a service mesh. - * - * Generated from protobuf field .google.cloud.iap.v1.CsmSettings csm_settings = 1; - * @param \Google\Cloud\Iap\V1\CsmSettings $var - * @return $this - */ - public function setCsmSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\CsmSettings::class); - $this->csm_settings = $var; - - return $this; - } - - /** - * Customization for Access Denied page. - * - * Generated from protobuf field .google.cloud.iap.v1.AccessDeniedPageSettings access_denied_page_settings = 2; - * @return \Google\Cloud\Iap\V1\AccessDeniedPageSettings|null - */ - public function getAccessDeniedPageSettings() - { - return $this->access_denied_page_settings; - } - - public function hasAccessDeniedPageSettings() - { - return isset($this->access_denied_page_settings); - } - - public function clearAccessDeniedPageSettings() - { - unset($this->access_denied_page_settings); - } - - /** - * Customization for Access Denied page. - * - * Generated from protobuf field .google.cloud.iap.v1.AccessDeniedPageSettings access_denied_page_settings = 2; - * @param \Google\Cloud\Iap\V1\AccessDeniedPageSettings $var - * @return $this - */ - public function setAccessDeniedPageSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\AccessDeniedPageSettings::class); - $this->access_denied_page_settings = $var; - - return $this; - } - - /** - * The Domain value to set for cookies generated by IAP. This value is not - * validated by the API, but will be ignored at runtime if invalid. - * - * Generated from protobuf field .google.protobuf.StringValue cookie_domain = 3; - * @return \Google\Protobuf\StringValue|null - */ - public function getCookieDomain() - { - return $this->cookie_domain; - } - - public function hasCookieDomain() - { - return isset($this->cookie_domain); - } - - public function clearCookieDomain() - { - unset($this->cookie_domain); - } - - /** - * Returns the unboxed value from getCookieDomain() - - * The Domain value to set for cookies generated by IAP. This value is not - * validated by the API, but will be ignored at runtime if invalid. - * - * Generated from protobuf field .google.protobuf.StringValue cookie_domain = 3; - * @return string|null - */ - public function getCookieDomainUnwrapped() - { - return $this->readWrapperValue("cookie_domain"); - } - - /** - * The Domain value to set for cookies generated by IAP. This value is not - * validated by the API, but will be ignored at runtime if invalid. - * - * Generated from protobuf field .google.protobuf.StringValue cookie_domain = 3; - * @param \Google\Protobuf\StringValue $var - * @return $this - */ - public function setCookieDomain($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); - $this->cookie_domain = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. - - * The Domain value to set for cookies generated by IAP. This value is not - * validated by the API, but will be ignored at runtime if invalid. - * - * Generated from protobuf field .google.protobuf.StringValue cookie_domain = 3; - * @param string|null $var - * @return $this - */ - public function setCookieDomainUnwrapped($var) - { - $this->writeWrapperValue("cookie_domain", $var); - return $this;} - - /** - * Settings to configure attribute propagation. - * - * Generated from protobuf field .google.cloud.iap.v1.AttributePropagationSettings attribute_propagation_settings = 4; - * @return \Google\Cloud\Iap\V1\AttributePropagationSettings|null - */ - public function getAttributePropagationSettings() - { - return $this->attribute_propagation_settings; - } - - public function hasAttributePropagationSettings() - { - return isset($this->attribute_propagation_settings); - } - - public function clearAttributePropagationSettings() - { - unset($this->attribute_propagation_settings); - } - - /** - * Settings to configure attribute propagation. - * - * Generated from protobuf field .google.cloud.iap.v1.AttributePropagationSettings attribute_propagation_settings = 4; - * @param \Google\Cloud\Iap\V1\AttributePropagationSettings $var - * @return $this - */ - public function setAttributePropagationSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\AttributePropagationSettings::class); - $this->attribute_propagation_settings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings.php deleted file mode 100644 index a401fdb21fd1..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings.php +++ /dev/null @@ -1,252 +0,0 @@ -google.cloud.iap.v1.AttributePropagationSettings - */ -class AttributePropagationSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Raw string CEL expression. Must return a list of attributes. A maximum of - * 45 attributes can be selected. Expressions can select different attribute - * types from `attributes`: `attributes.saml_attributes`, - * `attributes.iap_attributes`. The following functions are supported: - * - filter `.filter(, )`: Returns a subset of - * `` where `` is true for every item. - * - in ` in `: Returns true if `` contains ``. - * - selectByName `.selectByName()`: Returns the attribute - * in - * `` with the given `` name, otherwise returns empty. - * - emitAs `.emitAs()`: Sets the `` name - * field to the given `` for propagation in selected output - * credentials. - * - strict `.strict()`: Ignores the `x-goog-iap-attr-` prefix - * for the provided `` when propagating with the `HEADER` output - * credential, such as request headers. - * - append `.append()` OR - * `.append()`: Appends the provided `` or - * `` to the end of ``. - * Example expression: `attributes.saml_attributes.filter(x, x.name in - * ['test']).append(attributes.iap_attributes.selectByName('exact').emitAs('custom').strict())` - * - * Generated from protobuf field optional string expression = 1; - */ - protected $expression = null; - /** - * Which output credentials attributes selected by the CEL expression should - * be propagated in. All attributes will be fully duplicated in each selected - * output credential. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.AttributePropagationSettings.OutputCredentials output_credentials = 2; - */ - private $output_credentials; - /** - * Whether the provided attribute propagation settings should be evaluated on - * user requests. If set to true, attributes returned from the expression will - * be propagated in the set output credentials. - * - * Generated from protobuf field optional bool enable = 3; - */ - protected $enable = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $expression - * Raw string CEL expression. Must return a list of attributes. A maximum of - * 45 attributes can be selected. Expressions can select different attribute - * types from `attributes`: `attributes.saml_attributes`, - * `attributes.iap_attributes`. The following functions are supported: - * - filter `.filter(, )`: Returns a subset of - * `` where `` is true for every item. - * - in ` in `: Returns true if `` contains ``. - * - selectByName `.selectByName()`: Returns the attribute - * in - * `` with the given `` name, otherwise returns empty. - * - emitAs `.emitAs()`: Sets the `` name - * field to the given `` for propagation in selected output - * credentials. - * - strict `.strict()`: Ignores the `x-goog-iap-attr-` prefix - * for the provided `` when propagating with the `HEADER` output - * credential, such as request headers. - * - append `.append()` OR - * `.append()`: Appends the provided `` or - * `` to the end of ``. - * Example expression: `attributes.saml_attributes.filter(x, x.name in - * ['test']).append(attributes.iap_attributes.selectByName('exact').emitAs('custom').strict())` - * @type array|\Google\Protobuf\Internal\RepeatedField $output_credentials - * Which output credentials attributes selected by the CEL expression should - * be propagated in. All attributes will be fully duplicated in each selected - * output credential. - * @type bool $enable - * Whether the provided attribute propagation settings should be evaluated on - * user requests. If set to true, attributes returned from the expression will - * be propagated in the set output credentials. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Raw string CEL expression. Must return a list of attributes. A maximum of - * 45 attributes can be selected. Expressions can select different attribute - * types from `attributes`: `attributes.saml_attributes`, - * `attributes.iap_attributes`. The following functions are supported: - * - filter `.filter(, )`: Returns a subset of - * `` where `` is true for every item. - * - in ` in `: Returns true if `` contains ``. - * - selectByName `.selectByName()`: Returns the attribute - * in - * `` with the given `` name, otherwise returns empty. - * - emitAs `.emitAs()`: Sets the `` name - * field to the given `` for propagation in selected output - * credentials. - * - strict `.strict()`: Ignores the `x-goog-iap-attr-` prefix - * for the provided `` when propagating with the `HEADER` output - * credential, such as request headers. - * - append `.append()` OR - * `.append()`: Appends the provided `` or - * `` to the end of ``. - * Example expression: `attributes.saml_attributes.filter(x, x.name in - * ['test']).append(attributes.iap_attributes.selectByName('exact').emitAs('custom').strict())` - * - * Generated from protobuf field optional string expression = 1; - * @return string - */ - public function getExpression() - { - return isset($this->expression) ? $this->expression : ''; - } - - public function hasExpression() - { - return isset($this->expression); - } - - public function clearExpression() - { - unset($this->expression); - } - - /** - * Raw string CEL expression. Must return a list of attributes. A maximum of - * 45 attributes can be selected. Expressions can select different attribute - * types from `attributes`: `attributes.saml_attributes`, - * `attributes.iap_attributes`. The following functions are supported: - * - filter `.filter(, )`: Returns a subset of - * `` where `` is true for every item. - * - in ` in `: Returns true if `` contains ``. - * - selectByName `.selectByName()`: Returns the attribute - * in - * `` with the given `` name, otherwise returns empty. - * - emitAs `.emitAs()`: Sets the `` name - * field to the given `` for propagation in selected output - * credentials. - * - strict `.strict()`: Ignores the `x-goog-iap-attr-` prefix - * for the provided `` when propagating with the `HEADER` output - * credential, such as request headers. - * - append `.append()` OR - * `.append()`: Appends the provided `` or - * `` to the end of ``. - * Example expression: `attributes.saml_attributes.filter(x, x.name in - * ['test']).append(attributes.iap_attributes.selectByName('exact').emitAs('custom').strict())` - * - * Generated from protobuf field optional string expression = 1; - * @param string $var - * @return $this - */ - public function setExpression($var) - { - GPBUtil::checkString($var, True); - $this->expression = $var; - - return $this; - } - - /** - * Which output credentials attributes selected by the CEL expression should - * be propagated in. All attributes will be fully duplicated in each selected - * output credential. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.AttributePropagationSettings.OutputCredentials output_credentials = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOutputCredentials() - { - return $this->output_credentials; - } - - /** - * Which output credentials attributes selected by the CEL expression should - * be propagated in. All attributes will be fully duplicated in each selected - * output credential. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.AttributePropagationSettings.OutputCredentials output_credentials = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOutputCredentials($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Iap\V1\AttributePropagationSettings\OutputCredentials::class); - $this->output_credentials = $arr; - - return $this; - } - - /** - * Whether the provided attribute propagation settings should be evaluated on - * user requests. If set to true, attributes returned from the expression will - * be propagated in the set output credentials. - * - * Generated from protobuf field optional bool enable = 3; - * @return bool - */ - public function getEnable() - { - return isset($this->enable) ? $this->enable : false; - } - - public function hasEnable() - { - return isset($this->enable); - } - - public function clearEnable() - { - unset($this->enable); - } - - /** - * Whether the provided attribute propagation settings should be evaluated on - * user requests. If set to true, attributes returned from the expression will - * be propagated in the set output credentials. - * - * Generated from protobuf field optional bool enable = 3; - * @param bool $var - * @return $this - */ - public function setEnable($var) - { - GPBUtil::checkBool($var); - $this->enable = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings/OutputCredentials.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings/OutputCredentials.php deleted file mode 100644 index a195e370e9e1..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings/OutputCredentials.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.iap.v1.AttributePropagationSettings.OutputCredentials - */ -class OutputCredentials -{ - /** - * An output credential is required. - * - * Generated from protobuf enum OUTPUT_CREDENTIALS_UNSPECIFIED = 0; - */ - const OUTPUT_CREDENTIALS_UNSPECIFIED = 0; - /** - * Propagate attributes in the headers with "x-goog-iap-attr-" prefix. - * - * Generated from protobuf enum HEADER = 1; - */ - const HEADER = 1; - /** - * Propagate attributes in the JWT of the form: `"additional_claims": { - * "my_attribute": ["value1", "value2"] }` - * - * Generated from protobuf enum JWT = 2; - */ - const JWT = 2; - /** - * Propagate attributes in the RCToken of the form: `"additional_claims": { - * "my_attribute": ["value1", "value2"] }` - * - * Generated from protobuf enum RCTOKEN = 3; - */ - const RCTOKEN = 3; - - private static $valueToName = [ - self::OUTPUT_CREDENTIALS_UNSPECIFIED => 'OUTPUT_CREDENTIALS_UNSPECIFIED', - self::HEADER => 'HEADER', - self::JWT => 'JWT', - self::RCTOKEN => 'RCTOKEN', - ]; - - 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(OutputCredentials::class, \Google\Cloud\Iap\V1\AttributePropagationSettings_OutputCredentials::class); - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/Brand.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/Brand.php deleted file mode 100644 index 90b0b6b7ff0d..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/Brand.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.iap.v1.Brand - */ -class Brand extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Identifier of the brand. - * NOTE: GCP project number achieves the same brand identification purpose as - * only one brand per project can be created. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Support email displayed on the OAuth consent screen. - * - * Generated from protobuf field string support_email = 2; - */ - protected $support_email = ''; - /** - * Application name displayed on OAuth consent screen. - * - * Generated from protobuf field string application_title = 3; - */ - protected $application_title = ''; - /** - * Output only. Whether the brand is only intended for usage inside the - * G Suite organization only. - * - * Generated from protobuf field bool org_internal_only = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $org_internal_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Identifier of the brand. - * NOTE: GCP project number achieves the same brand identification purpose as - * only one brand per project can be created. - * @type string $support_email - * Support email displayed on the OAuth consent screen. - * @type string $application_title - * Application name displayed on OAuth consent screen. - * @type bool $org_internal_only - * Output only. Whether the brand is only intended for usage inside the - * G Suite organization only. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Identifier of the brand. - * NOTE: GCP project number achieves the same brand identification purpose as - * only one brand per project can be created. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Identifier of the brand. - * NOTE: GCP project number achieves the same brand identification purpose as - * only one brand per project can be created. - * - * 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; - } - - /** - * Support email displayed on the OAuth consent screen. - * - * Generated from protobuf field string support_email = 2; - * @return string - */ - public function getSupportEmail() - { - return $this->support_email; - } - - /** - * Support email displayed on the OAuth consent screen. - * - * Generated from protobuf field string support_email = 2; - * @param string $var - * @return $this - */ - public function setSupportEmail($var) - { - GPBUtil::checkString($var, True); - $this->support_email = $var; - - return $this; - } - - /** - * Application name displayed on OAuth consent screen. - * - * Generated from protobuf field string application_title = 3; - * @return string - */ - public function getApplicationTitle() - { - return $this->application_title; - } - - /** - * Application name displayed on OAuth consent screen. - * - * Generated from protobuf field string application_title = 3; - * @param string $var - * @return $this - */ - public function setApplicationTitle($var) - { - GPBUtil::checkString($var, True); - $this->application_title = $var; - - return $this; - } - - /** - * Output only. Whether the brand is only intended for usage inside the - * G Suite organization only. - * - * Generated from protobuf field bool org_internal_only = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getOrgInternalOnly() - { - return $this->org_internal_only; - } - - /** - * Output only. Whether the brand is only intended for usage inside the - * G Suite organization only. - * - * Generated from protobuf field bool org_internal_only = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setOrgInternalOnly($var) - { - GPBUtil::checkBool($var); - $this->org_internal_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CorsSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CorsSettings.php deleted file mode 100644 index 945b88df8573..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CorsSettings.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.iap.v1.CorsSettings - */ -class CorsSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Configuration to allow HTTP OPTIONS calls to skip authorization. If - * undefined, IAP will not apply any special logic to OPTIONS requests. - * - * Generated from protobuf field .google.protobuf.BoolValue allow_http_options = 1; - */ - protected $allow_http_options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\BoolValue $allow_http_options - * Configuration to allow HTTP OPTIONS calls to skip authorization. If - * undefined, IAP will not apply any special logic to OPTIONS requests. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Configuration to allow HTTP OPTIONS calls to skip authorization. If - * undefined, IAP will not apply any special logic to OPTIONS requests. - * - * Generated from protobuf field .google.protobuf.BoolValue allow_http_options = 1; - * @return \Google\Protobuf\BoolValue|null - */ - public function getAllowHttpOptions() - { - return $this->allow_http_options; - } - - public function hasAllowHttpOptions() - { - return isset($this->allow_http_options); - } - - public function clearAllowHttpOptions() - { - unset($this->allow_http_options); - } - - /** - * Returns the unboxed value from getAllowHttpOptions() - - * Configuration to allow HTTP OPTIONS calls to skip authorization. If - * undefined, IAP will not apply any special logic to OPTIONS requests. - * - * Generated from protobuf field .google.protobuf.BoolValue allow_http_options = 1; - * @return bool|null - */ - public function getAllowHttpOptionsUnwrapped() - { - return $this->readWrapperValue("allow_http_options"); - } - - /** - * Configuration to allow HTTP OPTIONS calls to skip authorization. If - * undefined, IAP will not apply any special logic to OPTIONS requests. - * - * Generated from protobuf field .google.protobuf.BoolValue allow_http_options = 1; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setAllowHttpOptions($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->allow_http_options = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Configuration to allow HTTP OPTIONS calls to skip authorization. If - * undefined, IAP will not apply any special logic to OPTIONS requests. - * - * Generated from protobuf field .google.protobuf.BoolValue allow_http_options = 1; - * @param bool|null $var - * @return $this - */ - public function setAllowHttpOptionsUnwrapped($var) - { - $this->writeWrapperValue("allow_http_options", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateBrandRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateBrandRequest.php deleted file mode 100644 index acd649fe0e5c..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateBrandRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.iap.v1.CreateBrandRequest - */ -class CreateBrandRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. GCP Project number/id under which the brand is to be created. - * In the following format: projects/{project_number/id}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. The brand to be created. - * - * Generated from protobuf field .google.cloud.iap.v1.Brand brand = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $brand = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. GCP Project number/id under which the brand is to be created. - * In the following format: projects/{project_number/id}. - * @type \Google\Cloud\Iap\V1\Brand $brand - * Required. The brand to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. GCP Project number/id under which the brand is to be created. - * In the following format: projects/{project_number/id}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. GCP Project number/id under which the brand is to be created. - * In the following format: projects/{project_number/id}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The brand to be created. - * - * Generated from protobuf field .google.cloud.iap.v1.Brand brand = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Iap\V1\Brand|null - */ - public function getBrand() - { - return $this->brand; - } - - public function hasBrand() - { - return isset($this->brand); - } - - public function clearBrand() - { - unset($this->brand); - } - - /** - * Required. The brand to be created. - * - * Generated from protobuf field .google.cloud.iap.v1.Brand brand = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Iap\V1\Brand $var - * @return $this - */ - public function setBrand($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\Brand::class); - $this->brand = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateIdentityAwareProxyClientRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateIdentityAwareProxyClientRequest.php deleted file mode 100644 index 0e938fed6c17..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateIdentityAwareProxyClientRequest.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.iap.v1.CreateIdentityAwareProxyClientRequest - */ -class CreateIdentityAwareProxyClientRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Path to create the client in. - * In the following format: - * projects/{project_number/id}/brands/{brand}. - * The project must belong to a G Suite account. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. Identity Aware Proxy Client to be created. - * - * Generated from protobuf field .google.cloud.iap.v1.IdentityAwareProxyClient identity_aware_proxy_client = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $identity_aware_proxy_client = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Path to create the client in. - * In the following format: - * projects/{project_number/id}/brands/{brand}. - * The project must belong to a G Suite account. - * @type \Google\Cloud\Iap\V1\IdentityAwareProxyClient $identity_aware_proxy_client - * Required. Identity Aware Proxy Client to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Path to create the client in. - * In the following format: - * projects/{project_number/id}/brands/{brand}. - * The project must belong to a G Suite account. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Path to create the client in. - * In the following format: - * projects/{project_number/id}/brands/{brand}. - * The project must belong to a G Suite account. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Identity Aware Proxy Client to be created. - * - * Generated from protobuf field .google.cloud.iap.v1.IdentityAwareProxyClient identity_aware_proxy_client = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Iap\V1\IdentityAwareProxyClient|null - */ - public function getIdentityAwareProxyClient() - { - return $this->identity_aware_proxy_client; - } - - public function hasIdentityAwareProxyClient() - { - return isset($this->identity_aware_proxy_client); - } - - public function clearIdentityAwareProxyClient() - { - unset($this->identity_aware_proxy_client); - } - - /** - * Required. Identity Aware Proxy Client to be created. - * - * Generated from protobuf field .google.cloud.iap.v1.IdentityAwareProxyClient identity_aware_proxy_client = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Iap\V1\IdentityAwareProxyClient $var - * @return $this - */ - public function setIdentityAwareProxyClient($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\IdentityAwareProxyClient::class); - $this->identity_aware_proxy_client = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateTunnelDestGroupRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateTunnelDestGroupRequest.php deleted file mode 100644 index ae841e64da92..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateTunnelDestGroupRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.iap.v1.CreateTunnelDestGroupRequest - */ -class CreateTunnelDestGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Google Cloud Project ID and location. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The TunnelDestGroup to create. - * - * Generated from protobuf field .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_group = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tunnel_dest_group = null; - /** - * Required. The ID to use for the TunnelDestGroup, which becomes the final - * component of the resource name. - * This value must be 4-63 characters, and valid characters - * are `[a-z]-`. - * - * Generated from protobuf field string tunnel_dest_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tunnel_dest_group_id = ''; - - /** - * @param string $parent Required. Google Cloud Project ID and location. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}`. Please see - * {@see IdentityAwareProxyAdminServiceClient::tunnelLocationName()} for help formatting this field. - * @param \Google\Cloud\Iap\V1\TunnelDestGroup $tunnelDestGroup Required. The TunnelDestGroup to create. - * @param string $tunnelDestGroupId Required. The ID to use for the TunnelDestGroup, which becomes the final - * component of the resource name. - * - * This value must be 4-63 characters, and valid characters - * are `[a-z]-`. - * - * @return \Google\Cloud\Iap\V1\CreateTunnelDestGroupRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Iap\V1\TunnelDestGroup $tunnelDestGroup, string $tunnelDestGroupId): self - { - return (new self()) - ->setParent($parent) - ->setTunnelDestGroup($tunnelDestGroup) - ->setTunnelDestGroupId($tunnelDestGroupId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Google Cloud Project ID and location. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}`. - * @type \Google\Cloud\Iap\V1\TunnelDestGroup $tunnel_dest_group - * Required. The TunnelDestGroup to create. - * @type string $tunnel_dest_group_id - * Required. The ID to use for the TunnelDestGroup, which becomes the final - * component of the resource name. - * This value must be 4-63 characters, and valid characters - * are `[a-z]-`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Google Cloud Project ID and location. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/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. Google Cloud Project ID and location. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/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; - } - - /** - * Required. The TunnelDestGroup to create. - * - * Generated from protobuf field .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Iap\V1\TunnelDestGroup|null - */ - public function getTunnelDestGroup() - { - return $this->tunnel_dest_group; - } - - public function hasTunnelDestGroup() - { - return isset($this->tunnel_dest_group); - } - - public function clearTunnelDestGroup() - { - unset($this->tunnel_dest_group); - } - - /** - * Required. The TunnelDestGroup to create. - * - * Generated from protobuf field .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Iap\V1\TunnelDestGroup $var - * @return $this - */ - public function setTunnelDestGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\TunnelDestGroup::class); - $this->tunnel_dest_group = $var; - - return $this; - } - - /** - * Required. The ID to use for the TunnelDestGroup, which becomes the final - * component of the resource name. - * This value must be 4-63 characters, and valid characters - * are `[a-z]-`. - * - * Generated from protobuf field string tunnel_dest_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTunnelDestGroupId() - { - return $this->tunnel_dest_group_id; - } - - /** - * Required. The ID to use for the TunnelDestGroup, which becomes the final - * component of the resource name. - * This value must be 4-63 characters, and valid characters - * are `[a-z]-`. - * - * Generated from protobuf field string tunnel_dest_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTunnelDestGroupId($var) - { - GPBUtil::checkString($var, True); - $this->tunnel_dest_group_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CsmSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CsmSettings.php deleted file mode 100644 index c35125b3b5f0..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CsmSettings.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.iap.v1.CsmSettings - */ -class CsmSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Audience claim set in the generated RCToken. This value is not validated by - * IAP. - * - * Generated from protobuf field .google.protobuf.StringValue rctoken_aud = 1; - */ - protected $rctoken_aud = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\StringValue $rctoken_aud - * Audience claim set in the generated RCToken. This value is not validated by - * IAP. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Audience claim set in the generated RCToken. This value is not validated by - * IAP. - * - * Generated from protobuf field .google.protobuf.StringValue rctoken_aud = 1; - * @return \Google\Protobuf\StringValue|null - */ - public function getRctokenAud() - { - return $this->rctoken_aud; - } - - public function hasRctokenAud() - { - return isset($this->rctoken_aud); - } - - public function clearRctokenAud() - { - unset($this->rctoken_aud); - } - - /** - * Returns the unboxed value from getRctokenAud() - - * Audience claim set in the generated RCToken. This value is not validated by - * IAP. - * - * Generated from protobuf field .google.protobuf.StringValue rctoken_aud = 1; - * @return string|null - */ - public function getRctokenAudUnwrapped() - { - return $this->readWrapperValue("rctoken_aud"); - } - - /** - * Audience claim set in the generated RCToken. This value is not validated by - * IAP. - * - * Generated from protobuf field .google.protobuf.StringValue rctoken_aud = 1; - * @param \Google\Protobuf\StringValue $var - * @return $this - */ - public function setRctokenAud($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); - $this->rctoken_aud = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. - - * Audience claim set in the generated RCToken. This value is not validated by - * IAP. - * - * Generated from protobuf field .google.protobuf.StringValue rctoken_aud = 1; - * @param string|null $var - * @return $this - */ - public function setRctokenAudUnwrapped($var) - { - $this->writeWrapperValue("rctoken_aud", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/DeleteIdentityAwareProxyClientRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/DeleteIdentityAwareProxyClientRequest.php deleted file mode 100644 index f17a3fe37e65..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/DeleteIdentityAwareProxyClientRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.iap.v1.DeleteIdentityAwareProxyClientRequest - */ -class DeleteIdentityAwareProxyClientRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the Identity Aware Proxy client to be deleted. - * In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the Identity Aware Proxy client to be deleted. - * In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the Identity Aware Proxy client to be deleted. - * In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the Identity Aware Proxy client to be deleted. - * In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/DeleteTunnelDestGroupRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/DeleteTunnelDestGroupRequest.php deleted file mode 100644 index 05da1ad776fe..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/DeleteTunnelDestGroupRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.iap.v1.DeleteTunnelDestGroupRequest - */ -class DeleteTunnelDestGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the TunnelDestGroup to delete. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. - * - * 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 TunnelDestGroup to delete. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. Please see - * {@see IdentityAwareProxyAdminServiceClient::tunnelDestGroupName()} for help formatting this field. - * - * @return \Google\Cloud\Iap\V1\DeleteTunnelDestGroupRequest - * - * @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 TunnelDestGroup to delete. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the TunnelDestGroup to delete. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. - * - * 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 TunnelDestGroup to delete. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. - * - * 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/Iap/v1/proto/src/Google/Cloud/Iap/V1/GcipSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GcipSettings.php deleted file mode 100644 index 972c15b86f85..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GcipSettings.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.iap.v1.GcipSettings - */ -class GcipSettings extends \Google\Protobuf\Internal\Message -{ - /** - * GCIP tenant ids that are linked to the IAP resource. - * tenant_ids could be a string beginning with a number character to indicate - * authenticating with GCIP tenant flow, or in the format of _ - * to indicate authenticating with GCIP agent flow. - * If agent flow is used, tenant_ids should only contain one single element, - * while for tenant flow, tenant_ids can contain multiple elements. - * - * Generated from protobuf field repeated string tenant_ids = 1; - */ - private $tenant_ids; - /** - * Login page URI associated with the GCIP tenants. - * Typically, all resources within the same project share the same login page, - * though it could be overridden at the sub resource level. - * - * Generated from protobuf field .google.protobuf.StringValue login_page_uri = 2; - */ - protected $login_page_uri = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $tenant_ids - * GCIP tenant ids that are linked to the IAP resource. - * tenant_ids could be a string beginning with a number character to indicate - * authenticating with GCIP tenant flow, or in the format of _ - * to indicate authenticating with GCIP agent flow. - * If agent flow is used, tenant_ids should only contain one single element, - * while for tenant flow, tenant_ids can contain multiple elements. - * @type \Google\Protobuf\StringValue $login_page_uri - * Login page URI associated with the GCIP tenants. - * Typically, all resources within the same project share the same login page, - * though it could be overridden at the sub resource level. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * GCIP tenant ids that are linked to the IAP resource. - * tenant_ids could be a string beginning with a number character to indicate - * authenticating with GCIP tenant flow, or in the format of _ - * to indicate authenticating with GCIP agent flow. - * If agent flow is used, tenant_ids should only contain one single element, - * while for tenant flow, tenant_ids can contain multiple elements. - * - * Generated from protobuf field repeated string tenant_ids = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTenantIds() - { - return $this->tenant_ids; - } - - /** - * GCIP tenant ids that are linked to the IAP resource. - * tenant_ids could be a string beginning with a number character to indicate - * authenticating with GCIP tenant flow, or in the format of _ - * to indicate authenticating with GCIP agent flow. - * If agent flow is used, tenant_ids should only contain one single element, - * while for tenant flow, tenant_ids can contain multiple elements. - * - * Generated from protobuf field repeated string tenant_ids = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTenantIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->tenant_ids = $arr; - - return $this; - } - - /** - * Login page URI associated with the GCIP tenants. - * Typically, all resources within the same project share the same login page, - * though it could be overridden at the sub resource level. - * - * Generated from protobuf field .google.protobuf.StringValue login_page_uri = 2; - * @return \Google\Protobuf\StringValue|null - */ - public function getLoginPageUri() - { - return $this->login_page_uri; - } - - public function hasLoginPageUri() - { - return isset($this->login_page_uri); - } - - public function clearLoginPageUri() - { - unset($this->login_page_uri); - } - - /** - * Returns the unboxed value from getLoginPageUri() - - * Login page URI associated with the GCIP tenants. - * Typically, all resources within the same project share the same login page, - * though it could be overridden at the sub resource level. - * - * Generated from protobuf field .google.protobuf.StringValue login_page_uri = 2; - * @return string|null - */ - public function getLoginPageUriUnwrapped() - { - return $this->readWrapperValue("login_page_uri"); - } - - /** - * Login page URI associated with the GCIP tenants. - * Typically, all resources within the same project share the same login page, - * though it could be overridden at the sub resource level. - * - * Generated from protobuf field .google.protobuf.StringValue login_page_uri = 2; - * @param \Google\Protobuf\StringValue $var - * @return $this - */ - public function setLoginPageUri($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); - $this->login_page_uri = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. - - * Login page URI associated with the GCIP tenants. - * Typically, all resources within the same project share the same login page, - * though it could be overridden at the sub resource level. - * - * Generated from protobuf field .google.protobuf.StringValue login_page_uri = 2; - * @param string|null $var - * @return $this - */ - public function setLoginPageUriUnwrapped($var) - { - $this->writeWrapperValue("login_page_uri", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetBrandRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetBrandRequest.php deleted file mode 100644 index 9ffb6ac252dc..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetBrandRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.iap.v1.GetBrandRequest - */ -class GetBrandRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the brand to be fetched. - * In the following format: projects/{project_number/id}/brands/{brand}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the brand to be fetched. - * In the following format: projects/{project_number/id}/brands/{brand}. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the brand to be fetched. - * In the following format: projects/{project_number/id}/brands/{brand}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the brand to be fetched. - * In the following format: projects/{project_number/id}/brands/{brand}. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetIapSettingsRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetIapSettingsRequest.php deleted file mode 100644 index 8cc90694746a..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetIapSettingsRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.iap.v1.GetIapSettingsRequest - */ -class GetIapSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name for which to retrieve the settings. - * Authorization: Requires the `getSettings` permission for the associated - * resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name for which to retrieve the settings. - * Authorization: Requires the `getSettings` permission for the associated - * resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name for which to retrieve the settings. - * Authorization: Requires the `getSettings` permission for the associated - * resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name for which to retrieve the settings. - * Authorization: Requires the `getSettings` permission for the associated - * resource. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetIdentityAwareProxyClientRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetIdentityAwareProxyClientRequest.php deleted file mode 100644 index 01dc5db82cf4..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetIdentityAwareProxyClientRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.iap.v1.GetIdentityAwareProxyClientRequest - */ -class GetIdentityAwareProxyClientRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the Identity Aware Proxy client to be fetched. - * In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the Identity Aware Proxy client to be fetched. - * In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the Identity Aware Proxy client to be fetched. - * In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the Identity Aware Proxy client to be fetched. - * In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetTunnelDestGroupRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetTunnelDestGroupRequest.php deleted file mode 100644 index d409d0a5fc71..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetTunnelDestGroupRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.iap.v1.GetTunnelDestGroupRequest - */ -class GetTunnelDestGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the TunnelDestGroup to be fetched. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. - * - * 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 TunnelDestGroup to be fetched. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. Please see - * {@see IdentityAwareProxyAdminServiceClient::tunnelDestGroupName()} for help formatting this field. - * - * @return \Google\Cloud\Iap\V1\GetTunnelDestGroupRequest - * - * @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 TunnelDestGroup to be fetched. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the TunnelDestGroup to be fetched. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. - * - * 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 TunnelDestGroup to be fetched. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. - * - * 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/Iap/v1/proto/src/Google/Cloud/Iap/V1/IapSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IapSettings.php deleted file mode 100644 index faaa3d8ca1b3..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IapSettings.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.iap.v1.IapSettings - */ -class IapSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the IAP protected resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Top level wrapper for all access related setting in IAP - * - * Generated from protobuf field .google.cloud.iap.v1.AccessSettings access_settings = 5; - */ - protected $access_settings = null; - /** - * Top level wrapper for all application related settings in IAP - * - * Generated from protobuf field .google.cloud.iap.v1.ApplicationSettings application_settings = 6; - */ - protected $application_settings = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the IAP protected resource. - * @type \Google\Cloud\Iap\V1\AccessSettings $access_settings - * Top level wrapper for all access related setting in IAP - * @type \Google\Cloud\Iap\V1\ApplicationSettings $application_settings - * Top level wrapper for all application related settings in IAP - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the IAP protected resource. - * - * 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 IAP protected resource. - * - * 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; - } - - /** - * Top level wrapper for all access related setting in IAP - * - * Generated from protobuf field .google.cloud.iap.v1.AccessSettings access_settings = 5; - * @return \Google\Cloud\Iap\V1\AccessSettings|null - */ - public function getAccessSettings() - { - return $this->access_settings; - } - - public function hasAccessSettings() - { - return isset($this->access_settings); - } - - public function clearAccessSettings() - { - unset($this->access_settings); - } - - /** - * Top level wrapper for all access related setting in IAP - * - * Generated from protobuf field .google.cloud.iap.v1.AccessSettings access_settings = 5; - * @param \Google\Cloud\Iap\V1\AccessSettings $var - * @return $this - */ - public function setAccessSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\AccessSettings::class); - $this->access_settings = $var; - - return $this; - } - - /** - * Top level wrapper for all application related settings in IAP - * - * Generated from protobuf field .google.cloud.iap.v1.ApplicationSettings application_settings = 6; - * @return \Google\Cloud\Iap\V1\ApplicationSettings|null - */ - public function getApplicationSettings() - { - return $this->application_settings; - } - - public function hasApplicationSettings() - { - return isset($this->application_settings); - } - - public function clearApplicationSettings() - { - unset($this->application_settings); - } - - /** - * Top level wrapper for all application related settings in IAP - * - * Generated from protobuf field .google.cloud.iap.v1.ApplicationSettings application_settings = 6; - * @param \Google\Cloud\Iap\V1\ApplicationSettings $var - * @return $this - */ - public function setApplicationSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\ApplicationSettings::class); - $this->application_settings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyClient.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyClient.php deleted file mode 100644 index e8d02a564039..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyClient.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.iap.v1.IdentityAwareProxyClient - */ -class IdentityAwareProxyClient extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Unique identifier of the OAuth client. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Client secret of the OAuth client. - * - * Generated from protobuf field string secret = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $secret = ''; - /** - * Human-friendly name given to the OAuth client. - * - * Generated from protobuf field string display_name = 3; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Unique identifier of the OAuth client. - * @type string $secret - * Output only. Client secret of the OAuth client. - * @type string $display_name - * Human-friendly name given to the OAuth client. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Unique identifier of the OAuth client. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Unique identifier of the OAuth client. - * - * 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. Client secret of the OAuth client. - * - * Generated from protobuf field string secret = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSecret() - { - return $this->secret; - } - - /** - * Output only. Client secret of the OAuth client. - * - * Generated from protobuf field string secret = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSecret($var) - { - GPBUtil::checkString($var, True); - $this->secret = $var; - - return $this; - } - - /** - * Human-friendly name given to the OAuth client. - * - * Generated from protobuf field string display_name = 3; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Human-friendly name given to the OAuth client. - * - * Generated from protobuf field string display_name = 3; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListBrandsRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListBrandsRequest.php deleted file mode 100644 index 72be9dbce426..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListBrandsRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.iap.v1.ListBrandsRequest - */ -class ListBrandsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. GCP Project number/id. - * In the following format: projects/{project_number/id}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. GCP Project number/id. - * In the following format: projects/{project_number/id}. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. GCP Project number/id. - * In the following format: projects/{project_number/id}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. GCP Project number/id. - * In the following format: projects/{project_number/id}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListBrandsResponse.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListBrandsResponse.php deleted file mode 100644 index 87d7babf7797..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListBrandsResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.iap.v1.ListBrandsResponse - */ -class ListBrandsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Brands existing in the project. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.Brand brands = 1; - */ - private $brands; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Iap\V1\Brand>|\Google\Protobuf\Internal\RepeatedField $brands - * Brands existing in the project. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Brands existing in the project. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.Brand brands = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBrands() - { - return $this->brands; - } - - /** - * Brands existing in the project. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.Brand brands = 1; - * @param array<\Google\Cloud\Iap\V1\Brand>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBrands($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iap\V1\Brand::class); - $this->brands = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListIdentityAwareProxyClientsRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListIdentityAwareProxyClientsRequest.php deleted file mode 100644 index 0f175a124de3..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListIdentityAwareProxyClientsRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.iap.v1.ListIdentityAwareProxyClientsRequest - */ -class ListIdentityAwareProxyClientsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Full brand path. - * In the following format: projects/{project_number/id}/brands/{brand}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * The maximum number of clients to return. The service may return fewer than - * this value. - * If unspecified, at most 100 clients will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListIdentityAwareProxyClients` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListIdentityAwareProxyClients` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Full brand path. - * In the following format: projects/{project_number/id}/brands/{brand}. - * @type int $page_size - * The maximum number of clients to return. The service may return fewer than - * this value. - * If unspecified, at most 100 clients will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * A page token, received from a previous `ListIdentityAwareProxyClients` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListIdentityAwareProxyClients` must match the call that provided the page - * token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Full brand path. - * In the following format: projects/{project_number/id}/brands/{brand}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Full brand path. - * In the following format: projects/{project_number/id}/brands/{brand}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of clients to return. The service may return fewer than - * this value. - * If unspecified, at most 100 clients will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of clients to return. The service may return fewer than - * this value. - * If unspecified, at most 100 clients will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListIdentityAwareProxyClients` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListIdentityAwareProxyClients` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListIdentityAwareProxyClients` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListIdentityAwareProxyClients` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - * @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/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListIdentityAwareProxyClientsResponse.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListIdentityAwareProxyClientsResponse.php deleted file mode 100644 index 61d2737fce29..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListIdentityAwareProxyClientsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.iap.v1.ListIdentityAwareProxyClientsResponse - */ -class ListIdentityAwareProxyClientsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Clients existing in the brand. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.IdentityAwareProxyClient identity_aware_proxy_clients = 1; - */ - private $identity_aware_proxy_clients; - /** - * A token, which can be send as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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\Iap\V1\IdentityAwareProxyClient>|\Google\Protobuf\Internal\RepeatedField $identity_aware_proxy_clients - * Clients existing in the brand. - * @type string $next_page_token - * A token, which can be send as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Clients existing in the brand. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.IdentityAwareProxyClient identity_aware_proxy_clients = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIdentityAwareProxyClients() - { - return $this->identity_aware_proxy_clients; - } - - /** - * Clients existing in the brand. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.IdentityAwareProxyClient identity_aware_proxy_clients = 1; - * @param array<\Google\Cloud\Iap\V1\IdentityAwareProxyClient>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIdentityAwareProxyClients($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iap\V1\IdentityAwareProxyClient::class); - $this->identity_aware_proxy_clients = $arr; - - return $this; - } - - /** - * A token, which can be send as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be send as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListTunnelDestGroupsRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListTunnelDestGroupsRequest.php deleted file mode 100644 index c017dcd3eb78..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListTunnelDestGroupsRequest.php +++ /dev/null @@ -1,192 +0,0 @@ -google.cloud.iap.v1.ListTunnelDestGroupsRequest - */ -class ListTunnelDestGroupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Google Cloud Project ID and location. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}`. - * A `-` can be used for the location to group across all locations. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of groups to return. The service might return fewer than - * this value. - * If unspecified, at most 100 groups are returned. - * The maximum value is 1000; values above 1000 are coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListTunnelDestGroups` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListTunnelDestGroups` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Google Cloud Project ID and location. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}`. - * A `-` can be used for the location to group across all locations. Please see - * {@see IdentityAwareProxyAdminServiceClient::tunnelLocationName()} for help formatting this field. - * - * @return \Google\Cloud\Iap\V1\ListTunnelDestGroupsRequest - * - * @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. Google Cloud Project ID and location. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}`. - * A `-` can be used for the location to group across all locations. - * @type int $page_size - * The maximum number of groups to return. The service might return fewer than - * this value. - * If unspecified, at most 100 groups are returned. - * The maximum value is 1000; values above 1000 are coerced to 1000. - * @type string $page_token - * A page token, received from a previous `ListTunnelDestGroups` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListTunnelDestGroups` must match the call that provided the page - * token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Google Cloud Project ID and location. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}`. - * A `-` can be used for the location to group across all 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. Google Cloud Project ID and location. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}`. - * A `-` can be used for the location to group across all 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; - } - - /** - * The maximum number of groups to return. The service might return fewer than - * this value. - * If unspecified, at most 100 groups are returned. - * The maximum value is 1000; values above 1000 are coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of groups to return. The service might return fewer than - * this value. - * If unspecified, at most 100 groups are returned. - * The maximum value is 1000; values above 1000 are coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListTunnelDestGroups` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListTunnelDestGroups` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListTunnelDestGroups` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListTunnelDestGroups` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - * @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/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListTunnelDestGroupsResponse.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListTunnelDestGroupsResponse.php deleted file mode 100644 index 9c7a174c1b8b..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListTunnelDestGroupsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.iap.v1.ListTunnelDestGroupsResponse - */ -class ListTunnelDestGroupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * TunnelDestGroup existing in the project. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_groups = 1; - */ - private $tunnel_dest_groups; - /** - * A token that you can send as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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\Iap\V1\TunnelDestGroup>|\Google\Protobuf\Internal\RepeatedField $tunnel_dest_groups - * TunnelDestGroup existing in the project. - * @type string $next_page_token - * A token that you can send as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * TunnelDestGroup existing in the project. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_groups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTunnelDestGroups() - { - return $this->tunnel_dest_groups; - } - - /** - * TunnelDestGroup existing in the project. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_groups = 1; - * @param array<\Google\Cloud\Iap\V1\TunnelDestGroup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTunnelDestGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iap\V1\TunnelDestGroup::class); - $this->tunnel_dest_groups = $arr; - - return $this; - } - - /** - * A token that you can send as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token that you can send as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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/Iap/v1/proto/src/Google/Cloud/Iap/V1/OAuthSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/OAuthSettings.php deleted file mode 100644 index 141f8b816ff5..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/OAuthSettings.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.iap.v1.OAuthSettings - */ -class OAuthSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Domain hint to send as hd=? parameter in OAuth request flow. Enables - * redirect to primary IDP by skipping Google's login screen. - * https://developers.google.com/identity/protocols/OpenIDConnect#hd-param - * Note: IAP does not verify that the id token's hd claim matches this value - * since access behavior is managed by IAM policies. - * - * Generated from protobuf field .google.protobuf.StringValue login_hint = 2; - */ - protected $login_hint = null; - /** - * List of OAuth client IDs allowed to programmatically authenticate with IAP. - * - * Generated from protobuf field repeated string programmatic_clients = 5; - */ - private $programmatic_clients; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\StringValue $login_hint - * Domain hint to send as hd=? parameter in OAuth request flow. Enables - * redirect to primary IDP by skipping Google's login screen. - * https://developers.google.com/identity/protocols/OpenIDConnect#hd-param - * Note: IAP does not verify that the id token's hd claim matches this value - * since access behavior is managed by IAM policies. - * @type array|\Google\Protobuf\Internal\RepeatedField $programmatic_clients - * List of OAuth client IDs allowed to programmatically authenticate with IAP. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Domain hint to send as hd=? parameter in OAuth request flow. Enables - * redirect to primary IDP by skipping Google's login screen. - * https://developers.google.com/identity/protocols/OpenIDConnect#hd-param - * Note: IAP does not verify that the id token's hd claim matches this value - * since access behavior is managed by IAM policies. - * - * Generated from protobuf field .google.protobuf.StringValue login_hint = 2; - * @return \Google\Protobuf\StringValue|null - */ - public function getLoginHint() - { - return $this->login_hint; - } - - public function hasLoginHint() - { - return isset($this->login_hint); - } - - public function clearLoginHint() - { - unset($this->login_hint); - } - - /** - * Returns the unboxed value from getLoginHint() - - * Domain hint to send as hd=? parameter in OAuth request flow. Enables - * redirect to primary IDP by skipping Google's login screen. - * https://developers.google.com/identity/protocols/OpenIDConnect#hd-param - * Note: IAP does not verify that the id token's hd claim matches this value - * since access behavior is managed by IAM policies. - * - * Generated from protobuf field .google.protobuf.StringValue login_hint = 2; - * @return string|null - */ - public function getLoginHintUnwrapped() - { - return $this->readWrapperValue("login_hint"); - } - - /** - * Domain hint to send as hd=? parameter in OAuth request flow. Enables - * redirect to primary IDP by skipping Google's login screen. - * https://developers.google.com/identity/protocols/OpenIDConnect#hd-param - * Note: IAP does not verify that the id token's hd claim matches this value - * since access behavior is managed by IAM policies. - * - * Generated from protobuf field .google.protobuf.StringValue login_hint = 2; - * @param \Google\Protobuf\StringValue $var - * @return $this - */ - public function setLoginHint($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); - $this->login_hint = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. - - * Domain hint to send as hd=? parameter in OAuth request flow. Enables - * redirect to primary IDP by skipping Google's login screen. - * https://developers.google.com/identity/protocols/OpenIDConnect#hd-param - * Note: IAP does not verify that the id token's hd claim matches this value - * since access behavior is managed by IAM policies. - * - * Generated from protobuf field .google.protobuf.StringValue login_hint = 2; - * @param string|null $var - * @return $this - */ - public function setLoginHintUnwrapped($var) - { - $this->writeWrapperValue("login_hint", $var); - return $this;} - - /** - * List of OAuth client IDs allowed to programmatically authenticate with IAP. - * - * Generated from protobuf field repeated string programmatic_clients = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProgrammaticClients() - { - return $this->programmatic_clients; - } - - /** - * List of OAuth client IDs allowed to programmatically authenticate with IAP. - * - * Generated from protobuf field repeated string programmatic_clients = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProgrammaticClients($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->programmatic_clients = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings.php deleted file mode 100644 index 7c4baa762797..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.iap.v1.ReauthSettings - */ -class ReauthSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Reauth method requested. - * - * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings.Method method = 1; - */ - protected $method = 0; - /** - * Reauth session lifetime, how long before a user has to reauthenticate - * again. - * - * Generated from protobuf field .google.protobuf.Duration max_age = 2; - */ - protected $max_age = null; - /** - * How IAP determines the effective policy in cases of hierarchial policies. - * Policies are merged from higher in the hierarchy to lower in the hierarchy. - * - * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings.PolicyType policy_type = 3; - */ - protected $policy_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $method - * Reauth method requested. - * @type \Google\Protobuf\Duration $max_age - * Reauth session lifetime, how long before a user has to reauthenticate - * again. - * @type int $policy_type - * How IAP determines the effective policy in cases of hierarchial policies. - * Policies are merged from higher in the hierarchy to lower in the hierarchy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Reauth method requested. - * - * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings.Method method = 1; - * @return int - */ - public function getMethod() - { - return $this->method; - } - - /** - * Reauth method requested. - * - * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings.Method method = 1; - * @param int $var - * @return $this - */ - public function setMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Iap\V1\ReauthSettings\Method::class); - $this->method = $var; - - return $this; - } - - /** - * Reauth session lifetime, how long before a user has to reauthenticate - * again. - * - * Generated from protobuf field .google.protobuf.Duration max_age = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxAge() - { - return $this->max_age; - } - - public function hasMaxAge() - { - return isset($this->max_age); - } - - public function clearMaxAge() - { - unset($this->max_age); - } - - /** - * Reauth session lifetime, how long before a user has to reauthenticate - * again. - * - * Generated from protobuf field .google.protobuf.Duration max_age = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxAge($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->max_age = $var; - - return $this; - } - - /** - * How IAP determines the effective policy in cases of hierarchial policies. - * Policies are merged from higher in the hierarchy to lower in the hierarchy. - * - * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings.PolicyType policy_type = 3; - * @return int - */ - public function getPolicyType() - { - return $this->policy_type; - } - - /** - * How IAP determines the effective policy in cases of hierarchial policies. - * Policies are merged from higher in the hierarchy to lower in the hierarchy. - * - * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings.PolicyType policy_type = 3; - * @param int $var - * @return $this - */ - public function setPolicyType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Iap\V1\ReauthSettings\PolicyType::class); - $this->policy_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings/Method.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings/Method.php deleted file mode 100644 index 719248ccb93f..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings/Method.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.iap.v1.ReauthSettings.Method - */ -class Method -{ - /** - * Reauthentication disabled. - * - * Generated from protobuf enum METHOD_UNSPECIFIED = 0; - */ - const METHOD_UNSPECIFIED = 0; - /** - * Prompts the user to log in again. - * - * Generated from protobuf enum LOGIN = 1; - */ - const LOGIN = 1; - /** - * Generated from protobuf enum PASSWORD = 2 [deprecated = true]; - */ - const PASSWORD = 2; - /** - * User must use their secure key 2nd factor device. - * - * Generated from protobuf enum SECURE_KEY = 3; - */ - const SECURE_KEY = 3; - /** - * User can use any enabled 2nd factor. - * - * Generated from protobuf enum ENROLLED_SECOND_FACTORS = 4; - */ - const ENROLLED_SECOND_FACTORS = 4; - - private static $valueToName = [ - self::METHOD_UNSPECIFIED => 'METHOD_UNSPECIFIED', - self::LOGIN => 'LOGIN', - self::PASSWORD => 'PASSWORD', - self::SECURE_KEY => 'SECURE_KEY', - self::ENROLLED_SECOND_FACTORS => 'ENROLLED_SECOND_FACTORS', - ]; - - 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(Method::class, \Google\Cloud\Iap\V1\ReauthSettings_Method::class); - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings/PolicyType.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings/PolicyType.php deleted file mode 100644 index f2f2779c5aac..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings/PolicyType.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.iap.v1.ReauthSettings.PolicyType - */ -class PolicyType -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum POLICY_TYPE_UNSPECIFIED = 0; - */ - const POLICY_TYPE_UNSPECIFIED = 0; - /** - * This policy acts as a minimum to other policies, lower in the hierarchy. - * Effective policy may only be the same or stricter. - * - * Generated from protobuf enum MINIMUM = 1; - */ - const MINIMUM = 1; - /** - * This policy acts as a default if no other reauth policy is set. - * - * Generated from protobuf enum DEFAULT = 2; - */ - const PBDEFAULT = 2; - - private static $valueToName = [ - self::POLICY_TYPE_UNSPECIFIED => 'POLICY_TYPE_UNSPECIFIED', - self::MINIMUM => 'MINIMUM', - self::PBDEFAULT => 'DEFAULT', - ]; - - 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)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PolicyType::class, \Google\Cloud\Iap\V1\ReauthSettings_PolicyType::class); - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ResetIdentityAwareProxyClientSecretRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ResetIdentityAwareProxyClientSecretRequest.php deleted file mode 100644 index 0b0d262553fc..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ResetIdentityAwareProxyClientSecretRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.iap.v1.ResetIdentityAwareProxyClientSecretRequest - */ -class ResetIdentityAwareProxyClientSecretRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the Identity Aware Proxy client to that will have its - * secret reset. In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the Identity Aware Proxy client to that will have its - * secret reset. In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the Identity Aware Proxy client to that will have its - * secret reset. In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the Identity Aware Proxy client to that will have its - * secret reset. In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/TunnelDestGroup.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/TunnelDestGroup.php deleted file mode 100644 index d552a68d741c..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/TunnelDestGroup.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.iap.v1.TunnelDestGroup - */ -class TunnelDestGroup extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Immutable. Identifier for the TunnelDestGroup. Must be unique - * within the project and contain only lower case letters (a-z) and dashes - * (-). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Unordered list. List of CIDRs that this group applies to. - * - * Generated from protobuf field repeated string cidrs = 2 [(.google.api.field_behavior) = UNORDERED_LIST]; - */ - private $cidrs; - /** - * Unordered list. List of FQDNs that this group applies to. - * - * Generated from protobuf field repeated string fqdns = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; - */ - private $fqdns; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Immutable. Identifier for the TunnelDestGroup. Must be unique - * within the project and contain only lower case letters (a-z) and dashes - * (-). - * @type array|\Google\Protobuf\Internal\RepeatedField $cidrs - * Unordered list. List of CIDRs that this group applies to. - * @type array|\Google\Protobuf\Internal\RepeatedField $fqdns - * Unordered list. List of FQDNs that this group applies to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Immutable. Identifier for the TunnelDestGroup. Must be unique - * within the project and contain only lower case letters (a-z) and dashes - * (-). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Immutable. Identifier for the TunnelDestGroup. Must be unique - * within the project and contain only lower case letters (a-z) and dashes - * (-). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Unordered list. List of CIDRs that this group applies to. - * - * Generated from protobuf field repeated string cidrs = 2 [(.google.api.field_behavior) = UNORDERED_LIST]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCidrs() - { - return $this->cidrs; - } - - /** - * Unordered list. List of CIDRs that this group applies to. - * - * Generated from protobuf field repeated string cidrs = 2 [(.google.api.field_behavior) = UNORDERED_LIST]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCidrs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->cidrs = $arr; - - return $this; - } - - /** - * Unordered list. List of FQDNs that this group applies to. - * - * Generated from protobuf field repeated string fqdns = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFqdns() - { - return $this->fqdns; - } - - /** - * Unordered list. List of FQDNs that this group applies to. - * - * Generated from protobuf field repeated string fqdns = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFqdns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->fqdns = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/UpdateIapSettingsRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/UpdateIapSettingsRequest.php deleted file mode 100644 index 66099782058b..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/UpdateIapSettingsRequest.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.iap.v1.UpdateIapSettingsRequest - */ -class UpdateIapSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The new values for the IAP settings to be updated. - * Authorization: Requires the `updateSettings` permission for the associated - * resource. - * - * Generated from protobuf field .google.cloud.iap.v1.IapSettings iap_settings = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $iap_settings = null; - /** - * The field mask specifying which IAP settings should be updated. - * If omitted, then all of the settings are updated. See - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * Note: All IAP reauth settings must always be set together, using the - * field mask: `iapSettings.accessSettings.reauthSettings`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Iap\V1\IapSettings $iap_settings - * Required. The new values for the IAP settings to be updated. - * Authorization: Requires the `updateSettings` permission for the associated - * resource. - * @type \Google\Protobuf\FieldMask $update_mask - * The field mask specifying which IAP settings should be updated. - * If omitted, then all of the settings are updated. See - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * Note: All IAP reauth settings must always be set together, using the - * field mask: `iapSettings.accessSettings.reauthSettings`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The new values for the IAP settings to be updated. - * Authorization: Requires the `updateSettings` permission for the associated - * resource. - * - * Generated from protobuf field .google.cloud.iap.v1.IapSettings iap_settings = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Iap\V1\IapSettings|null - */ - public function getIapSettings() - { - return $this->iap_settings; - } - - public function hasIapSettings() - { - return isset($this->iap_settings); - } - - public function clearIapSettings() - { - unset($this->iap_settings); - } - - /** - * Required. The new values for the IAP settings to be updated. - * Authorization: Requires the `updateSettings` permission for the associated - * resource. - * - * Generated from protobuf field .google.cloud.iap.v1.IapSettings iap_settings = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Iap\V1\IapSettings $var - * @return $this - */ - public function setIapSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\IapSettings::class); - $this->iap_settings = $var; - - return $this; - } - - /** - * The field mask specifying which IAP settings should be updated. - * If omitted, then all of the settings are updated. See - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * Note: All IAP reauth settings must always be set together, using the - * field mask: `iapSettings.accessSettings.reauthSettings`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @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); - } - - /** - * The field mask specifying which IAP settings should be updated. - * If omitted, then all of the settings are updated. See - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - * Note: All IAP reauth settings must always be set together, using the - * field mask: `iapSettings.accessSettings.reauthSettings`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @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/Iap/v1/proto/src/Google/Cloud/Iap/V1/UpdateTunnelDestGroupRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/UpdateTunnelDestGroupRequest.php deleted file mode 100644 index a97769331e90..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/UpdateTunnelDestGroupRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.iap.v1.UpdateTunnelDestGroupRequest - */ -class UpdateTunnelDestGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The new values for the TunnelDestGroup. - * - * Generated from protobuf field .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_group = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tunnel_dest_group = null; - /** - * A field mask that specifies which IAP settings to update. - * If omitted, then all of the settings are updated. See - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Iap\V1\TunnelDestGroup $tunnelDestGroup Required. The new values for the TunnelDestGroup. - * @param \Google\Protobuf\FieldMask $updateMask A field mask that specifies which IAP settings to update. - * If omitted, then all of the settings are updated. See - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * @return \Google\Cloud\Iap\V1\UpdateTunnelDestGroupRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Iap\V1\TunnelDestGroup $tunnelDestGroup, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setTunnelDestGroup($tunnelDestGroup) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Iap\V1\TunnelDestGroup $tunnel_dest_group - * Required. The new values for the TunnelDestGroup. - * @type \Google\Protobuf\FieldMask $update_mask - * A field mask that specifies which IAP settings to update. - * If omitted, then all of the settings are updated. See - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The new values for the TunnelDestGroup. - * - * Generated from protobuf field .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Iap\V1\TunnelDestGroup|null - */ - public function getTunnelDestGroup() - { - return $this->tunnel_dest_group; - } - - public function hasTunnelDestGroup() - { - return isset($this->tunnel_dest_group); - } - - public function clearTunnelDestGroup() - { - unset($this->tunnel_dest_group); - } - - /** - * Required. The new values for the TunnelDestGroup. - * - * Generated from protobuf field .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Iap\V1\TunnelDestGroup $var - * @return $this - */ - public function setTunnelDestGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\TunnelDestGroup::class); - $this->tunnel_dest_group = $var; - - return $this; - } - - /** - * A field mask that specifies which IAP settings to update. - * If omitted, then all of the settings are updated. See - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @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); - } - - /** - * A field mask that specifies which IAP settings to update. - * If omitted, then all of the settings are updated. See - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @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/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/create_tunnel_dest_group.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/create_tunnel_dest_group.php deleted file mode 100644 index 66b9dab362c7..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/create_tunnel_dest_group.php +++ /dev/null @@ -1,93 +0,0 @@ -setName($tunnelDestGroupName); - $request = (new CreateTunnelDestGroupRequest()) - ->setParent($formattedParent) - ->setTunnelDestGroup($tunnelDestGroup) - ->setTunnelDestGroupId($tunnelDestGroupId); - - // Call the API and handle any network failures. - try { - /** @var TunnelDestGroup $response */ - $response = $identityAwareProxyAdminServiceClient->createTunnelDestGroup($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 = IdentityAwareProxyAdminServiceClient::tunnelLocationName( - '[PROJECT]', - '[LOCATION]' - ); - $tunnelDestGroupName = '[NAME]'; - $tunnelDestGroupId = '[TUNNEL_DEST_GROUP_ID]'; - - create_tunnel_dest_group_sample($formattedParent, $tunnelDestGroupName, $tunnelDestGroupId); -} -// [END iap_v1_generated_IdentityAwareProxyAdminService_CreateTunnelDestGroup_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/delete_tunnel_dest_group.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/delete_tunnel_dest_group.php deleted file mode 100644 index 243c91d28cda..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/delete_tunnel_dest_group.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $identityAwareProxyAdminServiceClient->deleteTunnelDestGroup($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 = IdentityAwareProxyAdminServiceClient::tunnelDestGroupName( - '[PROJECT]', - '[LOCATION]', - '[DEST_GROUP]' - ); - - delete_tunnel_dest_group_sample($formattedName); -} -// [END iap_v1_generated_IdentityAwareProxyAdminService_DeleteTunnelDestGroup_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_iam_policy.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_iam_policy.php deleted file mode 100644 index fe00b20dae64..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_iam_policy.php +++ /dev/null @@ -1,74 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $identityAwareProxyAdminServiceClient->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 iap_v1_generated_IdentityAwareProxyAdminService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_iap_settings.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_iap_settings.php deleted file mode 100644 index 5a112f987180..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_iap_settings.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var IapSettings $response */ - $response = $identityAwareProxyAdminServiceClient->getIapSettings($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]'; - - get_iap_settings_sample($name); -} -// [END iap_v1_generated_IdentityAwareProxyAdminService_GetIapSettings_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_tunnel_dest_group.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_tunnel_dest_group.php deleted file mode 100644 index 6d4377b675bb..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_tunnel_dest_group.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var TunnelDestGroup $response */ - $response = $identityAwareProxyAdminServiceClient->getTunnelDestGroup($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 = IdentityAwareProxyAdminServiceClient::tunnelDestGroupName( - '[PROJECT]', - '[LOCATION]', - '[DEST_GROUP]' - ); - - get_tunnel_dest_group_sample($formattedName); -} -// [END iap_v1_generated_IdentityAwareProxyAdminService_GetTunnelDestGroup_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/list_tunnel_dest_groups.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/list_tunnel_dest_groups.php deleted file mode 100644 index dde13a894d3d..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/list_tunnel_dest_groups.php +++ /dev/null @@ -1,84 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $identityAwareProxyAdminServiceClient->listTunnelDestGroups($request); - - /** @var TunnelDestGroup $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 = IdentityAwareProxyAdminServiceClient::tunnelLocationName( - '[PROJECT]', - '[LOCATION]' - ); - - list_tunnel_dest_groups_sample($formattedParent); -} -// [END iap_v1_generated_IdentityAwareProxyAdminService_ListTunnelDestGroups_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/set_iam_policy.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/set_iam_policy.php deleted file mode 100644 index 23db1ab4d036..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/set_iam_policy.php +++ /dev/null @@ -1,76 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $identityAwareProxyAdminServiceClient->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 iap_v1_generated_IdentityAwareProxyAdminService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/test_iam_permissions.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/test_iam_permissions.php deleted file mode 100644 index 341923001410..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,81 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $identityAwareProxyAdminServiceClient->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 iap_v1_generated_IdentityAwareProxyAdminService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/update_iap_settings.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/update_iap_settings.php deleted file mode 100644 index 1d5084c3fe58..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/update_iap_settings.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($iapSettingsName); - $request = (new UpdateIapSettingsRequest()) - ->setIapSettings($iapSettings); - - // Call the API and handle any network failures. - try { - /** @var IapSettings $response */ - $response = $identityAwareProxyAdminServiceClient->updateIapSettings($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 -{ - $iapSettingsName = '[NAME]'; - - update_iap_settings_sample($iapSettingsName); -} -// [END iap_v1_generated_IdentityAwareProxyAdminService_UpdateIapSettings_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/update_tunnel_dest_group.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/update_tunnel_dest_group.php deleted file mode 100644 index b774e7c9a291..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/update_tunnel_dest_group.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($tunnelDestGroupName); - $request = (new UpdateTunnelDestGroupRequest()) - ->setTunnelDestGroup($tunnelDestGroup); - - // Call the API and handle any network failures. - try { - /** @var TunnelDestGroup $response */ - $response = $identityAwareProxyAdminServiceClient->updateTunnelDestGroup($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 -{ - $tunnelDestGroupName = '[NAME]'; - - update_tunnel_dest_group_sample($tunnelDestGroupName); -} -// [END iap_v1_generated_IdentityAwareProxyAdminService_UpdateTunnelDestGroup_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/create_brand.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/create_brand.php deleted file mode 100644 index cf006f4d19e2..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/create_brand.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($parent) - ->setBrand($brand); - - // Call the API and handle any network failures. - try { - /** @var Brand $response */ - $response = $identityAwareProxyOAuthServiceClient->createBrand($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 -{ - $parent = '[PARENT]'; - - create_brand_sample($parent); -} -// [END iap_v1_generated_IdentityAwareProxyOAuthService_CreateBrand_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/create_identity_aware_proxy_client.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/create_identity_aware_proxy_client.php deleted file mode 100644 index 1c1af634c567..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/create_identity_aware_proxy_client.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($parent) - ->setIdentityAwareProxyClient($identityAwareProxyClient); - - // Call the API and handle any network failures. - try { - /** @var IdentityAwareProxyClient $response */ - $response = $identityAwareProxyOAuthServiceClient->createIdentityAwareProxyClient($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 -{ - $parent = '[PARENT]'; - - create_identity_aware_proxy_client_sample($parent); -} -// [END iap_v1_generated_IdentityAwareProxyOAuthService_CreateIdentityAwareProxyClient_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/delete_identity_aware_proxy_client.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/delete_identity_aware_proxy_client.php deleted file mode 100644 index 5c1496edcfb0..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/delete_identity_aware_proxy_client.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - $identityAwareProxyOAuthServiceClient->deleteIdentityAwareProxyClient($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 -{ - $name = '[NAME]'; - - delete_identity_aware_proxy_client_sample($name); -} -// [END iap_v1_generated_IdentityAwareProxyOAuthService_DeleteIdentityAwareProxyClient_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/get_brand.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/get_brand.php deleted file mode 100644 index 87134dd283d6..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/get_brand.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var Brand $response */ - $response = $identityAwareProxyOAuthServiceClient->getBrand($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]'; - - get_brand_sample($name); -} -// [END iap_v1_generated_IdentityAwareProxyOAuthService_GetBrand_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/get_identity_aware_proxy_client.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/get_identity_aware_proxy_client.php deleted file mode 100644 index 4cbba19ae0a7..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/get_identity_aware_proxy_client.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var IdentityAwareProxyClient $response */ - $response = $identityAwareProxyOAuthServiceClient->getIdentityAwareProxyClient($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]'; - - get_identity_aware_proxy_client_sample($name); -} -// [END iap_v1_generated_IdentityAwareProxyOAuthService_GetIdentityAwareProxyClient_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/list_brands.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/list_brands.php deleted file mode 100644 index 97c272f528aa..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/list_brands.php +++ /dev/null @@ -1,71 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var ListBrandsResponse $response */ - $response = $identityAwareProxyOAuthServiceClient->listBrands($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 -{ - $parent = '[PARENT]'; - - list_brands_sample($parent); -} -// [END iap_v1_generated_IdentityAwareProxyOAuthService_ListBrands_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/list_identity_aware_proxy_clients.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/list_identity_aware_proxy_clients.php deleted file mode 100644 index a3e23cc0eb31..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/list_identity_aware_proxy_clients.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $identityAwareProxyOAuthServiceClient->listIdentityAwareProxyClients($request); - - /** @var IdentityAwareProxyClient $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 -{ - $parent = '[PARENT]'; - - list_identity_aware_proxy_clients_sample($parent); -} -// [END iap_v1_generated_IdentityAwareProxyOAuthService_ListIdentityAwareProxyClients_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/reset_identity_aware_proxy_client_secret.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/reset_identity_aware_proxy_client_secret.php deleted file mode 100644 index 947269b83bfd..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/reset_identity_aware_proxy_client_secret.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var IdentityAwareProxyClient $response */ - $response = $identityAwareProxyOAuthServiceClient->resetIdentityAwareProxyClientSecret($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]'; - - reset_identity_aware_proxy_client_secret_sample($name); -} -// [END iap_v1_generated_IdentityAwareProxyOAuthService_ResetIdentityAwareProxyClientSecret_sync] diff --git a/owl-bot-staging/Iap/v1/src/V1/Client/IdentityAwareProxyAdminServiceClient.php b/owl-bot-staging/Iap/v1/src/V1/Client/IdentityAwareProxyAdminServiceClient.php deleted file mode 100644 index c4eddacdce53..000000000000 --- a/owl-bot-staging/Iap/v1/src/V1/Client/IdentityAwareProxyAdminServiceClient.php +++ /dev/null @@ -1,537 +0,0 @@ - createTunnelDestGroupAsync(CreateTunnelDestGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteTunnelDestGroupAsync(DeleteTunnelDestGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIapSettingsAsync(GetIapSettingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTunnelDestGroupAsync(GetTunnelDestGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTunnelDestGroupsAsync(ListTunnelDestGroupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateIapSettingsAsync(UpdateIapSettingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateTunnelDestGroupAsync(UpdateTunnelDestGroupRequest $request, array $optionalArgs = []) - */ -final class IdentityAwareProxyAdminServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.iap.v1.IdentityAwareProxyAdminService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'iap.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'iap.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', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/identity_aware_proxy_admin_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/identity_aware_proxy_admin_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/identity_aware_proxy_admin_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/identity_aware_proxy_admin_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * tunnel_dest_group resource. - * - * @param string $project - * @param string $location - * @param string $destGroup - * - * @return string The formatted tunnel_dest_group resource. - */ - public static function tunnelDestGroupName(string $project, string $location, string $destGroup): string - { - return self::getPathTemplate('tunnelDestGroup')->render([ - 'project' => $project, - 'location' => $location, - 'dest_group' => $destGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * tunnel_location resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted tunnel_location resource. - */ - public static function tunnelLocationName(string $project, string $location): string - { - return self::getPathTemplate('tunnelLocation')->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 - * - tunnelDestGroup: projects/{project}/iap_tunnel/locations/{location}/destGroups/{dest_group} - * - tunnelLocation: projects/{project}/iap_tunnel/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 $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 'iap.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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 TunnelDestGroup. - * - * The async variant is - * {@see IdentityAwareProxyAdminServiceClient::createTunnelDestGroupAsync()} . - * - * @example samples/V1/IdentityAwareProxyAdminServiceClient/create_tunnel_dest_group.php - * - * @param CreateTunnelDestGroupRequest $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 TunnelDestGroup - * - * @throws ApiException Thrown if the API call fails. - */ - public function createTunnelDestGroup(CreateTunnelDestGroupRequest $request, array $callOptions = []): TunnelDestGroup - { - return $this->startApiCall('CreateTunnelDestGroup', $request, $callOptions)->wait(); - } - - /** - * Deletes a TunnelDestGroup. - * - * The async variant is - * {@see IdentityAwareProxyAdminServiceClient::deleteTunnelDestGroupAsync()} . - * - * @example samples/V1/IdentityAwareProxyAdminServiceClient/delete_tunnel_dest_group.php - * - * @param DeleteTunnelDestGroupRequest $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 deleteTunnelDestGroup(DeleteTunnelDestGroupRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteTunnelDestGroup', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for an Identity-Aware Proxy protected - * resource. - * More information about managing access via IAP can be found at: - * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api - * - * The async variant is - * {@see IdentityAwareProxyAdminServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/IdentityAwareProxyAdminServiceClient/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(); - } - - /** - * Gets the IAP settings on a particular IAP protected resource. - * - * The async variant is - * {@see IdentityAwareProxyAdminServiceClient::getIapSettingsAsync()} . - * - * @example samples/V1/IdentityAwareProxyAdminServiceClient/get_iap_settings.php - * - * @param GetIapSettingsRequest $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 IapSettings - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIapSettings(GetIapSettingsRequest $request, array $callOptions = []): IapSettings - { - return $this->startApiCall('GetIapSettings', $request, $callOptions)->wait(); - } - - /** - * Retrieves an existing TunnelDestGroup. - * - * The async variant is - * {@see IdentityAwareProxyAdminServiceClient::getTunnelDestGroupAsync()} . - * - * @example samples/V1/IdentityAwareProxyAdminServiceClient/get_tunnel_dest_group.php - * - * @param GetTunnelDestGroupRequest $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 TunnelDestGroup - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTunnelDestGroup(GetTunnelDestGroupRequest $request, array $callOptions = []): TunnelDestGroup - { - return $this->startApiCall('GetTunnelDestGroup', $request, $callOptions)->wait(); - } - - /** - * Lists the existing TunnelDestGroups. To group across all locations, use a - * `-` as the location ID. For example: - * `/v1/projects/123/iap_tunnel/locations/-/destGroups` - * - * The async variant is - * {@see IdentityAwareProxyAdminServiceClient::listTunnelDestGroupsAsync()} . - * - * @example samples/V1/IdentityAwareProxyAdminServiceClient/list_tunnel_dest_groups.php - * - * @param ListTunnelDestGroupsRequest $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 listTunnelDestGroups(ListTunnelDestGroupsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTunnelDestGroups', $request, $callOptions); - } - - /** - * Sets the access control policy for an Identity-Aware Proxy protected - * resource. Replaces any existing policy. - * More information about managing access via IAP can be found at: - * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api - * - * The async variant is - * {@see IdentityAwareProxyAdminServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/IdentityAwareProxyAdminServiceClient/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 Identity-Aware Proxy protected - * resource. - * More information about managing access via IAP can be found at: - * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api - * - * The async variant is - * {@see IdentityAwareProxyAdminServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/IdentityAwareProxyAdminServiceClient/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(); - } - - /** - * Updates the IAP settings on a particular IAP protected resource. It - * replaces all fields unless the `update_mask` is set. - * - * The async variant is - * {@see IdentityAwareProxyAdminServiceClient::updateIapSettingsAsync()} . - * - * @example samples/V1/IdentityAwareProxyAdminServiceClient/update_iap_settings.php - * - * @param UpdateIapSettingsRequest $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 IapSettings - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateIapSettings(UpdateIapSettingsRequest $request, array $callOptions = []): IapSettings - { - return $this->startApiCall('UpdateIapSettings', $request, $callOptions)->wait(); - } - - /** - * Updates a TunnelDestGroup. - * - * The async variant is - * {@see IdentityAwareProxyAdminServiceClient::updateTunnelDestGroupAsync()} . - * - * @example samples/V1/IdentityAwareProxyAdminServiceClient/update_tunnel_dest_group.php - * - * @param UpdateTunnelDestGroupRequest $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 TunnelDestGroup - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateTunnelDestGroup(UpdateTunnelDestGroupRequest $request, array $callOptions = []): TunnelDestGroup - { - return $this->startApiCall('UpdateTunnelDestGroup', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Iap/v1/src/V1/Client/IdentityAwareProxyOAuthServiceClient.php b/owl-bot-staging/Iap/v1/src/V1/Client/IdentityAwareProxyOAuthServiceClient.php deleted file mode 100644 index bc010d87f2dc..000000000000 --- a/owl-bot-staging/Iap/v1/src/V1/Client/IdentityAwareProxyOAuthServiceClient.php +++ /dev/null @@ -1,418 +0,0 @@ - createBrandAsync(CreateBrandRequest $request, array $optionalArgs = []) - * @method PromiseInterface createIdentityAwareProxyClientAsync(CreateIdentityAwareProxyClientRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteIdentityAwareProxyClientAsync(DeleteIdentityAwareProxyClientRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBrandAsync(GetBrandRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIdentityAwareProxyClientAsync(GetIdentityAwareProxyClientRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBrandsAsync(ListBrandsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listIdentityAwareProxyClientsAsync(ListIdentityAwareProxyClientsRequest $request, array $optionalArgs = []) - * @method PromiseInterface resetIdentityAwareProxyClientSecretAsync(ResetIdentityAwareProxyClientSecretRequest $request, array $optionalArgs = []) - */ -final class IdentityAwareProxyOAuthServiceClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.iap.v1.IdentityAwareProxyOAuthService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'iap.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'iap.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', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/identity_aware_proxy_o_auth_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/identity_aware_proxy_o_auth_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/identity_aware_proxy_o_auth_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/identity_aware_proxy_o_auth_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $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 'iap.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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); - } - - /** - * Constructs a new OAuth brand for the project if one does not exist. - * The created brand is "internal only", meaning that OAuth clients created - * under it only accept requests from users who belong to the same Google - * Workspace organization as the project. The brand is created in an - * un-reviewed status. NOTE: The "internal only" status can be manually - * changed in the Google Cloud Console. Requires that a brand does not already - * exist for the project, and that the specified support email is owned by the - * caller. - * - * The async variant is - * {@see IdentityAwareProxyOAuthServiceClient::createBrandAsync()} . - * - * @example samples/V1/IdentityAwareProxyOAuthServiceClient/create_brand.php - * - * @param CreateBrandRequest $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 Brand - * - * @throws ApiException Thrown if the API call fails. - */ - public function createBrand(CreateBrandRequest $request, array $callOptions = []): Brand - { - return $this->startApiCall('CreateBrand', $request, $callOptions)->wait(); - } - - /** - * Creates an Identity Aware Proxy (IAP) OAuth client. The client is owned - * by IAP. Requires that the brand for the project exists and that it is - * set for internal-only use. - * - * The async variant is - * {@see IdentityAwareProxyOAuthServiceClient::createIdentityAwareProxyClientAsync()} - * . - * - * @example samples/V1/IdentityAwareProxyOAuthServiceClient/create_identity_aware_proxy_client.php - * - * @param CreateIdentityAwareProxyClientRequest $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 IdentityAwareProxyClient - * - * @throws ApiException Thrown if the API call fails. - */ - public function createIdentityAwareProxyClient(CreateIdentityAwareProxyClientRequest $request, array $callOptions = []): IdentityAwareProxyClient - { - return $this->startApiCall('CreateIdentityAwareProxyClient', $request, $callOptions)->wait(); - } - - /** - * Deletes an Identity Aware Proxy (IAP) OAuth client. Useful for removing - * obsolete clients, managing the number of clients in a given project, and - * cleaning up after tests. Requires that the client is owned by IAP. - * - * The async variant is - * {@see IdentityAwareProxyOAuthServiceClient::deleteIdentityAwareProxyClientAsync()} - * . - * - * @example samples/V1/IdentityAwareProxyOAuthServiceClient/delete_identity_aware_proxy_client.php - * - * @param DeleteIdentityAwareProxyClientRequest $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 deleteIdentityAwareProxyClient(DeleteIdentityAwareProxyClientRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteIdentityAwareProxyClient', $request, $callOptions)->wait(); - } - - /** - * Retrieves the OAuth brand of the project. - * - * The async variant is - * {@see IdentityAwareProxyOAuthServiceClient::getBrandAsync()} . - * - * @example samples/V1/IdentityAwareProxyOAuthServiceClient/get_brand.php - * - * @param GetBrandRequest $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 Brand - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBrand(GetBrandRequest $request, array $callOptions = []): Brand - { - return $this->startApiCall('GetBrand', $request, $callOptions)->wait(); - } - - /** - * Retrieves an Identity Aware Proxy (IAP) OAuth client. - * Requires that the client is owned by IAP. - * - * The async variant is - * {@see IdentityAwareProxyOAuthServiceClient::getIdentityAwareProxyClientAsync()} - * . - * - * @example samples/V1/IdentityAwareProxyOAuthServiceClient/get_identity_aware_proxy_client.php - * - * @param GetIdentityAwareProxyClientRequest $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 IdentityAwareProxyClient - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIdentityAwareProxyClient(GetIdentityAwareProxyClientRequest $request, array $callOptions = []): IdentityAwareProxyClient - { - return $this->startApiCall('GetIdentityAwareProxyClient', $request, $callOptions)->wait(); - } - - /** - * Lists the existing brands for the project. - * - * The async variant is - * {@see IdentityAwareProxyOAuthServiceClient::listBrandsAsync()} . - * - * @example samples/V1/IdentityAwareProxyOAuthServiceClient/list_brands.php - * - * @param ListBrandsRequest $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 ListBrandsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listBrands(ListBrandsRequest $request, array $callOptions = []): ListBrandsResponse - { - return $this->startApiCall('ListBrands', $request, $callOptions)->wait(); - } - - /** - * Lists the existing clients for the brand. - * - * The async variant is - * {@see IdentityAwareProxyOAuthServiceClient::listIdentityAwareProxyClientsAsync()} - * . - * - * @example samples/V1/IdentityAwareProxyOAuthServiceClient/list_identity_aware_proxy_clients.php - * - * @param ListIdentityAwareProxyClientsRequest $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 listIdentityAwareProxyClients(ListIdentityAwareProxyClientsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListIdentityAwareProxyClients', $request, $callOptions); - } - - /** - * Resets an Identity Aware Proxy (IAP) OAuth client secret. Useful if the - * secret was compromised. Requires that the client is owned by IAP. - * - * The async variant is - * {@see IdentityAwareProxyOAuthServiceClient::resetIdentityAwareProxyClientSecretAsync()} - * . - * - * @example samples/V1/IdentityAwareProxyOAuthServiceClient/reset_identity_aware_proxy_client_secret.php - * - * @param ResetIdentityAwareProxyClientSecretRequest $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 IdentityAwareProxyClient - * - * @throws ApiException Thrown if the API call fails. - */ - public function resetIdentityAwareProxyClientSecret(ResetIdentityAwareProxyClientSecretRequest $request, array $callOptions = []): IdentityAwareProxyClient - { - return $this->startApiCall('ResetIdentityAwareProxyClientSecret', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Iap/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Iap/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 7d6b3af3a00f..000000000000 --- a/owl-bot-staging/Iap/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.iap.v1", - "libraryPackage": "Google\\Cloud\\Iap\\V1", - "services": { - "IdentityAwareProxyAdminService": { - "clients": { - "grpc": { - "libraryClient": "IdentityAwareProxyAdminServiceGapicClient", - "rpcs": { - "CreateTunnelDestGroup": { - "methods": [ - "createTunnelDestGroup" - ] - }, - "DeleteTunnelDestGroup": { - "methods": [ - "deleteTunnelDestGroup" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "GetIapSettings": { - "methods": [ - "getIapSettings" - ] - }, - "GetTunnelDestGroup": { - "methods": [ - "getTunnelDestGroup" - ] - }, - "ListTunnelDestGroups": { - "methods": [ - "listTunnelDestGroups" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "UpdateIapSettings": { - "methods": [ - "updateIapSettings" - ] - }, - "UpdateTunnelDestGroup": { - "methods": [ - "updateTunnelDestGroup" - ] - } - } - } - } - }, - "IdentityAwareProxyOAuthService": { - "clients": { - "grpc": { - "libraryClient": "IdentityAwareProxyOAuthServiceGapicClient", - "rpcs": { - "CreateBrand": { - "methods": [ - "createBrand" - ] - }, - "CreateIdentityAwareProxyClient": { - "methods": [ - "createIdentityAwareProxyClient" - ] - }, - "DeleteIdentityAwareProxyClient": { - "methods": [ - "deleteIdentityAwareProxyClient" - ] - }, - "GetBrand": { - "methods": [ - "getBrand" - ] - }, - "GetIdentityAwareProxyClient": { - "methods": [ - "getIdentityAwareProxyClient" - ] - }, - "ListBrands": { - "methods": [ - "listBrands" - ] - }, - "ListIdentityAwareProxyClients": { - "methods": [ - "listIdentityAwareProxyClients" - ] - }, - "ResetIdentityAwareProxyClientSecret": { - "methods": [ - "resetIdentityAwareProxyClientSecret" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_admin_service_client_config.json b/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_admin_service_client_config.json deleted file mode 100644 index da2a29c85576..000000000000 --- a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_admin_service_client_config.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "interfaces": { - "google.cloud.iap.v1.IdentityAwareProxyAdminService": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [] - }, - "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 - } - }, - "methods": { - "CreateTunnelDestGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteTunnelDestGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetIapSettings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetTunnelDestGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListTunnelDestGroups": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateIapSettings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateTunnelDestGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_admin_service_descriptor_config.php b/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_admin_service_descriptor_config.php deleted file mode 100644 index cbe96ef6c7a4..000000000000 --- a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_admin_service_descriptor_config.php +++ /dev/null @@ -1,162 +0,0 @@ - [ - 'google.cloud.iap.v1.IdentityAwareProxyAdminService' => [ - 'CreateTunnelDestGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iap\V1\TunnelDestGroup', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteTunnelDestGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'GetIapSettings' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iap\V1\IapSettings', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetTunnelDestGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iap\V1\TunnelDestGroup', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListTunnelDestGroups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTunnelDestGroups', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Iap\V1\ListTunnelDestGroupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateIapSettings' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iap\V1\IapSettings', - 'headerParams' => [ - [ - 'keyName' => 'iap_settings.name', - 'fieldAccessors' => [ - 'getIapSettings', - 'getName', - ], - ], - ], - ], - 'UpdateTunnelDestGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iap\V1\TunnelDestGroup', - 'headerParams' => [ - [ - 'keyName' => 'tunnel_dest_group.name', - 'fieldAccessors' => [ - 'getTunnelDestGroup', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'tunnelDestGroup' => 'projects/{project}/iap_tunnel/locations/{location}/destGroups/{dest_group}', - 'tunnelLocation' => 'projects/{project}/iap_tunnel/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_admin_service_rest_client_config.php b/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_admin_service_rest_client_config.php deleted file mode 100644 index 023bff66e5d6..000000000000 --- a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_admin_service_rest_client_config.php +++ /dev/null @@ -1,150 +0,0 @@ - [ - 'google.cloud.iap.v1.IdentityAwareProxyAdminService' => [ - 'CreateTunnelDestGroup' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/iap_tunnel/locations/*}/destGroups', - 'body' => 'tunnel_dest_group', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'tunnel_dest_group_id', - ], - ], - 'DeleteTunnelDestGroup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/iap_tunnel/locations/*/destGroups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=**}:getIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'GetIapSettings' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=**}:iapSettings', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTunnelDestGroup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/iap_tunnel/locations/*/destGroups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListTunnelDestGroups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/iap_tunnel/locations/*}/destGroups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=**}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=**}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateIapSettings' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{iap_settings.name=**}:iapSettings', - 'body' => 'iap_settings', - 'placeholders' => [ - 'iap_settings.name' => [ - 'getters' => [ - 'getIapSettings', - 'getName', - ], - ], - ], - ], - 'UpdateTunnelDestGroup' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{tunnel_dest_group.name=projects/*/iap_tunnel/locations/*/destGroups/*}', - 'body' => 'tunnel_dest_group', - 'placeholders' => [ - 'tunnel_dest_group.name' => [ - 'getters' => [ - 'getTunnelDestGroup', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_client_config.json b/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_client_config.json deleted file mode 100644 index 71494a74db15..000000000000 --- a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_client_config.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "interfaces": { - "google.cloud.iap.v1.IdentityAwareProxyOAuthService": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [] - }, - "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 - } - }, - "methods": { - "CreateBrand": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateIdentityAwareProxyClient": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteIdentityAwareProxyClient": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetBrand": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetIdentityAwareProxyClient": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListBrands": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListIdentityAwareProxyClients": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ResetIdentityAwareProxyClientSecret": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_descriptor_config.php b/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_descriptor_config.php deleted file mode 100644 index f745af37b455..000000000000 --- a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_descriptor_config.php +++ /dev/null @@ -1,132 +0,0 @@ - [ - 'google.cloud.iap.v1.IdentityAwareProxyOAuthService' => [ - 'CreateBrand' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iap\V1\Brand', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateIdentityAwareProxyClient' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iap\V1\IdentityAwareProxyClient', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteIdentityAwareProxyClient' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetBrand' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iap\V1\Brand', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIdentityAwareProxyClient' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iap\V1\IdentityAwareProxyClient', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListBrands' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iap\V1\ListBrandsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListIdentityAwareProxyClients' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getIdentityAwareProxyClients', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Iap\V1\ListIdentityAwareProxyClientsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ResetIdentityAwareProxyClientSecret' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iap\V1\IdentityAwareProxyClient', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_rest_client_config.php b/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_rest_client_config.php deleted file mode 100644 index 45a273f7fe9e..000000000000 --- a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_rest_client_config.php +++ /dev/null @@ -1,120 +0,0 @@ - [ - 'google.cloud.iap.v1.IdentityAwareProxyOAuthService' => [ - 'CreateBrand' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/brands', - 'body' => 'brand', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateIdentityAwareProxyClient' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/brands/*}/identityAwareProxyClients', - 'body' => 'identity_aware_proxy_client', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteIdentityAwareProxyClient' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBrand' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/brands/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIdentityAwareProxyClient' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListBrands' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/brands', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListIdentityAwareProxyClients' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/brands/*}/identityAwareProxyClients', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ResetIdentityAwareProxyClientSecret' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}:resetSecret', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Iap/v1/tests/Unit/V1/Client/IdentityAwareProxyAdminServiceClientTest.php b/owl-bot-staging/Iap/v1/tests/Unit/V1/Client/IdentityAwareProxyAdminServiceClientTest.php deleted file mode 100644 index 395b26b871bf..000000000000 --- a/owl-bot-staging/Iap/v1/tests/Unit/V1/Client/IdentityAwareProxyAdminServiceClientTest.php +++ /dev/null @@ -1,798 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return IdentityAwareProxyAdminServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new IdentityAwareProxyAdminServiceClient($options); - } - - /** @test */ - public function createTunnelDestGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new TunnelDestGroup(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tunnelLocationName('[PROJECT]', '[LOCATION]'); - $tunnelDestGroup = new TunnelDestGroup(); - $tunnelDestGroupName = 'tunnelDestGroupName1906281888'; - $tunnelDestGroup->setName($tunnelDestGroupName); - $tunnelDestGroupId = 'tunnelDestGroupId-1205367743'; - $request = (new CreateTunnelDestGroupRequest()) - ->setParent($formattedParent) - ->setTunnelDestGroup($tunnelDestGroup) - ->setTunnelDestGroupId($tunnelDestGroupId); - $response = $gapicClient->createTunnelDestGroup($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.iap.v1.IdentityAwareProxyAdminService/CreateTunnelDestGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTunnelDestGroup(); - $this->assertProtobufEquals($tunnelDestGroup, $actualValue); - $actualValue = $actualRequestObject->getTunnelDestGroupId(); - $this->assertProtobufEquals($tunnelDestGroupId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTunnelDestGroupExceptionTest() - { - $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->tunnelLocationName('[PROJECT]', '[LOCATION]'); - $tunnelDestGroup = new TunnelDestGroup(); - $tunnelDestGroupName = 'tunnelDestGroupName1906281888'; - $tunnelDestGroup->setName($tunnelDestGroupName); - $tunnelDestGroupId = 'tunnelDestGroupId-1205367743'; - $request = (new CreateTunnelDestGroupRequest()) - ->setParent($formattedParent) - ->setTunnelDestGroup($tunnelDestGroup) - ->setTunnelDestGroupId($tunnelDestGroupId); - try { - $gapicClient->createTunnelDestGroup($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 deleteTunnelDestGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tunnelDestGroupName('[PROJECT]', '[LOCATION]', '[DEST_GROUP]'); - $request = (new DeleteTunnelDestGroupRequest()) - ->setName($formattedName); - $gapicClient->deleteTunnelDestGroup($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyAdminService/DeleteTunnelDestGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTunnelDestGroupExceptionTest() - { - $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->tunnelDestGroupName('[PROJECT]', '[LOCATION]', '[DEST_GROUP]'); - $request = (new DeleteTunnelDestGroupRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteTunnelDestGroup($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.cloud.iap.v1.IdentityAwareProxyAdminService/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 getIapSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new IapSettings(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new GetIapSettingsRequest()) - ->setName($name); - $response = $gapicClient->getIapSettings($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.iap.v1.IdentityAwareProxyAdminService/GetIapSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIapSettingsExceptionTest() - { - $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'; - $request = (new GetIapSettingsRequest()) - ->setName($name); - try { - $gapicClient->getIapSettings($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 getTunnelDestGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new TunnelDestGroup(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tunnelDestGroupName('[PROJECT]', '[LOCATION]', '[DEST_GROUP]'); - $request = (new GetTunnelDestGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->getTunnelDestGroup($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.iap.v1.IdentityAwareProxyAdminService/GetTunnelDestGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTunnelDestGroupExceptionTest() - { - $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->tunnelDestGroupName('[PROJECT]', '[LOCATION]', '[DEST_GROUP]'); - $request = (new GetTunnelDestGroupRequest()) - ->setName($formattedName); - try { - $gapicClient->getTunnelDestGroup($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 listTunnelDestGroupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $tunnelDestGroupsElement = new TunnelDestGroup(); - $tunnelDestGroups = [ - $tunnelDestGroupsElement, - ]; - $expectedResponse = new ListTunnelDestGroupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTunnelDestGroups($tunnelDestGroups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tunnelLocationName('[PROJECT]', '[LOCATION]'); - $request = (new ListTunnelDestGroupsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTunnelDestGroups($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTunnelDestGroups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyAdminService/ListTunnelDestGroups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTunnelDestGroupsExceptionTest() - { - $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->tunnelLocationName('[PROJECT]', '[LOCATION]'); - $request = (new ListTunnelDestGroupsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTunnelDestGroups($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.cloud.iap.v1.IdentityAwareProxyAdminService/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.cloud.iap.v1.IdentityAwareProxyAdminService/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 updateIapSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new IapSettings(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $iapSettings = new IapSettings(); - $iapSettingsName = 'iapSettingsName-218298426'; - $iapSettings->setName($iapSettingsName); - $request = (new UpdateIapSettingsRequest()) - ->setIapSettings($iapSettings); - $response = $gapicClient->updateIapSettings($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.iap.v1.IdentityAwareProxyAdminService/UpdateIapSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getIapSettings(); - $this->assertProtobufEquals($iapSettings, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateIapSettingsExceptionTest() - { - $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 - $iapSettings = new IapSettings(); - $iapSettingsName = 'iapSettingsName-218298426'; - $iapSettings->setName($iapSettingsName); - $request = (new UpdateIapSettingsRequest()) - ->setIapSettings($iapSettings); - try { - $gapicClient->updateIapSettings($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 updateTunnelDestGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new TunnelDestGroup(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $tunnelDestGroup = new TunnelDestGroup(); - $tunnelDestGroupName = 'tunnelDestGroupName1906281888'; - $tunnelDestGroup->setName($tunnelDestGroupName); - $request = (new UpdateTunnelDestGroupRequest()) - ->setTunnelDestGroup($tunnelDestGroup); - $response = $gapicClient->updateTunnelDestGroup($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.iap.v1.IdentityAwareProxyAdminService/UpdateTunnelDestGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getTunnelDestGroup(); - $this->assertProtobufEquals($tunnelDestGroup, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTunnelDestGroupExceptionTest() - { - $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 - $tunnelDestGroup = new TunnelDestGroup(); - $tunnelDestGroupName = 'tunnelDestGroupName1906281888'; - $tunnelDestGroup->setName($tunnelDestGroupName); - $request = (new UpdateTunnelDestGroupRequest()) - ->setTunnelDestGroup($tunnelDestGroup); - try { - $gapicClient->updateTunnelDestGroup($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 createTunnelDestGroupAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new TunnelDestGroup(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tunnelLocationName('[PROJECT]', '[LOCATION]'); - $tunnelDestGroup = new TunnelDestGroup(); - $tunnelDestGroupName = 'tunnelDestGroupName1906281888'; - $tunnelDestGroup->setName($tunnelDestGroupName); - $tunnelDestGroupId = 'tunnelDestGroupId-1205367743'; - $request = (new CreateTunnelDestGroupRequest()) - ->setParent($formattedParent) - ->setTunnelDestGroup($tunnelDestGroup) - ->setTunnelDestGroupId($tunnelDestGroupId); - $response = $gapicClient->createTunnelDestGroupAsync($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.iap.v1.IdentityAwareProxyAdminService/CreateTunnelDestGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTunnelDestGroup(); - $this->assertProtobufEquals($tunnelDestGroup, $actualValue); - $actualValue = $actualRequestObject->getTunnelDestGroupId(); - $this->assertProtobufEquals($tunnelDestGroupId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Iap/v1/tests/Unit/V1/Client/IdentityAwareProxyOAuthServiceClientTest.php b/owl-bot-staging/Iap/v1/tests/Unit/V1/Client/IdentityAwareProxyOAuthServiceClientTest.php deleted file mode 100644 index a9c8201564e8..000000000000 --- a/owl-bot-staging/Iap/v1/tests/Unit/V1/Client/IdentityAwareProxyOAuthServiceClientTest.php +++ /dev/null @@ -1,663 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return IdentityAwareProxyOAuthServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new IdentityAwareProxyOAuthServiceClient($options); - } - - /** @test */ - public function createBrandTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $supportEmail = 'supportEmail-648030420'; - $applicationTitle = 'applicationTitle24071849'; - $orgInternalOnly = false; - $expectedResponse = new Brand(); - $expectedResponse->setName($name); - $expectedResponse->setSupportEmail($supportEmail); - $expectedResponse->setApplicationTitle($applicationTitle); - $expectedResponse->setOrgInternalOnly($orgInternalOnly); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $brand = new Brand(); - $request = (new CreateBrandRequest()) - ->setParent($parent) - ->setBrand($brand); - $response = $gapicClient->createBrand($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.iap.v1.IdentityAwareProxyOAuthService/CreateBrand', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getBrand(); - $this->assertProtobufEquals($brand, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createBrandExceptionTest() - { - $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 - $parent = 'parent-995424086'; - $brand = new Brand(); - $request = (new CreateBrandRequest()) - ->setParent($parent) - ->setBrand($brand); - try { - $gapicClient->createBrand($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 createIdentityAwareProxyClientTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $secret = 'secret-906277200'; - $displayName = 'displayName1615086568'; - $expectedResponse = new IdentityAwareProxyClient(); - $expectedResponse->setName($name); - $expectedResponse->setSecret($secret); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $identityAwareProxyClient = new IdentityAwareProxyClient(); - $request = (new CreateIdentityAwareProxyClientRequest()) - ->setParent($parent) - ->setIdentityAwareProxyClient($identityAwareProxyClient); - $response = $gapicClient->createIdentityAwareProxyClient($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.iap.v1.IdentityAwareProxyOAuthService/CreateIdentityAwareProxyClient', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getIdentityAwareProxyClient(); - $this->assertProtobufEquals($identityAwareProxyClient, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createIdentityAwareProxyClientExceptionTest() - { - $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 - $parent = 'parent-995424086'; - $identityAwareProxyClient = new IdentityAwareProxyClient(); - $request = (new CreateIdentityAwareProxyClientRequest()) - ->setParent($parent) - ->setIdentityAwareProxyClient($identityAwareProxyClient); - try { - $gapicClient->createIdentityAwareProxyClient($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 deleteIdentityAwareProxyClientTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new DeleteIdentityAwareProxyClientRequest()) - ->setName($name); - $gapicClient->deleteIdentityAwareProxyClient($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/DeleteIdentityAwareProxyClient', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteIdentityAwareProxyClientExceptionTest() - { - $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'; - $request = (new DeleteIdentityAwareProxyClientRequest()) - ->setName($name); - try { - $gapicClient->deleteIdentityAwareProxyClient($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 getBrandTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $supportEmail = 'supportEmail-648030420'; - $applicationTitle = 'applicationTitle24071849'; - $orgInternalOnly = false; - $expectedResponse = new Brand(); - $expectedResponse->setName($name2); - $expectedResponse->setSupportEmail($supportEmail); - $expectedResponse->setApplicationTitle($applicationTitle); - $expectedResponse->setOrgInternalOnly($orgInternalOnly); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new GetBrandRequest()) - ->setName($name); - $response = $gapicClient->getBrand($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.iap.v1.IdentityAwareProxyOAuthService/GetBrand', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBrandExceptionTest() - { - $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'; - $request = (new GetBrandRequest()) - ->setName($name); - try { - $gapicClient->getBrand($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 getIdentityAwareProxyClientTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $secret = 'secret-906277200'; - $displayName = 'displayName1615086568'; - $expectedResponse = new IdentityAwareProxyClient(); - $expectedResponse->setName($name2); - $expectedResponse->setSecret($secret); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new GetIdentityAwareProxyClientRequest()) - ->setName($name); - $response = $gapicClient->getIdentityAwareProxyClient($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.iap.v1.IdentityAwareProxyOAuthService/GetIdentityAwareProxyClient', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIdentityAwareProxyClientExceptionTest() - { - $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'; - $request = (new GetIdentityAwareProxyClientRequest()) - ->setName($name); - try { - $gapicClient->getIdentityAwareProxyClient($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 listBrandsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListBrandsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new ListBrandsRequest()) - ->setParent($parent); - $response = $gapicClient->listBrands($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.iap.v1.IdentityAwareProxyOAuthService/ListBrands', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBrandsExceptionTest() - { - $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 - $parent = 'parent-995424086'; - $request = (new ListBrandsRequest()) - ->setParent($parent); - try { - $gapicClient->listBrands($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 listIdentityAwareProxyClientsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $identityAwareProxyClientsElement = new IdentityAwareProxyClient(); - $identityAwareProxyClients = [ - $identityAwareProxyClientsElement, - ]; - $expectedResponse = new ListIdentityAwareProxyClientsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setIdentityAwareProxyClients($identityAwareProxyClients); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new ListIdentityAwareProxyClientsRequest()) - ->setParent($parent); - $response = $gapicClient->listIdentityAwareProxyClients($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getIdentityAwareProxyClients()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/ListIdentityAwareProxyClients', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIdentityAwareProxyClientsExceptionTest() - { - $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 - $parent = 'parent-995424086'; - $request = (new ListIdentityAwareProxyClientsRequest()) - ->setParent($parent); - try { - $gapicClient->listIdentityAwareProxyClients($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 resetIdentityAwareProxyClientSecretTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $secret = 'secret-906277200'; - $displayName = 'displayName1615086568'; - $expectedResponse = new IdentityAwareProxyClient(); - $expectedResponse->setName($name2); - $expectedResponse->setSecret($secret); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new ResetIdentityAwareProxyClientSecretRequest()) - ->setName($name); - $response = $gapicClient->resetIdentityAwareProxyClientSecret($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.iap.v1.IdentityAwareProxyOAuthService/ResetIdentityAwareProxyClientSecret', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resetIdentityAwareProxyClientSecretExceptionTest() - { - $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'; - $request = (new ResetIdentityAwareProxyClientSecretRequest()) - ->setName($name); - try { - $gapicClient->resetIdentityAwareProxyClientSecret($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 createBrandAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $supportEmail = 'supportEmail-648030420'; - $applicationTitle = 'applicationTitle24071849'; - $orgInternalOnly = false; - $expectedResponse = new Brand(); - $expectedResponse->setName($name); - $expectedResponse->setSupportEmail($supportEmail); - $expectedResponse->setApplicationTitle($applicationTitle); - $expectedResponse->setOrgInternalOnly($orgInternalOnly); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $brand = new Brand(); - $request = (new CreateBrandRequest()) - ->setParent($parent) - ->setBrand($brand); - $response = $gapicClient->createBrandAsync($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.iap.v1.IdentityAwareProxyOAuthService/CreateBrand', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getBrand(); - $this->assertProtobufEquals($brand, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Ids/v1/proto/src/GPBMetadata/Google/Cloud/Ids/V1/Ids.php b/owl-bot-staging/Ids/v1/proto/src/GPBMetadata/Google/Cloud/Ids/V1/Ids.php deleted file mode 100644 index 7d212aa7a7a6..000000000000 Binary files a/owl-bot-staging/Ids/v1/proto/src/GPBMetadata/Google/Cloud/Ids/V1/Ids.php and /dev/null differ diff --git a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/CreateEndpointRequest.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/CreateEndpointRequest.php deleted file mode 100644 index 928ba143eaf5..000000000000 --- a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/CreateEndpointRequest.php +++ /dev/null @@ -1,260 +0,0 @@ -google.cloud.ids.v1.CreateEndpointRequest - */ -class CreateEndpointRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The endpoint's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The endpoint identifier. This will be part of the endpoint's - * resource name. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * Values that do not match this pattern will trigger an INVALID_ARGUMENT - * error. - * - * Generated from protobuf field string endpoint_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $endpoint_id = ''; - /** - * Required. The endpoint to create. - * - * Generated from protobuf field .google.cloud.ids.v1.Endpoint endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $endpoint = null; - /** - * An optional request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The endpoint's parent. Please see - * {@see IDSClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Ids\V1\Endpoint $endpoint Required. The endpoint to create. - * @param string $endpointId Required. The endpoint identifier. This will be part of the endpoint's - * resource name. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * Values that do not match this pattern will trigger an INVALID_ARGUMENT - * error. - * - * @return \Google\Cloud\Ids\V1\CreateEndpointRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Ids\V1\Endpoint $endpoint, string $endpointId): self - { - return (new self()) - ->setParent($parent) - ->setEndpoint($endpoint) - ->setEndpointId($endpointId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The endpoint's parent. - * @type string $endpoint_id - * Required. The endpoint identifier. This will be part of the endpoint's - * resource name. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * Values that do not match this pattern will trigger an INVALID_ARGUMENT - * error. - * @type \Google\Cloud\Ids\V1\Endpoint $endpoint - * Required. The endpoint to create. - * @type string $request_id - * An optional request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Ids\V1\Ids::initOnce(); - parent::__construct($data); - } - - /** - * Required. The endpoint's parent. - * - * 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 endpoint's parent. - * - * 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. The endpoint identifier. This will be part of the endpoint's - * resource name. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * Values that do not match this pattern will trigger an INVALID_ARGUMENT - * error. - * - * Generated from protobuf field string endpoint_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEndpointId() - { - return $this->endpoint_id; - } - - /** - * Required. The endpoint identifier. This will be part of the endpoint's - * resource name. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * Values that do not match this pattern will trigger an INVALID_ARGUMENT - * error. - * - * Generated from protobuf field string endpoint_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEndpointId($var) - { - GPBUtil::checkString($var, True); - $this->endpoint_id = $var; - - return $this; - } - - /** - * Required. The endpoint to create. - * - * Generated from protobuf field .google.cloud.ids.v1.Endpoint endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Ids\V1\Endpoint|null - */ - public function getEndpoint() - { - return $this->endpoint; - } - - public function hasEndpoint() - { - return isset($this->endpoint); - } - - public function clearEndpoint() - { - unset($this->endpoint); - } - - /** - * Required. The endpoint to create. - * - * Generated from protobuf field .google.cloud.ids.v1.Endpoint endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Ids\V1\Endpoint $var - * @return $this - */ - public function setEndpoint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Ids\V1\Endpoint::class); - $this->endpoint = $var; - - return $this; - } - - /** - * An optional request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * An optional request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/DeleteEndpointRequest.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/DeleteEndpointRequest.php deleted file mode 100644 index fa24daaf67d1..000000000000 --- a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/DeleteEndpointRequest.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.ids.v1.DeleteEndpointRequest - */ -class DeleteEndpointRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the endpoint to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * An optional request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the endpoint to delete. Please see - * {@see IDSClient::endpointName()} for help formatting this field. - * - * @return \Google\Cloud\Ids\V1\DeleteEndpointRequest - * - * @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 of the endpoint to delete. - * @type string $request_id - * An optional request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Ids\V1\Ids::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the endpoint 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 of the endpoint 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; - } - - /** - * An optional request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * An optional request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint.php deleted file mode 100644 index f6410808a084..000000000000 --- a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint.php +++ /dev/null @@ -1,432 +0,0 @@ -google.cloud.ids.v1.Endpoint - */ -class Endpoint extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the endpoint. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The create time timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update time timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * The labels of the endpoint. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Required. The fully qualified URL of the network to which the IDS Endpoint is - * attached. - * - * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network = ''; - /** - * Output only. The fully qualified URL of the endpoint's ILB Forwarding Rule. - * - * Generated from protobuf field string endpoint_forwarding_rule = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $endpoint_forwarding_rule = ''; - /** - * Output only. The IP address of the IDS Endpoint's ILB. - * - * Generated from protobuf field string endpoint_ip = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $endpoint_ip = ''; - /** - * User-provided description of the endpoint - * - * Generated from protobuf field string description = 8; - */ - protected $description = ''; - /** - * Required. Lowest threat severity that this endpoint will alert on. - * - * Generated from protobuf field .google.cloud.ids.v1.Endpoint.Severity severity = 9 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $severity = 0; - /** - * Output only. Current state of the endpoint. - * - * Generated from protobuf field .google.cloud.ids.v1.Endpoint.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Whether the endpoint should report traffic logs in addition to threat logs. - * - * Generated from protobuf field bool traffic_logs = 13; - */ - protected $traffic_logs = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the endpoint. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The create time timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update time timestamp. - * @type array|\Google\Protobuf\Internal\MapField $labels - * The labels of the endpoint. - * @type string $network - * Required. The fully qualified URL of the network to which the IDS Endpoint is - * attached. - * @type string $endpoint_forwarding_rule - * Output only. The fully qualified URL of the endpoint's ILB Forwarding Rule. - * @type string $endpoint_ip - * Output only. The IP address of the IDS Endpoint's ILB. - * @type string $description - * User-provided description of the endpoint - * @type int $severity - * Required. Lowest threat severity that this endpoint will alert on. - * @type int $state - * Output only. Current state of the endpoint. - * @type bool $traffic_logs - * Whether the endpoint should report traffic logs in addition to threat logs. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Ids\V1\Ids::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the endpoint. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the endpoint. - * - * 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 create time timestamp. - * - * 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 create time timestamp. - * - * 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 update time timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The update time timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * The labels of the endpoint. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * The labels of the endpoint. - * - * Generated from protobuf field map labels = 4; - * @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; - } - - /** - * Required. The fully qualified URL of the network to which the IDS Endpoint is - * attached. - * - * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Required. The fully qualified URL of the network to which the IDS Endpoint is - * attached. - * - * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Output only. The fully qualified URL of the endpoint's ILB Forwarding Rule. - * - * Generated from protobuf field string endpoint_forwarding_rule = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEndpointForwardingRule() - { - return $this->endpoint_forwarding_rule; - } - - /** - * Output only. The fully qualified URL of the endpoint's ILB Forwarding Rule. - * - * Generated from protobuf field string endpoint_forwarding_rule = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEndpointForwardingRule($var) - { - GPBUtil::checkString($var, True); - $this->endpoint_forwarding_rule = $var; - - return $this; - } - - /** - * Output only. The IP address of the IDS Endpoint's ILB. - * - * Generated from protobuf field string endpoint_ip = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEndpointIp() - { - return $this->endpoint_ip; - } - - /** - * Output only. The IP address of the IDS Endpoint's ILB. - * - * Generated from protobuf field string endpoint_ip = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEndpointIp($var) - { - GPBUtil::checkString($var, True); - $this->endpoint_ip = $var; - - return $this; - } - - /** - * User-provided description of the endpoint - * - * Generated from protobuf field string description = 8; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User-provided description of the endpoint - * - * Generated from protobuf field string description = 8; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. Lowest threat severity that this endpoint will alert on. - * - * Generated from protobuf field .google.cloud.ids.v1.Endpoint.Severity severity = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * Required. Lowest threat severity that this endpoint will alert on. - * - * Generated from protobuf field .google.cloud.ids.v1.Endpoint.Severity severity = 9 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Ids\V1\Endpoint\Severity::class); - $this->severity = $var; - - return $this; - } - - /** - * Output only. Current state of the endpoint. - * - * Generated from protobuf field .google.cloud.ids.v1.Endpoint.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the endpoint. - * - * Generated from protobuf field .google.cloud.ids.v1.Endpoint.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Ids\V1\Endpoint\State::class); - $this->state = $var; - - return $this; - } - - /** - * Whether the endpoint should report traffic logs in addition to threat logs. - * - * Generated from protobuf field bool traffic_logs = 13; - * @return bool - */ - public function getTrafficLogs() - { - return $this->traffic_logs; - } - - /** - * Whether the endpoint should report traffic logs in addition to threat logs. - * - * Generated from protobuf field bool traffic_logs = 13; - * @param bool $var - * @return $this - */ - public function setTrafficLogs($var) - { - GPBUtil::checkBool($var); - $this->traffic_logs = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint/Severity.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint/Severity.php deleted file mode 100644 index 77b6813c9be8..000000000000 --- a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint/Severity.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.ids.v1.Endpoint.Severity - */ -class Severity -{ - /** - * Not set. - * - * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; - */ - const SEVERITY_UNSPECIFIED = 0; - /** - * Informational alerts. - * - * Generated from protobuf enum INFORMATIONAL = 1; - */ - const INFORMATIONAL = 1; - /** - * Low severity alerts. - * - * Generated from protobuf enum LOW = 2; - */ - const LOW = 2; - /** - * Medium severity alerts. - * - * Generated from protobuf enum MEDIUM = 3; - */ - const MEDIUM = 3; - /** - * High severity alerts. - * - * Generated from protobuf enum HIGH = 4; - */ - const HIGH = 4; - /** - * Critical severity alerts. - * - * Generated from protobuf enum CRITICAL = 5; - */ - const CRITICAL = 5; - - private static $valueToName = [ - self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', - self::INFORMATIONAL => 'INFORMATIONAL', - self::LOW => 'LOW', - self::MEDIUM => 'MEDIUM', - self::HIGH => 'HIGH', - self::CRITICAL => 'CRITICAL', - ]; - - 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(Severity::class, \Google\Cloud\Ids\V1\Endpoint_Severity::class); - diff --git a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint/State.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint/State.php deleted file mode 100644 index 35c39ce9be00..000000000000 --- a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.ids.v1.Endpoint.State - */ -class State -{ - /** - * Not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Active and ready for traffic. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * Being deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::DELETING => 'DELETING', - ]; - - 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\Ids\V1\Endpoint_State::class); - diff --git a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/GetEndpointRequest.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/GetEndpointRequest.php deleted file mode 100644 index adf2a00628ad..000000000000 --- a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/GetEndpointRequest.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.ids.v1.GetEndpointRequest - */ -class GetEndpointRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the endpoint to retrieve. - * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the endpoint to retrieve. - * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` - * Please see {@see IDSClient::endpointName()} for help formatting this field. - * - * @return \Google\Cloud\Ids\V1\GetEndpointRequest - * - * @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 of the endpoint to retrieve. - * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Ids\V1\Ids::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the endpoint to retrieve. - * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` - * - * 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 of the endpoint to retrieve. - * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` - * - * 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/Ids/v1/proto/src/Google/Cloud/Ids/V1/ListEndpointsRequest.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/ListEndpointsRequest.php deleted file mode 100644 index e566c2aff1b6..000000000000 --- a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/ListEndpointsRequest.php +++ /dev/null @@ -1,239 +0,0 @@ -google.cloud.ids.v1.ListEndpointsRequest - */ -class ListEndpointsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of endpoints. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of endpoints to return. The service may return fewer - * than this value. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from a previous `ListEndpoints` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListEndpoints` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of endpoints. Please see - * {@see IDSClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Ids\V1\ListEndpointsRequest - * - * @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 parent, which owns this collection of endpoints. - * @type int $page_size - * Optional. The maximum number of endpoints to return. The service may return fewer - * than this value. - * @type string $page_token - * Optional. A page token, received from a previous `ListEndpoints` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListEndpoints` must - * match the call that provided the page token. - * @type string $filter - * Optional. The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * @type string $order_by - * Optional. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Ids\V1\Ids::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of endpoints. - * - * 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 parent, which owns this collection of endpoints. - * - * 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 maximum number of endpoints to return. The service may return fewer - * than this value. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of endpoints to return. The service may return fewer - * than this value. - * - * 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. A page token, received from a previous `ListEndpoints` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListEndpoints` must - * match the call that provided the 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. A page token, received from a previous `ListEndpoints` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListEndpoints` must - * match the call that provided the 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. The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * - * 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. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * 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/Ids/v1/proto/src/Google/Cloud/Ids/V1/ListEndpointsResponse.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/ListEndpointsResponse.php deleted file mode 100644 index c24d54eeef07..000000000000 --- a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/ListEndpointsResponse.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.ids.v1.ListEndpointsResponse - */ -class ListEndpointsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of endpoints response. - * - * Generated from protobuf field repeated .google.cloud.ids.v1.Endpoint endpoints = 1; - */ - private $endpoints; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Ids\V1\Endpoint>|\Google\Protobuf\Internal\RepeatedField $endpoints - * The list of endpoints response. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Ids\V1\Ids::initOnce(); - parent::__construct($data); - } - - /** - * The list of endpoints response. - * - * Generated from protobuf field repeated .google.cloud.ids.v1.Endpoint endpoints = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEndpoints() - { - return $this->endpoints; - } - - /** - * The list of endpoints response. - * - * Generated from protobuf field repeated .google.cloud.ids.v1.Endpoint endpoints = 1; - * @param array<\Google\Cloud\Ids\V1\Endpoint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEndpoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Ids\V1\Endpoint::class); - $this->endpoints = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/OperationMetadata.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/OperationMetadata.php deleted file mode 100644 index 50e0d626665f..000000000000 --- a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/OperationMetadata.php +++ /dev/null @@ -1,303 +0,0 @@ -google.cloud.ids.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Ids\V1\Ids::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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 the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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 the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Ids/v1/samples/V1/IDSClient/create_endpoint.php b/owl-bot-staging/Ids/v1/samples/V1/IDSClient/create_endpoint.php deleted file mode 100644 index 0e773f791ff4..000000000000 --- a/owl-bot-staging/Ids/v1/samples/V1/IDSClient/create_endpoint.php +++ /dev/null @@ -1,105 +0,0 @@ -setNetwork($endpointNetwork) - ->setSeverity($endpointSeverity); - $request = (new CreateEndpointRequest()) - ->setParent($formattedParent) - ->setEndpointId($endpointId) - ->setEndpoint($endpoint); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $iDSClient->createEndpoint($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Endpoint $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 = IDSClient::locationName('[PROJECT]', '[LOCATION]'); - $endpointId = '[ENDPOINT_ID]'; - $endpointNetwork = '[NETWORK]'; - $endpointSeverity = Severity::SEVERITY_UNSPECIFIED; - - create_endpoint_sample($formattedParent, $endpointId, $endpointNetwork, $endpointSeverity); -} -// [END ids_v1_generated_IDS_CreateEndpoint_sync] diff --git a/owl-bot-staging/Ids/v1/samples/V1/IDSClient/delete_endpoint.php b/owl-bot-staging/Ids/v1/samples/V1/IDSClient/delete_endpoint.php deleted file mode 100644 index edf42fc41169..000000000000 --- a/owl-bot-staging/Ids/v1/samples/V1/IDSClient/delete_endpoint.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $iDSClient->deleteEndpoint($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 = IDSClient::endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]'); - - delete_endpoint_sample($formattedName); -} -// [END ids_v1_generated_IDS_DeleteEndpoint_sync] diff --git a/owl-bot-staging/Ids/v1/samples/V1/IDSClient/get_endpoint.php b/owl-bot-staging/Ids/v1/samples/V1/IDSClient/get_endpoint.php deleted file mode 100644 index 7038b8162c71..000000000000 --- a/owl-bot-staging/Ids/v1/samples/V1/IDSClient/get_endpoint.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Endpoint $response */ - $response = $iDSClient->getEndpoint($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 = IDSClient::endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]'); - - get_endpoint_sample($formattedName); -} -// [END ids_v1_generated_IDS_GetEndpoint_sync] diff --git a/owl-bot-staging/Ids/v1/samples/V1/IDSClient/list_endpoints.php b/owl-bot-staging/Ids/v1/samples/V1/IDSClient/list_endpoints.php deleted file mode 100644 index e54af6002547..000000000000 --- a/owl-bot-staging/Ids/v1/samples/V1/IDSClient/list_endpoints.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $iDSClient->listEndpoints($request); - - /** @var Endpoint $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 = IDSClient::locationName('[PROJECT]', '[LOCATION]'); - - list_endpoints_sample($formattedParent); -} -// [END ids_v1_generated_IDS_ListEndpoints_sync] diff --git a/owl-bot-staging/Ids/v1/src/V1/Client/IDSClient.php b/owl-bot-staging/Ids/v1/src/V1/Client/IDSClient.php deleted file mode 100644 index 55329281cb6e..000000000000 --- a/owl-bot-staging/Ids/v1/src/V1/Client/IDSClient.php +++ /dev/null @@ -1,400 +0,0 @@ - createEndpointAsync(CreateEndpointRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteEndpointAsync(DeleteEndpointRequest $request, array $optionalArgs = []) - * @method PromiseInterface getEndpointAsync(GetEndpointRequest $request, array $optionalArgs = []) - * @method PromiseInterface listEndpointsAsync(ListEndpointsRequest $request, array $optionalArgs = []) - */ -final class IDSClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.ids.v1.IDS'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'ids.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'ids.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', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/ids_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/ids_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/ids_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/ids_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 = isset($this->descriptors[$methodName]['longRunning']) ? $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 endpoint - * resource. - * - * @param string $project - * @param string $location - * @param string $endpoint - * - * @return string The formatted endpoint resource. - */ - public static function endpointName(string $project, string $location, string $endpoint): string - { - return self::getPathTemplate('endpoint')->render([ - 'project' => $project, - 'location' => $location, - 'endpoint' => $endpoint, - ]); - } - - /** - * 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 - * - endpoint: projects/{project}/locations/{location}/endpoints/{endpoint} - * - 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 $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 'ids.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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 Endpoint in a given project and location. - * - * The async variant is {@see IDSClient::createEndpointAsync()} . - * - * @example samples/V1/IDSClient/create_endpoint.php - * - * @param CreateEndpointRequest $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 createEndpoint(CreateEndpointRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateEndpoint', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Endpoint. - * - * The async variant is {@see IDSClient::deleteEndpointAsync()} . - * - * @example samples/V1/IDSClient/delete_endpoint.php - * - * @param DeleteEndpointRequest $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 deleteEndpoint(DeleteEndpointRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteEndpoint', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Endpoint. - * - * The async variant is {@see IDSClient::getEndpointAsync()} . - * - * @example samples/V1/IDSClient/get_endpoint.php - * - * @param GetEndpointRequest $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 Endpoint - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEndpoint(GetEndpointRequest $request, array $callOptions = []): Endpoint - { - return $this->startApiCall('GetEndpoint', $request, $callOptions)->wait(); - } - - /** - * Lists Endpoints in a given project and location. - * - * The async variant is {@see IDSClient::listEndpointsAsync()} . - * - * @example samples/V1/IDSClient/list_endpoints.php - * - * @param ListEndpointsRequest $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 listEndpoints(ListEndpointsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEndpoints', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Ids/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Ids/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 5ab423eb60d5..000000000000 --- a/owl-bot-staging/Ids/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.ids.v1", - "libraryPackage": "Google\\Cloud\\Ids\\V1", - "services": { - "IDS": { - "clients": { - "grpc": { - "libraryClient": "IDSGapicClient", - "rpcs": { - "CreateEndpoint": { - "methods": [ - "createEndpoint" - ] - }, - "DeleteEndpoint": { - "methods": [ - "deleteEndpoint" - ] - }, - "GetEndpoint": { - "methods": [ - "getEndpoint" - ] - }, - "ListEndpoints": { - "methods": [ - "listEndpoints" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Ids/v1/src/V1/resources/ids_client_config.json b/owl-bot-staging/Ids/v1/src/V1/resources/ids_client_config.json deleted file mode 100644 index 4e6ba8e1950b..000000000000 --- a/owl-bot-staging/Ids/v1/src/V1/resources/ids_client_config.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "interfaces": { - "google.cloud.ids.v1.IDS": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [], - "no_retry_2_codes": [] - }, - "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": 250, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 32000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 3600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 3600000, - "total_timeout_millis": 3600000 - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 3600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 3600000, - "total_timeout_millis": 3600000 - } - }, - "methods": { - "CreateEndpoint": { - "timeout_millis": 3600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteEndpoint": { - "timeout_millis": 3600000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "GetEndpoint": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListEndpoints": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Ids/v1/src/V1/resources/ids_descriptor_config.php b/owl-bot-staging/Ids/v1/src/V1/resources/ids_descriptor_config.php deleted file mode 100644 index e93f62df9064..000000000000 --- a/owl-bot-staging/Ids/v1/src/V1/resources/ids_descriptor_config.php +++ /dev/null @@ -1,102 +0,0 @@ - [ - 'google.cloud.ids.v1.IDS' => [ - 'CreateEndpoint' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Ids\V1\Endpoint', - 'metadataReturnType' => '\Google\Cloud\Ids\V1\OperationMetadata', - 'initialPollDelayMillis' => '5000', - 'pollDelayMultiplier' => '2.0', - 'maxPollDelayMillis' => '45000', - 'totalPollTimeoutMillis' => '3600000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteEndpoint' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Ids\V1\OperationMetadata', - 'initialPollDelayMillis' => '5000', - 'pollDelayMultiplier' => '2.0', - 'maxPollDelayMillis' => '45000', - 'totalPollTimeoutMillis' => '3600000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEndpoint' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Ids\V1\Endpoint', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListEndpoints' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEndpoints', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Ids\V1\ListEndpointsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'endpoint' => 'projects/{project}/locations/{location}/endpoints/{endpoint}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Ids/v1/src/V1/resources/ids_rest_client_config.php b/owl-bot-staging/Ids/v1/src/V1/resources/ids_rest_client_config.php deleted file mode 100644 index 52814abdc81a..000000000000 --- a/owl-bot-staging/Ids/v1/src/V1/resources/ids_rest_client_config.php +++ /dev/null @@ -1,185 +0,0 @@ - [ - 'google.cloud.ids.v1.IDS' => [ - 'CreateEndpoint' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/endpoints', - 'body' => 'endpoint', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'endpoint_id', - ], - ], - 'DeleteEndpoint' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEndpoint' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListEndpoints' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/endpoints', - '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/*/endpoints/*}:getIamPolicy', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Ids/v1/tests/Unit/V1/Client/IDSClientTest.php b/owl-bot-staging/Ids/v1/tests/Unit/V1/Client/IDSClientTest.php deleted file mode 100644 index 487c833bab8f..000000000000 --- a/owl-bot-staging/Ids/v1/tests/Unit/V1/Client/IDSClientTest.php +++ /dev/null @@ -1,580 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return IDSClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new IDSClient($options); - } - - /** @test */ - public function createEndpointTest() - { - $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/createEndpointTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $network = 'network1843485230'; - $endpointForwardingRule = 'endpointForwardingRule-1878786988'; - $endpointIp = 'endpointIp-1135808495'; - $description = 'description-1724546052'; - $trafficLogs = false; - $expectedResponse = new Endpoint(); - $expectedResponse->setName($name); - $expectedResponse->setNetwork($network); - $expectedResponse->setEndpointForwardingRule($endpointForwardingRule); - $expectedResponse->setEndpointIp($endpointIp); - $expectedResponse->setDescription($description); - $expectedResponse->setTrafficLogs($trafficLogs); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createEndpointTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $endpointId = 'endpointId-1135808507'; - $endpoint = new Endpoint(); - $endpointNetwork = 'endpointNetwork1670861529'; - $endpoint->setNetwork($endpointNetwork); - $endpointSeverity = Severity::SEVERITY_UNSPECIFIED; - $endpoint->setSeverity($endpointSeverity); - $request = (new CreateEndpointRequest()) - ->setParent($formattedParent) - ->setEndpointId($endpointId) - ->setEndpoint($endpoint); - $response = $gapicClient->createEndpoint($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.ids.v1.IDS/CreateEndpoint', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getEndpointId(); - $this->assertProtobufEquals($endpointId, $actualValue); - $actualValue = $actualApiRequestObject->getEndpoint(); - $this->assertProtobufEquals($endpoint, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEndpointTest'); - $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 createEndpointExceptionTest() - { - $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/createEndpointTest'); - $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]'); - $endpointId = 'endpointId-1135808507'; - $endpoint = new Endpoint(); - $endpointNetwork = 'endpointNetwork1670861529'; - $endpoint->setNetwork($endpointNetwork); - $endpointSeverity = Severity::SEVERITY_UNSPECIFIED; - $endpoint->setSeverity($endpointSeverity); - $request = (new CreateEndpointRequest()) - ->setParent($formattedParent) - ->setEndpointId($endpointId) - ->setEndpoint($endpoint); - $response = $gapicClient->createEndpoint($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEndpointTest'); - 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 deleteEndpointTest() - { - $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/deleteEndpointTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteEndpointTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]'); - $request = (new DeleteEndpointRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteEndpoint($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.ids.v1.IDS/DeleteEndpoint', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEndpointTest'); - $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 deleteEndpointExceptionTest() - { - $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/deleteEndpointTest'); - $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->endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]'); - $request = (new DeleteEndpointRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteEndpoint($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEndpointTest'); - 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 getEndpointTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $network = 'network1843485230'; - $endpointForwardingRule = 'endpointForwardingRule-1878786988'; - $endpointIp = 'endpointIp-1135808495'; - $description = 'description-1724546052'; - $trafficLogs = false; - $expectedResponse = new Endpoint(); - $expectedResponse->setName($name2); - $expectedResponse->setNetwork($network); - $expectedResponse->setEndpointForwardingRule($endpointForwardingRule); - $expectedResponse->setEndpointIp($endpointIp); - $expectedResponse->setDescription($description); - $expectedResponse->setTrafficLogs($trafficLogs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]'); - $request = (new GetEndpointRequest()) - ->setName($formattedName); - $response = $gapicClient->getEndpoint($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.ids.v1.IDS/GetEndpoint', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEndpointExceptionTest() - { - $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->endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]'); - $request = (new GetEndpointRequest()) - ->setName($formattedName); - try { - $gapicClient->getEndpoint($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 listEndpointsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $endpointsElement = new Endpoint(); - $endpoints = [ - $endpointsElement, - ]; - $expectedResponse = new ListEndpointsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEndpoints($endpoints); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListEndpointsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listEndpoints($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEndpoints()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.ids.v1.IDS/ListEndpoints', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEndpointsExceptionTest() - { - $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 ListEndpointsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listEndpoints($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 createEndpointAsyncTest() - { - $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/createEndpointTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $network = 'network1843485230'; - $endpointForwardingRule = 'endpointForwardingRule-1878786988'; - $endpointIp = 'endpointIp-1135808495'; - $description = 'description-1724546052'; - $trafficLogs = false; - $expectedResponse = new Endpoint(); - $expectedResponse->setName($name); - $expectedResponse->setNetwork($network); - $expectedResponse->setEndpointForwardingRule($endpointForwardingRule); - $expectedResponse->setEndpointIp($endpointIp); - $expectedResponse->setDescription($description); - $expectedResponse->setTrafficLogs($trafficLogs); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createEndpointTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $endpointId = 'endpointId-1135808507'; - $endpoint = new Endpoint(); - $endpointNetwork = 'endpointNetwork1670861529'; - $endpoint->setNetwork($endpointNetwork); - $endpointSeverity = Severity::SEVERITY_UNSPECIFIED; - $endpoint->setSeverity($endpointSeverity); - $request = (new CreateEndpointRequest()) - ->setParent($formattedParent) - ->setEndpointId($endpointId) - ->setEndpoint($endpoint); - $response = $gapicClient->createEndpointAsync($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.ids.v1.IDS/CreateEndpoint', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getEndpointId(); - $this->assertProtobufEquals($endpointId, $actualValue); - $actualValue = $actualApiRequestObject->getEndpoint(); - $this->assertProtobufEquals($endpoint, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEndpointTest'); - $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/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 947aaed125ac..000000000000 Binary files a/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/AutokeyAdmin.php and /dev/null differ diff --git a/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/EkmService.php b/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/EkmService.php deleted file mode 100644 index 44bbb50c4508..000000000000 Binary files a/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/EkmService.php and /dev/null differ diff --git a/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Resources.php b/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Resources.php deleted file mode 100644 index 0684ba4e7ddb..000000000000 Binary files a/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Resources.php and /dev/null differ 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 edd8f8bcd703..000000000000 Binary files a/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Service.php and /dev/null differ 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 1e1bf9f0ff2e..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AccessReason.php +++ /dev/null @@ -1,149 +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; - /** - * 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; - */ - const MODIFIED_CUSTOMER_INITIATED_ACCESS = 8; - /** - * 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; - */ - 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/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 4473493d8774..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig.php +++ /dev/null @@ -1,179 +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`. - * - * 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; - - /** - * 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`. - * @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. - * } - */ - 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`. - * - * 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`. - * - * 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; - } - -} - 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 6e3ef05f500e..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AutokeyConfig/State.php +++ /dev/null @@ -1,73 +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; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::KEY_PROJECT_DELETED => 'KEY_PROJECT_DELETED', - self::UNINITIALIZED => 'UNINITIALIZED', - ]; - - 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/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/CryptoKey.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey.php deleted file mode 100644 index e82ffe8ab6ec..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey.php +++ /dev/null @@ -1,748 +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][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], with the - * resource name in the format `projects/*/locations/*/ekmConnections/*`. - * 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][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], with the - * resource name in the format `projects/*/locations/*/ekmConnections/*`. - * 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][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], with the - * resource name in the format `projects/*/locations/*/ekmConnections/*`. - * 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][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], with the - * resource name in the format `projects/*/locations/*/ekmConnections/*`. - * 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 a941f6337534..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey/CryptoKeyPurpose.php +++ /dev/null @@ -1,104 +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; - - 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', - ]; - - 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 b4edec85f40f..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionAlgorithm.php +++ /dev/null @@ -1,336 +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; - - 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', - ]; - - 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 b4de21be0a7e..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; - /** - * This version is destroyed, and the key material is 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/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/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 92325efb4514..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 918f3dee31e3..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 03dd23462c6c..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/KeyManagementMode.php +++ /dev/null @@ -1,90 +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][EkmService.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/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 4bd2c559b37f..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetAutokeyConfigRequest.php +++ /dev/null @@ -1,87 +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`. - * - * 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`. 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`. - * } - */ - 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`. - * - * 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`. - * - * 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 508c3434e2b9..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetPublicKeyRequest.php +++ /dev/null @@ -1,87 +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 = ''; - - /** - * @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. - * } - */ - 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; - } - -} - 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 9018eb71ff7e..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportCryptoKeyVersionRequest.php +++ /dev/null @@ -1,491 +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][], 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][], 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][], 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][], 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 6eae364be08c..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob.php +++ /dev/null @@ -1,549 +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; - - /** - * 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]. - * } - */ - 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; - } - -} - 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 bbbe9ccb0775..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsResponse.php +++ /dev/null @@ -1,152 +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. - * - * 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. - * } - */ - 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. - * - * 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. - * - * 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 256c1b36b885..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysResponse.php +++ /dev/null @@ -1,148 +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. - * - * 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. - * } - */ - 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. - * - * 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. - * - * 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 cf84a145df5e..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsResponse.php +++ /dev/null @@ -1,148 +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. - * - * 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. - * } - */ - 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. - * - * 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. - * - * 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 04f11ca76dd2..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsResponse.php +++ /dev/null @@ -1,148 +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. - * - * 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. - * } - */ - 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. - * - * 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. - * - * 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 3deac0ea2e0f..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsResponse.php +++ /dev/null @@ -1,148 +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. - * - * 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. - * } - */ - 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. - * - * 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. - * - * 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 656adb13aac7..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/LocationMetadata.php +++ /dev/null @@ -1,126 +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; - - /** - * 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. - * } - */ - 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; - } - -} - 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 57af029a1136..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyRequest.php +++ /dev/null @@ -1,508 +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.tag][]) 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.tag][]) 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.tag][]) 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.tag][]) 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.tag][]) 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.tag][]) 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 e6f74d6c62b8..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ProtectionLevel.php +++ /dev/null @@ -1,77 +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; - - private static $valueToName = [ - self::PROTECTION_LEVEL_UNSPECIFIED => 'PROTECTION_LEVEL_UNSPECIFIED', - self::SOFTWARE => 'SOFTWARE', - self::HSM => 'HSM', - self::EXTERNAL => 'EXTERNAL', - self::EXTERNAL_VPC => 'EXTERNAL_VPC', - ]; - - 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 7309923596b0..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey.php +++ /dev/null @@ -1,354 +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; - - /** - * 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. - * } - */ - 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; - } - -} - 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/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/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 89599d61f7aa..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/get_autokey_config.php +++ /dev/null @@ -1,73 +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 21fc073d8358..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 6cb25c532205..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 b8af0822b0d7..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/AutokeyAdminClient/list_locations.php +++ /dev/null @@ -1,62 +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 1202ce1f6065..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 5beefc9c0980..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 7e4fe649a041..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 1eef8f2ebffd..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 f38155b3ecff..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 d642ccb079f2..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 e4e840e7cab7..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 f38158f6bad1..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 900bc825fe12..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 f717fabf6b9a..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/AutokeyClient/list_locations.php +++ /dev/null @@ -1,62 +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 db0f0ad6046c..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 e3588e89639f..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 da0a80095906..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 513e4675c0f5..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 af11f93fdf09..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 68149cdc7afa..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 310924b508b7..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 d0be2f4c697e..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 1bb19c6e2482..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_locations.php +++ /dev/null @@ -1,62 +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 8d33c45f5688..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 5f04484afdcb..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 4545f68080e6..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 25e0f134db8c..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 f3a099f99485..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/KeyManagementServiceClient/asymmetric_decrypt.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_decrypt.php deleted file mode 100644 index 09b3e01d23b1..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 b8467961948b..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 b2bc66b850b6..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 71cc05d5681f..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 510ff5be970a..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 5f8ee1d3ad45..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/decrypt.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decrypt.php deleted file mode 100644 index b5a474d68f41..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/destroy_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/destroy_crypto_key_version.php deleted file mode 100644 index b0090eef2c77..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 7f719bcf2ef5..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 a63710011bfd..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 4919946c0081..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 17903f74ced5..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 71a0fe28319b..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 0d020d202343..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 b21c49ace1d3..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 d5aa66a0b9d9..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 e30e488a9e65..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/import_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/import_crypto_key_version.php deleted file mode 100644 index 8e82a9df1cc8..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 015a526ed4d2..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 29a2ae2517ef..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 8ffb69c6a6de..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 1aa8f0bbc947..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 fa3ffc21350e..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_locations.php +++ /dev/null @@ -1,62 +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/mac_sign.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_sign.php deleted file mode 100644 index 41eb52ab8f14..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 31bbf3714133..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 45d7fd391947..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 6087bc112e2c..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 5d17fc937aaf..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 e3db153a0131..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 f7d0482b677c..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 083529fff6b1..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 6bf7dc69fbd7..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 156a84fa5eae..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 dc2d5740b626..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/Client/AutokeyAdminClient.php +++ /dev/null @@ -1,483 +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 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, - ]); - } - - /** - * 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 - * - project: projects/{project} - * - * 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 $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 string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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. - * - * 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. 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. - * - * 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 f65113a76b92..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/Client/AutokeyClient.php +++ /dev/null @@ -1,572 +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 = isset($this->descriptors[$methodName]['longRunning']) ? $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 $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 string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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][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. - * - * 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 3dec9532dfea..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/Client/EkmServiceClient.php +++ /dev/null @@ -1,639 +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 $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 string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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. - * - * 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/KeyManagementServiceClient.php b/owl-bot-staging/Kms/v1/src/V1/Client/KeyManagementServiceClient.php deleted file mode 100644 index 4ce890e8bce5..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/Client/KeyManagementServiceClient.php +++ /dev/null @@ -1,1378 +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 decryptAsync(DecryptRequest $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 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 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 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', - ], - ], - ]; - } - - /** - * 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, - ]); - } - - /** - * 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} - * - * 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 $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 string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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); - } - - /** - * 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(); - } - - /** - * 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(); - } - - /** - * 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(); - } - - /** - * 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); - } - - /** - * 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. - * - * 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 3682f60f663a..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,350 +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" - ] - } - } - } - } - }, - "KeyManagementService": { - "clients": { - "grpc": { - "libraryClient": "KeyManagementServiceGapicClient", - "rpcs": { - "AsymmetricDecrypt": { - "methods": [ - "asymmetricDecrypt" - ] - }, - "AsymmetricSign": { - "methods": [ - "asymmetricSign" - ] - }, - "CreateCryptoKey": { - "methods": [ - "createCryptoKey" - ] - }, - "CreateCryptoKeyVersion": { - "methods": [ - "createCryptoKeyVersion" - ] - }, - "CreateImportJob": { - "methods": [ - "createImportJob" - ] - }, - "CreateKeyRing": { - "methods": [ - "createKeyRing" - ] - }, - "Decrypt": { - "methods": [ - "decrypt" - ] - }, - "DestroyCryptoKeyVersion": { - "methods": [ - "destroyCryptoKeyVersion" - ] - }, - "Encrypt": { - "methods": [ - "encrypt" - ] - }, - "GenerateRandomBytes": { - "methods": [ - "generateRandomBytes" - ] - }, - "GetCryptoKey": { - "methods": [ - "getCryptoKey" - ] - }, - "GetCryptoKeyVersion": { - "methods": [ - "getCryptoKeyVersion" - ] - }, - "GetImportJob": { - "methods": [ - "getImportJob" - ] - }, - "GetKeyRing": { - "methods": [ - "getKeyRing" - ] - }, - "GetPublicKey": { - "methods": [ - "getPublicKey" - ] - }, - "ImportCryptoKeyVersion": { - "methods": [ - "importCryptoKeyVersion" - ] - }, - "ListCryptoKeyVersions": { - "methods": [ - "listCryptoKeyVersions" - ] - }, - "ListCryptoKeys": { - "methods": [ - "listCryptoKeys" - ] - }, - "ListImportJobs": { - "methods": [ - "listImportJobs" - ] - }, - "ListKeyRings": { - "methods": [ - "listKeyRings" - ] - }, - "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 b349e59725fc..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_descriptor_config.php +++ /dev/null @@ -1,142 +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', - 'project' => 'projects/{project}', - ], - ], - ], -]; 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 2b0b2021b53c..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/autokey_admin_rest_client_config.php +++ /dev/null @@ -1,203 +0,0 @@ - [ - 'google.cloud.kms.v1.AutokeyAdmin' => [ - 'GetAutokeyConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=folders/*/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', - '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 fc3e7e0fa238..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 ac1650bdc846..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 bb7c6839d8fa..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 34f91a604708..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/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 029ea27c5978..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_client_config.json +++ /dev/null @@ -1,210 +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" - }, - "Decrypt": { - "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" - }, - "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" - }, - "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 841c9a29088a..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_descriptor_config.php +++ /dev/null @@ -1,478 +0,0 @@ - [ - 'google.cloud.kms.v1.KeyManagementService' => [ - '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', - ], - ], - ], - ], - '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', - ], - ], - ], - ], - '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', - ], - ], - ], - ], - '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}', - ], - ], - ], -]; 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 eb9b6897bb40..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_rest_client_config.php +++ /dev/null @@ -1,509 +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', - ], - ], - 'Decrypt' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}:decrypt', - 'body' => '*', - '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', - ], - ], - ], - ], - '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', - ], - ], - ], - ], - '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 db3d68a16a74..000000000000 --- a/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/AutokeyAdminClientTest.php +++ /dev/null @@ -1,638 +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'; - $expectedResponse = new AutokeyConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setKeyProject($keyProject); - $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'; - $expectedResponse = new AutokeyConfig(); - $expectedResponse->setName($name); - $expectedResponse->setKeyProject($keyProject); - $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'; - $expectedResponse = new AutokeyConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setKeyProject($keyProject); - $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 c014d40dea8e..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 49e7f80489b6..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/KeyManagementServiceClientTest.php b/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/KeyManagementServiceClientTest.php deleted file mode 100644 index a908438108e1..000000000000 --- a/owl-bot-staging/Kms/v1/tests/Unit/V1/Client/KeyManagementServiceClientTest.php +++ /dev/null @@ -1,2573 +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'; - $expectedResponse = new ImportJob(); - $expectedResponse->setName($name); - $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 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 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'; - $expectedResponse = new ImportJob(); - $expectedResponse->setName($name2); - $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 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 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()); - } -} diff --git a/owl-bot-staging/KmsInventory/v1/proto/src/GPBMetadata/Google/Cloud/Kms/Inventory/V1/KeyDashboardService.php b/owl-bot-staging/KmsInventory/v1/proto/src/GPBMetadata/Google/Cloud/Kms/Inventory/V1/KeyDashboardService.php deleted file mode 100644 index ec8d97bd2cdf..000000000000 --- a/owl-bot-staging/KmsInventory/v1/proto/src/GPBMetadata/Google/Cloud/Kms/Inventory/V1/KeyDashboardService.php +++ /dev/null @@ -1,43 +0,0 @@ -internalAddGeneratedFile( - ' -¸ -9google/cloud/kms/inventory/v1/key_dashboard_service.protogoogle.cloud.kms.inventory.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto#google/cloud/kms/v1/resources.proto" -ListCryptoKeysRequestC -parent ( B3àAúA- -+cloudresourcemanager.googleapis.com/Project - page_size (BàA - -page_token ( BàA"f -ListCryptoKeysResponse3 - crypto_keys ( 2.google.cloud.kms.v1.CryptoKey -next_page_token ( 2› -KeyDashboardService² -ListCryptoKeys4.google.cloud.kms.inventory.v1.ListCryptoKeysRequest5.google.cloud.kms.inventory.v1.ListCryptoKeysResponse"3ÚAparent‚Óä“$"/v1/{parent=projects/*}/cryptoKeysOÊAkmsinventory.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÃ -!com.google.cloud.kms.inventory.v1BKeyDashboardServiceProtoPZ?cloud.google.com/go/kms/inventory/apiv1/inventorypb;inventorypbøªGoogle.Cloud.Kms.Inventory.V1ÊGoogle\\Cloud\\Kms\\Inventory\\V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/KmsInventory/v1/proto/src/GPBMetadata/Google/Cloud/Kms/Inventory/V1/KeyTrackingService.php b/owl-bot-staging/KmsInventory/v1/proto/src/GPBMetadata/Google/Cloud/Kms/Inventory/V1/KeyTrackingService.php deleted file mode 100644 index 87a681c8362d..000000000000 --- a/owl-bot-staging/KmsInventory/v1/proto/src/GPBMetadata/Google/Cloud/Kms/Inventory/V1/KeyTrackingService.php +++ /dev/null @@ -1,87 +0,0 @@ -internalAddGeneratedFile( - ' -© -8google/cloud/kms/inventory/v1/key_tracking_service.protogoogle.cloud.kms.inventory.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.protogoogle/protobuf/timestamp.proto"r -#GetProtectedResourcesSummaryRequestK -name ( B=àAúA7 -5kmsinventory.googleapis.com/ProtectedResourcesSummary"à -ProtectedResourcesSummary -name (  -resource_count ( - project_count (c -resource_types ( 2K.google.cloud.kms.inventory.v1.ProtectedResourcesSummary.ResourceTypesEntryc -cloud_products ( 2K.google.cloud.kms.inventory.v1.ProtectedResourcesSummary.CloudProductsEntryZ - locations ( 2G.google.cloud.kms.inventory.v1.ProtectedResourcesSummary.LocationsEntry4 -ResourceTypesEntry -key (  -value (:84 -CloudProductsEntry -key (  -value (:80 -LocationsEntry -key (  -value (:8:ÁêA½ -5kmsinventory.googleapis.com/ProtectedResourcesSummarymprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/protectedResourcesSummary”projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}/protectedResourcesSummary"Í -SearchProtectedResourcesRequestG -scope ( B8àAúA2 -0cloudresourcemanager.googleapis.com/Organization - -crypto_key ( B àAúA -* - page_size ( - -page_token (  -resource_types ( BàA"Š - SearchProtectedResourcesResponseM -protected_resources ( 20.google.cloud.kms.inventory.v1.ProtectedResource -next_page_token ( "ù -ProtectedResource -name (  -project (  - -project_id (  - cloud_product (  - resource_type (  -location ( L -labels ( 2<.google.cloud.kms.inventory.v1.ProtectedResource.LabelsEntryI -crypto_key_version ( B-úA* -(cloudkms.googleapis.com/CryptoKeyVersionJ -crypto_key_versions - ( B-úA* -(cloudkms.googleapis.com/CryptoKeyVersion4 - create_time ( 2.google.protobuf.TimestampBàA- - LabelsEntry -key (  -value ( :8:\'êA$ -cloudasset.googleapis.com/Asset*2Ú -KeyTrackingService -GetProtectedResourcesSummaryB.google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest8.google.cloud.kms.inventory.v1.ProtectedResourcesSummary"cÚAname‚Óä“VT/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/**}/protectedResourcesSummaryî -SearchProtectedResources>.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest?.google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse"QÚAscope, crypto_key‚Óä“75/v1/{scope=organizations/*}/protectedResources:searchOÊAkmsinventory.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÂ -!com.google.cloud.kms.inventory.v1BKeyTrackingServiceProtoPZ?cloud.google.com/go/kms/inventory/apiv1/inventorypb;inventorypbøªGoogle.Cloud.Kms.Inventory.V1ÊGoogle\\Cloud\\Kms\\Inventory\\V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/KmsInventory/v1/proto/src/Google/Cloud/Kms/Inventory/V1/GetProtectedResourcesSummaryRequest.php b/owl-bot-staging/KmsInventory/v1/proto/src/Google/Cloud/Kms/Inventory/V1/GetProtectedResourcesSummaryRequest.php deleted file mode 100644 index 7b7250aae22c..000000000000 --- a/owl-bot-staging/KmsInventory/v1/proto/src/Google/Cloud/Kms/Inventory/V1/GetProtectedResourcesSummaryRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest - */ -class GetProtectedResourcesSummaryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * 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 - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. Please see - * {@see KeyTrackingServiceClient::protectedResourcesSummaryName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\Inventory\V1\GetProtectedResourcesSummaryRequest - * - * @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 - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\Inventory\V1\KeyTrackingService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * 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]. - * - * 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/KmsInventory/v1/proto/src/Google/Cloud/Kms/Inventory/V1/ListCryptoKeysRequest.php b/owl-bot-staging/KmsInventory/v1/proto/src/Google/Cloud/Kms/Inventory/V1/ListCryptoKeysRequest.php deleted file mode 100644 index 005fec032720..000000000000 --- a/owl-bot-staging/KmsInventory/v1/proto/src/Google/Cloud/Kms/Inventory/V1/ListCryptoKeysRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.kms.inventory.v1.ListCryptoKeysRequest - */ -class ListCryptoKeysRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Google Cloud project for which to retrieve key metadata, in - * the format `projects/*` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of keys to return. The service may return - * fewer than this value. If unspecified, at most 1000 keys will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Pass this into a subsequent request in order to receive the next - * page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The Google Cloud project for which to retrieve key metadata, in - * the format `projects/*` - * Please see {@see KeyDashboardServiceClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\Kms\Inventory\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 Google Cloud project for which to retrieve key metadata, in - * the format `projects/*` - * @type int $page_size - * Optional. The maximum number of keys to return. The service may return - * fewer than this value. If unspecified, at most 1000 keys will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Pass this into a subsequent request in order to receive the next - * page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\Inventory\V1\KeyDashboardService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Google Cloud project for which to retrieve key metadata, in - * the format `projects/*` - * - * 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 Google Cloud project for which to retrieve key metadata, in - * the format `projects/*` - * - * 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 maximum number of keys to return. The service may return - * fewer than this value. If unspecified, at most 1000 keys will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of keys to return. The service may return - * fewer than this value. If unspecified, at most 1000 keys will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * 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. Pass this into a subsequent request in order to receive the next - * page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Pass this into a subsequent request in order to receive the next - * page of results. - * - * 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/KmsInventory/v1/proto/src/Google/Cloud/Kms/Inventory/V1/ListCryptoKeysResponse.php b/owl-bot-staging/KmsInventory/v1/proto/src/Google/Cloud/Kms/Inventory/V1/ListCryptoKeysResponse.php deleted file mode 100644 index eaecf70d100d..000000000000 --- a/owl-bot-staging/KmsInventory/v1/proto/src/Google/Cloud/Kms/Inventory/V1/ListCryptoKeysResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.kms.inventory.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; - /** - * The page token returned from the previous response if the next page is - * desired. - * - * 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\CryptoKey>|\Google\Protobuf\Internal\RepeatedField $crypto_keys - * The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - * @type string $next_page_token - * The page token returned from the previous response if the next page is - * desired. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\Inventory\V1\KeyDashboardService::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; - } - - /** - * The page token returned from the previous response if the next page is - * desired. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The page token returned from the previous response if the next page is - * desired. - * - * 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/KmsInventory/v1/proto/src/Google/Cloud/Kms/Inventory/V1/ProtectedResource.php b/owl-bot-staging/KmsInventory/v1/proto/src/Google/Cloud/Kms/Inventory/V1/ProtectedResource.php deleted file mode 100644 index 7be056de11f6..000000000000 --- a/owl-bot-staging/KmsInventory/v1/proto/src/Google/Cloud/Kms/Inventory/V1/ProtectedResource.php +++ /dev/null @@ -1,447 +0,0 @@ -google.cloud.kms.inventory.v1.ProtectedResource - */ -class ProtectedResource extends \Google\Protobuf\Internal\Message -{ - /** - * The full resource name of the resource. - * Example: - * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Format: `projects/{PROJECT_NUMBER}`. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * The ID of the project that owns the resource. - * - * Generated from protobuf field string project_id = 9; - */ - protected $project_id = ''; - /** - * The Cloud product that owns the resource. - * Example: `compute` - * - * Generated from protobuf field string cloud_product = 8; - */ - protected $cloud_product = ''; - /** - * Example: `compute.googleapis.com/Disk` - * - * Generated from protobuf field string resource_type = 3; - */ - protected $resource_type = ''; - /** - * Location can be `global`, regional like `us-east1`, or zonal like - * `us-west1-b`. - * - * Generated from protobuf field string location = 4; - */ - protected $location = ''; - /** - * A key-value pair of the resource's labels (v1) to their values. - * - * Generated from protobuf field map labels = 5; - */ - private $labels; - /** - * The name of the Cloud KMS - * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) - * used to protect this resource via CMEK. This field is empty if the - * Google Cloud product owning the resource does not provide key version data - * to Asset Inventory. If there are multiple key versions protecting the - * resource, then this is same value as the first element of - * crypto_key_versions. - * - * Generated from protobuf field string crypto_key_version = 6 [(.google.api.resource_reference) = { - */ - protected $crypto_key_version = ''; - /** - * The names of the Cloud KMS - * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) - * used to protect this resource via CMEK. This field is empty if the - * Google Cloud product owning the resource does not provide key versions data - * to Asset Inventory. The first element of this field is stored in - * crypto_key_version. - * - * Generated from protobuf field repeated string crypto_key_versions = 10 [(.google.api.resource_reference) = { - */ - private $crypto_key_versions; - /** - * Output only. The time at which this resource was created. The granularity - * is in seconds. Timestamp.nanos will always be 0. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The full resource name of the resource. - * Example: - * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. - * @type string $project - * Format: `projects/{PROJECT_NUMBER}`. - * @type string $project_id - * The ID of the project that owns the resource. - * @type string $cloud_product - * The Cloud product that owns the resource. - * Example: `compute` - * @type string $resource_type - * Example: `compute.googleapis.com/Disk` - * @type string $location - * Location can be `global`, regional like `us-east1`, or zonal like - * `us-west1-b`. - * @type array|\Google\Protobuf\Internal\MapField $labels - * A key-value pair of the resource's labels (v1) to their values. - * @type string $crypto_key_version - * The name of the Cloud KMS - * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) - * used to protect this resource via CMEK. This field is empty if the - * Google Cloud product owning the resource does not provide key version data - * to Asset Inventory. If there are multiple key versions protecting the - * resource, then this is same value as the first element of - * crypto_key_versions. - * @type array|\Google\Protobuf\Internal\RepeatedField $crypto_key_versions - * The names of the Cloud KMS - * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) - * used to protect this resource via CMEK. This field is empty if the - * Google Cloud product owning the resource does not provide key versions data - * to Asset Inventory. The first element of this field is stored in - * crypto_key_version. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this resource was created. The granularity - * is in seconds. Timestamp.nanos will always be 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\Inventory\V1\KeyTrackingService::initOnce(); - parent::__construct($data); - } - - /** - * The full resource name of the resource. - * Example: - * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The full resource name of the resource. - * Example: - * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. - * - * 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; - } - - /** - * Format: `projects/{PROJECT_NUMBER}`. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Format: `projects/{PROJECT_NUMBER}`. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * The ID of the project that owns the resource. - * - * Generated from protobuf field string project_id = 9; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * The ID of the project that owns the resource. - * - * Generated from protobuf field string project_id = 9; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * The Cloud product that owns the resource. - * Example: `compute` - * - * Generated from protobuf field string cloud_product = 8; - * @return string - */ - public function getCloudProduct() - { - return $this->cloud_product; - } - - /** - * The Cloud product that owns the resource. - * Example: `compute` - * - * Generated from protobuf field string cloud_product = 8; - * @param string $var - * @return $this - */ - public function setCloudProduct($var) - { - GPBUtil::checkString($var, True); - $this->cloud_product = $var; - - return $this; - } - - /** - * Example: `compute.googleapis.com/Disk` - * - * Generated from protobuf field string resource_type = 3; - * @return string - */ - public function getResourceType() - { - return $this->resource_type; - } - - /** - * Example: `compute.googleapis.com/Disk` - * - * Generated from protobuf field string resource_type = 3; - * @param string $var - * @return $this - */ - public function setResourceType($var) - { - GPBUtil::checkString($var, True); - $this->resource_type = $var; - - return $this; - } - - /** - * Location can be `global`, regional like `us-east1`, or zonal like - * `us-west1-b`. - * - * Generated from protobuf field string location = 4; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Location can be `global`, regional like `us-east1`, or zonal like - * `us-west1-b`. - * - * Generated from protobuf field string location = 4; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * A key-value pair of the resource's labels (v1) to their values. - * - * Generated from protobuf field map labels = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * A key-value pair of the resource's labels (v1) to their values. - * - * Generated from protobuf field map labels = 5; - * @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; - } - - /** - * The name of the Cloud KMS - * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) - * used to protect this resource via CMEK. This field is empty if the - * Google Cloud product owning the resource does not provide key version data - * to Asset Inventory. If there are multiple key versions protecting the - * resource, then this is same value as the first element of - * crypto_key_versions. - * - * Generated from protobuf field string crypto_key_version = 6 [(.google.api.resource_reference) = { - * @return string - */ - public function getCryptoKeyVersion() - { - return $this->crypto_key_version; - } - - /** - * The name of the Cloud KMS - * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) - * used to protect this resource via CMEK. This field is empty if the - * Google Cloud product owning the resource does not provide key version data - * to Asset Inventory. If there are multiple key versions protecting the - * resource, then this is same value as the first element of - * crypto_key_versions. - * - * Generated from protobuf field string crypto_key_version = 6 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCryptoKeyVersion($var) - { - GPBUtil::checkString($var, True); - $this->crypto_key_version = $var; - - return $this; - } - - /** - * The names of the Cloud KMS - * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) - * used to protect this resource via CMEK. This field is empty if the - * Google Cloud product owning the resource does not provide key versions data - * to Asset Inventory. The first element of this field is stored in - * crypto_key_version. - * - * Generated from protobuf field repeated string crypto_key_versions = 10 [(.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCryptoKeyVersions() - { - return $this->crypto_key_versions; - } - - /** - * The names of the Cloud KMS - * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) - * used to protect this resource via CMEK. This field is empty if the - * Google Cloud product owning the resource does not provide key versions data - * to Asset Inventory. The first element of this field is stored in - * crypto_key_version. - * - * Generated from protobuf field repeated string crypto_key_versions = 10 [(.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCryptoKeyVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->crypto_key_versions = $arr; - - return $this; - } - - /** - * Output only. The time at which this resource was created. The granularity - * is in seconds. Timestamp.nanos will always be 0. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.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 resource was created. The granularity - * is in seconds. Timestamp.nanos will always be 0. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.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/KmsInventory/v1/proto/src/Google/Cloud/Kms/Inventory/V1/ProtectedResourcesSummary.php b/owl-bot-staging/KmsInventory/v1/proto/src/Google/Cloud/Kms/Inventory/V1/ProtectedResourcesSummary.php deleted file mode 100644 index 6bc4e0544967..000000000000 --- a/owl-bot-staging/KmsInventory/v1/proto/src/Google/Cloud/Kms/Inventory/V1/ProtectedResourcesSummary.php +++ /dev/null @@ -1,254 +0,0 @@ -google.cloud.kms.inventory.v1.ProtectedResourcesSummary - */ -class ProtectedResourcesSummary extends \Google\Protobuf\Internal\Message -{ - /** - * The full name of the ProtectedResourcesSummary resource. - * Example: - * projects/test-project/locations/us/keyRings/test-keyring/cryptoKeys/test-key/protectedResourcesSummary - * - * Generated from protobuf field string name = 5; - */ - protected $name = ''; - /** - * The total number of protected resources in the same Cloud organization as - * the key. - * - * Generated from protobuf field int64 resource_count = 1; - */ - protected $resource_count = 0; - /** - * The number of distinct Cloud projects in the same Cloud organization as the - * key that have resources protected by the key. - * - * Generated from protobuf field int32 project_count = 2; - */ - protected $project_count = 0; - /** - * The number of resources protected by the key grouped by resource type. - * - * Generated from protobuf field map resource_types = 3; - */ - private $resource_types; - /** - * The number of resources protected by the key grouped by Cloud product. - * - * Generated from protobuf field map cloud_products = 6; - */ - private $cloud_products; - /** - * The number of resources protected by the key grouped by region. - * - * Generated from protobuf field map locations = 4; - */ - private $locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The full name of the ProtectedResourcesSummary resource. - * Example: - * projects/test-project/locations/us/keyRings/test-keyring/cryptoKeys/test-key/protectedResourcesSummary - * @type int|string $resource_count - * The total number of protected resources in the same Cloud organization as - * the key. - * @type int $project_count - * The number of distinct Cloud projects in the same Cloud organization as the - * key that have resources protected by the key. - * @type array|\Google\Protobuf\Internal\MapField $resource_types - * The number of resources protected by the key grouped by resource type. - * @type array|\Google\Protobuf\Internal\MapField $cloud_products - * The number of resources protected by the key grouped by Cloud product. - * @type array|\Google\Protobuf\Internal\MapField $locations - * The number of resources protected by the key grouped by region. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\Inventory\V1\KeyTrackingService::initOnce(); - parent::__construct($data); - } - - /** - * The full name of the ProtectedResourcesSummary resource. - * Example: - * projects/test-project/locations/us/keyRings/test-keyring/cryptoKeys/test-key/protectedResourcesSummary - * - * Generated from protobuf field string name = 5; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The full name of the ProtectedResourcesSummary resource. - * Example: - * projects/test-project/locations/us/keyRings/test-keyring/cryptoKeys/test-key/protectedResourcesSummary - * - * Generated from protobuf field string name = 5; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The total number of protected resources in the same Cloud organization as - * the key. - * - * Generated from protobuf field int64 resource_count = 1; - * @return int|string - */ - public function getResourceCount() - { - return $this->resource_count; - } - - /** - * The total number of protected resources in the same Cloud organization as - * the key. - * - * Generated from protobuf field int64 resource_count = 1; - * @param int|string $var - * @return $this - */ - public function setResourceCount($var) - { - GPBUtil::checkInt64($var); - $this->resource_count = $var; - - return $this; - } - - /** - * The number of distinct Cloud projects in the same Cloud organization as the - * key that have resources protected by the key. - * - * Generated from protobuf field int32 project_count = 2; - * @return int - */ - public function getProjectCount() - { - return $this->project_count; - } - - /** - * The number of distinct Cloud projects in the same Cloud organization as the - * key that have resources protected by the key. - * - * Generated from protobuf field int32 project_count = 2; - * @param int $var - * @return $this - */ - public function setProjectCount($var) - { - GPBUtil::checkInt32($var); - $this->project_count = $var; - - return $this; - } - - /** - * The number of resources protected by the key grouped by resource type. - * - * Generated from protobuf field map resource_types = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getResourceTypes() - { - return $this->resource_types; - } - - /** - * The number of resources protected by the key grouped by resource type. - * - * Generated from protobuf field map resource_types = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setResourceTypes($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT64); - $this->resource_types = $arr; - - return $this; - } - - /** - * The number of resources protected by the key grouped by Cloud product. - * - * Generated from protobuf field map cloud_products = 6; - * @return \Google\Protobuf\Internal\MapField - */ - public function getCloudProducts() - { - return $this->cloud_products; - } - - /** - * The number of resources protected by the key grouped by Cloud product. - * - * Generated from protobuf field map cloud_products = 6; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setCloudProducts($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT64); - $this->cloud_products = $arr; - - return $this; - } - - /** - * The number of resources protected by the key grouped by region. - * - * Generated from protobuf field map locations = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLocations() - { - return $this->locations; - } - - /** - * The number of resources protected by the key grouped by region. - * - * Generated from protobuf field map locations = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLocations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT64); - $this->locations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/KmsInventory/v1/proto/src/Google/Cloud/Kms/Inventory/V1/SearchProtectedResourcesRequest.php b/owl-bot-staging/KmsInventory/v1/proto/src/Google/Cloud/Kms/Inventory/V1/SearchProtectedResourcesRequest.php deleted file mode 100644 index 99b4f92617c6..000000000000 --- a/owl-bot-staging/KmsInventory/v1/proto/src/Google/Cloud/Kms/Inventory/V1/SearchProtectedResourcesRequest.php +++ /dev/null @@ -1,302 +0,0 @@ -google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest - */ -class SearchProtectedResourcesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the organization. - * Example: organizations/123 - * - * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $scope = ''; - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field string crypto_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $crypto_key = ''; - /** - * The maximum number of resources to return. The service may return fewer - * than this value. - * If unspecified, at most 500 resources will be returned. - * The maximum value is 500; values above 500 will be coerced to 500. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * A page token, received from a previous - * [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - /** - * Optional. A list of resource types that this request searches for. If - * empty, it will search all the [trackable resource - * types](https://cloud.google.com/kms/docs/view-key-usage#tracked-resource-types). - * Regular expressions are also supported. For example: - * * `compute.googleapis.com.*` snapshots resources whose type starts - * with `compute.googleapis.com`. - * * `.*Image` snapshots resources whose type ends with `Image`. - * * `.*Image.*` snapshots resources whose type contains `Image`. - * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported - * regular expression syntax. If the regular expression does not match any - * supported resource type, an INVALID_ARGUMENT error will be returned. - * - * Generated from protobuf field repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $resource_types; - - /** - * @param string $scope Required. Resource name of the organization. - * Example: organizations/123 - * Please see {@see KeyTrackingServiceClient::organizationName()} for help formatting this field. - * @param string $cryptoKey Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * @return \Google\Cloud\Kms\Inventory\V1\SearchProtectedResourcesRequest - * - * @experimental - */ - public static function build(string $scope, string $cryptoKey): self - { - return (new self()) - ->setScope($scope) - ->setCryptoKey($cryptoKey); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $scope - * Required. Resource name of the organization. - * Example: organizations/123 - * @type string $crypto_key - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * @type int $page_size - * The maximum number of resources to return. The service may return fewer - * than this value. - * If unspecified, at most 500 resources will be returned. - * The maximum value is 500; values above 500 will be coerced to 500. - * @type string $page_token - * A page token, received from a previous - * [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] - * must match the call that provided the page token. - * @type array|\Google\Protobuf\Internal\RepeatedField $resource_types - * Optional. A list of resource types that this request searches for. If - * empty, it will search all the [trackable resource - * types](https://cloud.google.com/kms/docs/view-key-usage#tracked-resource-types). - * Regular expressions are also supported. For example: - * * `compute.googleapis.com.*` snapshots resources whose type starts - * with `compute.googleapis.com`. - * * `.*Image` snapshots resources whose type ends with `Image`. - * * `.*Image.*` snapshots resources whose type contains `Image`. - * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported - * regular expression syntax. If the regular expression does not match any - * supported resource type, an INVALID_ARGUMENT error will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\Inventory\V1\KeyTrackingService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the organization. - * Example: organizations/123 - * - * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * Required. Resource name of the organization. - * Example: organizations/123 - * - * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field string crypto_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getCryptoKey() - { - return $this->crypto_key; - } - - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field string crypto_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCryptoKey($var) - { - GPBUtil::checkString($var, True); - $this->crypto_key = $var; - - return $this; - } - - /** - * The maximum number of resources to return. The service may return fewer - * than this value. - * If unspecified, at most 500 resources will be returned. - * The maximum value is 500; values above 500 will be coerced to 500. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of resources to return. The service may return fewer - * than this value. - * If unspecified, at most 500 resources will be returned. - * The maximum value is 500; values above 500 will be coerced to 500. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous - * [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous - * [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 4; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. A list of resource types that this request searches for. If - * empty, it will search all the [trackable resource - * types](https://cloud.google.com/kms/docs/view-key-usage#tracked-resource-types). - * Regular expressions are also supported. For example: - * * `compute.googleapis.com.*` snapshots resources whose type starts - * with `compute.googleapis.com`. - * * `.*Image` snapshots resources whose type ends with `Image`. - * * `.*Image.*` snapshots resources whose type contains `Image`. - * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported - * regular expression syntax. If the regular expression does not match any - * supported resource type, an INVALID_ARGUMENT error will be returned. - * - * Generated from protobuf field repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResourceTypes() - { - return $this->resource_types; - } - - /** - * Optional. A list of resource types that this request searches for. If - * empty, it will search all the [trackable resource - * types](https://cloud.google.com/kms/docs/view-key-usage#tracked-resource-types). - * Regular expressions are also supported. For example: - * * `compute.googleapis.com.*` snapshots resources whose type starts - * with `compute.googleapis.com`. - * * `.*Image` snapshots resources whose type ends with `Image`. - * * `.*Image.*` snapshots resources whose type contains `Image`. - * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported - * regular expression syntax. If the regular expression does not match any - * supported resource type, an INVALID_ARGUMENT error will be returned. - * - * Generated from protobuf field repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResourceTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->resource_types = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/KmsInventory/v1/proto/src/Google/Cloud/Kms/Inventory/V1/SearchProtectedResourcesResponse.php b/owl-bot-staging/KmsInventory/v1/proto/src/Google/Cloud/Kms/Inventory/V1/SearchProtectedResourcesResponse.php deleted file mode 100644 index d587533d91d3..000000000000 --- a/owl-bot-staging/KmsInventory/v1/proto/src/Google/Cloud/Kms/Inventory/V1/SearchProtectedResourcesResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse - */ -class SearchProtectedResourcesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Protected resources for this page. - * - * Generated from protobuf field repeated .google.cloud.kms.inventory.v1.ProtectedResource protected_resources = 1; - */ - private $protected_resources; - /** - * A token that can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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\Inventory\V1\ProtectedResource>|\Google\Protobuf\Internal\RepeatedField $protected_resources - * Protected resources for this page. - * @type string $next_page_token - * A token that can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\Inventory\V1\KeyTrackingService::initOnce(); - parent::__construct($data); - } - - /** - * Protected resources for this page. - * - * Generated from protobuf field repeated .google.cloud.kms.inventory.v1.ProtectedResource protected_resources = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProtectedResources() - { - return $this->protected_resources; - } - - /** - * Protected resources for this page. - * - * Generated from protobuf field repeated .google.cloud.kms.inventory.v1.ProtectedResource protected_resources = 1; - * @param array<\Google\Cloud\Kms\Inventory\V1\ProtectedResource>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProtectedResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\Inventory\V1\ProtectedResource::class); - $this->protected_resources = $arr; - - return $this; - } - - /** - * A token that can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token that can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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/KmsInventory/v1/samples/V1/KeyDashboardServiceClient/list_crypto_keys.php b/owl-bot-staging/KmsInventory/v1/samples/V1/KeyDashboardServiceClient/list_crypto_keys.php deleted file mode 100644 index 71829ee87406..000000000000 --- a/owl-bot-staging/KmsInventory/v1/samples/V1/KeyDashboardServiceClient/list_crypto_keys.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $keyDashboardServiceClient->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 = KeyDashboardServiceClient::projectName('[PROJECT]'); - - list_crypto_keys_sample($formattedParent); -} -// [END kmsinventory_v1_generated_KeyDashboardService_ListCryptoKeys_sync] diff --git a/owl-bot-staging/KmsInventory/v1/samples/V1/KeyTrackingServiceClient/get_protected_resources_summary.php b/owl-bot-staging/KmsInventory/v1/samples/V1/KeyTrackingServiceClient/get_protected_resources_summary.php deleted file mode 100644 index 11d686e4afab..000000000000 --- a/owl-bot-staging/KmsInventory/v1/samples/V1/KeyTrackingServiceClient/get_protected_resources_summary.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ProtectedResourcesSummary $response */ - $response = $keyTrackingServiceClient->getProtectedResourcesSummary($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 = KeyTrackingServiceClient::protectedResourcesSummaryName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]' - ); - - get_protected_resources_summary_sample($formattedName); -} -// [END kmsinventory_v1_generated_KeyTrackingService_GetProtectedResourcesSummary_sync] diff --git a/owl-bot-staging/KmsInventory/v1/samples/V1/KeyTrackingServiceClient/search_protected_resources.php b/owl-bot-staging/KmsInventory/v1/samples/V1/KeyTrackingServiceClient/search_protected_resources.php deleted file mode 100644 index 9a1f82090fac..000000000000 --- a/owl-bot-staging/KmsInventory/v1/samples/V1/KeyTrackingServiceClient/search_protected_resources.php +++ /dev/null @@ -1,82 +0,0 @@ -setScope($formattedScope) - ->setCryptoKey($cryptoKey); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $keyTrackingServiceClient->searchProtectedResources($request); - - /** @var ProtectedResource $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 -{ - $formattedScope = KeyTrackingServiceClient::organizationName('[ORGANIZATION]'); - $cryptoKey = '[CRYPTO_KEY]'; - - search_protected_resources_sample($formattedScope, $cryptoKey); -} -// [END kmsinventory_v1_generated_KeyTrackingService_SearchProtectedResources_sync] diff --git a/owl-bot-staging/KmsInventory/v1/src/V1/Client/KeyDashboardServiceClient.php b/owl-bot-staging/KmsInventory/v1/src/V1/Client/KeyDashboardServiceClient.php deleted file mode 100644 index 31c7940279b8..000000000000 --- a/owl-bot-staging/KmsInventory/v1/src/V1/Client/KeyDashboardServiceClient.php +++ /dev/null @@ -1,241 +0,0 @@ - listCryptoKeysAsync(ListCryptoKeysRequest $request, array $optionalArgs = []) - */ -final class KeyDashboardServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.kms.inventory.v1.KeyDashboardService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'kmsinventory.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'kmsinventory.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', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/key_dashboard_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/key_dashboard_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/key_dashboard_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/key_dashboard_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * 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, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - project: projects/{project} - * - * 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 $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 'kmsinventory.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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 cryptographic keys managed by Cloud KMS in a given Cloud project. - * Note that this data is sourced from snapshots, meaning it may not - * completely reflect the actual state of key metadata at call time. - * - * The async variant is {@see KeyDashboardServiceClient::listCryptoKeysAsync()} . - * - * @example samples/V1/KeyDashboardServiceClient/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); - } -} diff --git a/owl-bot-staging/KmsInventory/v1/src/V1/Client/KeyTrackingServiceClient.php b/owl-bot-staging/KmsInventory/v1/src/V1/Client/KeyTrackingServiceClient.php deleted file mode 100644 index 63d299d3fc3a..000000000000 --- a/owl-bot-staging/KmsInventory/v1/src/V1/Client/KeyTrackingServiceClient.php +++ /dev/null @@ -1,345 +0,0 @@ - getProtectedResourcesSummaryAsync(GetProtectedResourcesSummaryRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchProtectedResourcesAsync(SearchProtectedResourcesRequest $request, array $optionalArgs = []) - */ -final class KeyTrackingServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.kms.inventory.v1.KeyTrackingService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'kmsinventory.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'kmsinventory.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', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/key_tracking_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/key_tracking_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/key_tracking_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/key_tracking_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - */ - public static function organizationName(string $organization): string - { - return self::getPathTemplate('organization')->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_key_ring_crypto_key_crypto_key_version_protectedResourcesSummary - * resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * @param string $cryptoKeyVersion - * - * @return string The formatted project_location_key_ring_crypto_key_crypto_key_version_protectedResourcesSummary resource. - */ - public static function projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryName(string $project, string $location, string $keyRing, string $cryptoKey, string $cryptoKeyVersion): string - { - return self::getPathTemplate('projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary')->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 - * project_location_key_ring_crypto_key_protectedResourcesSummary resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * - * @return string The formatted project_location_key_ring_crypto_key_protectedResourcesSummary resource. - */ - public static function projectLocationKeyRingCryptoKeyProtectedResourcesSummaryName(string $project, string $location, string $keyRing, string $cryptoKey): string - { - return self::getPathTemplate('projectLocationKeyRingCryptoKeyProtectedResourcesSummary')->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * protected_resources_summary resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * - * @return string The formatted protected_resources_summary resource. - */ - public static function protectedResourcesSummaryName(string $project, string $location, string $keyRing, string $cryptoKey): string - { - return self::getPathTemplate('protectedResourcesSummary')->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - organization: organizations/{organization} - * - projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}/protectedResourcesSummary - * - projectLocationKeyRingCryptoKeyProtectedResourcesSummary: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/protectedResourcesSummary - * - protectedResourcesSummary: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/protectedResourcesSummary - * - * 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 $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 'kmsinventory.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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 aggregate information about the resources protected by the given - * Cloud KMS [CryptoKey][google.cloud.kms.v1.CryptoKey]. Only resources within - * the same Cloud organization as the key will be returned. The project that - * holds the key must be part of an organization in order for this call to - * succeed. - * - * The async variant is - * {@see KeyTrackingServiceClient::getProtectedResourcesSummaryAsync()} . - * - * @example samples/V1/KeyTrackingServiceClient/get_protected_resources_summary.php - * - * @param GetProtectedResourcesSummaryRequest $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 ProtectedResourcesSummary - * - * @throws ApiException Thrown if the API call fails. - */ - public function getProtectedResourcesSummary(GetProtectedResourcesSummaryRequest $request, array $callOptions = []): ProtectedResourcesSummary - { - return $this->startApiCall('GetProtectedResourcesSummary', $request, $callOptions)->wait(); - } - - /** - * Returns metadata about the resources protected by the given Cloud KMS - * [CryptoKey][google.cloud.kms.v1.CryptoKey] in the given Cloud organization. - * - * The async variant is - * {@see KeyTrackingServiceClient::searchProtectedResourcesAsync()} . - * - * @example samples/V1/KeyTrackingServiceClient/search_protected_resources.php - * - * @param SearchProtectedResourcesRequest $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 searchProtectedResources(SearchProtectedResourcesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('SearchProtectedResources', $request, $callOptions); - } -} diff --git a/owl-bot-staging/KmsInventory/v1/src/V1/gapic_metadata.json b/owl-bot-staging/KmsInventory/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 033466f46e5e..000000000000 --- a/owl-bot-staging/KmsInventory/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.kms.inventory.v1", - "libraryPackage": "Google\\Cloud\\Kms\\Inventory\\V1", - "services": { - "KeyDashboardService": { - "clients": { - "grpc": { - "libraryClient": "KeyDashboardServiceGapicClient", - "rpcs": { - "ListCryptoKeys": { - "methods": [ - "listCryptoKeys" - ] - } - } - } - } - }, - "KeyTrackingService": { - "clients": { - "grpc": { - "libraryClient": "KeyTrackingServiceGapicClient", - "rpcs": { - "GetProtectedResourcesSummary": { - "methods": [ - "getProtectedResourcesSummary" - ] - }, - "SearchProtectedResources": { - "methods": [ - "searchProtectedResources" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/KmsInventory/v1/src/V1/resources/key_dashboard_service_client_config.json b/owl-bot-staging/KmsInventory/v1/src/V1/resources/key_dashboard_service_client_config.json deleted file mode 100644 index dbe0e0bfee52..000000000000 --- a/owl-bot-staging/KmsInventory/v1/src/V1/resources/key_dashboard_service_client_config.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "interfaces": { - "google.cloud.kms.inventory.v1.KeyDashboardService": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [] - }, - "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 - } - }, - "methods": { - "ListCryptoKeys": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/KmsInventory/v1/src/V1/resources/key_dashboard_service_descriptor_config.php b/owl-bot-staging/KmsInventory/v1/src/V1/resources/key_dashboard_service_descriptor_config.php deleted file mode 100644 index 895a524b43fa..000000000000 --- a/owl-bot-staging/KmsInventory/v1/src/V1/resources/key_dashboard_service_descriptor_config.php +++ /dev/null @@ -1,51 +0,0 @@ - [ - 'google.cloud.kms.inventory.v1.KeyDashboardService' => [ - 'ListCryptoKeys' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCryptoKeys', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Kms\Inventory\V1\ListCryptoKeysResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'project' => 'projects/{project}', - ], - ], - ], -]; diff --git a/owl-bot-staging/KmsInventory/v1/src/V1/resources/key_dashboard_service_rest_client_config.php b/owl-bot-staging/KmsInventory/v1/src/V1/resources/key_dashboard_service_rest_client_config.php deleted file mode 100644 index f6923d447c85..000000000000 --- a/owl-bot-staging/KmsInventory/v1/src/V1/resources/key_dashboard_service_rest_client_config.php +++ /dev/null @@ -1,40 +0,0 @@ - [ - 'google.cloud.kms.inventory.v1.KeyDashboardService' => [ - 'ListCryptoKeys' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/cryptoKeys', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/KmsInventory/v1/src/V1/resources/key_tracking_service_client_config.json b/owl-bot-staging/KmsInventory/v1/src/V1/resources/key_tracking_service_client_config.json deleted file mode 100644 index 678f0fd92d49..000000000000 --- a/owl-bot-staging/KmsInventory/v1/src/V1/resources/key_tracking_service_client_config.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "interfaces": { - "google.cloud.kms.inventory.v1.KeyTrackingService": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [] - }, - "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 - } - }, - "methods": { - "GetProtectedResourcesSummary": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "SearchProtectedResources": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/KmsInventory/v1/src/V1/resources/key_tracking_service_descriptor_config.php b/owl-bot-staging/KmsInventory/v1/src/V1/resources/key_tracking_service_descriptor_config.php deleted file mode 100644 index 7eff8a30e2e8..000000000000 --- a/owl-bot-staging/KmsInventory/v1/src/V1/resources/key_tracking_service_descriptor_config.php +++ /dev/null @@ -1,66 +0,0 @@ - [ - 'google.cloud.kms.inventory.v1.KeyTrackingService' => [ - 'GetProtectedResourcesSummary' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Kms\Inventory\V1\ProtectedResourcesSummary', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'SearchProtectedResources' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getProtectedResources', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Kms\Inventory\V1\SearchProtectedResourcesResponse', - 'headerParams' => [ - [ - 'keyName' => 'scope', - 'fieldAccessors' => [ - 'getScope', - ], - ], - ], - ], - 'templateMap' => [ - 'organization' => 'organizations/{organization}', - 'projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}/protectedResourcesSummary', - 'projectLocationKeyRingCryptoKeyProtectedResourcesSummary' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/protectedResourcesSummary', - 'protectedResourcesSummary' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/protectedResourcesSummary', - ], - ], - ], -]; diff --git a/owl-bot-staging/KmsInventory/v1/src/V1/resources/key_tracking_service_rest_client_config.php b/owl-bot-staging/KmsInventory/v1/src/V1/resources/key_tracking_service_rest_client_config.php deleted file mode 100644 index 3ab9ce3b17fc..000000000000 --- a/owl-bot-staging/KmsInventory/v1/src/V1/resources/key_tracking_service_rest_client_config.php +++ /dev/null @@ -1,51 +0,0 @@ - [ - 'google.cloud.kms.inventory.v1.KeyTrackingService' => [ - 'GetProtectedResourcesSummary' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/**}/protectedResourcesSummary', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SearchProtectedResources' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{scope=organizations/*}/protectedResources:search', - 'placeholders' => [ - 'scope' => [ - 'getters' => [ - 'getScope', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/KmsInventory/v1/tests/Unit/V1/Client/KeyDashboardServiceClientTest.php b/owl-bot-staging/KmsInventory/v1/tests/Unit/V1/Client/KeyDashboardServiceClientTest.php deleted file mode 100644 index 8f36f423c863..000000000000 --- a/owl-bot-staging/KmsInventory/v1/tests/Unit/V1/Client/KeyDashboardServiceClientTest.php +++ /dev/null @@ -1,172 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return KeyDashboardServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new KeyDashboardServiceClient($options); - } - - /** @test */ - public function listCryptoKeysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $cryptoKeysElement = new CryptoKey(); - $cryptoKeys = [ - $cryptoKeysElement, - ]; - $expectedResponse = new ListCryptoKeysResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCryptoKeys($cryptoKeys); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $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.inventory.v1.KeyDashboardService/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->projectName('[PROJECT]'); - $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 listCryptoKeysAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $cryptoKeysElement = new CryptoKey(); - $cryptoKeys = [ - $cryptoKeysElement, - ]; - $expectedResponse = new ListCryptoKeysResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCryptoKeys($cryptoKeys); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListCryptoKeysRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listCryptoKeysAsync($request)->wait(); - $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.inventory.v1.KeyDashboardService/ListCryptoKeys', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/KmsInventory/v1/tests/Unit/V1/Client/KeyTrackingServiceClientTest.php b/owl-bot-staging/KmsInventory/v1/tests/Unit/V1/Client/KeyTrackingServiceClientTest.php deleted file mode 100644 index faa7ed3526f2..000000000000 --- a/owl-bot-staging/KmsInventory/v1/tests/Unit/V1/Client/KeyTrackingServiceClientTest.php +++ /dev/null @@ -1,244 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return KeyTrackingServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new KeyTrackingServiceClient($options); - } - - /** @test */ - public function getProtectedResourcesSummaryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $resourceCount = 287552926; - $projectCount = 953448343; - $expectedResponse = new ProtectedResourcesSummary(); - $expectedResponse->setName($name2); - $expectedResponse->setResourceCount($resourceCount); - $expectedResponse->setProjectCount($projectCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->protectedResourcesSummaryName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $request = (new GetProtectedResourcesSummaryRequest()) - ->setName($formattedName); - $response = $gapicClient->getProtectedResourcesSummary($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.inventory.v1.KeyTrackingService/GetProtectedResourcesSummary', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProtectedResourcesSummaryExceptionTest() - { - $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->protectedResourcesSummaryName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $request = (new GetProtectedResourcesSummaryRequest()) - ->setName($formattedName); - try { - $gapicClient->getProtectedResourcesSummary($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 searchProtectedResourcesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $protectedResourcesElement = new ProtectedResource(); - $protectedResources = [ - $protectedResourcesElement, - ]; - $expectedResponse = new SearchProtectedResourcesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setProtectedResources($protectedResources); - $transport->addResponse($expectedResponse); - // Mock request - $formattedScope = $gapicClient->organizationName('[ORGANIZATION]'); - $cryptoKey = 'cryptoKey-1992067615'; - $request = (new SearchProtectedResourcesRequest()) - ->setScope($formattedScope) - ->setCryptoKey($cryptoKey); - $response = $gapicClient->searchProtectedResources($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getProtectedResources()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.inventory.v1.KeyTrackingService/SearchProtectedResources', $actualFuncCall); - $actualValue = $actualRequestObject->getScope(); - $this->assertProtobufEquals($formattedScope, $actualValue); - $actualValue = $actualRequestObject->getCryptoKey(); - $this->assertProtobufEquals($cryptoKey, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchProtectedResourcesExceptionTest() - { - $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 - $formattedScope = $gapicClient->organizationName('[ORGANIZATION]'); - $cryptoKey = 'cryptoKey-1992067615'; - $request = (new SearchProtectedResourcesRequest()) - ->setScope($formattedScope) - ->setCryptoKey($cryptoKey); - try { - $gapicClient->searchProtectedResources($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 getProtectedResourcesSummaryAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $resourceCount = 287552926; - $projectCount = 953448343; - $expectedResponse = new ProtectedResourcesSummary(); - $expectedResponse->setName($name2); - $expectedResponse->setResourceCount($resourceCount); - $expectedResponse->setProjectCount($projectCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->protectedResourcesSummaryName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $request = (new GetProtectedResourcesSummaryRequest()) - ->setName($formattedName); - $response = $gapicClient->getProtectedResourcesSummaryAsync($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.inventory.v1.KeyTrackingService/GetProtectedResourcesSummary', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Language/v1/proto/src/GPBMetadata/Google/Cloud/Language/V1/LanguageService.php b/owl-bot-staging/Language/v1/proto/src/GPBMetadata/Google/Cloud/Language/V1/LanguageService.php deleted file mode 100644 index cbde468cf4ba..000000000000 Binary files a/owl-bot-staging/Language/v1/proto/src/GPBMetadata/Google/Cloud/Language/V1/LanguageService.php and /dev/null differ diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitiesRequest.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitiesRequest.php deleted file mode 100644 index 484f7cd05f8b..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitiesRequest.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.language.v1.AnalyzeEntitiesRequest - */ -class AnalyzeEntitiesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - */ - protected $encoding_type = 0; - - /** - * @param \Google\Cloud\Language\V1\Document $document Required. Input document. - * @param int $encodingType The encoding type used by the API to calculate offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1\EncodingType} - * - * @return \Google\Cloud\Language\V1\AnalyzeEntitiesRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Language\V1\Document $document, int $encodingType): self - { - return (new self()) - ->setDocument($document) - ->setEncodingType($encodingType); - } - - /** - * @param \Google\Cloud\Language\V1\Document $document Required. Input document. - * - * @return \Google\Cloud\Language\V1\AnalyzeEntitiesRequest - * - * @experimental - */ - public static function buildFromDocument(\Google\Cloud\Language\V1\Document $document): self - { - return (new self()) - ->setDocument($document); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\Document $document - * Required. Input document. - * @type int $encoding_type - * The encoding type used by the API to calculate offsets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitiesResponse.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitiesResponse.php deleted file mode 100644 index ef8b012b81de..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitiesResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.language.v1.AnalyzeEntitiesResponse - */ -class AnalyzeEntitiesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The recognized entities in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 1; - */ - private $entities; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field - * for more details. - * - * Generated from protobuf field string language = 2; - */ - protected $language = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * The recognized entities in the input document. - * @type string $language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field - * for more details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The recognized entities in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * The recognized entities in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 1; - * @param array<\Google\Cloud\Language\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field - * for more details. - * - * Generated from protobuf field string language = 2; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field - * for more details. - * - * Generated from protobuf field string language = 2; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitySentimentRequest.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitySentimentRequest.php deleted file mode 100644 index e804e4b00e3c..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitySentimentRequest.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.language.v1.AnalyzeEntitySentimentRequest - */ -class AnalyzeEntitySentimentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - */ - protected $encoding_type = 0; - - /** - * @param \Google\Cloud\Language\V1\Document $document Required. Input document. - * @param int $encodingType The encoding type used by the API to calculate offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1\EncodingType} - * - * @return \Google\Cloud\Language\V1\AnalyzeEntitySentimentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Language\V1\Document $document, int $encodingType): self - { - return (new self()) - ->setDocument($document) - ->setEncodingType($encodingType); - } - - /** - * @param \Google\Cloud\Language\V1\Document $document Required. Input document. - * - * @return \Google\Cloud\Language\V1\AnalyzeEntitySentimentRequest - * - * @experimental - */ - public static function buildFromDocument(\Google\Cloud\Language\V1\Document $document): self - { - return (new self()) - ->setDocument($document); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\Document $document - * Required. Input document. - * @type int $encoding_type - * The encoding type used by the API to calculate offsets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitySentimentResponse.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitySentimentResponse.php deleted file mode 100644 index af5c81037f0e..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitySentimentResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.language.v1.AnalyzeEntitySentimentResponse - */ -class AnalyzeEntitySentimentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The recognized entities in the input document with associated sentiments. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 1; - */ - private $entities; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field - * for more details. - * - * Generated from protobuf field string language = 2; - */ - protected $language = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * The recognized entities in the input document with associated sentiments. - * @type string $language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field - * for more details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The recognized entities in the input document with associated sentiments. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * The recognized entities in the input document with associated sentiments. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 1; - * @param array<\Google\Cloud\Language\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field - * for more details. - * - * Generated from protobuf field string language = 2; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field - * for more details. - * - * Generated from protobuf field string language = 2; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSentimentRequest.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSentimentRequest.php deleted file mode 100644 index 511269b456fb..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSentimentRequest.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.language.v1.AnalyzeSentimentRequest - */ -class AnalyzeSentimentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The encoding type used by the API to calculate sentence offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - */ - protected $encoding_type = 0; - - /** - * @param \Google\Cloud\Language\V1\Document $document Required. Input document. - * @param int $encodingType The encoding type used by the API to calculate sentence offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1\EncodingType} - * - * @return \Google\Cloud\Language\V1\AnalyzeSentimentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Language\V1\Document $document, int $encodingType): self - { - return (new self()) - ->setDocument($document) - ->setEncodingType($encodingType); - } - - /** - * @param \Google\Cloud\Language\V1\Document $document Required. Input document. - * - * @return \Google\Cloud\Language\V1\AnalyzeSentimentRequest - * - * @experimental - */ - public static function buildFromDocument(\Google\Cloud\Language\V1\Document $document): self - { - return (new self()) - ->setDocument($document); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\Document $document - * Required. Input document. - * @type int $encoding_type - * The encoding type used by the API to calculate sentence offsets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate sentence offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate sentence offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSentimentResponse.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSentimentResponse.php deleted file mode 100644 index fb1beedbc146..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSentimentResponse.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.language.v1.AnalyzeSentimentResponse - */ -class AnalyzeSentimentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The overall sentiment of the input document. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment document_sentiment = 1; - */ - protected $document_sentiment = null; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field - * for more details. - * - * Generated from protobuf field string language = 2; - */ - protected $language = ''; - /** - * The sentiment for all the sentences in the document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 3; - */ - private $sentences; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\Sentiment $document_sentiment - * The overall sentiment of the input document. - * @type string $language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field - * for more details. - * @type array<\Google\Cloud\Language\V1\Sentence>|\Google\Protobuf\Internal\RepeatedField $sentences - * The sentiment for all the sentences in the document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The overall sentiment of the input document. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment document_sentiment = 1; - * @return \Google\Cloud\Language\V1\Sentiment|null - */ - public function getDocumentSentiment() - { - return $this->document_sentiment; - } - - public function hasDocumentSentiment() - { - return isset($this->document_sentiment); - } - - public function clearDocumentSentiment() - { - unset($this->document_sentiment); - } - - /** - * The overall sentiment of the input document. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment document_sentiment = 1; - * @param \Google\Cloud\Language\V1\Sentiment $var - * @return $this - */ - public function setDocumentSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Sentiment::class); - $this->document_sentiment = $var; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field - * for more details. - * - * Generated from protobuf field string language = 2; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field - * for more details. - * - * Generated from protobuf field string language = 2; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - - /** - * The sentiment for all the sentences in the document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSentences() - { - return $this->sentences; - } - - /** - * The sentiment for all the sentences in the document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 3; - * @param array<\Google\Cloud\Language\V1\Sentence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSentences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Sentence::class); - $this->sentences = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSyntaxRequest.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSyntaxRequest.php deleted file mode 100644 index d85748a9484a..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSyntaxRequest.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.language.v1.AnalyzeSyntaxRequest - */ -class AnalyzeSyntaxRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - */ - protected $encoding_type = 0; - - /** - * @param \Google\Cloud\Language\V1\Document $document Required. Input document. - * @param int $encodingType The encoding type used by the API to calculate offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1\EncodingType} - * - * @return \Google\Cloud\Language\V1\AnalyzeSyntaxRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Language\V1\Document $document, int $encodingType): self - { - return (new self()) - ->setDocument($document) - ->setEncodingType($encodingType); - } - - /** - * @param \Google\Cloud\Language\V1\Document $document Required. Input document. - * - * @return \Google\Cloud\Language\V1\AnalyzeSyntaxRequest - * - * @experimental - */ - public static function buildFromDocument(\Google\Cloud\Language\V1\Document $document): self - { - return (new self()) - ->setDocument($document); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\Document $document - * Required. Input document. - * @type int $encoding_type - * The encoding type used by the API to calculate offsets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSyntaxResponse.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSyntaxResponse.php deleted file mode 100644 index 9672f9f4b43a..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSyntaxResponse.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.language.v1.AnalyzeSyntaxResponse - */ -class AnalyzeSyntaxResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Sentences in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 1; - */ - private $sentences; - /** - * Tokens, along with their syntactic information, in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Token tokens = 2; - */ - private $tokens; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field - * for more details. - * - * Generated from protobuf field string language = 3; - */ - protected $language = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V1\Sentence>|\Google\Protobuf\Internal\RepeatedField $sentences - * Sentences in the input document. - * @type array<\Google\Cloud\Language\V1\Token>|\Google\Protobuf\Internal\RepeatedField $tokens - * Tokens, along with their syntactic information, in the input document. - * @type string $language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field - * for more details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Sentences in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSentences() - { - return $this->sentences; - } - - /** - * Sentences in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 1; - * @param array<\Google\Cloud\Language\V1\Sentence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSentences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Sentence::class); - $this->sentences = $arr; - - return $this; - } - - /** - * Tokens, along with their syntactic information, in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Token tokens = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTokens() - { - return $this->tokens; - } - - /** - * Tokens, along with their syntactic information, in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Token tokens = 2; - * @param array<\Google\Cloud\Language\V1\Token>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTokens($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Token::class); - $this->tokens = $arr; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field - * for more details. - * - * Generated from protobuf field string language = 3; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field - * for more details. - * - * Generated from protobuf field string language = 3; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest.php deleted file mode 100644 index e5b11c63f559..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.language.v1.AnnotateTextRequest - */ -class AnnotateTextRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * Required. The enabled features. - * - * Generated from protobuf field .google.cloud.language.v1.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $features = null; - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 3; - */ - protected $encoding_type = 0; - - /** - * @param \Google\Cloud\Language\V1\Document $document Required. Input document. - * @param \Google\Cloud\Language\V1\AnnotateTextRequest\Features $features Required. The enabled features. - * @param int $encodingType The encoding type used by the API to calculate offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1\EncodingType} - * - * @return \Google\Cloud\Language\V1\AnnotateTextRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Language\V1\Document $document, \Google\Cloud\Language\V1\AnnotateTextRequest\Features $features, int $encodingType): self - { - return (new self()) - ->setDocument($document) - ->setFeatures($features) - ->setEncodingType($encodingType); - } - - /** - * @param \Google\Cloud\Language\V1\Document $document Required. Input document. - * @param \Google\Cloud\Language\V1\AnnotateTextRequest\Features $features Required. The enabled features. - * - * @return \Google\Cloud\Language\V1\AnnotateTextRequest - * - * @experimental - */ - public static function buildFromDocumentFeatures(\Google\Cloud\Language\V1\Document $document, \Google\Cloud\Language\V1\AnnotateTextRequest\Features $features): self - { - return (new self()) - ->setDocument($document) - ->setFeatures($features); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\Document $document - * Required. Input document. - * @type \Google\Cloud\Language\V1\AnnotateTextRequest\Features $features - * Required. The enabled features. - * @type int $encoding_type - * The encoding type used by the API to calculate offsets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * Required. The enabled features. - * - * Generated from protobuf field .google.cloud.language.v1.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1\AnnotateTextRequest\Features|null - */ - public function getFeatures() - { - return $this->features; - } - - public function hasFeatures() - { - return isset($this->features); - } - - public function clearFeatures() - { - unset($this->features); - } - - /** - * Required. The enabled features. - * - * Generated from protobuf field .google.cloud.language.v1.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1\AnnotateTextRequest\Features $var - * @return $this - */ - public function setFeatures($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\AnnotateTextRequest\Features::class); - $this->features = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 3; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 3; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest/Features.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest/Features.php deleted file mode 100644 index 8ac338d34839..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest/Features.php +++ /dev/null @@ -1,289 +0,0 @@ -google.cloud.language.v1.AnnotateTextRequest.Features - */ -class Features extends \Google\Protobuf\Internal\Message -{ - /** - * Extract syntax information. - * - * Generated from protobuf field bool extract_syntax = 1; - */ - protected $extract_syntax = false; - /** - * Extract entities. - * - * Generated from protobuf field bool extract_entities = 2; - */ - protected $extract_entities = false; - /** - * Extract document-level sentiment. - * - * Generated from protobuf field bool extract_document_sentiment = 3; - */ - protected $extract_document_sentiment = false; - /** - * Extract entities and their associated sentiment. - * - * Generated from protobuf field bool extract_entity_sentiment = 4; - */ - protected $extract_entity_sentiment = false; - /** - * Classify the full document into categories. - * - * Generated from protobuf field bool classify_text = 6; - */ - protected $classify_text = false; - /** - * Moderate the document for harmful and sensitive categories. - * - * Generated from protobuf field bool moderate_text = 11; - */ - protected $moderate_text = false; - /** - * The model options to use for classification. Defaults to v1 options - * if not specified. Only used if `classify_text` is set to true. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions classification_model_options = 10; - */ - protected $classification_model_options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $extract_syntax - * Extract syntax information. - * @type bool $extract_entities - * Extract entities. - * @type bool $extract_document_sentiment - * Extract document-level sentiment. - * @type bool $extract_entity_sentiment - * Extract entities and their associated sentiment. - * @type bool $classify_text - * Classify the full document into categories. - * @type bool $moderate_text - * Moderate the document for harmful and sensitive categories. - * @type \Google\Cloud\Language\V1\ClassificationModelOptions $classification_model_options - * The model options to use for classification. Defaults to v1 options - * if not specified. Only used if `classify_text` is set to true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Extract syntax information. - * - * Generated from protobuf field bool extract_syntax = 1; - * @return bool - */ - public function getExtractSyntax() - { - return $this->extract_syntax; - } - - /** - * Extract syntax information. - * - * Generated from protobuf field bool extract_syntax = 1; - * @param bool $var - * @return $this - */ - public function setExtractSyntax($var) - { - GPBUtil::checkBool($var); - $this->extract_syntax = $var; - - return $this; - } - - /** - * Extract entities. - * - * Generated from protobuf field bool extract_entities = 2; - * @return bool - */ - public function getExtractEntities() - { - return $this->extract_entities; - } - - /** - * Extract entities. - * - * Generated from protobuf field bool extract_entities = 2; - * @param bool $var - * @return $this - */ - public function setExtractEntities($var) - { - GPBUtil::checkBool($var); - $this->extract_entities = $var; - - return $this; - } - - /** - * Extract document-level sentiment. - * - * Generated from protobuf field bool extract_document_sentiment = 3; - * @return bool - */ - public function getExtractDocumentSentiment() - { - return $this->extract_document_sentiment; - } - - /** - * Extract document-level sentiment. - * - * Generated from protobuf field bool extract_document_sentiment = 3; - * @param bool $var - * @return $this - */ - public function setExtractDocumentSentiment($var) - { - GPBUtil::checkBool($var); - $this->extract_document_sentiment = $var; - - return $this; - } - - /** - * Extract entities and their associated sentiment. - * - * Generated from protobuf field bool extract_entity_sentiment = 4; - * @return bool - */ - public function getExtractEntitySentiment() - { - return $this->extract_entity_sentiment; - } - - /** - * Extract entities and their associated sentiment. - * - * Generated from protobuf field bool extract_entity_sentiment = 4; - * @param bool $var - * @return $this - */ - public function setExtractEntitySentiment($var) - { - GPBUtil::checkBool($var); - $this->extract_entity_sentiment = $var; - - return $this; - } - - /** - * Classify the full document into categories. - * - * Generated from protobuf field bool classify_text = 6; - * @return bool - */ - public function getClassifyText() - { - return $this->classify_text; - } - - /** - * Classify the full document into categories. - * - * Generated from protobuf field bool classify_text = 6; - * @param bool $var - * @return $this - */ - public function setClassifyText($var) - { - GPBUtil::checkBool($var); - $this->classify_text = $var; - - return $this; - } - - /** - * Moderate the document for harmful and sensitive categories. - * - * Generated from protobuf field bool moderate_text = 11; - * @return bool - */ - public function getModerateText() - { - return $this->moderate_text; - } - - /** - * Moderate the document for harmful and sensitive categories. - * - * Generated from protobuf field bool moderate_text = 11; - * @param bool $var - * @return $this - */ - public function setModerateText($var) - { - GPBUtil::checkBool($var); - $this->moderate_text = $var; - - return $this; - } - - /** - * The model options to use for classification. Defaults to v1 options - * if not specified. Only used if `classify_text` is set to true. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions classification_model_options = 10; - * @return \Google\Cloud\Language\V1\ClassificationModelOptions|null - */ - public function getClassificationModelOptions() - { - return $this->classification_model_options; - } - - public function hasClassificationModelOptions() - { - return isset($this->classification_model_options); - } - - public function clearClassificationModelOptions() - { - unset($this->classification_model_options); - } - - /** - * The model options to use for classification. Defaults to v1 options - * if not specified. Only used if `classify_text` is set to true. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions classification_model_options = 10; - * @param \Google\Cloud\Language\V1\ClassificationModelOptions $var - * @return $this - */ - public function setClassificationModelOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\ClassificationModelOptions::class); - $this->classification_model_options = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Features::class, \Google\Cloud\Language\V1\AnnotateTextRequest_Features::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextResponse.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextResponse.php deleted file mode 100644 index 6e17632dee8b..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextResponse.php +++ /dev/null @@ -1,317 +0,0 @@ -google.cloud.language.v1.AnnotateTextResponse - */ -class AnnotateTextResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Sentences in the input document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 1; - */ - private $sentences; - /** - * Tokens, along with their syntactic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Token tokens = 2; - */ - private $tokens; - /** - * Entities, along with their semantic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entities]. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 3; - */ - private $entities; - /** - * The overall sentiment for the document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment document_sentiment = 4; - */ - protected $document_sentiment = null; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field - * for more details. - * - * Generated from protobuf field string language = 5; - */ - protected $language = ''; - /** - * Categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory categories = 6; - */ - private $categories; - /** - * Harmful and sensitive categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7; - */ - private $moderation_categories; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V1\Sentence>|\Google\Protobuf\Internal\RepeatedField $sentences - * Sentences in the input document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. - * @type array<\Google\Cloud\Language\V1\Token>|\Google\Protobuf\Internal\RepeatedField $tokens - * Tokens, along with their syntactic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. - * @type array<\Google\Cloud\Language\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * Entities, along with their semantic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entities]. - * @type \Google\Cloud\Language\V1\Sentiment $document_sentiment - * The overall sentiment for the document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]. - * @type string $language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field - * for more details. - * @type array<\Google\Cloud\Language\V1\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $categories - * Categories identified in the input document. - * @type array<\Google\Cloud\Language\V1\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $moderation_categories - * Harmful and sensitive categories identified in the input document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Sentences in the input document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSentences() - { - return $this->sentences; - } - - /** - * Sentences in the input document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 1; - * @param array<\Google\Cloud\Language\V1\Sentence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSentences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Sentence::class); - $this->sentences = $arr; - - return $this; - } - - /** - * Tokens, along with their syntactic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Token tokens = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTokens() - { - return $this->tokens; - } - - /** - * Tokens, along with their syntactic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Token tokens = 2; - * @param array<\Google\Cloud\Language\V1\Token>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTokens($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Token::class); - $this->tokens = $arr; - - return $this; - } - - /** - * Entities, along with their semantic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entities]. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * Entities, along with their semantic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entities]. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 3; - * @param array<\Google\Cloud\Language\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * The overall sentiment for the document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment document_sentiment = 4; - * @return \Google\Cloud\Language\V1\Sentiment|null - */ - public function getDocumentSentiment() - { - return $this->document_sentiment; - } - - public function hasDocumentSentiment() - { - return isset($this->document_sentiment); - } - - public function clearDocumentSentiment() - { - unset($this->document_sentiment); - } - - /** - * The overall sentiment for the document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment document_sentiment = 4; - * @param \Google\Cloud\Language\V1\Sentiment $var - * @return $this - */ - public function setDocumentSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Sentiment::class); - $this->document_sentiment = $var; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field - * for more details. - * - * Generated from protobuf field string language = 5; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field - * for more details. - * - * Generated from protobuf field string language = 5; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - - /** - * Categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory categories = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCategories() - { - return $this->categories; - } - - /** - * Categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory categories = 6; - * @param array<\Google\Cloud\Language\V1\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\ClassificationCategory::class); - $this->categories = $arr; - - return $this; - } - - /** - * Harmful and sensitive categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getModerationCategories() - { - return $this->moderation_categories; - } - - /** - * Harmful and sensitive categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 7; - * @param array<\Google\Cloud\Language\V1\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setModerationCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\ClassificationCategory::class); - $this->moderation_categories = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationCategory.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationCategory.php deleted file mode 100644 index b3b7b1cbc849..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationCategory.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.language.v1.ClassificationCategory - */ -class ClassificationCategory extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the category representing the document. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The classifier's confidence of the category. Number represents how certain - * the classifier is that this category represents the given text. - * - * Generated from protobuf field float confidence = 2; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the category representing the document. - * @type float $confidence - * The classifier's confidence of the category. Number represents how certain - * the classifier is that this category represents the given text. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The name of the category representing the document. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the category representing the document. - * - * 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 classifier's confidence of the category. Number represents how certain - * the classifier is that this category represents the given text. - * - * Generated from protobuf field float confidence = 2; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * The classifier's confidence of the category. Number represents how certain - * the classifier is that this category represents the given text. - * - * Generated from protobuf field float confidence = 2; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions.php deleted file mode 100644 index dc546f8a8822..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.language.v1.ClassificationModelOptions - */ -class ClassificationModelOptions extends \Google\Protobuf\Internal\Message -{ - protected $model_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\ClassificationModelOptions\V1Model $v1_model - * Setting this field will use the V1 model and V1 content categories - * version. The V1 model is a legacy model; support for this will be - * discontinued in the future. - * @type \Google\Cloud\Language\V1\ClassificationModelOptions\V2Model $v2_model - * Setting this field will use the V2 model with the appropriate content - * categories version. The V2 model is a better performing model. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Setting this field will use the V1 model and V1 content categories - * version. The V1 model is a legacy model; support for this will be - * discontinued in the future. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions.V1Model v1_model = 1; - * @return \Google\Cloud\Language\V1\ClassificationModelOptions\V1Model|null - */ - public function getV1Model() - { - return $this->readOneof(1); - } - - public function hasV1Model() - { - return $this->hasOneof(1); - } - - /** - * Setting this field will use the V1 model and V1 content categories - * version. The V1 model is a legacy model; support for this will be - * discontinued in the future. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions.V1Model v1_model = 1; - * @param \Google\Cloud\Language\V1\ClassificationModelOptions\V1Model $var - * @return $this - */ - public function setV1Model($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\ClassificationModelOptions\V1Model::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Setting this field will use the V2 model with the appropriate content - * categories version. The V2 model is a better performing model. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions.V2Model v2_model = 2; - * @return \Google\Cloud\Language\V1\ClassificationModelOptions\V2Model|null - */ - public function getV2Model() - { - return $this->readOneof(2); - } - - public function hasV2Model() - { - return $this->hasOneof(2); - } - - /** - * Setting this field will use the V2 model with the appropriate content - * categories version. The V2 model is a better performing model. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions.V2Model v2_model = 2; - * @param \Google\Cloud\Language\V1\ClassificationModelOptions\V2Model $var - * @return $this - */ - public function setV2Model($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\ClassificationModelOptions\V2Model::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getModelType() - { - return $this->whichOneof("model_type"); - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V1Model.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V1Model.php deleted file mode 100644 index e6ac49f77646..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V1Model.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.language.v1.ClassificationModelOptions.V1Model - */ -class V1Model extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(V1Model::class, \Google\Cloud\Language\V1\ClassificationModelOptions_V1Model::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V2Model.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V2Model.php deleted file mode 100644 index d4bbc1b08794..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V2Model.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.language.v1.ClassificationModelOptions.V2Model - */ -class V2Model extends \Google\Protobuf\Internal\Message -{ - /** - * The content categories used for classification. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions.V2Model.ContentCategoriesVersion content_categories_version = 1; - */ - protected $content_categories_version = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $content_categories_version - * The content categories used for classification. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The content categories used for classification. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions.V2Model.ContentCategoriesVersion content_categories_version = 1; - * @return int - */ - public function getContentCategoriesVersion() - { - return $this->content_categories_version; - } - - /** - * The content categories used for classification. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions.V2Model.ContentCategoriesVersion content_categories_version = 1; - * @param int $var - * @return $this - */ - public function setContentCategoriesVersion($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\ClassificationModelOptions\V2Model\ContentCategoriesVersion::class); - $this->content_categories_version = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(V2Model::class, \Google\Cloud\Language\V1\ClassificationModelOptions_V2Model::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V2Model/ContentCategoriesVersion.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V2Model/ContentCategoriesVersion.php deleted file mode 100644 index 5c9434822a5b..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V2Model/ContentCategoriesVersion.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.language.v1.ClassificationModelOptions.V2Model.ContentCategoriesVersion - */ -class ContentCategoriesVersion -{ - /** - * If `ContentCategoriesVersion` is not specified, this option will - * default to `V1`. - * - * Generated from protobuf enum CONTENT_CATEGORIES_VERSION_UNSPECIFIED = 0; - */ - const CONTENT_CATEGORIES_VERSION_UNSPECIFIED = 0; - /** - * Legacy content categories of our initial launch in 2017. - * - * Generated from protobuf enum V1 = 1; - */ - const V1 = 1; - /** - * Updated content categories in 2022. - * - * Generated from protobuf enum V2 = 2; - */ - const V2 = 2; - - private static $valueToName = [ - self::CONTENT_CATEGORIES_VERSION_UNSPECIFIED => 'CONTENT_CATEGORIES_VERSION_UNSPECIFIED', - self::V1 => 'V1', - self::V2 => 'V2', - ]; - - 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(ContentCategoriesVersion::class, \Google\Cloud\Language\V1\ClassificationModelOptions_V2Model_ContentCategoriesVersion::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassifyTextRequest.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassifyTextRequest.php deleted file mode 100644 index 058b703bfe9f..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassifyTextRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.language.v1.ClassifyTextRequest - */ -class ClassifyTextRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * Model options to use for classification. Defaults to v1 options if not - * specified. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions classification_model_options = 3; - */ - protected $classification_model_options = null; - - /** - * @param \Google\Cloud\Language\V1\Document $document Required. Input document. - * - * @return \Google\Cloud\Language\V1\ClassifyTextRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Language\V1\Document $document): self - { - return (new self()) - ->setDocument($document); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\Document $document - * Required. Input document. - * @type \Google\Cloud\Language\V1\ClassificationModelOptions $classification_model_options - * Model options to use for classification. Defaults to v1 options if not - * specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * Model options to use for classification. Defaults to v1 options if not - * specified. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions classification_model_options = 3; - * @return \Google\Cloud\Language\V1\ClassificationModelOptions|null - */ - public function getClassificationModelOptions() - { - return $this->classification_model_options; - } - - public function hasClassificationModelOptions() - { - return isset($this->classification_model_options); - } - - public function clearClassificationModelOptions() - { - unset($this->classification_model_options); - } - - /** - * Model options to use for classification. Defaults to v1 options if not - * specified. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions classification_model_options = 3; - * @param \Google\Cloud\Language\V1\ClassificationModelOptions $var - * @return $this - */ - public function setClassificationModelOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\ClassificationModelOptions::class); - $this->classification_model_options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassifyTextResponse.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassifyTextResponse.php deleted file mode 100644 index 3ace816bfb6e..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassifyTextResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.language.v1.ClassifyTextResponse - */ -class ClassifyTextResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory categories = 1; - */ - private $categories; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V1\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $categories - * Categories representing the input document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory categories = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCategories() - { - return $this->categories; - } - - /** - * Categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory categories = 1; - * @param array<\Google\Cloud\Language\V1\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\ClassificationCategory::class); - $this->categories = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge.php deleted file mode 100644 index 87559c773111..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.language.v1.DependencyEdge - */ -class DependencyEdge extends \Google\Protobuf\Internal\Message -{ - /** - * Represents the head of this token in the dependency tree. - * This is the index of the token which has an arc going to this token. - * The index is the position of the token in the array of tokens returned - * by the API method. If this token is a root token, then the - * `head_token_index` is its own index. - * - * Generated from protobuf field int32 head_token_index = 1; - */ - protected $head_token_index = 0; - /** - * The parse label for the token. - * - * Generated from protobuf field .google.cloud.language.v1.DependencyEdge.Label label = 2; - */ - protected $label = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $head_token_index - * Represents the head of this token in the dependency tree. - * This is the index of the token which has an arc going to this token. - * The index is the position of the token in the array of tokens returned - * by the API method. If this token is a root token, then the - * `head_token_index` is its own index. - * @type int $label - * The parse label for the token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Represents the head of this token in the dependency tree. - * This is the index of the token which has an arc going to this token. - * The index is the position of the token in the array of tokens returned - * by the API method. If this token is a root token, then the - * `head_token_index` is its own index. - * - * Generated from protobuf field int32 head_token_index = 1; - * @return int - */ - public function getHeadTokenIndex() - { - return $this->head_token_index; - } - - /** - * Represents the head of this token in the dependency tree. - * This is the index of the token which has an arc going to this token. - * The index is the position of the token in the array of tokens returned - * by the API method. If this token is a root token, then the - * `head_token_index` is its own index. - * - * Generated from protobuf field int32 head_token_index = 1; - * @param int $var - * @return $this - */ - public function setHeadTokenIndex($var) - { - GPBUtil::checkInt32($var); - $this->head_token_index = $var; - - return $this; - } - - /** - * The parse label for the token. - * - * Generated from protobuf field .google.cloud.language.v1.DependencyEdge.Label label = 2; - * @return int - */ - public function getLabel() - { - return $this->label; - } - - /** - * The parse label for the token. - * - * Generated from protobuf field .google.cloud.language.v1.DependencyEdge.Label label = 2; - * @param int $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\DependencyEdge\Label::class); - $this->label = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge/Label.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge/Label.php deleted file mode 100644 index cd6d7039830c..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge/Label.php +++ /dev/null @@ -1,628 +0,0 @@ -google.cloud.language.v1.DependencyEdge.Label - */ -class Label -{ - /** - * Unknown - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * Abbreviation modifier - * - * Generated from protobuf enum ABBREV = 1; - */ - const ABBREV = 1; - /** - * Adjectival complement - * - * Generated from protobuf enum ACOMP = 2; - */ - const ACOMP = 2; - /** - * Adverbial clause modifier - * - * Generated from protobuf enum ADVCL = 3; - */ - const ADVCL = 3; - /** - * Adverbial modifier - * - * Generated from protobuf enum ADVMOD = 4; - */ - const ADVMOD = 4; - /** - * Adjectival modifier of an NP - * - * Generated from protobuf enum AMOD = 5; - */ - const AMOD = 5; - /** - * Appositional modifier of an NP - * - * Generated from protobuf enum APPOS = 6; - */ - const APPOS = 6; - /** - * Attribute dependent of a copular verb - * - * Generated from protobuf enum ATTR = 7; - */ - const ATTR = 7; - /** - * Auxiliary (non-main) verb - * - * Generated from protobuf enum AUX = 8; - */ - const AUX = 8; - /** - * Passive auxiliary - * - * Generated from protobuf enum AUXPASS = 9; - */ - const AUXPASS = 9; - /** - * Coordinating conjunction - * - * Generated from protobuf enum CC = 10; - */ - const CC = 10; - /** - * Clausal complement of a verb or adjective - * - * Generated from protobuf enum CCOMP = 11; - */ - const CCOMP = 11; - /** - * Conjunct - * - * Generated from protobuf enum CONJ = 12; - */ - const CONJ = 12; - /** - * Clausal subject - * - * Generated from protobuf enum CSUBJ = 13; - */ - const CSUBJ = 13; - /** - * Clausal passive subject - * - * Generated from protobuf enum CSUBJPASS = 14; - */ - const CSUBJPASS = 14; - /** - * Dependency (unable to determine) - * - * Generated from protobuf enum DEP = 15; - */ - const DEP = 15; - /** - * Determiner - * - * Generated from protobuf enum DET = 16; - */ - const DET = 16; - /** - * Discourse - * - * Generated from protobuf enum DISCOURSE = 17; - */ - const DISCOURSE = 17; - /** - * Direct object - * - * Generated from protobuf enum DOBJ = 18; - */ - const DOBJ = 18; - /** - * Expletive - * - * Generated from protobuf enum EXPL = 19; - */ - const EXPL = 19; - /** - * Goes with (part of a word in a text not well edited) - * - * Generated from protobuf enum GOESWITH = 20; - */ - const GOESWITH = 20; - /** - * Indirect object - * - * Generated from protobuf enum IOBJ = 21; - */ - const IOBJ = 21; - /** - * Marker (word introducing a subordinate clause) - * - * Generated from protobuf enum MARK = 22; - */ - const MARK = 22; - /** - * Multi-word expression - * - * Generated from protobuf enum MWE = 23; - */ - const MWE = 23; - /** - * Multi-word verbal expression - * - * Generated from protobuf enum MWV = 24; - */ - const MWV = 24; - /** - * Negation modifier - * - * Generated from protobuf enum NEG = 25; - */ - const NEG = 25; - /** - * Noun compound modifier - * - * Generated from protobuf enum NN = 26; - */ - const NN = 26; - /** - * Noun phrase used as an adverbial modifier - * - * Generated from protobuf enum NPADVMOD = 27; - */ - const NPADVMOD = 27; - /** - * Nominal subject - * - * Generated from protobuf enum NSUBJ = 28; - */ - const NSUBJ = 28; - /** - * Passive nominal subject - * - * Generated from protobuf enum NSUBJPASS = 29; - */ - const NSUBJPASS = 29; - /** - * Numeric modifier of a noun - * - * Generated from protobuf enum NUM = 30; - */ - const NUM = 30; - /** - * Element of compound number - * - * Generated from protobuf enum NUMBER = 31; - */ - const NUMBER = 31; - /** - * Punctuation mark - * - * Generated from protobuf enum P = 32; - */ - const P = 32; - /** - * Parataxis relation - * - * Generated from protobuf enum PARATAXIS = 33; - */ - const PARATAXIS = 33; - /** - * Participial modifier - * - * Generated from protobuf enum PARTMOD = 34; - */ - const PARTMOD = 34; - /** - * The complement of a preposition is a clause - * - * Generated from protobuf enum PCOMP = 35; - */ - const PCOMP = 35; - /** - * Object of a preposition - * - * Generated from protobuf enum POBJ = 36; - */ - const POBJ = 36; - /** - * Possession modifier - * - * Generated from protobuf enum POSS = 37; - */ - const POSS = 37; - /** - * Postverbal negative particle - * - * Generated from protobuf enum POSTNEG = 38; - */ - const POSTNEG = 38; - /** - * Predicate complement - * - * Generated from protobuf enum PRECOMP = 39; - */ - const PRECOMP = 39; - /** - * Preconjunt - * - * Generated from protobuf enum PRECONJ = 40; - */ - const PRECONJ = 40; - /** - * Predeterminer - * - * Generated from protobuf enum PREDET = 41; - */ - const PREDET = 41; - /** - * Prefix - * - * Generated from protobuf enum PREF = 42; - */ - const PREF = 42; - /** - * Prepositional modifier - * - * Generated from protobuf enum PREP = 43; - */ - const PREP = 43; - /** - * The relationship between a verb and verbal morpheme - * - * Generated from protobuf enum PRONL = 44; - */ - const PRONL = 44; - /** - * Particle - * - * Generated from protobuf enum PRT = 45; - */ - const PRT = 45; - /** - * Associative or possessive marker - * - * Generated from protobuf enum PS = 46; - */ - const PS = 46; - /** - * Quantifier phrase modifier - * - * Generated from protobuf enum QUANTMOD = 47; - */ - const QUANTMOD = 47; - /** - * Relative clause modifier - * - * Generated from protobuf enum RCMOD = 48; - */ - const RCMOD = 48; - /** - * Complementizer in relative clause - * - * Generated from protobuf enum RCMODREL = 49; - */ - const RCMODREL = 49; - /** - * Ellipsis without a preceding predicate - * - * Generated from protobuf enum RDROP = 50; - */ - const RDROP = 50; - /** - * Referent - * - * Generated from protobuf enum REF = 51; - */ - const REF = 51; - /** - * Remnant - * - * Generated from protobuf enum REMNANT = 52; - */ - const REMNANT = 52; - /** - * Reparandum - * - * Generated from protobuf enum REPARANDUM = 53; - */ - const REPARANDUM = 53; - /** - * Root - * - * Generated from protobuf enum ROOT = 54; - */ - const ROOT = 54; - /** - * Suffix specifying a unit of number - * - * Generated from protobuf enum SNUM = 55; - */ - const SNUM = 55; - /** - * Suffix - * - * Generated from protobuf enum SUFF = 56; - */ - const SUFF = 56; - /** - * Temporal modifier - * - * Generated from protobuf enum TMOD = 57; - */ - const TMOD = 57; - /** - * Topic marker - * - * Generated from protobuf enum TOPIC = 58; - */ - const TOPIC = 58; - /** - * Clause headed by an infinite form of the verb that modifies a noun - * - * Generated from protobuf enum VMOD = 59; - */ - const VMOD = 59; - /** - * Vocative - * - * Generated from protobuf enum VOCATIVE = 60; - */ - const VOCATIVE = 60; - /** - * Open clausal complement - * - * Generated from protobuf enum XCOMP = 61; - */ - const XCOMP = 61; - /** - * Name suffix - * - * Generated from protobuf enum SUFFIX = 62; - */ - const SUFFIX = 62; - /** - * Name title - * - * Generated from protobuf enum TITLE = 63; - */ - const TITLE = 63; - /** - * Adverbial phrase modifier - * - * Generated from protobuf enum ADVPHMOD = 64; - */ - const ADVPHMOD = 64; - /** - * Causative auxiliary - * - * Generated from protobuf enum AUXCAUS = 65; - */ - const AUXCAUS = 65; - /** - * Helper auxiliary - * - * Generated from protobuf enum AUXVV = 66; - */ - const AUXVV = 66; - /** - * Rentaishi (Prenominal modifier) - * - * Generated from protobuf enum DTMOD = 67; - */ - const DTMOD = 67; - /** - * Foreign words - * - * Generated from protobuf enum FOREIGN = 68; - */ - const FOREIGN = 68; - /** - * Keyword - * - * Generated from protobuf enum KW = 69; - */ - const KW = 69; - /** - * List for chains of comparable items - * - * Generated from protobuf enum LIST = 70; - */ - const PBLIST = 70; - /** - * Nominalized clause - * - * Generated from protobuf enum NOMC = 71; - */ - const NOMC = 71; - /** - * Nominalized clausal subject - * - * Generated from protobuf enum NOMCSUBJ = 72; - */ - const NOMCSUBJ = 72; - /** - * Nominalized clausal passive - * - * Generated from protobuf enum NOMCSUBJPASS = 73; - */ - const NOMCSUBJPASS = 73; - /** - * Compound of numeric modifier - * - * Generated from protobuf enum NUMC = 74; - */ - const NUMC = 74; - /** - * Copula - * - * Generated from protobuf enum COP = 75; - */ - const COP = 75; - /** - * Dislocated relation (for fronted/topicalized elements) - * - * Generated from protobuf enum DISLOCATED = 76; - */ - const DISLOCATED = 76; - /** - * Aspect marker - * - * Generated from protobuf enum ASP = 77; - */ - const ASP = 77; - /** - * Genitive modifier - * - * Generated from protobuf enum GMOD = 78; - */ - const GMOD = 78; - /** - * Genitive object - * - * Generated from protobuf enum GOBJ = 79; - */ - const GOBJ = 79; - /** - * Infinitival modifier - * - * Generated from protobuf enum INFMOD = 80; - */ - const INFMOD = 80; - /** - * Measure - * - * Generated from protobuf enum MES = 81; - */ - const MES = 81; - /** - * Nominal complement of a noun - * - * Generated from protobuf enum NCOMP = 82; - */ - const NCOMP = 82; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::ABBREV => 'ABBREV', - self::ACOMP => 'ACOMP', - self::ADVCL => 'ADVCL', - self::ADVMOD => 'ADVMOD', - self::AMOD => 'AMOD', - self::APPOS => 'APPOS', - self::ATTR => 'ATTR', - self::AUX => 'AUX', - self::AUXPASS => 'AUXPASS', - self::CC => 'CC', - self::CCOMP => 'CCOMP', - self::CONJ => 'CONJ', - self::CSUBJ => 'CSUBJ', - self::CSUBJPASS => 'CSUBJPASS', - self::DEP => 'DEP', - self::DET => 'DET', - self::DISCOURSE => 'DISCOURSE', - self::DOBJ => 'DOBJ', - self::EXPL => 'EXPL', - self::GOESWITH => 'GOESWITH', - self::IOBJ => 'IOBJ', - self::MARK => 'MARK', - self::MWE => 'MWE', - self::MWV => 'MWV', - self::NEG => 'NEG', - self::NN => 'NN', - self::NPADVMOD => 'NPADVMOD', - self::NSUBJ => 'NSUBJ', - self::NSUBJPASS => 'NSUBJPASS', - self::NUM => 'NUM', - self::NUMBER => 'NUMBER', - self::P => 'P', - self::PARATAXIS => 'PARATAXIS', - self::PARTMOD => 'PARTMOD', - self::PCOMP => 'PCOMP', - self::POBJ => 'POBJ', - self::POSS => 'POSS', - self::POSTNEG => 'POSTNEG', - self::PRECOMP => 'PRECOMP', - self::PRECONJ => 'PRECONJ', - self::PREDET => 'PREDET', - self::PREF => 'PREF', - self::PREP => 'PREP', - self::PRONL => 'PRONL', - self::PRT => 'PRT', - self::PS => 'PS', - self::QUANTMOD => 'QUANTMOD', - self::RCMOD => 'RCMOD', - self::RCMODREL => 'RCMODREL', - self::RDROP => 'RDROP', - self::REF => 'REF', - self::REMNANT => 'REMNANT', - self::REPARANDUM => 'REPARANDUM', - self::ROOT => 'ROOT', - self::SNUM => 'SNUM', - self::SUFF => 'SUFF', - self::TMOD => 'TMOD', - self::TOPIC => 'TOPIC', - self::VMOD => 'VMOD', - self::VOCATIVE => 'VOCATIVE', - self::XCOMP => 'XCOMP', - self::SUFFIX => 'SUFFIX', - self::TITLE => 'TITLE', - self::ADVPHMOD => 'ADVPHMOD', - self::AUXCAUS => 'AUXCAUS', - self::AUXVV => 'AUXVV', - self::DTMOD => 'DTMOD', - self::FOREIGN => 'FOREIGN', - self::KW => 'KW', - self::PBLIST => 'LIST', - self::NOMC => 'NOMC', - self::NOMCSUBJ => 'NOMCSUBJ', - self::NOMCSUBJPASS => 'NOMCSUBJPASS', - self::NUMC => 'NUMC', - self::COP => 'COP', - self::DISLOCATED => 'DISLOCATED', - self::ASP => 'ASP', - self::GMOD => 'GMOD', - self::GOBJ => 'GOBJ', - self::INFMOD => 'INFMOD', - self::MES => 'MES', - self::NCOMP => 'NCOMP', - ]; - - 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)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Label::class, \Google\Cloud\Language\V1\DependencyEdge_Label::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document.php deleted file mode 100644 index 9e7818972375..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document.php +++ /dev/null @@ -1,220 +0,0 @@ -google.cloud.language.v1.Document - */ -class Document extends \Google\Protobuf\Internal\Message -{ - /** - * Required. If the type is not set or is `TYPE_UNSPECIFIED`, - * returns an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field .google.cloud.language.v1.Document.Type type = 1; - */ - protected $type = 0; - /** - * The language of the document (if not specified, the language is - * automatically detected). Both ISO and BCP-47 language codes are - * accepted.
- * [Language - * Support](https://cloud.google.com/natural-language/docs/languages) lists - * currently supported languages for each API method. If the language (either - * specified by the caller or automatically detected) is not supported by the - * called API method, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string language = 4; - */ - protected $language = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Required. If the type is not set or is `TYPE_UNSPECIFIED`, - * returns an `INVALID_ARGUMENT` error. - * @type string $content - * The content of the input in string format. - * Cloud audit logging exempt since it is based on user data. - * @type string $gcs_content_uri - * The Google Cloud Storage URI where the file content is located. - * This URI must be of the form: gs://bucket_name/object_name. For more - * details, see https://cloud.google.com/storage/docs/reference-uris. - * NOTE: Cloud Storage object versioning is not supported. - * @type string $language - * The language of the document (if not specified, the language is - * automatically detected). Both ISO and BCP-47 language codes are - * accepted.
- * [Language - * Support](https://cloud.google.com/natural-language/docs/languages) lists - * currently supported languages for each API method. If the language (either - * specified by the caller or automatically detected) is not supported by the - * called API method, an `INVALID_ARGUMENT` error is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. If the type is not set or is `TYPE_UNSPECIFIED`, - * returns an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field .google.cloud.language.v1.Document.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. If the type is not set or is `TYPE_UNSPECIFIED`, - * returns an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field .google.cloud.language.v1.Document.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\Document\Type::class); - $this->type = $var; - - return $this; - } - - /** - * The content of the input in string format. - * Cloud audit logging exempt since it is based on user data. - * - * Generated from protobuf field string content = 2; - * @return string - */ - public function getContent() - { - return $this->readOneof(2); - } - - public function hasContent() - { - return $this->hasOneof(2); - } - - /** - * The content of the input in string format. - * Cloud audit logging exempt since it is based on user data. - * - * Generated from protobuf field string content = 2; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The Google Cloud Storage URI where the file content is located. - * This URI must be of the form: gs://bucket_name/object_name. For more - * details, see https://cloud.google.com/storage/docs/reference-uris. - * NOTE: Cloud Storage object versioning is not supported. - * - * Generated from protobuf field string gcs_content_uri = 3; - * @return string - */ - public function getGcsContentUri() - { - return $this->readOneof(3); - } - - public function hasGcsContentUri() - { - return $this->hasOneof(3); - } - - /** - * The Google Cloud Storage URI where the file content is located. - * This URI must be of the form: gs://bucket_name/object_name. For more - * details, see https://cloud.google.com/storage/docs/reference-uris. - * NOTE: Cloud Storage object versioning is not supported. - * - * Generated from protobuf field string gcs_content_uri = 3; - * @param string $var - * @return $this - */ - public function setGcsContentUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The language of the document (if not specified, the language is - * automatically detected). Both ISO and BCP-47 language codes are - * accepted.
- * [Language - * Support](https://cloud.google.com/natural-language/docs/languages) lists - * currently supported languages for each API method. If the language (either - * specified by the caller or automatically detected) is not supported by the - * called API method, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string language = 4; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the document (if not specified, the language is - * automatically detected). Both ISO and BCP-47 language codes are - * accepted.
- * [Language - * Support](https://cloud.google.com/natural-language/docs/languages) lists - * currently supported languages for each API method. If the language (either - * specified by the caller or automatically detected) is not supported by the - * called API method, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string language = 4; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document/Type.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document/Type.php deleted file mode 100644 index 00069f59a85c..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.language.v1.Document.Type - */ -class Type -{ - /** - * The content type is not specified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Plain text - * - * Generated from protobuf enum PLAIN_TEXT = 1; - */ - const PLAIN_TEXT = 1; - /** - * HTML - * - * Generated from protobuf enum HTML = 2; - */ - const HTML = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::PLAIN_TEXT => 'PLAIN_TEXT', - self::HTML => 'HTML', - ]; - - 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(Type::class, \Google\Cloud\Language\V1\Document_Type::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EncodingType.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EncodingType.php deleted file mode 100644 index ca0b1a3218b7..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EncodingType.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.language.v1.EncodingType - */ -class EncodingType -{ - /** - * If `EncodingType` is not specified, encoding-dependent information (such as - * `begin_offset`) will be set at `-1`. - * - * Generated from protobuf enum NONE = 0; - */ - const NONE = 0; - /** - * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-8 encoding of the input. C++ and Go are examples of languages - * that use this encoding natively. - * - * Generated from protobuf enum UTF8 = 1; - */ - const UTF8 = 1; - /** - * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-16 encoding of the input. Java and JavaScript are examples of - * languages that use this encoding natively. - * - * Generated from protobuf enum UTF16 = 2; - */ - const UTF16 = 2; - /** - * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-32 encoding of the input. Python is an example of a language - * that uses this encoding natively. - * - * Generated from protobuf enum UTF32 = 3; - */ - const UTF32 = 3; - - private static $valueToName = [ - self::NONE => 'NONE', - self::UTF8 => 'UTF8', - self::UTF16 => 'UTF16', - self::UTF32 => 'UTF32', - ]; - - 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/Language/v1/proto/src/Google/Cloud/Language/V1/Entity.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Entity.php deleted file mode 100644 index 948b75127f67..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Entity.php +++ /dev/null @@ -1,293 +0,0 @@ -google.cloud.language.v1.Entity - */ -class Entity extends \Google\Protobuf\Internal\Message -{ - /** - * The representative name for the entity. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The entity type. - * - * Generated from protobuf field .google.cloud.language.v1.Entity.Type type = 2; - */ - protected $type = 0; - /** - * Metadata associated with the entity. - * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) - * and Knowledge Graph MID (`mid`), if they are available. For the metadata - * associated with other entity types, see the Type table below. - * - * Generated from protobuf field map metadata = 3; - */ - private $metadata; - /** - * The salience score associated with the entity in the [0, 1.0] range. - * The salience score for an entity provides information about the - * importance or centrality of that entity to the entire document text. - * Scores closer to 0 are less salient, while scores closer to 1.0 are highly - * salient. - * - * Generated from protobuf field float salience = 4; - */ - protected $salience = 0.0; - /** - * The mentions of this entity in the input document. The API currently - * supports proper noun mentions. - * - * Generated from protobuf field repeated .google.cloud.language.v1.EntityMention mentions = 5; - */ - private $mentions; - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the aggregate sentiment expressed - * for this entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 6; - */ - protected $sentiment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The representative name for the entity. - * @type int $type - * The entity type. - * @type array|\Google\Protobuf\Internal\MapField $metadata - * Metadata associated with the entity. - * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) - * and Knowledge Graph MID (`mid`), if they are available. For the metadata - * associated with other entity types, see the Type table below. - * @type float $salience - * The salience score associated with the entity in the [0, 1.0] range. - * The salience score for an entity provides information about the - * importance or centrality of that entity to the entire document text. - * Scores closer to 0 are less salient, while scores closer to 1.0 are highly - * salient. - * @type array<\Google\Cloud\Language\V1\EntityMention>|\Google\Protobuf\Internal\RepeatedField $mentions - * The mentions of this entity in the input document. The API currently - * supports proper noun mentions. - * @type \Google\Cloud\Language\V1\Sentiment $sentiment - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the aggregate sentiment expressed - * for this entity in the provided document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The representative name for the entity. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The representative name for the entity. - * - * 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 entity type. - * - * Generated from protobuf field .google.cloud.language.v1.Entity.Type type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The entity type. - * - * Generated from protobuf field .google.cloud.language.v1.Entity.Type type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\Entity\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Metadata associated with the entity. - * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) - * and Knowledge Graph MID (`mid`), if they are available. For the metadata - * associated with other entity types, see the Type table below. - * - * Generated from protobuf field map metadata = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * Metadata associated with the entity. - * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) - * and Knowledge Graph MID (`mid`), if they are available. For the metadata - * associated with other entity types, see the Type table below. - * - * Generated from protobuf field map metadata = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata = $arr; - - return $this; - } - - /** - * The salience score associated with the entity in the [0, 1.0] range. - * The salience score for an entity provides information about the - * importance or centrality of that entity to the entire document text. - * Scores closer to 0 are less salient, while scores closer to 1.0 are highly - * salient. - * - * Generated from protobuf field float salience = 4; - * @return float - */ - public function getSalience() - { - return $this->salience; - } - - /** - * The salience score associated with the entity in the [0, 1.0] range. - * The salience score for an entity provides information about the - * importance or centrality of that entity to the entire document text. - * Scores closer to 0 are less salient, while scores closer to 1.0 are highly - * salient. - * - * Generated from protobuf field float salience = 4; - * @param float $var - * @return $this - */ - public function setSalience($var) - { - GPBUtil::checkFloat($var); - $this->salience = $var; - - return $this; - } - - /** - * The mentions of this entity in the input document. The API currently - * supports proper noun mentions. - * - * Generated from protobuf field repeated .google.cloud.language.v1.EntityMention mentions = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMentions() - { - return $this->mentions; - } - - /** - * The mentions of this entity in the input document. The API currently - * supports proper noun mentions. - * - * Generated from protobuf field repeated .google.cloud.language.v1.EntityMention mentions = 5; - * @param array<\Google\Cloud\Language\V1\EntityMention>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMentions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\EntityMention::class); - $this->mentions = $arr; - - return $this; - } - - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the aggregate sentiment expressed - * for this entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 6; - * @return \Google\Cloud\Language\V1\Sentiment|null - */ - public function getSentiment() - { - return $this->sentiment; - } - - public function hasSentiment() - { - return isset($this->sentiment); - } - - public function clearSentiment() - { - unset($this->sentiment); - } - - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the aggregate sentiment expressed - * for this entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 6; - * @param \Google\Cloud\Language\V1\Sentiment $var - * @return $this - */ - public function setSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Sentiment::class); - $this->sentiment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Entity/Type.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Entity/Type.php deleted file mode 100644 index a54bb0c4b4fb..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Entity/Type.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.language.v1.Entity.Type - */ -class Type -{ - /** - * Unknown - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * Person - * - * Generated from protobuf enum PERSON = 1; - */ - const PERSON = 1; - /** - * Location - * - * Generated from protobuf enum LOCATION = 2; - */ - const LOCATION = 2; - /** - * Organization - * - * Generated from protobuf enum ORGANIZATION = 3; - */ - const ORGANIZATION = 3; - /** - * Event - * - * Generated from protobuf enum EVENT = 4; - */ - const EVENT = 4; - /** - * Artwork - * - * Generated from protobuf enum WORK_OF_ART = 5; - */ - const WORK_OF_ART = 5; - /** - * Consumer product - * - * Generated from protobuf enum CONSUMER_GOOD = 6; - */ - const CONSUMER_GOOD = 6; - /** - * Other types of entities - * - * Generated from protobuf enum OTHER = 7; - */ - const OTHER = 7; - /** - * Phone number - * The metadata lists the phone number, formatted according to local - * convention, plus whichever additional elements appear in the text: - * * `number` - the actual number, broken down into sections as per local - * convention - * * `national_prefix` - country code, if detected - * * `area_code` - region or area code, if detected - * * `extension` - phone extension (to be dialed after connection), if - * detected - * - * Generated from protobuf enum PHONE_NUMBER = 9; - */ - const PHONE_NUMBER = 9; - /** - * Address - * The metadata identifies the street number and locality plus whichever - * additional elements appear in the text: - * * `street_number` - street number - * * `locality` - city or town - * * `street_name` - street/route name, if detected - * * `postal_code` - postal code, if detected - * * `country` - country, if detected< - * * `broad_region` - administrative area, such as the state, if detected - * * `narrow_region` - smaller administrative area, such as county, if - * detected - * * `sublocality` - used in Asian addresses to demark a district within a - * city, if detected - * - * Generated from protobuf enum ADDRESS = 10; - */ - const ADDRESS = 10; - /** - * Date - * The metadata identifies the components of the date: - * * `year` - four digit year, if detected - * * `month` - two digit month number, if detected - * * `day` - two digit day number, if detected - * - * Generated from protobuf enum DATE = 11; - */ - const DATE = 11; - /** - * Number - * The metadata is the number itself. - * - * Generated from protobuf enum NUMBER = 12; - */ - const NUMBER = 12; - /** - * Price - * The metadata identifies the `value` and `currency`. - * - * Generated from protobuf enum PRICE = 13; - */ - const PRICE = 13; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::PERSON => 'PERSON', - self::LOCATION => 'LOCATION', - self::ORGANIZATION => 'ORGANIZATION', - self::EVENT => 'EVENT', - self::WORK_OF_ART => 'WORK_OF_ART', - self::CONSUMER_GOOD => 'CONSUMER_GOOD', - self::OTHER => 'OTHER', - self::PHONE_NUMBER => 'PHONE_NUMBER', - self::ADDRESS => 'ADDRESS', - self::DATE => 'DATE', - self::NUMBER => 'NUMBER', - self::PRICE => 'PRICE', - ]; - - 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(Type::class, \Google\Cloud\Language\V1\Entity_Type::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention.php deleted file mode 100644 index 4fc395029bad..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.language.v1.EntityMention - */ -class EntityMention extends \Google\Protobuf\Internal\Message -{ - /** - * The mention text. - * - * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; - */ - protected $text = null; - /** - * The type of the entity mention. - * - * Generated from protobuf field .google.cloud.language.v1.EntityMention.Type type = 2; - */ - protected $type = 0; - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the sentiment expressed for this - * mention of the entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 3; - */ - protected $sentiment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\TextSpan $text - * The mention text. - * @type int $type - * The type of the entity mention. - * @type \Google\Cloud\Language\V1\Sentiment $sentiment - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the sentiment expressed for this - * mention of the entity in the provided document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The mention text. - * - * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; - * @return \Google\Cloud\Language\V1\TextSpan|null - */ - public function getText() - { - return $this->text; - } - - public function hasText() - { - return isset($this->text); - } - - public function clearText() - { - unset($this->text); - } - - /** - * The mention text. - * - * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; - * @param \Google\Cloud\Language\V1\TextSpan $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\TextSpan::class); - $this->text = $var; - - return $this; - } - - /** - * The type of the entity mention. - * - * Generated from protobuf field .google.cloud.language.v1.EntityMention.Type type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the entity mention. - * - * Generated from protobuf field .google.cloud.language.v1.EntityMention.Type type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\EntityMention\Type::class); - $this->type = $var; - - return $this; - } - - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the sentiment expressed for this - * mention of the entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 3; - * @return \Google\Cloud\Language\V1\Sentiment|null - */ - public function getSentiment() - { - return $this->sentiment; - } - - public function hasSentiment() - { - return isset($this->sentiment); - } - - public function clearSentiment() - { - unset($this->sentiment); - } - - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the sentiment expressed for this - * mention of the entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 3; - * @param \Google\Cloud\Language\V1\Sentiment $var - * @return $this - */ - public function setSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Sentiment::class); - $this->sentiment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention/Type.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention/Type.php deleted file mode 100644 index 2fd75a738dfd..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.language.v1.EntityMention.Type - */ -class Type -{ - /** - * Unknown - * - * Generated from protobuf enum TYPE_UNKNOWN = 0; - */ - const TYPE_UNKNOWN = 0; - /** - * Proper name - * - * Generated from protobuf enum PROPER = 1; - */ - const PROPER = 1; - /** - * Common noun (or noun compound) - * - * Generated from protobuf enum COMMON = 2; - */ - const COMMON = 2; - - private static $valueToName = [ - self::TYPE_UNKNOWN => 'TYPE_UNKNOWN', - self::PROPER => 'PROPER', - self::COMMON => 'COMMON', - ]; - - 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(Type::class, \Google\Cloud\Language\V1\EntityMention_Type::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ModerateTextRequest.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ModerateTextRequest.php deleted file mode 100644 index 4134355f42d4..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ModerateTextRequest.php +++ /dev/null @@ -1,90 +0,0 @@ -google.cloud.language.v1.ModerateTextRequest - */ -class ModerateTextRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - - /** - * @param \Google\Cloud\Language\V1\Document $document Required. Input document. - * - * @return \Google\Cloud\Language\V1\ModerateTextRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Language\V1\Document $document): self - { - return (new self()) - ->setDocument($document); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\Document $document - * Required. Input document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Document::class); - $this->document = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ModerateTextResponse.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ModerateTextResponse.php deleted file mode 100644 index 20d5519fa3f9..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ModerateTextResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.language.v1.ModerateTextResponse - */ -class ModerateTextResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Harmful and sensitive categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 1; - */ - private $moderation_categories; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V1\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $moderation_categories - * Harmful and sensitive categories representing the input document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Harmful and sensitive categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getModerationCategories() - { - return $this->moderation_categories; - } - - /** - * Harmful and sensitive categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory moderation_categories = 1; - * @param array<\Google\Cloud\Language\V1\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setModerationCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\ClassificationCategory::class); - $this->moderation_categories = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech.php deleted file mode 100644 index 91ec89536ef9..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech.php +++ /dev/null @@ -1,443 +0,0 @@ -google.cloud.language.v1.PartOfSpeech - */ -class PartOfSpeech extends \Google\Protobuf\Internal\Message -{ - /** - * The part of speech tag. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Tag tag = 1; - */ - protected $tag = 0; - /** - * The grammatical aspect. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Aspect aspect = 2; - */ - protected $aspect = 0; - /** - * The grammatical case. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Case case = 3; - */ - protected $case = 0; - /** - * The grammatical form. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Form form = 4; - */ - protected $form = 0; - /** - * The grammatical gender. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Gender gender = 5; - */ - protected $gender = 0; - /** - * The grammatical mood. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Mood mood = 6; - */ - protected $mood = 0; - /** - * The grammatical number. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Number number = 7; - */ - protected $number = 0; - /** - * The grammatical person. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Person person = 8; - */ - protected $person = 0; - /** - * The grammatical properness. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Proper proper = 9; - */ - protected $proper = 0; - /** - * The grammatical reciprocity. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Reciprocity reciprocity = 10; - */ - protected $reciprocity = 0; - /** - * The grammatical tense. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Tense tense = 11; - */ - protected $tense = 0; - /** - * The grammatical voice. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Voice voice = 12; - */ - protected $voice = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $tag - * The part of speech tag. - * @type int $aspect - * The grammatical aspect. - * @type int $case - * The grammatical case. - * @type int $form - * The grammatical form. - * @type int $gender - * The grammatical gender. - * @type int $mood - * The grammatical mood. - * @type int $number - * The grammatical number. - * @type int $person - * The grammatical person. - * @type int $proper - * The grammatical properness. - * @type int $reciprocity - * The grammatical reciprocity. - * @type int $tense - * The grammatical tense. - * @type int $voice - * The grammatical voice. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The part of speech tag. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Tag tag = 1; - * @return int - */ - public function getTag() - { - return $this->tag; - } - - /** - * The part of speech tag. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Tag tag = 1; - * @param int $var - * @return $this - */ - public function setTag($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Tag::class); - $this->tag = $var; - - return $this; - } - - /** - * The grammatical aspect. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Aspect aspect = 2; - * @return int - */ - public function getAspect() - { - return $this->aspect; - } - - /** - * The grammatical aspect. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Aspect aspect = 2; - * @param int $var - * @return $this - */ - public function setAspect($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Aspect::class); - $this->aspect = $var; - - return $this; - } - - /** - * The grammatical case. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Case case = 3; - * @return int - */ - public function getCase() - { - return $this->case; - } - - /** - * The grammatical case. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Case case = 3; - * @param int $var - * @return $this - */ - public function setCase($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\PBCase::class); - $this->case = $var; - - return $this; - } - - /** - * The grammatical form. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Form form = 4; - * @return int - */ - public function getForm() - { - return $this->form; - } - - /** - * The grammatical form. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Form form = 4; - * @param int $var - * @return $this - */ - public function setForm($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Form::class); - $this->form = $var; - - return $this; - } - - /** - * The grammatical gender. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Gender gender = 5; - * @return int - */ - public function getGender() - { - return $this->gender; - } - - /** - * The grammatical gender. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Gender gender = 5; - * @param int $var - * @return $this - */ - public function setGender($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Gender::class); - $this->gender = $var; - - return $this; - } - - /** - * The grammatical mood. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Mood mood = 6; - * @return int - */ - public function getMood() - { - return $this->mood; - } - - /** - * The grammatical mood. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Mood mood = 6; - * @param int $var - * @return $this - */ - public function setMood($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Mood::class); - $this->mood = $var; - - return $this; - } - - /** - * The grammatical number. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Number number = 7; - * @return int - */ - public function getNumber() - { - return $this->number; - } - - /** - * The grammatical number. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Number number = 7; - * @param int $var - * @return $this - */ - public function setNumber($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Number::class); - $this->number = $var; - - return $this; - } - - /** - * The grammatical person. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Person person = 8; - * @return int - */ - public function getPerson() - { - return $this->person; - } - - /** - * The grammatical person. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Person person = 8; - * @param int $var - * @return $this - */ - public function setPerson($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Person::class); - $this->person = $var; - - return $this; - } - - /** - * The grammatical properness. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Proper proper = 9; - * @return int - */ - public function getProper() - { - return $this->proper; - } - - /** - * The grammatical properness. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Proper proper = 9; - * @param int $var - * @return $this - */ - public function setProper($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Proper::class); - $this->proper = $var; - - return $this; - } - - /** - * The grammatical reciprocity. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Reciprocity reciprocity = 10; - * @return int - */ - public function getReciprocity() - { - return $this->reciprocity; - } - - /** - * The grammatical reciprocity. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Reciprocity reciprocity = 10; - * @param int $var - * @return $this - */ - public function setReciprocity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Reciprocity::class); - $this->reciprocity = $var; - - return $this; - } - - /** - * The grammatical tense. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Tense tense = 11; - * @return int - */ - public function getTense() - { - return $this->tense; - } - - /** - * The grammatical tense. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Tense tense = 11; - * @param int $var - * @return $this - */ - public function setTense($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Tense::class); - $this->tense = $var; - - return $this; - } - - /** - * The grammatical voice. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Voice voice = 12; - * @return int - */ - public function getVoice() - { - return $this->voice; - } - - /** - * The grammatical voice. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Voice voice = 12; - * @param int $var - * @return $this - */ - public function setVoice($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Voice::class); - $this->voice = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Aspect.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Aspect.php deleted file mode 100644 index 95abc9c0df68..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Aspect.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Aspect - */ -class Aspect -{ - /** - * Aspect is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum ASPECT_UNKNOWN = 0; - */ - const ASPECT_UNKNOWN = 0; - /** - * Perfective - * - * Generated from protobuf enum PERFECTIVE = 1; - */ - const PERFECTIVE = 1; - /** - * Imperfective - * - * Generated from protobuf enum IMPERFECTIVE = 2; - */ - const IMPERFECTIVE = 2; - /** - * Progressive - * - * Generated from protobuf enum PROGRESSIVE = 3; - */ - const PROGRESSIVE = 3; - - private static $valueToName = [ - self::ASPECT_UNKNOWN => 'ASPECT_UNKNOWN', - self::PERFECTIVE => 'PERFECTIVE', - self::IMPERFECTIVE => 'IMPERFECTIVE', - self::PROGRESSIVE => 'PROGRESSIVE', - ]; - - 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(Aspect::class, \Google\Cloud\Language\V1\PartOfSpeech_Aspect::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Form.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Form.php deleted file mode 100644 index 0d3977bbd54a..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Form.php +++ /dev/null @@ -1,130 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Form - */ -class Form -{ - /** - * Form is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum FORM_UNKNOWN = 0; - */ - const FORM_UNKNOWN = 0; - /** - * Adnomial - * - * Generated from protobuf enum ADNOMIAL = 1; - */ - const ADNOMIAL = 1; - /** - * Auxiliary - * - * Generated from protobuf enum AUXILIARY = 2; - */ - const AUXILIARY = 2; - /** - * Complementizer - * - * Generated from protobuf enum COMPLEMENTIZER = 3; - */ - const COMPLEMENTIZER = 3; - /** - * Final ending - * - * Generated from protobuf enum FINAL_ENDING = 4; - */ - const FINAL_ENDING = 4; - /** - * Gerund - * - * Generated from protobuf enum GERUND = 5; - */ - const GERUND = 5; - /** - * Realis - * - * Generated from protobuf enum REALIS = 6; - */ - const REALIS = 6; - /** - * Irrealis - * - * Generated from protobuf enum IRREALIS = 7; - */ - const IRREALIS = 7; - /** - * Short form - * - * Generated from protobuf enum SHORT = 8; - */ - const SHORT = 8; - /** - * Long form - * - * Generated from protobuf enum LONG = 9; - */ - const LONG = 9; - /** - * Order form - * - * Generated from protobuf enum ORDER = 10; - */ - const ORDER = 10; - /** - * Specific form - * - * Generated from protobuf enum SPECIFIC = 11; - */ - const SPECIFIC = 11; - - private static $valueToName = [ - self::FORM_UNKNOWN => 'FORM_UNKNOWN', - self::ADNOMIAL => 'ADNOMIAL', - self::AUXILIARY => 'AUXILIARY', - self::COMPLEMENTIZER => 'COMPLEMENTIZER', - self::FINAL_ENDING => 'FINAL_ENDING', - self::GERUND => 'GERUND', - self::REALIS => 'REALIS', - self::IRREALIS => 'IRREALIS', - self::SHORT => 'SHORT', - self::LONG => 'LONG', - self::ORDER => 'ORDER', - self::SPECIFIC => 'SPECIFIC', - ]; - - 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(Form::class, \Google\Cloud\Language\V1\PartOfSpeech_Form::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Gender.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Gender.php deleted file mode 100644 index 510fead88faf..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Gender.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Gender - */ -class Gender -{ - /** - * Gender is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum GENDER_UNKNOWN = 0; - */ - const GENDER_UNKNOWN = 0; - /** - * Feminine - * - * Generated from protobuf enum FEMININE = 1; - */ - const FEMININE = 1; - /** - * Masculine - * - * Generated from protobuf enum MASCULINE = 2; - */ - const MASCULINE = 2; - /** - * Neuter - * - * Generated from protobuf enum NEUTER = 3; - */ - const NEUTER = 3; - - private static $valueToName = [ - self::GENDER_UNKNOWN => 'GENDER_UNKNOWN', - self::FEMININE => 'FEMININE', - self::MASCULINE => 'MASCULINE', - self::NEUTER => 'NEUTER', - ]; - - 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(Gender::class, \Google\Cloud\Language\V1\PartOfSpeech_Gender::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Mood.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Mood.php deleted file mode 100644 index 3b0c97066083..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Mood.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Mood - */ -class Mood -{ - /** - * Mood is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum MOOD_UNKNOWN = 0; - */ - const MOOD_UNKNOWN = 0; - /** - * Conditional - * - * Generated from protobuf enum CONDITIONAL_MOOD = 1; - */ - const CONDITIONAL_MOOD = 1; - /** - * Imperative - * - * Generated from protobuf enum IMPERATIVE = 2; - */ - const IMPERATIVE = 2; - /** - * Indicative - * - * Generated from protobuf enum INDICATIVE = 3; - */ - const INDICATIVE = 3; - /** - * Interrogative - * - * Generated from protobuf enum INTERROGATIVE = 4; - */ - const INTERROGATIVE = 4; - /** - * Jussive - * - * Generated from protobuf enum JUSSIVE = 5; - */ - const JUSSIVE = 5; - /** - * Subjunctive - * - * Generated from protobuf enum SUBJUNCTIVE = 6; - */ - const SUBJUNCTIVE = 6; - - private static $valueToName = [ - self::MOOD_UNKNOWN => 'MOOD_UNKNOWN', - self::CONDITIONAL_MOOD => 'CONDITIONAL_MOOD', - self::IMPERATIVE => 'IMPERATIVE', - self::INDICATIVE => 'INDICATIVE', - self::INTERROGATIVE => 'INTERROGATIVE', - self::JUSSIVE => 'JUSSIVE', - self::SUBJUNCTIVE => 'SUBJUNCTIVE', - ]; - - 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(Mood::class, \Google\Cloud\Language\V1\PartOfSpeech_Mood::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Number.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Number.php deleted file mode 100644 index 1663eed86eb7..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Number.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Number - */ -class Number -{ - /** - * Number is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum NUMBER_UNKNOWN = 0; - */ - const NUMBER_UNKNOWN = 0; - /** - * Singular - * - * Generated from protobuf enum SINGULAR = 1; - */ - const SINGULAR = 1; - /** - * Plural - * - * Generated from protobuf enum PLURAL = 2; - */ - const PLURAL = 2; - /** - * Dual - * - * Generated from protobuf enum DUAL = 3; - */ - const DUAL = 3; - - private static $valueToName = [ - self::NUMBER_UNKNOWN => 'NUMBER_UNKNOWN', - self::SINGULAR => 'SINGULAR', - self::PLURAL => 'PLURAL', - self::DUAL => 'DUAL', - ]; - - 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(Number::class, \Google\Cloud\Language\V1\PartOfSpeech_Number::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/PBCase.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/PBCase.php deleted file mode 100644 index 156b6963e012..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/PBCase.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Case - */ -class PBCase -{ - /** - * Case is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum CASE_UNKNOWN = 0; - */ - const CASE_UNKNOWN = 0; - /** - * Accusative - * - * Generated from protobuf enum ACCUSATIVE = 1; - */ - const ACCUSATIVE = 1; - /** - * Adverbial - * - * Generated from protobuf enum ADVERBIAL = 2; - */ - const ADVERBIAL = 2; - /** - * Complementive - * - * Generated from protobuf enum COMPLEMENTIVE = 3; - */ - const COMPLEMENTIVE = 3; - /** - * Dative - * - * Generated from protobuf enum DATIVE = 4; - */ - const DATIVE = 4; - /** - * Genitive - * - * Generated from protobuf enum GENITIVE = 5; - */ - const GENITIVE = 5; - /** - * Instrumental - * - * Generated from protobuf enum INSTRUMENTAL = 6; - */ - const INSTRUMENTAL = 6; - /** - * Locative - * - * Generated from protobuf enum LOCATIVE = 7; - */ - const LOCATIVE = 7; - /** - * Nominative - * - * Generated from protobuf enum NOMINATIVE = 8; - */ - const NOMINATIVE = 8; - /** - * Oblique - * - * Generated from protobuf enum OBLIQUE = 9; - */ - const OBLIQUE = 9; - /** - * Partitive - * - * Generated from protobuf enum PARTITIVE = 10; - */ - const PARTITIVE = 10; - /** - * Prepositional - * - * Generated from protobuf enum PREPOSITIONAL = 11; - */ - const PREPOSITIONAL = 11; - /** - * Reflexive - * - * Generated from protobuf enum REFLEXIVE_CASE = 12; - */ - const REFLEXIVE_CASE = 12; - /** - * Relative - * - * Generated from protobuf enum RELATIVE_CASE = 13; - */ - const RELATIVE_CASE = 13; - /** - * Vocative - * - * Generated from protobuf enum VOCATIVE = 14; - */ - const VOCATIVE = 14; - - private static $valueToName = [ - self::CASE_UNKNOWN => 'CASE_UNKNOWN', - self::ACCUSATIVE => 'ACCUSATIVE', - self::ADVERBIAL => 'ADVERBIAL', - self::COMPLEMENTIVE => 'COMPLEMENTIVE', - self::DATIVE => 'DATIVE', - self::GENITIVE => 'GENITIVE', - self::INSTRUMENTAL => 'INSTRUMENTAL', - self::LOCATIVE => 'LOCATIVE', - self::NOMINATIVE => 'NOMINATIVE', - self::OBLIQUE => 'OBLIQUE', - self::PARTITIVE => 'PARTITIVE', - self::PREPOSITIONAL => 'PREPOSITIONAL', - self::REFLEXIVE_CASE => 'REFLEXIVE_CASE', - self::RELATIVE_CASE => 'RELATIVE_CASE', - self::VOCATIVE => 'VOCATIVE', - ]; - - 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(PBCase::class, \Google\Cloud\Language\V1\PartOfSpeech_Case::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Person.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Person.php deleted file mode 100644 index ba1a5a463fed..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Person.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Person - */ -class Person -{ - /** - * Person is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum PERSON_UNKNOWN = 0; - */ - const PERSON_UNKNOWN = 0; - /** - * First - * - * Generated from protobuf enum FIRST = 1; - */ - const FIRST = 1; - /** - * Second - * - * Generated from protobuf enum SECOND = 2; - */ - const SECOND = 2; - /** - * Third - * - * Generated from protobuf enum THIRD = 3; - */ - const THIRD = 3; - /** - * Reflexive - * - * Generated from protobuf enum REFLEXIVE_PERSON = 4; - */ - const REFLEXIVE_PERSON = 4; - - private static $valueToName = [ - self::PERSON_UNKNOWN => 'PERSON_UNKNOWN', - self::FIRST => 'FIRST', - self::SECOND => 'SECOND', - self::THIRD => 'THIRD', - self::REFLEXIVE_PERSON => 'REFLEXIVE_PERSON', - ]; - - 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(Person::class, \Google\Cloud\Language\V1\PartOfSpeech_Person::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Proper.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Proper.php deleted file mode 100644 index 694ba0a32b40..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Proper.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Proper - */ -class Proper -{ - /** - * Proper is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum PROPER_UNKNOWN = 0; - */ - const PROPER_UNKNOWN = 0; - /** - * Proper - * - * Generated from protobuf enum PROPER = 1; - */ - const PROPER = 1; - /** - * Not proper - * - * Generated from protobuf enum NOT_PROPER = 2; - */ - const NOT_PROPER = 2; - - private static $valueToName = [ - self::PROPER_UNKNOWN => 'PROPER_UNKNOWN', - self::PROPER => 'PROPER', - self::NOT_PROPER => 'NOT_PROPER', - ]; - - 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(Proper::class, \Google\Cloud\Language\V1\PartOfSpeech_Proper::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Reciprocity.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Reciprocity.php deleted file mode 100644 index c849d6e3463c..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Reciprocity.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Reciprocity - */ -class Reciprocity -{ - /** - * Reciprocity is not applicable in the analyzed language or is not - * predicted. - * - * Generated from protobuf enum RECIPROCITY_UNKNOWN = 0; - */ - const RECIPROCITY_UNKNOWN = 0; - /** - * Reciprocal - * - * Generated from protobuf enum RECIPROCAL = 1; - */ - const RECIPROCAL = 1; - /** - * Non-reciprocal - * - * Generated from protobuf enum NON_RECIPROCAL = 2; - */ - const NON_RECIPROCAL = 2; - - private static $valueToName = [ - self::RECIPROCITY_UNKNOWN => 'RECIPROCITY_UNKNOWN', - self::RECIPROCAL => 'RECIPROCAL', - self::NON_RECIPROCAL => 'NON_RECIPROCAL', - ]; - - 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(Reciprocity::class, \Google\Cloud\Language\V1\PartOfSpeech_Reciprocity::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Tag.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Tag.php deleted file mode 100644 index 3e67b7be11ae..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Tag.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Tag - */ -class Tag -{ - /** - * Unknown - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * Adjective - * - * Generated from protobuf enum ADJ = 1; - */ - const ADJ = 1; - /** - * Adposition (preposition and postposition) - * - * Generated from protobuf enum ADP = 2; - */ - const ADP = 2; - /** - * Adverb - * - * Generated from protobuf enum ADV = 3; - */ - const ADV = 3; - /** - * Conjunction - * - * Generated from protobuf enum CONJ = 4; - */ - const CONJ = 4; - /** - * Determiner - * - * Generated from protobuf enum DET = 5; - */ - const DET = 5; - /** - * Noun (common and proper) - * - * Generated from protobuf enum NOUN = 6; - */ - const NOUN = 6; - /** - * Cardinal number - * - * Generated from protobuf enum NUM = 7; - */ - const NUM = 7; - /** - * Pronoun - * - * Generated from protobuf enum PRON = 8; - */ - const PRON = 8; - /** - * Particle or other function word - * - * Generated from protobuf enum PRT = 9; - */ - const PRT = 9; - /** - * Punctuation - * - * Generated from protobuf enum PUNCT = 10; - */ - const PUNCT = 10; - /** - * Verb (all tenses and modes) - * - * Generated from protobuf enum VERB = 11; - */ - const VERB = 11; - /** - * Other: foreign words, typos, abbreviations - * - * Generated from protobuf enum X = 12; - */ - const X = 12; - /** - * Affix - * - * Generated from protobuf enum AFFIX = 13; - */ - const AFFIX = 13; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::ADJ => 'ADJ', - self::ADP => 'ADP', - self::ADV => 'ADV', - self::CONJ => 'CONJ', - self::DET => 'DET', - self::NOUN => 'NOUN', - self::NUM => 'NUM', - self::PRON => 'PRON', - self::PRT => 'PRT', - self::PUNCT => 'PUNCT', - self::VERB => 'VERB', - self::X => 'X', - self::AFFIX => 'AFFIX', - ]; - - 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(Tag::class, \Google\Cloud\Language\V1\PartOfSpeech_Tag::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Tense.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Tense.php deleted file mode 100644 index 3d0e65618a04..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Tense.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Tense - */ -class Tense -{ - /** - * Tense is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum TENSE_UNKNOWN = 0; - */ - const TENSE_UNKNOWN = 0; - /** - * Conditional - * - * Generated from protobuf enum CONDITIONAL_TENSE = 1; - */ - const CONDITIONAL_TENSE = 1; - /** - * Future - * - * Generated from protobuf enum FUTURE = 2; - */ - const FUTURE = 2; - /** - * Past - * - * Generated from protobuf enum PAST = 3; - */ - const PAST = 3; - /** - * Present - * - * Generated from protobuf enum PRESENT = 4; - */ - const PRESENT = 4; - /** - * Imperfect - * - * Generated from protobuf enum IMPERFECT = 5; - */ - const IMPERFECT = 5; - /** - * Pluperfect - * - * Generated from protobuf enum PLUPERFECT = 6; - */ - const PLUPERFECT = 6; - - private static $valueToName = [ - self::TENSE_UNKNOWN => 'TENSE_UNKNOWN', - self::CONDITIONAL_TENSE => 'CONDITIONAL_TENSE', - self::FUTURE => 'FUTURE', - self::PAST => 'PAST', - self::PRESENT => 'PRESENT', - self::IMPERFECT => 'IMPERFECT', - self::PLUPERFECT => 'PLUPERFECT', - ]; - - 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(Tense::class, \Google\Cloud\Language\V1\PartOfSpeech_Tense::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Voice.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Voice.php deleted file mode 100644 index ea5996d4fe4d..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Voice.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Voice - */ -class Voice -{ - /** - * Voice is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum VOICE_UNKNOWN = 0; - */ - const VOICE_UNKNOWN = 0; - /** - * Active - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * Causative - * - * Generated from protobuf enum CAUSATIVE = 2; - */ - const CAUSATIVE = 2; - /** - * Passive - * - * Generated from protobuf enum PASSIVE = 3; - */ - const PASSIVE = 3; - - private static $valueToName = [ - self::VOICE_UNKNOWN => 'VOICE_UNKNOWN', - self::ACTIVE => 'ACTIVE', - self::CAUSATIVE => 'CAUSATIVE', - self::PASSIVE => 'PASSIVE', - ]; - - 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(Voice::class, \Google\Cloud\Language\V1\PartOfSpeech_Voice::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Sentence.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Sentence.php deleted file mode 100644 index ab4a4b8ac465..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Sentence.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.language.v1.Sentence - */ -class Sentence extends \Google\Protobuf\Internal\Message -{ - /** - * The sentence text. - * - * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; - */ - protected $text = null; - /** - * For calls to [AnalyzeSentiment][] or if - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] - * is set to true, this field will contain the sentiment for the sentence. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 2; - */ - protected $sentiment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\TextSpan $text - * The sentence text. - * @type \Google\Cloud\Language\V1\Sentiment $sentiment - * For calls to [AnalyzeSentiment][] or if - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] - * is set to true, this field will contain the sentiment for the sentence. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The sentence text. - * - * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; - * @return \Google\Cloud\Language\V1\TextSpan|null - */ - public function getText() - { - return $this->text; - } - - public function hasText() - { - return isset($this->text); - } - - public function clearText() - { - unset($this->text); - } - - /** - * The sentence text. - * - * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; - * @param \Google\Cloud\Language\V1\TextSpan $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\TextSpan::class); - $this->text = $var; - - return $this; - } - - /** - * For calls to [AnalyzeSentiment][] or if - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] - * is set to true, this field will contain the sentiment for the sentence. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 2; - * @return \Google\Cloud\Language\V1\Sentiment|null - */ - public function getSentiment() - { - return $this->sentiment; - } - - public function hasSentiment() - { - return isset($this->sentiment); - } - - public function clearSentiment() - { - unset($this->sentiment); - } - - /** - * For calls to [AnalyzeSentiment][] or if - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] - * is set to true, this field will contain the sentiment for the sentence. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 2; - * @param \Google\Cloud\Language\V1\Sentiment $var - * @return $this - */ - public function setSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Sentiment::class); - $this->sentiment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Sentiment.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Sentiment.php deleted file mode 100644 index f58d7d6a31be..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Sentiment.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.language.v1.Sentiment - */ -class Sentiment extends \Google\Protobuf\Internal\Message -{ - /** - * A non-negative number in the [0, +inf) range, which represents - * the absolute magnitude of sentiment regardless of score (positive or - * negative). - * - * Generated from protobuf field float magnitude = 2; - */ - protected $magnitude = 0.0; - /** - * Sentiment score between -1.0 (negative sentiment) and 1.0 - * (positive sentiment). - * - * Generated from protobuf field float score = 3; - */ - protected $score = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $magnitude - * A non-negative number in the [0, +inf) range, which represents - * the absolute magnitude of sentiment regardless of score (positive or - * negative). - * @type float $score - * Sentiment score between -1.0 (negative sentiment) and 1.0 - * (positive sentiment). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * A non-negative number in the [0, +inf) range, which represents - * the absolute magnitude of sentiment regardless of score (positive or - * negative). - * - * Generated from protobuf field float magnitude = 2; - * @return float - */ - public function getMagnitude() - { - return $this->magnitude; - } - - /** - * A non-negative number in the [0, +inf) range, which represents - * the absolute magnitude of sentiment regardless of score (positive or - * negative). - * - * Generated from protobuf field float magnitude = 2; - * @param float $var - * @return $this - */ - public function setMagnitude($var) - { - GPBUtil::checkFloat($var); - $this->magnitude = $var; - - return $this; - } - - /** - * Sentiment score between -1.0 (negative sentiment) and 1.0 - * (positive sentiment). - * - * Generated from protobuf field float score = 3; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * Sentiment score between -1.0 (negative sentiment) and 1.0 - * (positive sentiment). - * - * Generated from protobuf field float score = 3; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/TextSpan.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/TextSpan.php deleted file mode 100644 index 0f4018a1b30f..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/TextSpan.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.language.v1.TextSpan - */ -class TextSpan extends \Google\Protobuf\Internal\Message -{ - /** - * The content of the output text. - * - * Generated from protobuf field string content = 1; - */ - protected $content = ''; - /** - * The API calculates the beginning offset of the content in the original - * document according to the - * [EncodingType][google.cloud.language.v1.EncodingType] specified in the API - * request. - * - * Generated from protobuf field int32 begin_offset = 2; - */ - protected $begin_offset = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $content - * The content of the output text. - * @type int $begin_offset - * The API calculates the beginning offset of the content in the original - * document according to the - * [EncodingType][google.cloud.language.v1.EncodingType] specified in the API - * request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The content of the output text. - * - * Generated from protobuf field string content = 1; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * The content of the output text. - * - * Generated from protobuf field string content = 1; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, True); - $this->content = $var; - - return $this; - } - - /** - * The API calculates the beginning offset of the content in the original - * document according to the - * [EncodingType][google.cloud.language.v1.EncodingType] specified in the API - * request. - * - * Generated from protobuf field int32 begin_offset = 2; - * @return int - */ - public function getBeginOffset() - { - return $this->begin_offset; - } - - /** - * The API calculates the beginning offset of the content in the original - * document according to the - * [EncodingType][google.cloud.language.v1.EncodingType] specified in the API - * request. - * - * Generated from protobuf field int32 begin_offset = 2; - * @param int $var - * @return $this - */ - public function setBeginOffset($var) - { - GPBUtil::checkInt32($var); - $this->begin_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Token.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Token.php deleted file mode 100644 index f01477f0c5d6..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Token.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.language.v1.Token - */ -class Token extends \Google\Protobuf\Internal\Message -{ - /** - * The token text. - * - * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; - */ - protected $text = null; - /** - * Parts of speech tag for this token. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech part_of_speech = 2; - */ - protected $part_of_speech = null; - /** - * Dependency tree parse for this token. - * - * Generated from protobuf field .google.cloud.language.v1.DependencyEdge dependency_edge = 3; - */ - protected $dependency_edge = null; - /** - * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. - * - * Generated from protobuf field string lemma = 4; - */ - protected $lemma = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\TextSpan $text - * The token text. - * @type \Google\Cloud\Language\V1\PartOfSpeech $part_of_speech - * Parts of speech tag for this token. - * @type \Google\Cloud\Language\V1\DependencyEdge $dependency_edge - * Dependency tree parse for this token. - * @type string $lemma - * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The token text. - * - * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; - * @return \Google\Cloud\Language\V1\TextSpan|null - */ - public function getText() - { - return $this->text; - } - - public function hasText() - { - return isset($this->text); - } - - public function clearText() - { - unset($this->text); - } - - /** - * The token text. - * - * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; - * @param \Google\Cloud\Language\V1\TextSpan $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\TextSpan::class); - $this->text = $var; - - return $this; - } - - /** - * Parts of speech tag for this token. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech part_of_speech = 2; - * @return \Google\Cloud\Language\V1\PartOfSpeech|null - */ - public function getPartOfSpeech() - { - return $this->part_of_speech; - } - - public function hasPartOfSpeech() - { - return isset($this->part_of_speech); - } - - public function clearPartOfSpeech() - { - unset($this->part_of_speech); - } - - /** - * Parts of speech tag for this token. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech part_of_speech = 2; - * @param \Google\Cloud\Language\V1\PartOfSpeech $var - * @return $this - */ - public function setPartOfSpeech($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\PartOfSpeech::class); - $this->part_of_speech = $var; - - return $this; - } - - /** - * Dependency tree parse for this token. - * - * Generated from protobuf field .google.cloud.language.v1.DependencyEdge dependency_edge = 3; - * @return \Google\Cloud\Language\V1\DependencyEdge|null - */ - public function getDependencyEdge() - { - return $this->dependency_edge; - } - - public function hasDependencyEdge() - { - return isset($this->dependency_edge); - } - - public function clearDependencyEdge() - { - unset($this->dependency_edge); - } - - /** - * Dependency tree parse for this token. - * - * Generated from protobuf field .google.cloud.language.v1.DependencyEdge dependency_edge = 3; - * @param \Google\Cloud\Language\V1\DependencyEdge $var - * @return $this - */ - public function setDependencyEdge($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\DependencyEdge::class); - $this->dependency_edge = $var; - - return $this; - } - - /** - * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. - * - * Generated from protobuf field string lemma = 4; - * @return string - */ - public function getLemma() - { - return $this->lemma; - } - - /** - * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. - * - * Generated from protobuf field string lemma = 4; - * @param string $var - * @return $this - */ - public function setLemma($var) - { - GPBUtil::checkString($var, True); - $this->lemma = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_entities.php b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_entities.php deleted file mode 100644 index e6cae5c272d0..000000000000 --- a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_entities.php +++ /dev/null @@ -1,62 +0,0 @@ -setDocument($document); - - // Call the API and handle any network failures. - try { - /** @var AnalyzeEntitiesResponse $response */ - $response = $languageServiceClient->analyzeEntities($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1_generated_LanguageService_AnalyzeEntities_sync] diff --git a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_entity_sentiment.php b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_entity_sentiment.php deleted file mode 100644 index 0704a32897e6..000000000000 --- a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_entity_sentiment.php +++ /dev/null @@ -1,63 +0,0 @@ -setDocument($document); - - // Call the API and handle any network failures. - try { - /** @var AnalyzeEntitySentimentResponse $response */ - $response = $languageServiceClient->analyzeEntitySentiment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1_generated_LanguageService_AnalyzeEntitySentiment_sync] diff --git a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_sentiment.php b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_sentiment.php deleted file mode 100644 index e09715114838..000000000000 --- a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_sentiment.php +++ /dev/null @@ -1,60 +0,0 @@ -setDocument($document); - - // Call the API and handle any network failures. - try { - /** @var AnalyzeSentimentResponse $response */ - $response = $languageServiceClient->analyzeSentiment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1_generated_LanguageService_AnalyzeSentiment_sync] diff --git a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_syntax.php b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_syntax.php deleted file mode 100644 index 0a850d884c58..000000000000 --- a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_syntax.php +++ /dev/null @@ -1,62 +0,0 @@ -setDocument($document); - - // Call the API and handle any network failures. - try { - /** @var AnalyzeSyntaxResponse $response */ - $response = $languageServiceClient->analyzeSyntax($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1_generated_LanguageService_AnalyzeSyntax_sync] diff --git a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/annotate_text.php b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/annotate_text.php deleted file mode 100644 index d9c20d163e88..000000000000 --- a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/annotate_text.php +++ /dev/null @@ -1,64 +0,0 @@ -setDocument($document) - ->setFeatures($features); - - // Call the API and handle any network failures. - try { - /** @var AnnotateTextResponse $response */ - $response = $languageServiceClient->annotateText($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1_generated_LanguageService_AnnotateText_sync] diff --git a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/classify_text.php b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/classify_text.php deleted file mode 100644 index 1acac6c7b81a..000000000000 --- a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/classify_text.php +++ /dev/null @@ -1,60 +0,0 @@ -setDocument($document); - - // Call the API and handle any network failures. - try { - /** @var ClassifyTextResponse $response */ - $response = $languageServiceClient->classifyText($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1_generated_LanguageService_ClassifyText_sync] diff --git a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/moderate_text.php b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/moderate_text.php deleted file mode 100644 index 3a5abb2adffc..000000000000 --- a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/moderate_text.php +++ /dev/null @@ -1,60 +0,0 @@ -setDocument($document); - - // Call the API and handle any network failures. - try { - /** @var ModerateTextResponse $response */ - $response = $languageServiceClient->moderateText($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1_generated_LanguageService_ModerateText_sync] diff --git a/owl-bot-staging/Language/v1/src/V1/Client/LanguageServiceClient.php b/owl-bot-staging/Language/v1/src/V1/Client/LanguageServiceClient.php deleted file mode 100644 index 495bb745d1c9..000000000000 --- a/owl-bot-staging/Language/v1/src/V1/Client/LanguageServiceClient.php +++ /dev/null @@ -1,378 +0,0 @@ - analyzeEntitiesAsync(AnalyzeEntitiesRequest $request, array $optionalArgs = []) - * @method PromiseInterface analyzeEntitySentimentAsync(AnalyzeEntitySentimentRequest $request, array $optionalArgs = []) - * @method PromiseInterface analyzeSentimentAsync(AnalyzeSentimentRequest $request, array $optionalArgs = []) - * @method PromiseInterface analyzeSyntaxAsync(AnalyzeSyntaxRequest $request, array $optionalArgs = []) - * @method PromiseInterface annotateTextAsync(AnnotateTextRequest $request, array $optionalArgs = []) - * @method PromiseInterface classifyTextAsync(ClassifyTextRequest $request, array $optionalArgs = []) - * @method PromiseInterface moderateTextAsync(ModerateTextRequest $request, array $optionalArgs = []) - */ -final class LanguageServiceClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.language.v1.LanguageService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'language.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'language.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-language', - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/language_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/language_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/language_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/language_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $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 'language.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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); - } - - /** - * Finds named entities (currently proper names and common nouns) in the text - * along with entity types, salience, mentions for each entity, and - * other properties. - * - * The async variant is {@see LanguageServiceClient::analyzeEntitiesAsync()} . - * - * @example samples/V1/LanguageServiceClient/analyze_entities.php - * - * @param AnalyzeEntitiesRequest $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 AnalyzeEntitiesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function analyzeEntities(AnalyzeEntitiesRequest $request, array $callOptions = []): AnalyzeEntitiesResponse - { - return $this->startApiCall('AnalyzeEntities', $request, $callOptions)->wait(); - } - - /** - * Finds entities, similar to - * [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] - * in the text and analyzes sentiment associated with each entity and its - * mentions. - * - * The async variant is {@see LanguageServiceClient::analyzeEntitySentimentAsync()} - * . - * - * @example samples/V1/LanguageServiceClient/analyze_entity_sentiment.php - * - * @param AnalyzeEntitySentimentRequest $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 AnalyzeEntitySentimentResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function analyzeEntitySentiment(AnalyzeEntitySentimentRequest $request, array $callOptions = []): AnalyzeEntitySentimentResponse - { - return $this->startApiCall('AnalyzeEntitySentiment', $request, $callOptions)->wait(); - } - - /** - * Analyzes the sentiment of the provided text. - * - * The async variant is {@see LanguageServiceClient::analyzeSentimentAsync()} . - * - * @example samples/V1/LanguageServiceClient/analyze_sentiment.php - * - * @param AnalyzeSentimentRequest $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 AnalyzeSentimentResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function analyzeSentiment(AnalyzeSentimentRequest $request, array $callOptions = []): AnalyzeSentimentResponse - { - return $this->startApiCall('AnalyzeSentiment', $request, $callOptions)->wait(); - } - - /** - * Analyzes the syntax of the text and provides sentence boundaries and - * tokenization along with part of speech tags, dependency trees, and other - * properties. - * - * The async variant is {@see LanguageServiceClient::analyzeSyntaxAsync()} . - * - * @example samples/V1/LanguageServiceClient/analyze_syntax.php - * - * @param AnalyzeSyntaxRequest $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 AnalyzeSyntaxResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function analyzeSyntax(AnalyzeSyntaxRequest $request, array $callOptions = []): AnalyzeSyntaxResponse - { - return $this->startApiCall('AnalyzeSyntax', $request, $callOptions)->wait(); - } - - /** - * A convenience method that provides all the features that analyzeSentiment, - * analyzeEntities, and analyzeSyntax provide in one call. - * - * The async variant is {@see LanguageServiceClient::annotateTextAsync()} . - * - * @example samples/V1/LanguageServiceClient/annotate_text.php - * - * @param AnnotateTextRequest $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 AnnotateTextResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function annotateText(AnnotateTextRequest $request, array $callOptions = []): AnnotateTextResponse - { - return $this->startApiCall('AnnotateText', $request, $callOptions)->wait(); - } - - /** - * Classifies a document into categories. - * - * The async variant is {@see LanguageServiceClient::classifyTextAsync()} . - * - * @example samples/V1/LanguageServiceClient/classify_text.php - * - * @param ClassifyTextRequest $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 ClassifyTextResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function classifyText(ClassifyTextRequest $request, array $callOptions = []): ClassifyTextResponse - { - return $this->startApiCall('ClassifyText', $request, $callOptions)->wait(); - } - - /** - * Moderates a document for harmful and sensitive categories. - * - * The async variant is {@see LanguageServiceClient::moderateTextAsync()} . - * - * @example samples/V1/LanguageServiceClient/moderate_text.php - * - * @param ModerateTextRequest $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 ModerateTextResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function moderateText(ModerateTextRequest $request, array $callOptions = []): ModerateTextResponse - { - return $this->startApiCall('ModerateText', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Language/v1/src/V1/Gapic/LanguageServiceGapicClient.php b/owl-bot-staging/Language/v1/src/V1/Gapic/LanguageServiceGapicClient.php deleted file mode 100644 index 28802f41eeb5..000000000000 --- a/owl-bot-staging/Language/v1/src/V1/Gapic/LanguageServiceGapicClient.php +++ /dev/null @@ -1,476 +0,0 @@ -analyzeEntities($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @deprecated Please use the new service client {@see \Google\Cloud\Language\V1\Client\LanguageServiceClient}. - */ -class LanguageServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.language.v1.LanguageService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'language.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'language.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-language', - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/language_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/language_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/language_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/language_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $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 'language.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Finds named entities (currently proper names and common nouns) in the text - * along with entity types, salience, mentions for each entity, and - * other properties. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $response = $languageServiceClient->analyzeEntities($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param array $optionalArgs { - * Optional. - * - * @type int $encodingType - * The encoding type used by the API to calculate offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1\EncodingType} - * @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 \Google\Cloud\Language\V1\AnalyzeEntitiesResponse - * - * @throws ApiException if the remote call fails - */ - public function analyzeEntities($document, array $optionalArgs = []) - { - $request = new AnalyzeEntitiesRequest(); - $request->setDocument($document); - if (isset($optionalArgs['encodingType'])) { - $request->setEncodingType($optionalArgs['encodingType']); - } - - return $this->startCall('AnalyzeEntities', AnalyzeEntitiesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Finds entities, similar to - * [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] - * in the text and analyzes sentiment associated with each entity and its - * mentions. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $response = $languageServiceClient->analyzeEntitySentiment($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param array $optionalArgs { - * Optional. - * - * @type int $encodingType - * The encoding type used by the API to calculate offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1\EncodingType} - * @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 \Google\Cloud\Language\V1\AnalyzeEntitySentimentResponse - * - * @throws ApiException if the remote call fails - */ - public function analyzeEntitySentiment($document, array $optionalArgs = []) - { - $request = new AnalyzeEntitySentimentRequest(); - $request->setDocument($document); - if (isset($optionalArgs['encodingType'])) { - $request->setEncodingType($optionalArgs['encodingType']); - } - - return $this->startCall('AnalyzeEntitySentiment', AnalyzeEntitySentimentResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Analyzes the sentiment of the provided text. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $response = $languageServiceClient->analyzeSentiment($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param array $optionalArgs { - * Optional. - * - * @type int $encodingType - * The encoding type used by the API to calculate sentence offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1\EncodingType} - * @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 \Google\Cloud\Language\V1\AnalyzeSentimentResponse - * - * @throws ApiException if the remote call fails - */ - public function analyzeSentiment($document, array $optionalArgs = []) - { - $request = new AnalyzeSentimentRequest(); - $request->setDocument($document); - if (isset($optionalArgs['encodingType'])) { - $request->setEncodingType($optionalArgs['encodingType']); - } - - return $this->startCall('AnalyzeSentiment', AnalyzeSentimentResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Analyzes the syntax of the text and provides sentence boundaries and - * tokenization along with part of speech tags, dependency trees, and other - * properties. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $response = $languageServiceClient->analyzeSyntax($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param array $optionalArgs { - * Optional. - * - * @type int $encodingType - * The encoding type used by the API to calculate offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1\EncodingType} - * @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 \Google\Cloud\Language\V1\AnalyzeSyntaxResponse - * - * @throws ApiException if the remote call fails - */ - public function analyzeSyntax($document, array $optionalArgs = []) - { - $request = new AnalyzeSyntaxRequest(); - $request->setDocument($document); - if (isset($optionalArgs['encodingType'])) { - $request->setEncodingType($optionalArgs['encodingType']); - } - - return $this->startCall('AnalyzeSyntax', AnalyzeSyntaxResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * A convenience method that provides all the features that analyzeSentiment, - * analyzeEntities, and analyzeSyntax provide in one call. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $features = new Features(); - * $response = $languageServiceClient->annotateText($document, $features); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param Features $features Required. The enabled features. - * @param array $optionalArgs { - * Optional. - * - * @type int $encodingType - * The encoding type used by the API to calculate offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1\EncodingType} - * @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 \Google\Cloud\Language\V1\AnnotateTextResponse - * - * @throws ApiException if the remote call fails - */ - public function annotateText($document, $features, array $optionalArgs = []) - { - $request = new AnnotateTextRequest(); - $request->setDocument($document); - $request->setFeatures($features); - if (isset($optionalArgs['encodingType'])) { - $request->setEncodingType($optionalArgs['encodingType']); - } - - return $this->startCall('AnnotateText', AnnotateTextResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Classifies a document into categories. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $response = $languageServiceClient->classifyText($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param array $optionalArgs { - * Optional. - * - * @type ClassificationModelOptions $classificationModelOptions - * Model options to use for classification. Defaults to v1 options if not - * specified. - * @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 \Google\Cloud\Language\V1\ClassifyTextResponse - * - * @throws ApiException if the remote call fails - */ - public function classifyText($document, array $optionalArgs = []) - { - $request = new ClassifyTextRequest(); - $request->setDocument($document); - if (isset($optionalArgs['classificationModelOptions'])) { - $request->setClassificationModelOptions($optionalArgs['classificationModelOptions']); - } - - return $this->startCall('ClassifyText', ClassifyTextResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Moderates a document for harmful and sensitive categories. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $response = $languageServiceClient->moderateText($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param array $optionalArgs { - * 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 \Google\Cloud\Language\V1\ModerateTextResponse - * - * @throws ApiException if the remote call fails - */ - public function moderateText($document, array $optionalArgs = []) - { - $request = new ModerateTextRequest(); - $request->setDocument($document); - return $this->startCall('ModerateText', ModerateTextResponse::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Language/v1/src/V1/LanguageServiceClient.php b/owl-bot-staging/Language/v1/src/V1/LanguageServiceClient.php deleted file mode 100644 index f92f76bdb3cb..000000000000 --- a/owl-bot-staging/Language/v1/src/V1/LanguageServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.language.v1.LanguageService' => [ - 'AnalyzeEntities' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Language\V1\AnalyzeEntitiesResponse', - ], - 'AnalyzeEntitySentiment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Language\V1\AnalyzeEntitySentimentResponse', - ], - 'AnalyzeSentiment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Language\V1\AnalyzeSentimentResponse', - ], - 'AnalyzeSyntax' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Language\V1\AnalyzeSyntaxResponse', - ], - 'AnnotateText' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Language\V1\AnnotateTextResponse', - ], - 'ClassifyText' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Language\V1\ClassifyTextResponse', - ], - 'ModerateText' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Language\V1\ModerateTextResponse', - ], - ], - ], -]; diff --git a/owl-bot-staging/Language/v1/src/V1/resources/language_service_rest_client_config.php b/owl-bot-staging/Language/v1/src/V1/resources/language_service_rest_client_config.php deleted file mode 100644 index e616a1719cce..000000000000 --- a/owl-bot-staging/Language/v1/src/V1/resources/language_service_rest_client_config.php +++ /dev/null @@ -1,64 +0,0 @@ - [ - 'google.cloud.language.v1.LanguageService' => [ - 'AnalyzeEntities' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/documents:analyzeEntities', - 'body' => '*', - ], - 'AnalyzeEntitySentiment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/documents:analyzeEntitySentiment', - 'body' => '*', - ], - 'AnalyzeSentiment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/documents:analyzeSentiment', - 'body' => '*', - ], - 'AnalyzeSyntax' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/documents:analyzeSyntax', - 'body' => '*', - ], - 'AnnotateText' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/documents:annotateText', - 'body' => '*', - ], - 'ClassifyText' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/documents:classifyText', - 'body' => '*', - ], - 'ModerateText' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/documents:moderateText', - 'body' => '*', - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Language/v1/tests/Unit/V1/Client/LanguageServiceClientTest.php b/owl-bot-staging/Language/v1/tests/Unit/V1/Client/LanguageServiceClientTest.php deleted file mode 100644 index 142fcc2ddac9..000000000000 --- a/owl-bot-staging/Language/v1/tests/Unit/V1/Client/LanguageServiceClientTest.php +++ /dev/null @@ -1,555 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return LanguageServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new LanguageServiceClient($options); - } - - /** @test */ - public function analyzeEntitiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnalyzeEntitiesResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $request = (new AnalyzeEntitiesRequest()) - ->setDocument($document); - $response = $gapicClient->analyzeEntities($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.language.v1.LanguageService/AnalyzeEntities', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeEntitiesExceptionTest() - { - $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 - $document = new Document(); - $request = (new AnalyzeEntitiesRequest()) - ->setDocument($document); - try { - $gapicClient->analyzeEntities($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 analyzeEntitySentimentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnalyzeEntitySentimentResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $request = (new AnalyzeEntitySentimentRequest()) - ->setDocument($document); - $response = $gapicClient->analyzeEntitySentiment($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.language.v1.LanguageService/AnalyzeEntitySentiment', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeEntitySentimentExceptionTest() - { - $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 - $document = new Document(); - $request = (new AnalyzeEntitySentimentRequest()) - ->setDocument($document); - try { - $gapicClient->analyzeEntitySentiment($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 analyzeSentimentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnalyzeSentimentResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $request = (new AnalyzeSentimentRequest()) - ->setDocument($document); - $response = $gapicClient->analyzeSentiment($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.language.v1.LanguageService/AnalyzeSentiment', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeSentimentExceptionTest() - { - $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 - $document = new Document(); - $request = (new AnalyzeSentimentRequest()) - ->setDocument($document); - try { - $gapicClient->analyzeSentiment($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 analyzeSyntaxTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnalyzeSyntaxResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $request = (new AnalyzeSyntaxRequest()) - ->setDocument($document); - $response = $gapicClient->analyzeSyntax($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.language.v1.LanguageService/AnalyzeSyntax', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeSyntaxExceptionTest() - { - $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 - $document = new Document(); - $request = (new AnalyzeSyntaxRequest()) - ->setDocument($document); - try { - $gapicClient->analyzeSyntax($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 annotateTextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnnotateTextResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $features = new Features(); - $request = (new AnnotateTextRequest()) - ->setDocument($document) - ->setFeatures($features); - $response = $gapicClient->annotateText($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.language.v1.LanguageService/AnnotateText', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $actualValue = $actualRequestObject->getFeatures(); - $this->assertProtobufEquals($features, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function annotateTextExceptionTest() - { - $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 - $document = new Document(); - $features = new Features(); - $request = (new AnnotateTextRequest()) - ->setDocument($document) - ->setFeatures($features); - try { - $gapicClient->annotateText($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 classifyTextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ClassifyTextResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $request = (new ClassifyTextRequest()) - ->setDocument($document); - $response = $gapicClient->classifyText($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.language.v1.LanguageService/ClassifyText', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function classifyTextExceptionTest() - { - $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 - $document = new Document(); - $request = (new ClassifyTextRequest()) - ->setDocument($document); - try { - $gapicClient->classifyText($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 moderateTextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ModerateTextResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $request = (new ModerateTextRequest()) - ->setDocument($document); - $response = $gapicClient->moderateText($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.language.v1.LanguageService/ModerateText', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function moderateTextExceptionTest() - { - $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 - $document = new Document(); - $request = (new ModerateTextRequest()) - ->setDocument($document); - try { - $gapicClient->moderateText($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 analyzeEntitiesAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnalyzeEntitiesResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $request = (new AnalyzeEntitiesRequest()) - ->setDocument($document); - $response = $gapicClient->analyzeEntitiesAsync($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.language.v1.LanguageService/AnalyzeEntities', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Language/v1/tests/Unit/V1/LanguageServiceClientTest.php b/owl-bot-staging/Language/v1/tests/Unit/V1/LanguageServiceClientTest.php deleted file mode 100644 index 720476a8571d..000000000000 --- a/owl-bot-staging/Language/v1/tests/Unit/V1/LanguageServiceClientTest.php +++ /dev/null @@ -1,489 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return LanguageServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new LanguageServiceClient($options); - } - - /** @test */ - public function analyzeEntitiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnalyzeEntitiesResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $response = $gapicClient->analyzeEntities($document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1.LanguageService/AnalyzeEntities', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeEntitiesExceptionTest() - { - $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 - $document = new Document(); - try { - $gapicClient->analyzeEntities($document); - // 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 analyzeEntitySentimentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnalyzeEntitySentimentResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $response = $gapicClient->analyzeEntitySentiment($document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1.LanguageService/AnalyzeEntitySentiment', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeEntitySentimentExceptionTest() - { - $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 - $document = new Document(); - try { - $gapicClient->analyzeEntitySentiment($document); - // 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 analyzeSentimentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnalyzeSentimentResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $response = $gapicClient->analyzeSentiment($document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1.LanguageService/AnalyzeSentiment', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeSentimentExceptionTest() - { - $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 - $document = new Document(); - try { - $gapicClient->analyzeSentiment($document); - // 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 analyzeSyntaxTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnalyzeSyntaxResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $response = $gapicClient->analyzeSyntax($document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1.LanguageService/AnalyzeSyntax', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeSyntaxExceptionTest() - { - $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 - $document = new Document(); - try { - $gapicClient->analyzeSyntax($document); - // 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 annotateTextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnnotateTextResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $features = new Features(); - $response = $gapicClient->annotateText($document, $features); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1.LanguageService/AnnotateText', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $actualValue = $actualRequestObject->getFeatures(); - $this->assertProtobufEquals($features, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function annotateTextExceptionTest() - { - $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 - $document = new Document(); - $features = new Features(); - try { - $gapicClient->annotateText($document, $features); - // 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 classifyTextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ClassifyTextResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $response = $gapicClient->classifyText($document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1.LanguageService/ClassifyText', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function classifyTextExceptionTest() - { - $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 - $document = new Document(); - try { - $gapicClient->classifyText($document); - // 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 moderateTextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ModerateTextResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $response = $gapicClient->moderateText($document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1.LanguageService/ModerateText', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function moderateTextExceptionTest() - { - $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 - $document = new Document(); - try { - $gapicClient->moderateText($document); - // 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()); - } -} diff --git a/owl-bot-staging/Language/v1beta2/proto/src/GPBMetadata/Google/Cloud/Language/V1Beta2/LanguageService.php b/owl-bot-staging/Language/v1beta2/proto/src/GPBMetadata/Google/Cloud/Language/V1Beta2/LanguageService.php deleted file mode 100644 index cbde99bb7e59..000000000000 Binary files a/owl-bot-staging/Language/v1beta2/proto/src/GPBMetadata/Google/Cloud/Language/V1Beta2/LanguageService.php and /dev/null differ diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitiesRequest.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitiesRequest.php deleted file mode 100644 index d6a55c91b009..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitiesRequest.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.language.v1beta2.AnalyzeEntitiesRequest - */ -class AnalyzeEntitiesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - */ - protected $encoding_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\Document $document - * Required. Input document. - * @type int $encoding_type - * The encoding type used by the API to calculate offsets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1beta2\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1beta2\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitiesResponse.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitiesResponse.php deleted file mode 100644 index 84100e331c33..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitiesResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.language.v1beta2.AnalyzeEntitiesResponse - */ -class AnalyzeEntitiesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The recognized entities in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 1; - */ - private $entities; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] - * field for more details. - * - * Generated from protobuf field string language = 2; - */ - protected $language = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V1beta2\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * The recognized entities in the input document. - * @type string $language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] - * field for more details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The recognized entities in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * The recognized entities in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 1; - * @param array<\Google\Cloud\Language\V1beta2\Entity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] - * field for more details. - * - * Generated from protobuf field string language = 2; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] - * field for more details. - * - * Generated from protobuf field string language = 2; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitySentimentRequest.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitySentimentRequest.php deleted file mode 100644 index 0518237c96b6..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitySentimentRequest.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest - */ -class AnalyzeEntitySentimentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - */ - protected $encoding_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\Document $document - * Required. Input document. - * @type int $encoding_type - * The encoding type used by the API to calculate offsets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1beta2\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1beta2\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitySentimentResponse.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitySentimentResponse.php deleted file mode 100644 index a28b23ed2890..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitySentimentResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse - */ -class AnalyzeEntitySentimentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The recognized entities in the input document with associated sentiments. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 1; - */ - private $entities; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] - * field for more details. - * - * Generated from protobuf field string language = 2; - */ - protected $language = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V1beta2\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * The recognized entities in the input document with associated sentiments. - * @type string $language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] - * field for more details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The recognized entities in the input document with associated sentiments. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * The recognized entities in the input document with associated sentiments. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 1; - * @param array<\Google\Cloud\Language\V1beta2\Entity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] - * field for more details. - * - * Generated from protobuf field string language = 2; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] - * field for more details. - * - * Generated from protobuf field string language = 2; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSentimentRequest.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSentimentRequest.php deleted file mode 100644 index 80c589be0ee6..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSentimentRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.language.v1beta2.AnalyzeSentimentRequest - */ -class AnalyzeSentimentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The encoding type used by the API to calculate sentence offsets for the - * sentence sentiment. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - */ - protected $encoding_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\Document $document - * Required. Input document. - * @type int $encoding_type - * The encoding type used by the API to calculate sentence offsets for the - * sentence sentiment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1beta2\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1beta2\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate sentence offsets for the - * sentence sentiment. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate sentence offsets for the - * sentence sentiment. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSentimentResponse.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSentimentResponse.php deleted file mode 100644 index acbf50a3b954..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSentimentResponse.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.language.v1beta2.AnalyzeSentimentResponse - */ -class AnalyzeSentimentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The overall sentiment of the input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment document_sentiment = 1; - */ - protected $document_sentiment = null; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] - * field for more details. - * - * Generated from protobuf field string language = 2; - */ - protected $language = ''; - /** - * The sentiment for all the sentences in the document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 3; - */ - private $sentences; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\Sentiment $document_sentiment - * The overall sentiment of the input document. - * @type string $language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] - * field for more details. - * @type array<\Google\Cloud\Language\V1beta2\Sentence>|\Google\Protobuf\Internal\RepeatedField $sentences - * The sentiment for all the sentences in the document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The overall sentiment of the input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment document_sentiment = 1; - * @return \Google\Cloud\Language\V1beta2\Sentiment|null - */ - public function getDocumentSentiment() - { - return $this->document_sentiment; - } - - public function hasDocumentSentiment() - { - return isset($this->document_sentiment); - } - - public function clearDocumentSentiment() - { - unset($this->document_sentiment); - } - - /** - * The overall sentiment of the input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment document_sentiment = 1; - * @param \Google\Cloud\Language\V1beta2\Sentiment $var - * @return $this - */ - public function setDocumentSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Sentiment::class); - $this->document_sentiment = $var; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] - * field for more details. - * - * Generated from protobuf field string language = 2; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] - * field for more details. - * - * Generated from protobuf field string language = 2; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - - /** - * The sentiment for all the sentences in the document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSentences() - { - return $this->sentences; - } - - /** - * The sentiment for all the sentences in the document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 3; - * @param array<\Google\Cloud\Language\V1beta2\Sentence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSentences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Sentence::class); - $this->sentences = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSyntaxRequest.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSyntaxRequest.php deleted file mode 100644 index 4efdf49b5efc..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSyntaxRequest.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.language.v1beta2.AnalyzeSyntaxRequest - */ -class AnalyzeSyntaxRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - */ - protected $encoding_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\Document $document - * Required. Input document. - * @type int $encoding_type - * The encoding type used by the API to calculate offsets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1beta2\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1beta2\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSyntaxResponse.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSyntaxResponse.php deleted file mode 100644 index bff7832df4b1..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSyntaxResponse.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.language.v1beta2.AnalyzeSyntaxResponse - */ -class AnalyzeSyntaxResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Sentences in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 1; - */ - private $sentences; - /** - * Tokens, along with their syntactic information, in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Token tokens = 2; - */ - private $tokens; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] - * field for more details. - * - * Generated from protobuf field string language = 3; - */ - protected $language = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V1beta2\Sentence>|\Google\Protobuf\Internal\RepeatedField $sentences - * Sentences in the input document. - * @type array<\Google\Cloud\Language\V1beta2\Token>|\Google\Protobuf\Internal\RepeatedField $tokens - * Tokens, along with their syntactic information, in the input document. - * @type string $language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] - * field for more details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Sentences in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSentences() - { - return $this->sentences; - } - - /** - * Sentences in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 1; - * @param array<\Google\Cloud\Language\V1beta2\Sentence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSentences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Sentence::class); - $this->sentences = $arr; - - return $this; - } - - /** - * Tokens, along with their syntactic information, in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Token tokens = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTokens() - { - return $this->tokens; - } - - /** - * Tokens, along with their syntactic information, in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Token tokens = 2; - * @param array<\Google\Cloud\Language\V1beta2\Token>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTokens($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Token::class); - $this->tokens = $arr; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] - * field for more details. - * - * Generated from protobuf field string language = 3; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] - * field for more details. - * - * Generated from protobuf field string language = 3; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest.php deleted file mode 100644 index 811df80d0e3f..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.language.v1beta2.AnnotateTextRequest - */ -class AnnotateTextRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * Required. The enabled features. - * - * Generated from protobuf field .google.cloud.language.v1beta2.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $features = null; - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 3; - */ - protected $encoding_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\Document $document - * Required. Input document. - * @type \Google\Cloud\Language\V1beta2\AnnotateTextRequest\Features $features - * Required. The enabled features. - * @type int $encoding_type - * The encoding type used by the API to calculate offsets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1beta2\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1beta2\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Document::class); - $this->document = $var; - - return $this; - } - - /** - * Required. The enabled features. - * - * Generated from protobuf field .google.cloud.language.v1beta2.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1beta2\AnnotateTextRequest\Features|null - */ - public function getFeatures() - { - return $this->features; - } - - public function hasFeatures() - { - return isset($this->features); - } - - public function clearFeatures() - { - unset($this->features); - } - - /** - * Required. The enabled features. - * - * Generated from protobuf field .google.cloud.language.v1beta2.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1beta2\AnnotateTextRequest\Features $var - * @return $this - */ - public function setFeatures($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\AnnotateTextRequest\Features::class); - $this->features = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 3; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 3; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest/Features.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest/Features.php deleted file mode 100644 index 97e355362ffd..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest/Features.php +++ /dev/null @@ -1,302 +0,0 @@ -google.cloud.language.v1beta2.AnnotateTextRequest.Features - */ -class Features extends \Google\Protobuf\Internal\Message -{ - /** - * Extract syntax information. - * - * Generated from protobuf field bool extract_syntax = 1; - */ - protected $extract_syntax = false; - /** - * Extract entities. - * - * Generated from protobuf field bool extract_entities = 2; - */ - protected $extract_entities = false; - /** - * Extract document-level sentiment. - * - * Generated from protobuf field bool extract_document_sentiment = 3; - */ - protected $extract_document_sentiment = false; - /** - * Extract entities and their associated sentiment. - * - * Generated from protobuf field bool extract_entity_sentiment = 4; - */ - protected $extract_entity_sentiment = false; - /** - * Classify the full document into categories. If this is true, - * the API will use the default model which classifies into a - * [predefined - * taxonomy](https://cloud.google.com/natural-language/docs/categories). - * - * Generated from protobuf field bool classify_text = 6; - */ - protected $classify_text = false; - /** - * Moderate the document for harmful and sensitive categories. - * - * Generated from protobuf field bool moderate_text = 11; - */ - protected $moderate_text = false; - /** - * The model options to use for classification. Defaults to v1 options - * if not specified. Only used if `classify_text` is set to true. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 10; - */ - protected $classification_model_options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $extract_syntax - * Extract syntax information. - * @type bool $extract_entities - * Extract entities. - * @type bool $extract_document_sentiment - * Extract document-level sentiment. - * @type bool $extract_entity_sentiment - * Extract entities and their associated sentiment. - * @type bool $classify_text - * Classify the full document into categories. If this is true, - * the API will use the default model which classifies into a - * [predefined - * taxonomy](https://cloud.google.com/natural-language/docs/categories). - * @type bool $moderate_text - * Moderate the document for harmful and sensitive categories. - * @type \Google\Cloud\Language\V1beta2\ClassificationModelOptions $classification_model_options - * The model options to use for classification. Defaults to v1 options - * if not specified. Only used if `classify_text` is set to true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Extract syntax information. - * - * Generated from protobuf field bool extract_syntax = 1; - * @return bool - */ - public function getExtractSyntax() - { - return $this->extract_syntax; - } - - /** - * Extract syntax information. - * - * Generated from protobuf field bool extract_syntax = 1; - * @param bool $var - * @return $this - */ - public function setExtractSyntax($var) - { - GPBUtil::checkBool($var); - $this->extract_syntax = $var; - - return $this; - } - - /** - * Extract entities. - * - * Generated from protobuf field bool extract_entities = 2; - * @return bool - */ - public function getExtractEntities() - { - return $this->extract_entities; - } - - /** - * Extract entities. - * - * Generated from protobuf field bool extract_entities = 2; - * @param bool $var - * @return $this - */ - public function setExtractEntities($var) - { - GPBUtil::checkBool($var); - $this->extract_entities = $var; - - return $this; - } - - /** - * Extract document-level sentiment. - * - * Generated from protobuf field bool extract_document_sentiment = 3; - * @return bool - */ - public function getExtractDocumentSentiment() - { - return $this->extract_document_sentiment; - } - - /** - * Extract document-level sentiment. - * - * Generated from protobuf field bool extract_document_sentiment = 3; - * @param bool $var - * @return $this - */ - public function setExtractDocumentSentiment($var) - { - GPBUtil::checkBool($var); - $this->extract_document_sentiment = $var; - - return $this; - } - - /** - * Extract entities and their associated sentiment. - * - * Generated from protobuf field bool extract_entity_sentiment = 4; - * @return bool - */ - public function getExtractEntitySentiment() - { - return $this->extract_entity_sentiment; - } - - /** - * Extract entities and their associated sentiment. - * - * Generated from protobuf field bool extract_entity_sentiment = 4; - * @param bool $var - * @return $this - */ - public function setExtractEntitySentiment($var) - { - GPBUtil::checkBool($var); - $this->extract_entity_sentiment = $var; - - return $this; - } - - /** - * Classify the full document into categories. If this is true, - * the API will use the default model which classifies into a - * [predefined - * taxonomy](https://cloud.google.com/natural-language/docs/categories). - * - * Generated from protobuf field bool classify_text = 6; - * @return bool - */ - public function getClassifyText() - { - return $this->classify_text; - } - - /** - * Classify the full document into categories. If this is true, - * the API will use the default model which classifies into a - * [predefined - * taxonomy](https://cloud.google.com/natural-language/docs/categories). - * - * Generated from protobuf field bool classify_text = 6; - * @param bool $var - * @return $this - */ - public function setClassifyText($var) - { - GPBUtil::checkBool($var); - $this->classify_text = $var; - - return $this; - } - - /** - * Moderate the document for harmful and sensitive categories. - * - * Generated from protobuf field bool moderate_text = 11; - * @return bool - */ - public function getModerateText() - { - return $this->moderate_text; - } - - /** - * Moderate the document for harmful and sensitive categories. - * - * Generated from protobuf field bool moderate_text = 11; - * @param bool $var - * @return $this - */ - public function setModerateText($var) - { - GPBUtil::checkBool($var); - $this->moderate_text = $var; - - return $this; - } - - /** - * The model options to use for classification. Defaults to v1 options - * if not specified. Only used if `classify_text` is set to true. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 10; - * @return \Google\Cloud\Language\V1beta2\ClassificationModelOptions|null - */ - public function getClassificationModelOptions() - { - return $this->classification_model_options; - } - - public function hasClassificationModelOptions() - { - return isset($this->classification_model_options); - } - - public function clearClassificationModelOptions() - { - unset($this->classification_model_options); - } - - /** - * The model options to use for classification. Defaults to v1 options - * if not specified. Only used if `classify_text` is set to true. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 10; - * @param \Google\Cloud\Language\V1beta2\ClassificationModelOptions $var - * @return $this - */ - public function setClassificationModelOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\ClassificationModelOptions::class); - $this->classification_model_options = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Features::class, \Google\Cloud\Language\V1beta2\AnnotateTextRequest_Features::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextResponse.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextResponse.php deleted file mode 100644 index f1f7323ebb0f..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextResponse.php +++ /dev/null @@ -1,317 +0,0 @@ -google.cloud.language.v1beta2.AnnotateTextResponse - */ -class AnnotateTextResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Sentences in the input document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 1; - */ - private $sentences; - /** - * Tokens, along with their syntactic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Token tokens = 2; - */ - private $tokens; - /** - * Entities, along with their semantic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entities]. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 3; - */ - private $entities; - /** - * The overall sentiment for the document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment]. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment document_sentiment = 4; - */ - protected $document_sentiment = null; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] - * field for more details. - * - * Generated from protobuf field string language = 5; - */ - protected $language = ''; - /** - * Categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6; - */ - private $categories; - /** - * Harmful and sensitive categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory moderation_categories = 8; - */ - private $moderation_categories; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V1beta2\Sentence>|\Google\Protobuf\Internal\RepeatedField $sentences - * Sentences in the input document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. - * @type array<\Google\Cloud\Language\V1beta2\Token>|\Google\Protobuf\Internal\RepeatedField $tokens - * Tokens, along with their syntactic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. - * @type array<\Google\Cloud\Language\V1beta2\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * Entities, along with their semantic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entities]. - * @type \Google\Cloud\Language\V1beta2\Sentiment $document_sentiment - * The overall sentiment for the document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment]. - * @type string $language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] - * field for more details. - * @type array<\Google\Cloud\Language\V1beta2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $categories - * Categories identified in the input document. - * @type array<\Google\Cloud\Language\V1beta2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $moderation_categories - * Harmful and sensitive categories identified in the input document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Sentences in the input document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSentences() - { - return $this->sentences; - } - - /** - * Sentences in the input document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 1; - * @param array<\Google\Cloud\Language\V1beta2\Sentence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSentences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Sentence::class); - $this->sentences = $arr; - - return $this; - } - - /** - * Tokens, along with their syntactic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Token tokens = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTokens() - { - return $this->tokens; - } - - /** - * Tokens, along with their syntactic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Token tokens = 2; - * @param array<\Google\Cloud\Language\V1beta2\Token>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTokens($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Token::class); - $this->tokens = $arr; - - return $this; - } - - /** - * Entities, along with their semantic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entities]. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * Entities, along with their semantic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entities]. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 3; - * @param array<\Google\Cloud\Language\V1beta2\Entity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * The overall sentiment for the document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment]. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment document_sentiment = 4; - * @return \Google\Cloud\Language\V1beta2\Sentiment|null - */ - public function getDocumentSentiment() - { - return $this->document_sentiment; - } - - public function hasDocumentSentiment() - { - return isset($this->document_sentiment); - } - - public function clearDocumentSentiment() - { - unset($this->document_sentiment); - } - - /** - * The overall sentiment for the document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment]. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment document_sentiment = 4; - * @param \Google\Cloud\Language\V1beta2\Sentiment $var - * @return $this - */ - public function setDocumentSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Sentiment::class); - $this->document_sentiment = $var; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] - * field for more details. - * - * Generated from protobuf field string language = 5; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] - * field for more details. - * - * Generated from protobuf field string language = 5; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - - /** - * Categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCategories() - { - return $this->categories; - } - - /** - * Categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6; - * @param array<\Google\Cloud\Language\V1beta2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\ClassificationCategory::class); - $this->categories = $arr; - - return $this; - } - - /** - * Harmful and sensitive categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory moderation_categories = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getModerationCategories() - { - return $this->moderation_categories; - } - - /** - * Harmful and sensitive categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory moderation_categories = 8; - * @param array<\Google\Cloud\Language\V1beta2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setModerationCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\ClassificationCategory::class); - $this->moderation_categories = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationCategory.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationCategory.php deleted file mode 100644 index 0bce5347449c..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationCategory.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.language.v1beta2.ClassificationCategory - */ -class ClassificationCategory extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the category representing the document. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The classifier's confidence of the category. Number represents how certain - * the classifier is that this category represents the given text. - * - * Generated from protobuf field float confidence = 2; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the category representing the document. - * @type float $confidence - * The classifier's confidence of the category. Number represents how certain - * the classifier is that this category represents the given text. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The name of the category representing the document. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the category representing the document. - * - * 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 classifier's confidence of the category. Number represents how certain - * the classifier is that this category represents the given text. - * - * Generated from protobuf field float confidence = 2; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * The classifier's confidence of the category. Number represents how certain - * the classifier is that this category represents the given text. - * - * Generated from protobuf field float confidence = 2; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions.php deleted file mode 100644 index 75c27dd88790..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.language.v1beta2.ClassificationModelOptions - */ -class ClassificationModelOptions extends \Google\Protobuf\Internal\Message -{ - protected $model_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V1Model $v1_model - * Setting this field will use the V1 model and V1 content categories - * version. The V1 model is a legacy model; support for this will be - * discontinued in the future. - * @type \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V2Model $v2_model - * Setting this field will use the V2 model with the appropriate content - * categories version. The V2 model is a better performing model. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Setting this field will use the V1 model and V1 content categories - * version. The V1 model is a legacy model; support for this will be - * discontinued in the future. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions.V1Model v1_model = 1; - * @return \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V1Model|null - */ - public function getV1Model() - { - return $this->readOneof(1); - } - - public function hasV1Model() - { - return $this->hasOneof(1); - } - - /** - * Setting this field will use the V1 model and V1 content categories - * version. The V1 model is a legacy model; support for this will be - * discontinued in the future. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions.V1Model v1_model = 1; - * @param \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V1Model $var - * @return $this - */ - public function setV1Model($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V1Model::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Setting this field will use the V2 model with the appropriate content - * categories version. The V2 model is a better performing model. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions.V2Model v2_model = 2; - * @return \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V2Model|null - */ - public function getV2Model() - { - return $this->readOneof(2); - } - - public function hasV2Model() - { - return $this->hasOneof(2); - } - - /** - * Setting this field will use the V2 model with the appropriate content - * categories version. The V2 model is a better performing model. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions.V2Model v2_model = 2; - * @param \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V2Model $var - * @return $this - */ - public function setV2Model($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V2Model::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getModelType() - { - return $this->whichOneof("model_type"); - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V1Model.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V1Model.php deleted file mode 100644 index ae781d4d3d46..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V1Model.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.language.v1beta2.ClassificationModelOptions.V1Model - */ -class V1Model extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(V1Model::class, \Google\Cloud\Language\V1beta2\ClassificationModelOptions_V1Model::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V2Model.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V2Model.php deleted file mode 100644 index d312077d7246..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V2Model.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.language.v1beta2.ClassificationModelOptions.V2Model - */ -class V2Model extends \Google\Protobuf\Internal\Message -{ - /** - * The content categories used for classification. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.ContentCategoriesVersion content_categories_version = 1; - */ - protected $content_categories_version = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $content_categories_version - * The content categories used for classification. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The content categories used for classification. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.ContentCategoriesVersion content_categories_version = 1; - * @return int - */ - public function getContentCategoriesVersion() - { - return $this->content_categories_version; - } - - /** - * The content categories used for classification. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.ContentCategoriesVersion content_categories_version = 1; - * @param int $var - * @return $this - */ - public function setContentCategoriesVersion($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V2Model\ContentCategoriesVersion::class); - $this->content_categories_version = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(V2Model::class, \Google\Cloud\Language\V1beta2\ClassificationModelOptions_V2Model::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V2Model/ContentCategoriesVersion.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V2Model/ContentCategoriesVersion.php deleted file mode 100644 index 7b495d2a084a..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V2Model/ContentCategoriesVersion.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.ContentCategoriesVersion - */ -class ContentCategoriesVersion -{ - /** - * If `ContentCategoriesVersion` is not specified, this option will - * default to `V1`. - * - * Generated from protobuf enum CONTENT_CATEGORIES_VERSION_UNSPECIFIED = 0; - */ - const CONTENT_CATEGORIES_VERSION_UNSPECIFIED = 0; - /** - * Legacy content categories of our initial launch in 2017. - * - * Generated from protobuf enum V1 = 1; - */ - const V1 = 1; - /** - * Updated content categories in 2022. - * - * Generated from protobuf enum V2 = 2; - */ - const V2 = 2; - - private static $valueToName = [ - self::CONTENT_CATEGORIES_VERSION_UNSPECIFIED => 'CONTENT_CATEGORIES_VERSION_UNSPECIFIED', - self::V1 => 'V1', - self::V2 => 'V2', - ]; - - 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(ContentCategoriesVersion::class, \Google\Cloud\Language\V1beta2\ClassificationModelOptions_V2Model_ContentCategoriesVersion::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassifyTextRequest.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassifyTextRequest.php deleted file mode 100644 index 93a15118be47..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassifyTextRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.language.v1beta2.ClassifyTextRequest - */ -class ClassifyTextRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * Model options to use for classification. Defaults to v1 options if not - * specified. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 3; - */ - protected $classification_model_options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\Document $document - * Required. Input document. - * @type \Google\Cloud\Language\V1beta2\ClassificationModelOptions $classification_model_options - * Model options to use for classification. Defaults to v1 options if not - * specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1beta2\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1beta2\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Document::class); - $this->document = $var; - - return $this; - } - - /** - * Model options to use for classification. Defaults to v1 options if not - * specified. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 3; - * @return \Google\Cloud\Language\V1beta2\ClassificationModelOptions|null - */ - public function getClassificationModelOptions() - { - return $this->classification_model_options; - } - - public function hasClassificationModelOptions() - { - return isset($this->classification_model_options); - } - - public function clearClassificationModelOptions() - { - unset($this->classification_model_options); - } - - /** - * Model options to use for classification. Defaults to v1 options if not - * specified. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 3; - * @param \Google\Cloud\Language\V1beta2\ClassificationModelOptions $var - * @return $this - */ - public function setClassificationModelOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\ClassificationModelOptions::class); - $this->classification_model_options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassifyTextResponse.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassifyTextResponse.php deleted file mode 100644 index a919aba1e73f..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassifyTextResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.language.v1beta2.ClassifyTextResponse - */ -class ClassifyTextResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 1; - */ - private $categories; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V1beta2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $categories - * Categories representing the input document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCategories() - { - return $this->categories; - } - - /** - * Categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 1; - * @param array<\Google\Cloud\Language\V1beta2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\ClassificationCategory::class); - $this->categories = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge.php deleted file mode 100644 index 17f1fd96606c..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.language.v1beta2.DependencyEdge - */ -class DependencyEdge extends \Google\Protobuf\Internal\Message -{ - /** - * Represents the head of this token in the dependency tree. - * This is the index of the token which has an arc going to this token. - * The index is the position of the token in the array of tokens returned - * by the API method. If this token is a root token, then the - * `head_token_index` is its own index. - * - * Generated from protobuf field int32 head_token_index = 1; - */ - protected $head_token_index = 0; - /** - * The parse label for the token. - * - * Generated from protobuf field .google.cloud.language.v1beta2.DependencyEdge.Label label = 2; - */ - protected $label = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $head_token_index - * Represents the head of this token in the dependency tree. - * This is the index of the token which has an arc going to this token. - * The index is the position of the token in the array of tokens returned - * by the API method. If this token is a root token, then the - * `head_token_index` is its own index. - * @type int $label - * The parse label for the token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Represents the head of this token in the dependency tree. - * This is the index of the token which has an arc going to this token. - * The index is the position of the token in the array of tokens returned - * by the API method. If this token is a root token, then the - * `head_token_index` is its own index. - * - * Generated from protobuf field int32 head_token_index = 1; - * @return int - */ - public function getHeadTokenIndex() - { - return $this->head_token_index; - } - - /** - * Represents the head of this token in the dependency tree. - * This is the index of the token which has an arc going to this token. - * The index is the position of the token in the array of tokens returned - * by the API method. If this token is a root token, then the - * `head_token_index` is its own index. - * - * Generated from protobuf field int32 head_token_index = 1; - * @param int $var - * @return $this - */ - public function setHeadTokenIndex($var) - { - GPBUtil::checkInt32($var); - $this->head_token_index = $var; - - return $this; - } - - /** - * The parse label for the token. - * - * Generated from protobuf field .google.cloud.language.v1beta2.DependencyEdge.Label label = 2; - * @return int - */ - public function getLabel() - { - return $this->label; - } - - /** - * The parse label for the token. - * - * Generated from protobuf field .google.cloud.language.v1beta2.DependencyEdge.Label label = 2; - * @param int $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\DependencyEdge\Label::class); - $this->label = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge/Label.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge/Label.php deleted file mode 100644 index 81e822ce5295..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge/Label.php +++ /dev/null @@ -1,628 +0,0 @@ -google.cloud.language.v1beta2.DependencyEdge.Label - */ -class Label -{ - /** - * Unknown - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * Abbreviation modifier - * - * Generated from protobuf enum ABBREV = 1; - */ - const ABBREV = 1; - /** - * Adjectival complement - * - * Generated from protobuf enum ACOMP = 2; - */ - const ACOMP = 2; - /** - * Adverbial clause modifier - * - * Generated from protobuf enum ADVCL = 3; - */ - const ADVCL = 3; - /** - * Adverbial modifier - * - * Generated from protobuf enum ADVMOD = 4; - */ - const ADVMOD = 4; - /** - * Adjectival modifier of an NP - * - * Generated from protobuf enum AMOD = 5; - */ - const AMOD = 5; - /** - * Appositional modifier of an NP - * - * Generated from protobuf enum APPOS = 6; - */ - const APPOS = 6; - /** - * Attribute dependent of a copular verb - * - * Generated from protobuf enum ATTR = 7; - */ - const ATTR = 7; - /** - * Auxiliary (non-main) verb - * - * Generated from protobuf enum AUX = 8; - */ - const AUX = 8; - /** - * Passive auxiliary - * - * Generated from protobuf enum AUXPASS = 9; - */ - const AUXPASS = 9; - /** - * Coordinating conjunction - * - * Generated from protobuf enum CC = 10; - */ - const CC = 10; - /** - * Clausal complement of a verb or adjective - * - * Generated from protobuf enum CCOMP = 11; - */ - const CCOMP = 11; - /** - * Conjunct - * - * Generated from protobuf enum CONJ = 12; - */ - const CONJ = 12; - /** - * Clausal subject - * - * Generated from protobuf enum CSUBJ = 13; - */ - const CSUBJ = 13; - /** - * Clausal passive subject - * - * Generated from protobuf enum CSUBJPASS = 14; - */ - const CSUBJPASS = 14; - /** - * Dependency (unable to determine) - * - * Generated from protobuf enum DEP = 15; - */ - const DEP = 15; - /** - * Determiner - * - * Generated from protobuf enum DET = 16; - */ - const DET = 16; - /** - * Discourse - * - * Generated from protobuf enum DISCOURSE = 17; - */ - const DISCOURSE = 17; - /** - * Direct object - * - * Generated from protobuf enum DOBJ = 18; - */ - const DOBJ = 18; - /** - * Expletive - * - * Generated from protobuf enum EXPL = 19; - */ - const EXPL = 19; - /** - * Goes with (part of a word in a text not well edited) - * - * Generated from protobuf enum GOESWITH = 20; - */ - const GOESWITH = 20; - /** - * Indirect object - * - * Generated from protobuf enum IOBJ = 21; - */ - const IOBJ = 21; - /** - * Marker (word introducing a subordinate clause) - * - * Generated from protobuf enum MARK = 22; - */ - const MARK = 22; - /** - * Multi-word expression - * - * Generated from protobuf enum MWE = 23; - */ - const MWE = 23; - /** - * Multi-word verbal expression - * - * Generated from protobuf enum MWV = 24; - */ - const MWV = 24; - /** - * Negation modifier - * - * Generated from protobuf enum NEG = 25; - */ - const NEG = 25; - /** - * Noun compound modifier - * - * Generated from protobuf enum NN = 26; - */ - const NN = 26; - /** - * Noun phrase used as an adverbial modifier - * - * Generated from protobuf enum NPADVMOD = 27; - */ - const NPADVMOD = 27; - /** - * Nominal subject - * - * Generated from protobuf enum NSUBJ = 28; - */ - const NSUBJ = 28; - /** - * Passive nominal subject - * - * Generated from protobuf enum NSUBJPASS = 29; - */ - const NSUBJPASS = 29; - /** - * Numeric modifier of a noun - * - * Generated from protobuf enum NUM = 30; - */ - const NUM = 30; - /** - * Element of compound number - * - * Generated from protobuf enum NUMBER = 31; - */ - const NUMBER = 31; - /** - * Punctuation mark - * - * Generated from protobuf enum P = 32; - */ - const P = 32; - /** - * Parataxis relation - * - * Generated from protobuf enum PARATAXIS = 33; - */ - const PARATAXIS = 33; - /** - * Participial modifier - * - * Generated from protobuf enum PARTMOD = 34; - */ - const PARTMOD = 34; - /** - * The complement of a preposition is a clause - * - * Generated from protobuf enum PCOMP = 35; - */ - const PCOMP = 35; - /** - * Object of a preposition - * - * Generated from protobuf enum POBJ = 36; - */ - const POBJ = 36; - /** - * Possession modifier - * - * Generated from protobuf enum POSS = 37; - */ - const POSS = 37; - /** - * Postverbal negative particle - * - * Generated from protobuf enum POSTNEG = 38; - */ - const POSTNEG = 38; - /** - * Predicate complement - * - * Generated from protobuf enum PRECOMP = 39; - */ - const PRECOMP = 39; - /** - * Preconjunt - * - * Generated from protobuf enum PRECONJ = 40; - */ - const PRECONJ = 40; - /** - * Predeterminer - * - * Generated from protobuf enum PREDET = 41; - */ - const PREDET = 41; - /** - * Prefix - * - * Generated from protobuf enum PREF = 42; - */ - const PREF = 42; - /** - * Prepositional modifier - * - * Generated from protobuf enum PREP = 43; - */ - const PREP = 43; - /** - * The relationship between a verb and verbal morpheme - * - * Generated from protobuf enum PRONL = 44; - */ - const PRONL = 44; - /** - * Particle - * - * Generated from protobuf enum PRT = 45; - */ - const PRT = 45; - /** - * Associative or possessive marker - * - * Generated from protobuf enum PS = 46; - */ - const PS = 46; - /** - * Quantifier phrase modifier - * - * Generated from protobuf enum QUANTMOD = 47; - */ - const QUANTMOD = 47; - /** - * Relative clause modifier - * - * Generated from protobuf enum RCMOD = 48; - */ - const RCMOD = 48; - /** - * Complementizer in relative clause - * - * Generated from protobuf enum RCMODREL = 49; - */ - const RCMODREL = 49; - /** - * Ellipsis without a preceding predicate - * - * Generated from protobuf enum RDROP = 50; - */ - const RDROP = 50; - /** - * Referent - * - * Generated from protobuf enum REF = 51; - */ - const REF = 51; - /** - * Remnant - * - * Generated from protobuf enum REMNANT = 52; - */ - const REMNANT = 52; - /** - * Reparandum - * - * Generated from protobuf enum REPARANDUM = 53; - */ - const REPARANDUM = 53; - /** - * Root - * - * Generated from protobuf enum ROOT = 54; - */ - const ROOT = 54; - /** - * Suffix specifying a unit of number - * - * Generated from protobuf enum SNUM = 55; - */ - const SNUM = 55; - /** - * Suffix - * - * Generated from protobuf enum SUFF = 56; - */ - const SUFF = 56; - /** - * Temporal modifier - * - * Generated from protobuf enum TMOD = 57; - */ - const TMOD = 57; - /** - * Topic marker - * - * Generated from protobuf enum TOPIC = 58; - */ - const TOPIC = 58; - /** - * Clause headed by an infinite form of the verb that modifies a noun - * - * Generated from protobuf enum VMOD = 59; - */ - const VMOD = 59; - /** - * Vocative - * - * Generated from protobuf enum VOCATIVE = 60; - */ - const VOCATIVE = 60; - /** - * Open clausal complement - * - * Generated from protobuf enum XCOMP = 61; - */ - const XCOMP = 61; - /** - * Name suffix - * - * Generated from protobuf enum SUFFIX = 62; - */ - const SUFFIX = 62; - /** - * Name title - * - * Generated from protobuf enum TITLE = 63; - */ - const TITLE = 63; - /** - * Adverbial phrase modifier - * - * Generated from protobuf enum ADVPHMOD = 64; - */ - const ADVPHMOD = 64; - /** - * Causative auxiliary - * - * Generated from protobuf enum AUXCAUS = 65; - */ - const AUXCAUS = 65; - /** - * Helper auxiliary - * - * Generated from protobuf enum AUXVV = 66; - */ - const AUXVV = 66; - /** - * Rentaishi (Prenominal modifier) - * - * Generated from protobuf enum DTMOD = 67; - */ - const DTMOD = 67; - /** - * Foreign words - * - * Generated from protobuf enum FOREIGN = 68; - */ - const FOREIGN = 68; - /** - * Keyword - * - * Generated from protobuf enum KW = 69; - */ - const KW = 69; - /** - * List for chains of comparable items - * - * Generated from protobuf enum LIST = 70; - */ - const PBLIST = 70; - /** - * Nominalized clause - * - * Generated from protobuf enum NOMC = 71; - */ - const NOMC = 71; - /** - * Nominalized clausal subject - * - * Generated from protobuf enum NOMCSUBJ = 72; - */ - const NOMCSUBJ = 72; - /** - * Nominalized clausal passive - * - * Generated from protobuf enum NOMCSUBJPASS = 73; - */ - const NOMCSUBJPASS = 73; - /** - * Compound of numeric modifier - * - * Generated from protobuf enum NUMC = 74; - */ - const NUMC = 74; - /** - * Copula - * - * Generated from protobuf enum COP = 75; - */ - const COP = 75; - /** - * Dislocated relation (for fronted/topicalized elements) - * - * Generated from protobuf enum DISLOCATED = 76; - */ - const DISLOCATED = 76; - /** - * Aspect marker - * - * Generated from protobuf enum ASP = 77; - */ - const ASP = 77; - /** - * Genitive modifier - * - * Generated from protobuf enum GMOD = 78; - */ - const GMOD = 78; - /** - * Genitive object - * - * Generated from protobuf enum GOBJ = 79; - */ - const GOBJ = 79; - /** - * Infinitival modifier - * - * Generated from protobuf enum INFMOD = 80; - */ - const INFMOD = 80; - /** - * Measure - * - * Generated from protobuf enum MES = 81; - */ - const MES = 81; - /** - * Nominal complement of a noun - * - * Generated from protobuf enum NCOMP = 82; - */ - const NCOMP = 82; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::ABBREV => 'ABBREV', - self::ACOMP => 'ACOMP', - self::ADVCL => 'ADVCL', - self::ADVMOD => 'ADVMOD', - self::AMOD => 'AMOD', - self::APPOS => 'APPOS', - self::ATTR => 'ATTR', - self::AUX => 'AUX', - self::AUXPASS => 'AUXPASS', - self::CC => 'CC', - self::CCOMP => 'CCOMP', - self::CONJ => 'CONJ', - self::CSUBJ => 'CSUBJ', - self::CSUBJPASS => 'CSUBJPASS', - self::DEP => 'DEP', - self::DET => 'DET', - self::DISCOURSE => 'DISCOURSE', - self::DOBJ => 'DOBJ', - self::EXPL => 'EXPL', - self::GOESWITH => 'GOESWITH', - self::IOBJ => 'IOBJ', - self::MARK => 'MARK', - self::MWE => 'MWE', - self::MWV => 'MWV', - self::NEG => 'NEG', - self::NN => 'NN', - self::NPADVMOD => 'NPADVMOD', - self::NSUBJ => 'NSUBJ', - self::NSUBJPASS => 'NSUBJPASS', - self::NUM => 'NUM', - self::NUMBER => 'NUMBER', - self::P => 'P', - self::PARATAXIS => 'PARATAXIS', - self::PARTMOD => 'PARTMOD', - self::PCOMP => 'PCOMP', - self::POBJ => 'POBJ', - self::POSS => 'POSS', - self::POSTNEG => 'POSTNEG', - self::PRECOMP => 'PRECOMP', - self::PRECONJ => 'PRECONJ', - self::PREDET => 'PREDET', - self::PREF => 'PREF', - self::PREP => 'PREP', - self::PRONL => 'PRONL', - self::PRT => 'PRT', - self::PS => 'PS', - self::QUANTMOD => 'QUANTMOD', - self::RCMOD => 'RCMOD', - self::RCMODREL => 'RCMODREL', - self::RDROP => 'RDROP', - self::REF => 'REF', - self::REMNANT => 'REMNANT', - self::REPARANDUM => 'REPARANDUM', - self::ROOT => 'ROOT', - self::SNUM => 'SNUM', - self::SUFF => 'SUFF', - self::TMOD => 'TMOD', - self::TOPIC => 'TOPIC', - self::VMOD => 'VMOD', - self::VOCATIVE => 'VOCATIVE', - self::XCOMP => 'XCOMP', - self::SUFFIX => 'SUFFIX', - self::TITLE => 'TITLE', - self::ADVPHMOD => 'ADVPHMOD', - self::AUXCAUS => 'AUXCAUS', - self::AUXVV => 'AUXVV', - self::DTMOD => 'DTMOD', - self::FOREIGN => 'FOREIGN', - self::KW => 'KW', - self::PBLIST => 'LIST', - self::NOMC => 'NOMC', - self::NOMCSUBJ => 'NOMCSUBJ', - self::NOMCSUBJPASS => 'NOMCSUBJPASS', - self::NUMC => 'NUMC', - self::COP => 'COP', - self::DISLOCATED => 'DISLOCATED', - self::ASP => 'ASP', - self::GMOD => 'GMOD', - self::GOBJ => 'GOBJ', - self::INFMOD => 'INFMOD', - self::MES => 'MES', - self::NCOMP => 'NCOMP', - ]; - - 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)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Label::class, \Google\Cloud\Language\V1beta2\DependencyEdge_Label::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document.php deleted file mode 100644 index 77f3783dfd41..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document.php +++ /dev/null @@ -1,300 +0,0 @@ -google.cloud.language.v1beta2.Document - */ -class Document extends \Google\Protobuf\Internal\Message -{ - /** - * Required. If the type is not set or is `TYPE_UNSPECIFIED`, - * returns an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document.Type type = 1; - */ - protected $type = 0; - /** - * The language of the document (if not specified, the language is - * automatically detected). Both ISO and BCP-47 language codes are - * accepted.
- * [Language - * Support](https://cloud.google.com/natural-language/docs/languages) lists - * currently supported languages for each API method. If the language (either - * specified by the caller or automatically detected) is not supported by the - * called API method, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string language = 4; - */ - protected $language = ''; - /** - * The web URI where the document comes from. This URI is not used for - * fetching the content, but as a hint for analyzing the document. - * - * Generated from protobuf field string reference_web_uri = 5; - */ - protected $reference_web_uri = ''; - /** - * Indicates how detected boilerplate(e.g. advertisements, copyright - * declarations, banners) should be handled for this document. If not - * specified, boilerplate will be treated the same as content. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document.BoilerplateHandling boilerplate_handling = 6; - */ - protected $boilerplate_handling = 0; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Required. If the type is not set or is `TYPE_UNSPECIFIED`, - * returns an `INVALID_ARGUMENT` error. - * @type string $content - * The content of the input in string format. - * Cloud audit logging exempt since it is based on user data. - * @type string $gcs_content_uri - * The Google Cloud Storage URI where the file content is located. - * This URI must be of the form: gs://bucket_name/object_name. For more - * details, see https://cloud.google.com/storage/docs/reference-uris. - * NOTE: Cloud Storage object versioning is not supported. - * @type string $language - * The language of the document (if not specified, the language is - * automatically detected). Both ISO and BCP-47 language codes are - * accepted.
- * [Language - * Support](https://cloud.google.com/natural-language/docs/languages) lists - * currently supported languages for each API method. If the language (either - * specified by the caller or automatically detected) is not supported by the - * called API method, an `INVALID_ARGUMENT` error is returned. - * @type string $reference_web_uri - * The web URI where the document comes from. This URI is not used for - * fetching the content, but as a hint for analyzing the document. - * @type int $boilerplate_handling - * Indicates how detected boilerplate(e.g. advertisements, copyright - * declarations, banners) should be handled for this document. If not - * specified, boilerplate will be treated the same as content. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. If the type is not set or is `TYPE_UNSPECIFIED`, - * returns an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. If the type is not set or is `TYPE_UNSPECIFIED`, - * returns an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\Document\Type::class); - $this->type = $var; - - return $this; - } - - /** - * The content of the input in string format. - * Cloud audit logging exempt since it is based on user data. - * - * Generated from protobuf field string content = 2; - * @return string - */ - public function getContent() - { - return $this->readOneof(2); - } - - public function hasContent() - { - return $this->hasOneof(2); - } - - /** - * The content of the input in string format. - * Cloud audit logging exempt since it is based on user data. - * - * Generated from protobuf field string content = 2; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The Google Cloud Storage URI where the file content is located. - * This URI must be of the form: gs://bucket_name/object_name. For more - * details, see https://cloud.google.com/storage/docs/reference-uris. - * NOTE: Cloud Storage object versioning is not supported. - * - * Generated from protobuf field string gcs_content_uri = 3; - * @return string - */ - public function getGcsContentUri() - { - return $this->readOneof(3); - } - - public function hasGcsContentUri() - { - return $this->hasOneof(3); - } - - /** - * The Google Cloud Storage URI where the file content is located. - * This URI must be of the form: gs://bucket_name/object_name. For more - * details, see https://cloud.google.com/storage/docs/reference-uris. - * NOTE: Cloud Storage object versioning is not supported. - * - * Generated from protobuf field string gcs_content_uri = 3; - * @param string $var - * @return $this - */ - public function setGcsContentUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The language of the document (if not specified, the language is - * automatically detected). Both ISO and BCP-47 language codes are - * accepted.
- * [Language - * Support](https://cloud.google.com/natural-language/docs/languages) lists - * currently supported languages for each API method. If the language (either - * specified by the caller or automatically detected) is not supported by the - * called API method, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string language = 4; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the document (if not specified, the language is - * automatically detected). Both ISO and BCP-47 language codes are - * accepted.
- * [Language - * Support](https://cloud.google.com/natural-language/docs/languages) lists - * currently supported languages for each API method. If the language (either - * specified by the caller or automatically detected) is not supported by the - * called API method, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string language = 4; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - - /** - * The web URI where the document comes from. This URI is not used for - * fetching the content, but as a hint for analyzing the document. - * - * Generated from protobuf field string reference_web_uri = 5; - * @return string - */ - public function getReferenceWebUri() - { - return $this->reference_web_uri; - } - - /** - * The web URI where the document comes from. This URI is not used for - * fetching the content, but as a hint for analyzing the document. - * - * Generated from protobuf field string reference_web_uri = 5; - * @param string $var - * @return $this - */ - public function setReferenceWebUri($var) - { - GPBUtil::checkString($var, True); - $this->reference_web_uri = $var; - - return $this; - } - - /** - * Indicates how detected boilerplate(e.g. advertisements, copyright - * declarations, banners) should be handled for this document. If not - * specified, boilerplate will be treated the same as content. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document.BoilerplateHandling boilerplate_handling = 6; - * @return int - */ - public function getBoilerplateHandling() - { - return $this->boilerplate_handling; - } - - /** - * Indicates how detected boilerplate(e.g. advertisements, copyright - * declarations, banners) should be handled for this document. If not - * specified, boilerplate will be treated the same as content. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document.BoilerplateHandling boilerplate_handling = 6; - * @param int $var - * @return $this - */ - public function setBoilerplateHandling($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\Document\BoilerplateHandling::class); - $this->boilerplate_handling = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document/BoilerplateHandling.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document/BoilerplateHandling.php deleted file mode 100644 index 0b2e8a4c21c7..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document/BoilerplateHandling.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.language.v1beta2.Document.BoilerplateHandling - */ -class BoilerplateHandling -{ - /** - * The boilerplate handling is not specified. - * - * Generated from protobuf enum BOILERPLATE_HANDLING_UNSPECIFIED = 0; - */ - const BOILERPLATE_HANDLING_UNSPECIFIED = 0; - /** - * Do not analyze detected boilerplate. Reference web URI is required for - * detecting boilerplate. - * - * Generated from protobuf enum SKIP_BOILERPLATE = 1; - */ - const SKIP_BOILERPLATE = 1; - /** - * Treat boilerplate the same as content. - * - * Generated from protobuf enum KEEP_BOILERPLATE = 2; - */ - const KEEP_BOILERPLATE = 2; - - private static $valueToName = [ - self::BOILERPLATE_HANDLING_UNSPECIFIED => 'BOILERPLATE_HANDLING_UNSPECIFIED', - self::SKIP_BOILERPLATE => 'SKIP_BOILERPLATE', - self::KEEP_BOILERPLATE => 'KEEP_BOILERPLATE', - ]; - - 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(BoilerplateHandling::class, \Google\Cloud\Language\V1beta2\Document_BoilerplateHandling::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document/Type.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document/Type.php deleted file mode 100644 index 382148db46a1..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.language.v1beta2.Document.Type - */ -class Type -{ - /** - * The content type is not specified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Plain text - * - * Generated from protobuf enum PLAIN_TEXT = 1; - */ - const PLAIN_TEXT = 1; - /** - * HTML - * - * Generated from protobuf enum HTML = 2; - */ - const HTML = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::PLAIN_TEXT => 'PLAIN_TEXT', - self::HTML => 'HTML', - ]; - - 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(Type::class, \Google\Cloud\Language\V1beta2\Document_Type::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EncodingType.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EncodingType.php deleted file mode 100644 index 8328031fbd89..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EncodingType.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.language.v1beta2.EncodingType - */ -class EncodingType -{ - /** - * If `EncodingType` is not specified, encoding-dependent information (such as - * `begin_offset`) will be set at `-1`. - * - * Generated from protobuf enum NONE = 0; - */ - const NONE = 0; - /** - * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-8 encoding of the input. C++ and Go are examples of languages - * that use this encoding natively. - * - * Generated from protobuf enum UTF8 = 1; - */ - const UTF8 = 1; - /** - * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-16 encoding of the input. Java and JavaScript are examples of - * languages that use this encoding natively. - * - * Generated from protobuf enum UTF16 = 2; - */ - const UTF16 = 2; - /** - * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-32 encoding of the input. Python is an example of a language - * that uses this encoding natively. - * - * Generated from protobuf enum UTF32 = 3; - */ - const UTF32 = 3; - - private static $valueToName = [ - self::NONE => 'NONE', - self::UTF8 => 'UTF8', - self::UTF16 => 'UTF16', - self::UTF32 => 'UTF32', - ]; - - 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/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity.php deleted file mode 100644 index a5d2c26c213e..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity.php +++ /dev/null @@ -1,293 +0,0 @@ -google.cloud.language.v1beta2.Entity - */ -class Entity extends \Google\Protobuf\Internal\Message -{ - /** - * The representative name for the entity. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The entity type. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Entity.Type type = 2; - */ - protected $type = 0; - /** - * Metadata associated with the entity. - * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) - * and Knowledge Graph MID (`mid`), if they are available. For the metadata - * associated with other entity types, see the Type table below. - * - * Generated from protobuf field map metadata = 3; - */ - private $metadata; - /** - * The salience score associated with the entity in the [0, 1.0] range. - * The salience score for an entity provides information about the - * importance or centrality of that entity to the entire document text. - * Scores closer to 0 are less salient, while scores closer to 1.0 are highly - * salient. - * - * Generated from protobuf field float salience = 4; - */ - protected $salience = 0.0; - /** - * The mentions of this entity in the input document. The API currently - * supports proper noun mentions. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.EntityMention mentions = 5; - */ - private $mentions; - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the aggregate sentiment expressed - * for this entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 6; - */ - protected $sentiment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The representative name for the entity. - * @type int $type - * The entity type. - * @type array|\Google\Protobuf\Internal\MapField $metadata - * Metadata associated with the entity. - * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) - * and Knowledge Graph MID (`mid`), if they are available. For the metadata - * associated with other entity types, see the Type table below. - * @type float $salience - * The salience score associated with the entity in the [0, 1.0] range. - * The salience score for an entity provides information about the - * importance or centrality of that entity to the entire document text. - * Scores closer to 0 are less salient, while scores closer to 1.0 are highly - * salient. - * @type array<\Google\Cloud\Language\V1beta2\EntityMention>|\Google\Protobuf\Internal\RepeatedField $mentions - * The mentions of this entity in the input document. The API currently - * supports proper noun mentions. - * @type \Google\Cloud\Language\V1beta2\Sentiment $sentiment - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the aggregate sentiment expressed - * for this entity in the provided document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The representative name for the entity. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The representative name for the entity. - * - * 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 entity type. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Entity.Type type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The entity type. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Entity.Type type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\Entity\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Metadata associated with the entity. - * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) - * and Knowledge Graph MID (`mid`), if they are available. For the metadata - * associated with other entity types, see the Type table below. - * - * Generated from protobuf field map metadata = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * Metadata associated with the entity. - * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) - * and Knowledge Graph MID (`mid`), if they are available. For the metadata - * associated with other entity types, see the Type table below. - * - * Generated from protobuf field map metadata = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata = $arr; - - return $this; - } - - /** - * The salience score associated with the entity in the [0, 1.0] range. - * The salience score for an entity provides information about the - * importance or centrality of that entity to the entire document text. - * Scores closer to 0 are less salient, while scores closer to 1.0 are highly - * salient. - * - * Generated from protobuf field float salience = 4; - * @return float - */ - public function getSalience() - { - return $this->salience; - } - - /** - * The salience score associated with the entity in the [0, 1.0] range. - * The salience score for an entity provides information about the - * importance or centrality of that entity to the entire document text. - * Scores closer to 0 are less salient, while scores closer to 1.0 are highly - * salient. - * - * Generated from protobuf field float salience = 4; - * @param float $var - * @return $this - */ - public function setSalience($var) - { - GPBUtil::checkFloat($var); - $this->salience = $var; - - return $this; - } - - /** - * The mentions of this entity in the input document. The API currently - * supports proper noun mentions. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.EntityMention mentions = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMentions() - { - return $this->mentions; - } - - /** - * The mentions of this entity in the input document. The API currently - * supports proper noun mentions. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.EntityMention mentions = 5; - * @param array<\Google\Cloud\Language\V1beta2\EntityMention>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMentions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\EntityMention::class); - $this->mentions = $arr; - - return $this; - } - - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the aggregate sentiment expressed - * for this entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 6; - * @return \Google\Cloud\Language\V1beta2\Sentiment|null - */ - public function getSentiment() - { - return $this->sentiment; - } - - public function hasSentiment() - { - return isset($this->sentiment); - } - - public function clearSentiment() - { - unset($this->sentiment); - } - - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the aggregate sentiment expressed - * for this entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 6; - * @param \Google\Cloud\Language\V1beta2\Sentiment $var - * @return $this - */ - public function setSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Sentiment::class); - $this->sentiment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity/Type.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity/Type.php deleted file mode 100644 index 128bbb2c7e0b..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity/Type.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.language.v1beta2.Entity.Type - */ -class Type -{ - /** - * Unknown - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * Person - * - * Generated from protobuf enum PERSON = 1; - */ - const PERSON = 1; - /** - * Location - * - * Generated from protobuf enum LOCATION = 2; - */ - const LOCATION = 2; - /** - * Organization - * - * Generated from protobuf enum ORGANIZATION = 3; - */ - const ORGANIZATION = 3; - /** - * Event - * - * Generated from protobuf enum EVENT = 4; - */ - const EVENT = 4; - /** - * Artwork - * - * Generated from protobuf enum WORK_OF_ART = 5; - */ - const WORK_OF_ART = 5; - /** - * Consumer product - * - * Generated from protobuf enum CONSUMER_GOOD = 6; - */ - const CONSUMER_GOOD = 6; - /** - * Other types of entities - * - * Generated from protobuf enum OTHER = 7; - */ - const OTHER = 7; - /** - * Phone number - * The metadata lists the phone number, formatted according to local - * convention, plus whichever additional elements appear in the text: - * * `number` - the actual number, broken down into sections as per local - * convention - * * `national_prefix` - country code, if detected - * * `area_code` - region or area code, if detected - * * `extension` - phone extension (to be dialed after connection), if - * detected - * - * Generated from protobuf enum PHONE_NUMBER = 9; - */ - const PHONE_NUMBER = 9; - /** - * Address - * The metadata identifies the street number and locality plus whichever - * additional elements appear in the text: - * * `street_number` - street number - * * `locality` - city or town - * * `street_name` - street/route name, if detected - * * `postal_code` - postal code, if detected - * * `country` - country, if detected< - * * `broad_region` - administrative area, such as the state, if detected - * * `narrow_region` - smaller administrative area, such as county, if - * detected - * * `sublocality` - used in Asian addresses to demark a district within a - * city, if detected - * - * Generated from protobuf enum ADDRESS = 10; - */ - const ADDRESS = 10; - /** - * Date - * The metadata identifies the components of the date: - * * `year` - four digit year, if detected - * * `month` - two digit month number, if detected - * * `day` - two digit day number, if detected - * - * Generated from protobuf enum DATE = 11; - */ - const DATE = 11; - /** - * Number - * The metadata is the number itself. - * - * Generated from protobuf enum NUMBER = 12; - */ - const NUMBER = 12; - /** - * Price - * The metadata identifies the `value` and `currency`. - * - * Generated from protobuf enum PRICE = 13; - */ - const PRICE = 13; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::PERSON => 'PERSON', - self::LOCATION => 'LOCATION', - self::ORGANIZATION => 'ORGANIZATION', - self::EVENT => 'EVENT', - self::WORK_OF_ART => 'WORK_OF_ART', - self::CONSUMER_GOOD => 'CONSUMER_GOOD', - self::OTHER => 'OTHER', - self::PHONE_NUMBER => 'PHONE_NUMBER', - self::ADDRESS => 'ADDRESS', - self::DATE => 'DATE', - self::NUMBER => 'NUMBER', - self::PRICE => 'PRICE', - ]; - - 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(Type::class, \Google\Cloud\Language\V1beta2\Entity_Type::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention.php deleted file mode 100644 index 837d6fa5fe25..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.language.v1beta2.EntityMention - */ -class EntityMention extends \Google\Protobuf\Internal\Message -{ - /** - * The mention text. - * - * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; - */ - protected $text = null; - /** - * The type of the entity mention. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EntityMention.Type type = 2; - */ - protected $type = 0; - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the sentiment expressed for this - * mention of the entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 3; - */ - protected $sentiment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\TextSpan $text - * The mention text. - * @type int $type - * The type of the entity mention. - * @type \Google\Cloud\Language\V1beta2\Sentiment $sentiment - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the sentiment expressed for this - * mention of the entity in the provided document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The mention text. - * - * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; - * @return \Google\Cloud\Language\V1beta2\TextSpan|null - */ - public function getText() - { - return $this->text; - } - - public function hasText() - { - return isset($this->text); - } - - public function clearText() - { - unset($this->text); - } - - /** - * The mention text. - * - * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; - * @param \Google\Cloud\Language\V1beta2\TextSpan $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\TextSpan::class); - $this->text = $var; - - return $this; - } - - /** - * The type of the entity mention. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EntityMention.Type type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the entity mention. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EntityMention.Type type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\EntityMention\Type::class); - $this->type = $var; - - return $this; - } - - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the sentiment expressed for this - * mention of the entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 3; - * @return \Google\Cloud\Language\V1beta2\Sentiment|null - */ - public function getSentiment() - { - return $this->sentiment; - } - - public function hasSentiment() - { - return isset($this->sentiment); - } - - public function clearSentiment() - { - unset($this->sentiment); - } - - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the sentiment expressed for this - * mention of the entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 3; - * @param \Google\Cloud\Language\V1beta2\Sentiment $var - * @return $this - */ - public function setSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Sentiment::class); - $this->sentiment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention/Type.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention/Type.php deleted file mode 100644 index 75131e71c1d9..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.language.v1beta2.EntityMention.Type - */ -class Type -{ - /** - * Unknown - * - * Generated from protobuf enum TYPE_UNKNOWN = 0; - */ - const TYPE_UNKNOWN = 0; - /** - * Proper name - * - * Generated from protobuf enum PROPER = 1; - */ - const PROPER = 1; - /** - * Common noun (or noun compound) - * - * Generated from protobuf enum COMMON = 2; - */ - const COMMON = 2; - - private static $valueToName = [ - self::TYPE_UNKNOWN => 'TYPE_UNKNOWN', - self::PROPER => 'PROPER', - self::COMMON => 'COMMON', - ]; - - 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(Type::class, \Google\Cloud\Language\V1beta2\EntityMention_Type::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ModerateTextRequest.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ModerateTextRequest.php deleted file mode 100644 index d006eb5a525c..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ModerateTextRequest.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.language.v1beta2.ModerateTextRequest - */ -class ModerateTextRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\Document $document - * Required. Input document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1beta2\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1beta2\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Document::class); - $this->document = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ModerateTextResponse.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ModerateTextResponse.php deleted file mode 100644 index 99c5faa0cf3c..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ModerateTextResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.language.v1beta2.ModerateTextResponse - */ -class ModerateTextResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Harmful and sensitive categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory moderation_categories = 1; - */ - private $moderation_categories; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V1beta2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $moderation_categories - * Harmful and sensitive categories representing the input document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Harmful and sensitive categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory moderation_categories = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getModerationCategories() - { - return $this->moderation_categories; - } - - /** - * Harmful and sensitive categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory moderation_categories = 1; - * @param array<\Google\Cloud\Language\V1beta2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setModerationCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\ClassificationCategory::class); - $this->moderation_categories = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech.php deleted file mode 100644 index 5c739918469e..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech.php +++ /dev/null @@ -1,441 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech - */ -class PartOfSpeech extends \Google\Protobuf\Internal\Message -{ - /** - * The part of speech tag. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Tag tag = 1; - */ - protected $tag = 0; - /** - * The grammatical aspect. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Aspect aspect = 2; - */ - protected $aspect = 0; - /** - * The grammatical case. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Case case = 3; - */ - protected $case = 0; - /** - * The grammatical form. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Form form = 4; - */ - protected $form = 0; - /** - * The grammatical gender. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Gender gender = 5; - */ - protected $gender = 0; - /** - * The grammatical mood. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Mood mood = 6; - */ - protected $mood = 0; - /** - * The grammatical number. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Number number = 7; - */ - protected $number = 0; - /** - * The grammatical person. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Person person = 8; - */ - protected $person = 0; - /** - * The grammatical properness. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Proper proper = 9; - */ - protected $proper = 0; - /** - * The grammatical reciprocity. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Reciprocity reciprocity = 10; - */ - protected $reciprocity = 0; - /** - * The grammatical tense. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Tense tense = 11; - */ - protected $tense = 0; - /** - * The grammatical voice. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Voice voice = 12; - */ - protected $voice = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $tag - * The part of speech tag. - * @type int $aspect - * The grammatical aspect. - * @type int $case - * The grammatical case. - * @type int $form - * The grammatical form. - * @type int $gender - * The grammatical gender. - * @type int $mood - * The grammatical mood. - * @type int $number - * The grammatical number. - * @type int $person - * The grammatical person. - * @type int $proper - * The grammatical properness. - * @type int $reciprocity - * The grammatical reciprocity. - * @type int $tense - * The grammatical tense. - * @type int $voice - * The grammatical voice. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The part of speech tag. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Tag tag = 1; - * @return int - */ - public function getTag() - { - return $this->tag; - } - - /** - * The part of speech tag. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Tag tag = 1; - * @param int $var - * @return $this - */ - public function setTag($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Tag::class); - $this->tag = $var; - - return $this; - } - - /** - * The grammatical aspect. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Aspect aspect = 2; - * @return int - */ - public function getAspect() - { - return $this->aspect; - } - - /** - * The grammatical aspect. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Aspect aspect = 2; - * @param int $var - * @return $this - */ - public function setAspect($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Aspect::class); - $this->aspect = $var; - - return $this; - } - - /** - * The grammatical case. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Case case = 3; - * @return int - */ - public function getCase() - { - return $this->case; - } - - /** - * The grammatical case. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Case case = 3; - * @param int $var - * @return $this - */ - public function setCase($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\PBCase::class); - $this->case = $var; - - return $this; - } - - /** - * The grammatical form. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Form form = 4; - * @return int - */ - public function getForm() - { - return $this->form; - } - - /** - * The grammatical form. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Form form = 4; - * @param int $var - * @return $this - */ - public function setForm($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Form::class); - $this->form = $var; - - return $this; - } - - /** - * The grammatical gender. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Gender gender = 5; - * @return int - */ - public function getGender() - { - return $this->gender; - } - - /** - * The grammatical gender. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Gender gender = 5; - * @param int $var - * @return $this - */ - public function setGender($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Gender::class); - $this->gender = $var; - - return $this; - } - - /** - * The grammatical mood. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Mood mood = 6; - * @return int - */ - public function getMood() - { - return $this->mood; - } - - /** - * The grammatical mood. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Mood mood = 6; - * @param int $var - * @return $this - */ - public function setMood($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Mood::class); - $this->mood = $var; - - return $this; - } - - /** - * The grammatical number. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Number number = 7; - * @return int - */ - public function getNumber() - { - return $this->number; - } - - /** - * The grammatical number. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Number number = 7; - * @param int $var - * @return $this - */ - public function setNumber($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Number::class); - $this->number = $var; - - return $this; - } - - /** - * The grammatical person. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Person person = 8; - * @return int - */ - public function getPerson() - { - return $this->person; - } - - /** - * The grammatical person. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Person person = 8; - * @param int $var - * @return $this - */ - public function setPerson($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Person::class); - $this->person = $var; - - return $this; - } - - /** - * The grammatical properness. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Proper proper = 9; - * @return int - */ - public function getProper() - { - return $this->proper; - } - - /** - * The grammatical properness. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Proper proper = 9; - * @param int $var - * @return $this - */ - public function setProper($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Proper::class); - $this->proper = $var; - - return $this; - } - - /** - * The grammatical reciprocity. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Reciprocity reciprocity = 10; - * @return int - */ - public function getReciprocity() - { - return $this->reciprocity; - } - - /** - * The grammatical reciprocity. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Reciprocity reciprocity = 10; - * @param int $var - * @return $this - */ - public function setReciprocity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Reciprocity::class); - $this->reciprocity = $var; - - return $this; - } - - /** - * The grammatical tense. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Tense tense = 11; - * @return int - */ - public function getTense() - { - return $this->tense; - } - - /** - * The grammatical tense. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Tense tense = 11; - * @param int $var - * @return $this - */ - public function setTense($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Tense::class); - $this->tense = $var; - - return $this; - } - - /** - * The grammatical voice. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Voice voice = 12; - * @return int - */ - public function getVoice() - { - return $this->voice; - } - - /** - * The grammatical voice. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Voice voice = 12; - * @param int $var - * @return $this - */ - public function setVoice($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Voice::class); - $this->voice = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Aspect.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Aspect.php deleted file mode 100644 index 48882ba09ced..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Aspect.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Aspect - */ -class Aspect -{ - /** - * Aspect is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum ASPECT_UNKNOWN = 0; - */ - const ASPECT_UNKNOWN = 0; - /** - * Perfective - * - * Generated from protobuf enum PERFECTIVE = 1; - */ - const PERFECTIVE = 1; - /** - * Imperfective - * - * Generated from protobuf enum IMPERFECTIVE = 2; - */ - const IMPERFECTIVE = 2; - /** - * Progressive - * - * Generated from protobuf enum PROGRESSIVE = 3; - */ - const PROGRESSIVE = 3; - - private static $valueToName = [ - self::ASPECT_UNKNOWN => 'ASPECT_UNKNOWN', - self::PERFECTIVE => 'PERFECTIVE', - self::IMPERFECTIVE => 'IMPERFECTIVE', - self::PROGRESSIVE => 'PROGRESSIVE', - ]; - - 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(Aspect::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Aspect::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Form.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Form.php deleted file mode 100644 index b3c1847352d3..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Form.php +++ /dev/null @@ -1,130 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Form - */ -class Form -{ - /** - * Form is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum FORM_UNKNOWN = 0; - */ - const FORM_UNKNOWN = 0; - /** - * Adnomial - * - * Generated from protobuf enum ADNOMIAL = 1; - */ - const ADNOMIAL = 1; - /** - * Auxiliary - * - * Generated from protobuf enum AUXILIARY = 2; - */ - const AUXILIARY = 2; - /** - * Complementizer - * - * Generated from protobuf enum COMPLEMENTIZER = 3; - */ - const COMPLEMENTIZER = 3; - /** - * Final ending - * - * Generated from protobuf enum FINAL_ENDING = 4; - */ - const FINAL_ENDING = 4; - /** - * Gerund - * - * Generated from protobuf enum GERUND = 5; - */ - const GERUND = 5; - /** - * Realis - * - * Generated from protobuf enum REALIS = 6; - */ - const REALIS = 6; - /** - * Irrealis - * - * Generated from protobuf enum IRREALIS = 7; - */ - const IRREALIS = 7; - /** - * Short form - * - * Generated from protobuf enum SHORT = 8; - */ - const SHORT = 8; - /** - * Long form - * - * Generated from protobuf enum LONG = 9; - */ - const LONG = 9; - /** - * Order form - * - * Generated from protobuf enum ORDER = 10; - */ - const ORDER = 10; - /** - * Specific form - * - * Generated from protobuf enum SPECIFIC = 11; - */ - const SPECIFIC = 11; - - private static $valueToName = [ - self::FORM_UNKNOWN => 'FORM_UNKNOWN', - self::ADNOMIAL => 'ADNOMIAL', - self::AUXILIARY => 'AUXILIARY', - self::COMPLEMENTIZER => 'COMPLEMENTIZER', - self::FINAL_ENDING => 'FINAL_ENDING', - self::GERUND => 'GERUND', - self::REALIS => 'REALIS', - self::IRREALIS => 'IRREALIS', - self::SHORT => 'SHORT', - self::LONG => 'LONG', - self::ORDER => 'ORDER', - self::SPECIFIC => 'SPECIFIC', - ]; - - 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(Form::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Form::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Gender.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Gender.php deleted file mode 100644 index 8481abbc6b93..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Gender.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Gender - */ -class Gender -{ - /** - * Gender is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum GENDER_UNKNOWN = 0; - */ - const GENDER_UNKNOWN = 0; - /** - * Feminine - * - * Generated from protobuf enum FEMININE = 1; - */ - const FEMININE = 1; - /** - * Masculine - * - * Generated from protobuf enum MASCULINE = 2; - */ - const MASCULINE = 2; - /** - * Neuter - * - * Generated from protobuf enum NEUTER = 3; - */ - const NEUTER = 3; - - private static $valueToName = [ - self::GENDER_UNKNOWN => 'GENDER_UNKNOWN', - self::FEMININE => 'FEMININE', - self::MASCULINE => 'MASCULINE', - self::NEUTER => 'NEUTER', - ]; - - 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(Gender::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Gender::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Mood.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Mood.php deleted file mode 100644 index 8857bc7dcd44..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Mood.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Mood - */ -class Mood -{ - /** - * Mood is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum MOOD_UNKNOWN = 0; - */ - const MOOD_UNKNOWN = 0; - /** - * Conditional - * - * Generated from protobuf enum CONDITIONAL_MOOD = 1; - */ - const CONDITIONAL_MOOD = 1; - /** - * Imperative - * - * Generated from protobuf enum IMPERATIVE = 2; - */ - const IMPERATIVE = 2; - /** - * Indicative - * - * Generated from protobuf enum INDICATIVE = 3; - */ - const INDICATIVE = 3; - /** - * Interrogative - * - * Generated from protobuf enum INTERROGATIVE = 4; - */ - const INTERROGATIVE = 4; - /** - * Jussive - * - * Generated from protobuf enum JUSSIVE = 5; - */ - const JUSSIVE = 5; - /** - * Subjunctive - * - * Generated from protobuf enum SUBJUNCTIVE = 6; - */ - const SUBJUNCTIVE = 6; - - private static $valueToName = [ - self::MOOD_UNKNOWN => 'MOOD_UNKNOWN', - self::CONDITIONAL_MOOD => 'CONDITIONAL_MOOD', - self::IMPERATIVE => 'IMPERATIVE', - self::INDICATIVE => 'INDICATIVE', - self::INTERROGATIVE => 'INTERROGATIVE', - self::JUSSIVE => 'JUSSIVE', - self::SUBJUNCTIVE => 'SUBJUNCTIVE', - ]; - - 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(Mood::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Mood::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Number.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Number.php deleted file mode 100644 index f3c9eddeaf95..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Number.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Number - */ -class Number -{ - /** - * Number is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum NUMBER_UNKNOWN = 0; - */ - const NUMBER_UNKNOWN = 0; - /** - * Singular - * - * Generated from protobuf enum SINGULAR = 1; - */ - const SINGULAR = 1; - /** - * Plural - * - * Generated from protobuf enum PLURAL = 2; - */ - const PLURAL = 2; - /** - * Dual - * - * Generated from protobuf enum DUAL = 3; - */ - const DUAL = 3; - - private static $valueToName = [ - self::NUMBER_UNKNOWN => 'NUMBER_UNKNOWN', - self::SINGULAR => 'SINGULAR', - self::PLURAL => 'PLURAL', - self::DUAL => 'DUAL', - ]; - - 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(Number::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Number::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/PBCase.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/PBCase.php deleted file mode 100644 index f110d8846a1a..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/PBCase.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Case - */ -class PBCase -{ - /** - * Case is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum CASE_UNKNOWN = 0; - */ - const CASE_UNKNOWN = 0; - /** - * Accusative - * - * Generated from protobuf enum ACCUSATIVE = 1; - */ - const ACCUSATIVE = 1; - /** - * Adverbial - * - * Generated from protobuf enum ADVERBIAL = 2; - */ - const ADVERBIAL = 2; - /** - * Complementive - * - * Generated from protobuf enum COMPLEMENTIVE = 3; - */ - const COMPLEMENTIVE = 3; - /** - * Dative - * - * Generated from protobuf enum DATIVE = 4; - */ - const DATIVE = 4; - /** - * Genitive - * - * Generated from protobuf enum GENITIVE = 5; - */ - const GENITIVE = 5; - /** - * Instrumental - * - * Generated from protobuf enum INSTRUMENTAL = 6; - */ - const INSTRUMENTAL = 6; - /** - * Locative - * - * Generated from protobuf enum LOCATIVE = 7; - */ - const LOCATIVE = 7; - /** - * Nominative - * - * Generated from protobuf enum NOMINATIVE = 8; - */ - const NOMINATIVE = 8; - /** - * Oblique - * - * Generated from protobuf enum OBLIQUE = 9; - */ - const OBLIQUE = 9; - /** - * Partitive - * - * Generated from protobuf enum PARTITIVE = 10; - */ - const PARTITIVE = 10; - /** - * Prepositional - * - * Generated from protobuf enum PREPOSITIONAL = 11; - */ - const PREPOSITIONAL = 11; - /** - * Reflexive - * - * Generated from protobuf enum REFLEXIVE_CASE = 12; - */ - const REFLEXIVE_CASE = 12; - /** - * Relative - * - * Generated from protobuf enum RELATIVE_CASE = 13; - */ - const RELATIVE_CASE = 13; - /** - * Vocative - * - * Generated from protobuf enum VOCATIVE = 14; - */ - const VOCATIVE = 14; - - private static $valueToName = [ - self::CASE_UNKNOWN => 'CASE_UNKNOWN', - self::ACCUSATIVE => 'ACCUSATIVE', - self::ADVERBIAL => 'ADVERBIAL', - self::COMPLEMENTIVE => 'COMPLEMENTIVE', - self::DATIVE => 'DATIVE', - self::GENITIVE => 'GENITIVE', - self::INSTRUMENTAL => 'INSTRUMENTAL', - self::LOCATIVE => 'LOCATIVE', - self::NOMINATIVE => 'NOMINATIVE', - self::OBLIQUE => 'OBLIQUE', - self::PARTITIVE => 'PARTITIVE', - self::PREPOSITIONAL => 'PREPOSITIONAL', - self::REFLEXIVE_CASE => 'REFLEXIVE_CASE', - self::RELATIVE_CASE => 'RELATIVE_CASE', - self::VOCATIVE => 'VOCATIVE', - ]; - - 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(PBCase::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Case::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Person.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Person.php deleted file mode 100644 index 9584fd35c7ca..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Person.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Person - */ -class Person -{ - /** - * Person is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum PERSON_UNKNOWN = 0; - */ - const PERSON_UNKNOWN = 0; - /** - * First - * - * Generated from protobuf enum FIRST = 1; - */ - const FIRST = 1; - /** - * Second - * - * Generated from protobuf enum SECOND = 2; - */ - const SECOND = 2; - /** - * Third - * - * Generated from protobuf enum THIRD = 3; - */ - const THIRD = 3; - /** - * Reflexive - * - * Generated from protobuf enum REFLEXIVE_PERSON = 4; - */ - const REFLEXIVE_PERSON = 4; - - private static $valueToName = [ - self::PERSON_UNKNOWN => 'PERSON_UNKNOWN', - self::FIRST => 'FIRST', - self::SECOND => 'SECOND', - self::THIRD => 'THIRD', - self::REFLEXIVE_PERSON => 'REFLEXIVE_PERSON', - ]; - - 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(Person::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Person::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Proper.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Proper.php deleted file mode 100644 index d71aded410d6..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Proper.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Proper - */ -class Proper -{ - /** - * Proper is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum PROPER_UNKNOWN = 0; - */ - const PROPER_UNKNOWN = 0; - /** - * Proper - * - * Generated from protobuf enum PROPER = 1; - */ - const PROPER = 1; - /** - * Not proper - * - * Generated from protobuf enum NOT_PROPER = 2; - */ - const NOT_PROPER = 2; - - private static $valueToName = [ - self::PROPER_UNKNOWN => 'PROPER_UNKNOWN', - self::PROPER => 'PROPER', - self::NOT_PROPER => 'NOT_PROPER', - ]; - - 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(Proper::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Proper::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Reciprocity.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Reciprocity.php deleted file mode 100644 index aae22e4dd765..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Reciprocity.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Reciprocity - */ -class Reciprocity -{ - /** - * Reciprocity is not applicable in the analyzed language or is not - * predicted. - * - * Generated from protobuf enum RECIPROCITY_UNKNOWN = 0; - */ - const RECIPROCITY_UNKNOWN = 0; - /** - * Reciprocal - * - * Generated from protobuf enum RECIPROCAL = 1; - */ - const RECIPROCAL = 1; - /** - * Non-reciprocal - * - * Generated from protobuf enum NON_RECIPROCAL = 2; - */ - const NON_RECIPROCAL = 2; - - private static $valueToName = [ - self::RECIPROCITY_UNKNOWN => 'RECIPROCITY_UNKNOWN', - self::RECIPROCAL => 'RECIPROCAL', - self::NON_RECIPROCAL => 'NON_RECIPROCAL', - ]; - - 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(Reciprocity::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Reciprocity::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Tag.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Tag.php deleted file mode 100644 index 0fb0d7e7e813..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Tag.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Tag - */ -class Tag -{ - /** - * Unknown - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * Adjective - * - * Generated from protobuf enum ADJ = 1; - */ - const ADJ = 1; - /** - * Adposition (preposition and postposition) - * - * Generated from protobuf enum ADP = 2; - */ - const ADP = 2; - /** - * Adverb - * - * Generated from protobuf enum ADV = 3; - */ - const ADV = 3; - /** - * Conjunction - * - * Generated from protobuf enum CONJ = 4; - */ - const CONJ = 4; - /** - * Determiner - * - * Generated from protobuf enum DET = 5; - */ - const DET = 5; - /** - * Noun (common and proper) - * - * Generated from protobuf enum NOUN = 6; - */ - const NOUN = 6; - /** - * Cardinal number - * - * Generated from protobuf enum NUM = 7; - */ - const NUM = 7; - /** - * Pronoun - * - * Generated from protobuf enum PRON = 8; - */ - const PRON = 8; - /** - * Particle or other function word - * - * Generated from protobuf enum PRT = 9; - */ - const PRT = 9; - /** - * Punctuation - * - * Generated from protobuf enum PUNCT = 10; - */ - const PUNCT = 10; - /** - * Verb (all tenses and modes) - * - * Generated from protobuf enum VERB = 11; - */ - const VERB = 11; - /** - * Other: foreign words, typos, abbreviations - * - * Generated from protobuf enum X = 12; - */ - const X = 12; - /** - * Affix - * - * Generated from protobuf enum AFFIX = 13; - */ - const AFFIX = 13; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::ADJ => 'ADJ', - self::ADP => 'ADP', - self::ADV => 'ADV', - self::CONJ => 'CONJ', - self::DET => 'DET', - self::NOUN => 'NOUN', - self::NUM => 'NUM', - self::PRON => 'PRON', - self::PRT => 'PRT', - self::PUNCT => 'PUNCT', - self::VERB => 'VERB', - self::X => 'X', - self::AFFIX => 'AFFIX', - ]; - - 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(Tag::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Tag::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Tense.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Tense.php deleted file mode 100644 index e9e4e2000ad0..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Tense.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Tense - */ -class Tense -{ - /** - * Tense is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum TENSE_UNKNOWN = 0; - */ - const TENSE_UNKNOWN = 0; - /** - * Conditional - * - * Generated from protobuf enum CONDITIONAL_TENSE = 1; - */ - const CONDITIONAL_TENSE = 1; - /** - * Future - * - * Generated from protobuf enum FUTURE = 2; - */ - const FUTURE = 2; - /** - * Past - * - * Generated from protobuf enum PAST = 3; - */ - const PAST = 3; - /** - * Present - * - * Generated from protobuf enum PRESENT = 4; - */ - const PRESENT = 4; - /** - * Imperfect - * - * Generated from protobuf enum IMPERFECT = 5; - */ - const IMPERFECT = 5; - /** - * Pluperfect - * - * Generated from protobuf enum PLUPERFECT = 6; - */ - const PLUPERFECT = 6; - - private static $valueToName = [ - self::TENSE_UNKNOWN => 'TENSE_UNKNOWN', - self::CONDITIONAL_TENSE => 'CONDITIONAL_TENSE', - self::FUTURE => 'FUTURE', - self::PAST => 'PAST', - self::PRESENT => 'PRESENT', - self::IMPERFECT => 'IMPERFECT', - self::PLUPERFECT => 'PLUPERFECT', - ]; - - 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(Tense::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Tense::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Voice.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Voice.php deleted file mode 100644 index b1cfd65aeaa9..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Voice.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Voice - */ -class Voice -{ - /** - * Voice is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum VOICE_UNKNOWN = 0; - */ - const VOICE_UNKNOWN = 0; - /** - * Active - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * Causative - * - * Generated from protobuf enum CAUSATIVE = 2; - */ - const CAUSATIVE = 2; - /** - * Passive - * - * Generated from protobuf enum PASSIVE = 3; - */ - const PASSIVE = 3; - - private static $valueToName = [ - self::VOICE_UNKNOWN => 'VOICE_UNKNOWN', - self::ACTIVE => 'ACTIVE', - self::CAUSATIVE => 'CAUSATIVE', - self::PASSIVE => 'PASSIVE', - ]; - - 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(Voice::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Voice::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Sentence.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Sentence.php deleted file mode 100644 index 5598b7be933c..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Sentence.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.language.v1beta2.Sentence - */ -class Sentence extends \Google\Protobuf\Internal\Message -{ - /** - * The sentence text. - * - * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; - */ - protected $text = null; - /** - * For calls to [AnalyzeSentiment][] or if - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] - * is set to true, this field will contain the sentiment for the sentence. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 2; - */ - protected $sentiment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\TextSpan $text - * The sentence text. - * @type \Google\Cloud\Language\V1beta2\Sentiment $sentiment - * For calls to [AnalyzeSentiment][] or if - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] - * is set to true, this field will contain the sentiment for the sentence. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The sentence text. - * - * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; - * @return \Google\Cloud\Language\V1beta2\TextSpan|null - */ - public function getText() - { - return $this->text; - } - - public function hasText() - { - return isset($this->text); - } - - public function clearText() - { - unset($this->text); - } - - /** - * The sentence text. - * - * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; - * @param \Google\Cloud\Language\V1beta2\TextSpan $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\TextSpan::class); - $this->text = $var; - - return $this; - } - - /** - * For calls to [AnalyzeSentiment][] or if - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] - * is set to true, this field will contain the sentiment for the sentence. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 2; - * @return \Google\Cloud\Language\V1beta2\Sentiment|null - */ - public function getSentiment() - { - return $this->sentiment; - } - - public function hasSentiment() - { - return isset($this->sentiment); - } - - public function clearSentiment() - { - unset($this->sentiment); - } - - /** - * For calls to [AnalyzeSentiment][] or if - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] - * is set to true, this field will contain the sentiment for the sentence. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 2; - * @param \Google\Cloud\Language\V1beta2\Sentiment $var - * @return $this - */ - public function setSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Sentiment::class); - $this->sentiment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Sentiment.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Sentiment.php deleted file mode 100644 index 5dd926e6ae2d..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Sentiment.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.language.v1beta2.Sentiment - */ -class Sentiment extends \Google\Protobuf\Internal\Message -{ - /** - * A non-negative number in the [0, +inf) range, which represents - * the absolute magnitude of sentiment regardless of score (positive or - * negative). - * - * Generated from protobuf field float magnitude = 2; - */ - protected $magnitude = 0.0; - /** - * Sentiment score between -1.0 (negative sentiment) and 1.0 - * (positive sentiment). - * - * Generated from protobuf field float score = 3; - */ - protected $score = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $magnitude - * A non-negative number in the [0, +inf) range, which represents - * the absolute magnitude of sentiment regardless of score (positive or - * negative). - * @type float $score - * Sentiment score between -1.0 (negative sentiment) and 1.0 - * (positive sentiment). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * A non-negative number in the [0, +inf) range, which represents - * the absolute magnitude of sentiment regardless of score (positive or - * negative). - * - * Generated from protobuf field float magnitude = 2; - * @return float - */ - public function getMagnitude() - { - return $this->magnitude; - } - - /** - * A non-negative number in the [0, +inf) range, which represents - * the absolute magnitude of sentiment regardless of score (positive or - * negative). - * - * Generated from protobuf field float magnitude = 2; - * @param float $var - * @return $this - */ - public function setMagnitude($var) - { - GPBUtil::checkFloat($var); - $this->magnitude = $var; - - return $this; - } - - /** - * Sentiment score between -1.0 (negative sentiment) and 1.0 - * (positive sentiment). - * - * Generated from protobuf field float score = 3; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * Sentiment score between -1.0 (negative sentiment) and 1.0 - * (positive sentiment). - * - * Generated from protobuf field float score = 3; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/TextSpan.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/TextSpan.php deleted file mode 100644 index 2adf1f08e1b7..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/TextSpan.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.language.v1beta2.TextSpan - */ -class TextSpan extends \Google\Protobuf\Internal\Message -{ - /** - * The content of the output text. - * - * Generated from protobuf field string content = 1; - */ - protected $content = ''; - /** - * The API calculates the beginning offset of the content in the original - * document according to the - * [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the - * API request. - * - * Generated from protobuf field int32 begin_offset = 2; - */ - protected $begin_offset = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $content - * The content of the output text. - * @type int $begin_offset - * The API calculates the beginning offset of the content in the original - * document according to the - * [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the - * API request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The content of the output text. - * - * Generated from protobuf field string content = 1; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * The content of the output text. - * - * Generated from protobuf field string content = 1; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, True); - $this->content = $var; - - return $this; - } - - /** - * The API calculates the beginning offset of the content in the original - * document according to the - * [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the - * API request. - * - * Generated from protobuf field int32 begin_offset = 2; - * @return int - */ - public function getBeginOffset() - { - return $this->begin_offset; - } - - /** - * The API calculates the beginning offset of the content in the original - * document according to the - * [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the - * API request. - * - * Generated from protobuf field int32 begin_offset = 2; - * @param int $var - * @return $this - */ - public function setBeginOffset($var) - { - GPBUtil::checkInt32($var); - $this->begin_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Token.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Token.php deleted file mode 100644 index f441782ad3a0..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Token.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.language.v1beta2.Token - */ -class Token extends \Google\Protobuf\Internal\Message -{ - /** - * The token text. - * - * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; - */ - protected $text = null; - /** - * Parts of speech tag for this token. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech part_of_speech = 2; - */ - protected $part_of_speech = null; - /** - * Dependency tree parse for this token. - * - * Generated from protobuf field .google.cloud.language.v1beta2.DependencyEdge dependency_edge = 3; - */ - protected $dependency_edge = null; - /** - * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. - * - * Generated from protobuf field string lemma = 4; - */ - protected $lemma = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\TextSpan $text - * The token text. - * @type \Google\Cloud\Language\V1beta2\PartOfSpeech $part_of_speech - * Parts of speech tag for this token. - * @type \Google\Cloud\Language\V1beta2\DependencyEdge $dependency_edge - * Dependency tree parse for this token. - * @type string $lemma - * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The token text. - * - * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; - * @return \Google\Cloud\Language\V1beta2\TextSpan|null - */ - public function getText() - { - return $this->text; - } - - public function hasText() - { - return isset($this->text); - } - - public function clearText() - { - unset($this->text); - } - - /** - * The token text. - * - * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; - * @param \Google\Cloud\Language\V1beta2\TextSpan $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\TextSpan::class); - $this->text = $var; - - return $this; - } - - /** - * Parts of speech tag for this token. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech part_of_speech = 2; - * @return \Google\Cloud\Language\V1beta2\PartOfSpeech|null - */ - public function getPartOfSpeech() - { - return $this->part_of_speech; - } - - public function hasPartOfSpeech() - { - return isset($this->part_of_speech); - } - - public function clearPartOfSpeech() - { - unset($this->part_of_speech); - } - - /** - * Parts of speech tag for this token. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech part_of_speech = 2; - * @param \Google\Cloud\Language\V1beta2\PartOfSpeech $var - * @return $this - */ - public function setPartOfSpeech($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\PartOfSpeech::class); - $this->part_of_speech = $var; - - return $this; - } - - /** - * Dependency tree parse for this token. - * - * Generated from protobuf field .google.cloud.language.v1beta2.DependencyEdge dependency_edge = 3; - * @return \Google\Cloud\Language\V1beta2\DependencyEdge|null - */ - public function getDependencyEdge() - { - return $this->dependency_edge; - } - - public function hasDependencyEdge() - { - return isset($this->dependency_edge); - } - - public function clearDependencyEdge() - { - unset($this->dependency_edge); - } - - /** - * Dependency tree parse for this token. - * - * Generated from protobuf field .google.cloud.language.v1beta2.DependencyEdge dependency_edge = 3; - * @param \Google\Cloud\Language\V1beta2\DependencyEdge $var - * @return $this - */ - public function setDependencyEdge($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\DependencyEdge::class); - $this->dependency_edge = $var; - - return $this; - } - - /** - * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. - * - * Generated from protobuf field string lemma = 4; - * @return string - */ - public function getLemma() - { - return $this->lemma; - } - - /** - * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. - * - * Generated from protobuf field string lemma = 4; - * @param string $var - * @return $this - */ - public function setLemma($var) - { - GPBUtil::checkString($var, True); - $this->lemma = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_entities.php b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_entities.php deleted file mode 100644 index 5951d15a901d..000000000000 --- a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_entities.php +++ /dev/null @@ -1,59 +0,0 @@ -analyzeEntities($document); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1beta2_generated_LanguageService_AnalyzeEntities_sync] diff --git a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_entity_sentiment.php b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_entity_sentiment.php deleted file mode 100644 index 38cec4a0a967..000000000000 --- a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_entity_sentiment.php +++ /dev/null @@ -1,60 +0,0 @@ -analyzeEntitySentiment($document); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1beta2_generated_LanguageService_AnalyzeEntitySentiment_sync] diff --git a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_sentiment.php b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_sentiment.php deleted file mode 100644 index 87415da5d053..000000000000 --- a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_sentiment.php +++ /dev/null @@ -1,57 +0,0 @@ -analyzeSentiment($document); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1beta2_generated_LanguageService_AnalyzeSentiment_sync] diff --git a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_syntax.php b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_syntax.php deleted file mode 100644 index 87fd763318b2..000000000000 --- a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_syntax.php +++ /dev/null @@ -1,59 +0,0 @@ -analyzeSyntax($document); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1beta2_generated_LanguageService_AnalyzeSyntax_sync] diff --git a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/annotate_text.php b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/annotate_text.php deleted file mode 100644 index 9f01b01bf70d..000000000000 --- a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/annotate_text.php +++ /dev/null @@ -1,60 +0,0 @@ -annotateText($document, $features); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1beta2_generated_LanguageService_AnnotateText_sync] diff --git a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/classify_text.php b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/classify_text.php deleted file mode 100644 index 5240d109c638..000000000000 --- a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/classify_text.php +++ /dev/null @@ -1,57 +0,0 @@ -classifyText($document); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1beta2_generated_LanguageService_ClassifyText_sync] diff --git a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/moderate_text.php b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/moderate_text.php deleted file mode 100644 index 42bb2ad22f23..000000000000 --- a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/moderate_text.php +++ /dev/null @@ -1,57 +0,0 @@ -moderateText($document); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1beta2_generated_LanguageService_ModerateText_sync] diff --git a/owl-bot-staging/Language/v1beta2/src/V1beta2/Gapic/LanguageServiceGapicClient.php b/owl-bot-staging/Language/v1beta2/src/V1beta2/Gapic/LanguageServiceGapicClient.php deleted file mode 100644 index 990191b59109..000000000000 --- a/owl-bot-staging/Language/v1beta2/src/V1beta2/Gapic/LanguageServiceGapicClient.php +++ /dev/null @@ -1,497 +0,0 @@ -analyzeEntities($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @experimental - * - * @deprecated This class will be removed in the next major version update. - */ -class LanguageServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.language.v1beta2.LanguageService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'language.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'language.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-language', - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/language_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/language_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/language_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/language_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $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 'language.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Finds named entities (currently proper names and common nouns) in the text - * along with entity types, salience, mentions for each entity, and - * other properties. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $response = $languageServiceClient->analyzeEntities($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param array $optionalArgs { - * Optional. - * - * @type int $encodingType - * The encoding type used by the API to calculate offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1beta2\EncodingType} - * @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 \Google\Cloud\Language\V1beta2\AnalyzeEntitiesResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function analyzeEntities($document, array $optionalArgs = []) - { - $request = new AnalyzeEntitiesRequest(); - $request->setDocument($document); - if (isset($optionalArgs['encodingType'])) { - $request->setEncodingType($optionalArgs['encodingType']); - } - - return $this->startCall('AnalyzeEntities', AnalyzeEntitiesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Finds entities, similar to - * [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities] - * in the text and analyzes sentiment associated with each entity and its - * mentions. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $response = $languageServiceClient->analyzeEntitySentiment($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param array $optionalArgs { - * Optional. - * - * @type int $encodingType - * The encoding type used by the API to calculate offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1beta2\EncodingType} - * @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 \Google\Cloud\Language\V1beta2\AnalyzeEntitySentimentResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function analyzeEntitySentiment($document, array $optionalArgs = []) - { - $request = new AnalyzeEntitySentimentRequest(); - $request->setDocument($document); - if (isset($optionalArgs['encodingType'])) { - $request->setEncodingType($optionalArgs['encodingType']); - } - - return $this->startCall('AnalyzeEntitySentiment', AnalyzeEntitySentimentResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Analyzes the sentiment of the provided text. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $response = $languageServiceClient->analyzeSentiment($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param array $optionalArgs { - * Optional. - * - * @type int $encodingType - * The encoding type used by the API to calculate sentence offsets for the - * sentence sentiment. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1beta2\EncodingType} - * @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 \Google\Cloud\Language\V1beta2\AnalyzeSentimentResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function analyzeSentiment($document, array $optionalArgs = []) - { - $request = new AnalyzeSentimentRequest(); - $request->setDocument($document); - if (isset($optionalArgs['encodingType'])) { - $request->setEncodingType($optionalArgs['encodingType']); - } - - return $this->startCall('AnalyzeSentiment', AnalyzeSentimentResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Analyzes the syntax of the text and provides sentence boundaries and - * tokenization along with part of speech tags, dependency trees, and other - * properties. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $response = $languageServiceClient->analyzeSyntax($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param array $optionalArgs { - * Optional. - * - * @type int $encodingType - * The encoding type used by the API to calculate offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1beta2\EncodingType} - * @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 \Google\Cloud\Language\V1beta2\AnalyzeSyntaxResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function analyzeSyntax($document, array $optionalArgs = []) - { - $request = new AnalyzeSyntaxRequest(); - $request->setDocument($document); - if (isset($optionalArgs['encodingType'])) { - $request->setEncodingType($optionalArgs['encodingType']); - } - - return $this->startCall('AnalyzeSyntax', AnalyzeSyntaxResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * A convenience method that provides all syntax, sentiment, entity, and - * classification features in one call. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $features = new Features(); - * $response = $languageServiceClient->annotateText($document, $features); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param Features $features Required. The enabled features. - * @param array $optionalArgs { - * Optional. - * - * @type int $encodingType - * The encoding type used by the API to calculate offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1beta2\EncodingType} - * @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 \Google\Cloud\Language\V1beta2\AnnotateTextResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function annotateText($document, $features, array $optionalArgs = []) - { - $request = new AnnotateTextRequest(); - $request->setDocument($document); - $request->setFeatures($features); - if (isset($optionalArgs['encodingType'])) { - $request->setEncodingType($optionalArgs['encodingType']); - } - - return $this->startCall('AnnotateText', AnnotateTextResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Classifies a document into categories. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $response = $languageServiceClient->classifyText($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param array $optionalArgs { - * Optional. - * - * @type ClassificationModelOptions $classificationModelOptions - * Model options to use for classification. Defaults to v1 options if not - * specified. - * @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 \Google\Cloud\Language\V1beta2\ClassifyTextResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function classifyText($document, array $optionalArgs = []) - { - $request = new ClassifyTextRequest(); - $request->setDocument($document); - if (isset($optionalArgs['classificationModelOptions'])) { - $request->setClassificationModelOptions($optionalArgs['classificationModelOptions']); - } - - return $this->startCall('ClassifyText', ClassifyTextResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Moderates a document for harmful and sensitive categories. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $response = $languageServiceClient->moderateText($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param array $optionalArgs { - * 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 \Google\Cloud\Language\V1beta2\ModerateTextResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function moderateText($document, array $optionalArgs = []) - { - $request = new ModerateTextRequest(); - $request->setDocument($document); - return $this->startCall('ModerateText', ModerateTextResponse::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Language/v1beta2/src/V1beta2/LanguageServiceClient.php b/owl-bot-staging/Language/v1beta2/src/V1beta2/LanguageServiceClient.php deleted file mode 100644 index bd70321cdd6e..000000000000 --- a/owl-bot-staging/Language/v1beta2/src/V1beta2/LanguageServiceClient.php +++ /dev/null @@ -1,36 +0,0 @@ - [ - 'google.cloud.language.v1beta2.LanguageService' => [], - ], -]; diff --git a/owl-bot-staging/Language/v1beta2/src/V1beta2/resources/language_service_rest_client_config.php b/owl-bot-staging/Language/v1beta2/src/V1beta2/resources/language_service_rest_client_config.php deleted file mode 100644 index 99ccfe4ee080..000000000000 --- a/owl-bot-staging/Language/v1beta2/src/V1beta2/resources/language_service_rest_client_config.php +++ /dev/null @@ -1,64 +0,0 @@ - [ - 'google.cloud.language.v1beta2.LanguageService' => [ - 'AnalyzeEntities' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta2/documents:analyzeEntities', - 'body' => '*', - ], - 'AnalyzeEntitySentiment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta2/documents:analyzeEntitySentiment', - 'body' => '*', - ], - 'AnalyzeSentiment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta2/documents:analyzeSentiment', - 'body' => '*', - ], - 'AnalyzeSyntax' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta2/documents:analyzeSyntax', - 'body' => '*', - ], - 'AnnotateText' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta2/documents:annotateText', - 'body' => '*', - ], - 'ClassifyText' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta2/documents:classifyText', - 'body' => '*', - ], - 'ModerateText' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta2/documents:moderateText', - 'body' => '*', - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Language/v1beta2/tests/Unit/V1beta2/LanguageServiceClientTest.php b/owl-bot-staging/Language/v1beta2/tests/Unit/V1beta2/LanguageServiceClientTest.php deleted file mode 100644 index 7bfafd44b85c..000000000000 --- a/owl-bot-staging/Language/v1beta2/tests/Unit/V1beta2/LanguageServiceClientTest.php +++ /dev/null @@ -1,489 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return LanguageServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new LanguageServiceClient($options); - } - - /** @test */ - public function analyzeEntitiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnalyzeEntitiesResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $response = $gapicClient->analyzeEntities($document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1beta2.LanguageService/AnalyzeEntities', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeEntitiesExceptionTest() - { - $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 - $document = new Document(); - try { - $gapicClient->analyzeEntities($document); - // 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 analyzeEntitySentimentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnalyzeEntitySentimentResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $response = $gapicClient->analyzeEntitySentiment($document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1beta2.LanguageService/AnalyzeEntitySentiment', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeEntitySentimentExceptionTest() - { - $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 - $document = new Document(); - try { - $gapicClient->analyzeEntitySentiment($document); - // 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 analyzeSentimentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnalyzeSentimentResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $response = $gapicClient->analyzeSentiment($document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1beta2.LanguageService/AnalyzeSentiment', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeSentimentExceptionTest() - { - $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 - $document = new Document(); - try { - $gapicClient->analyzeSentiment($document); - // 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 analyzeSyntaxTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnalyzeSyntaxResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $response = $gapicClient->analyzeSyntax($document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1beta2.LanguageService/AnalyzeSyntax', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeSyntaxExceptionTest() - { - $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 - $document = new Document(); - try { - $gapicClient->analyzeSyntax($document); - // 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 annotateTextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnnotateTextResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $features = new Features(); - $response = $gapicClient->annotateText($document, $features); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1beta2.LanguageService/AnnotateText', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $actualValue = $actualRequestObject->getFeatures(); - $this->assertProtobufEquals($features, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function annotateTextExceptionTest() - { - $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 - $document = new Document(); - $features = new Features(); - try { - $gapicClient->annotateText($document, $features); - // 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 classifyTextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ClassifyTextResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $response = $gapicClient->classifyText($document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1beta2.LanguageService/ClassifyText', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function classifyTextExceptionTest() - { - $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 - $document = new Document(); - try { - $gapicClient->classifyText($document); - // 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 moderateTextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ModerateTextResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $response = $gapicClient->moderateText($document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1beta2.LanguageService/ModerateText', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function moderateTextExceptionTest() - { - $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 - $document = new Document(); - try { - $gapicClient->moderateText($document); - // 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()); - } -} diff --git a/owl-bot-staging/Language/v2/proto/src/GPBMetadata/Google/Cloud/Language/V2/LanguageService.php b/owl-bot-staging/Language/v2/proto/src/GPBMetadata/Google/Cloud/Language/V2/LanguageService.php deleted file mode 100644 index fbfe8c771e70..000000000000 Binary files a/owl-bot-staging/Language/v2/proto/src/GPBMetadata/Google/Cloud/Language/V2/LanguageService.php and /dev/null differ diff --git a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/AnalyzeEntitiesRequest.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/AnalyzeEntitiesRequest.php deleted file mode 100644 index fe7ffb5ed624..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/AnalyzeEntitiesRequest.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.language.v2.AnalyzeEntitiesRequest - */ -class AnalyzeEntitiesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v2.EncodingType encoding_type = 2; - */ - protected $encoding_type = 0; - - /** - * @param \Google\Cloud\Language\V2\Document $document Required. Input document. - * @param int $encodingType The encoding type used by the API to calculate offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V2\EncodingType} - * - * @return \Google\Cloud\Language\V2\AnalyzeEntitiesRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Language\V2\Document $document, int $encodingType): self - { - return (new self()) - ->setDocument($document) - ->setEncodingType($encodingType); - } - - /** - * @param \Google\Cloud\Language\V2\Document $document Required. Input document. - * - * @return \Google\Cloud\Language\V2\AnalyzeEntitiesRequest - * - * @experimental - */ - public static function buildFromDocument(\Google\Cloud\Language\V2\Document $document): self - { - return (new self()) - ->setDocument($document); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V2\Document $document - * Required. Input document. - * @type int $encoding_type - * The encoding type used by the API to calculate offsets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V2\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V2\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V2\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v2.EncodingType encoding_type = 2; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v2.EncodingType encoding_type = 2; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V2\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/AnalyzeEntitiesResponse.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/AnalyzeEntitiesResponse.php deleted file mode 100644 index fa270c893944..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/AnalyzeEntitiesResponse.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.language.v2.AnalyzeEntitiesResponse - */ -class AnalyzeEntitiesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The recognized entities in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v2.Entity entities = 1; - */ - private $entities; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][] field for more details. - * - * Generated from protobuf field string language_code = 2; - */ - protected $language_code = ''; - /** - * Whether the language is officially supported. The API may still return a - * response when the language is not supported, but it is on a best effort - * basis. - * - * Generated from protobuf field bool language_supported = 3; - */ - protected $language_supported = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V2\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * The recognized entities in the input document. - * @type string $language_code - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][] field for more details. - * @type bool $language_supported - * Whether the language is officially supported. The API may still return a - * response when the language is not supported, but it is on a best effort - * basis. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The recognized entities in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v2.Entity entities = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * The recognized entities in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v2.Entity entities = 1; - * @param array<\Google\Cloud\Language\V2\Entity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V2\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][] field for more details. - * - * Generated from protobuf field string language_code = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][] field for more details. - * - * Generated from protobuf field string language_code = 2; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Whether the language is officially supported. The API may still return a - * response when the language is not supported, but it is on a best effort - * basis. - * - * Generated from protobuf field bool language_supported = 3; - * @return bool - */ - public function getLanguageSupported() - { - return $this->language_supported; - } - - /** - * Whether the language is officially supported. The API may still return a - * response when the language is not supported, but it is on a best effort - * basis. - * - * Generated from protobuf field bool language_supported = 3; - * @param bool $var - * @return $this - */ - public function setLanguageSupported($var) - { - GPBUtil::checkBool($var); - $this->language_supported = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/AnalyzeSentimentRequest.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/AnalyzeSentimentRequest.php deleted file mode 100644 index 3d86cd0077ad..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/AnalyzeSentimentRequest.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.language.v2.AnalyzeSentimentRequest - */ -class AnalyzeSentimentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The encoding type used by the API to calculate sentence offsets. - * - * Generated from protobuf field .google.cloud.language.v2.EncodingType encoding_type = 2; - */ - protected $encoding_type = 0; - - /** - * @param \Google\Cloud\Language\V2\Document $document Required. Input document. - * @param int $encodingType The encoding type used by the API to calculate sentence offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V2\EncodingType} - * - * @return \Google\Cloud\Language\V2\AnalyzeSentimentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Language\V2\Document $document, int $encodingType): self - { - return (new self()) - ->setDocument($document) - ->setEncodingType($encodingType); - } - - /** - * @param \Google\Cloud\Language\V2\Document $document Required. Input document. - * - * @return \Google\Cloud\Language\V2\AnalyzeSentimentRequest - * - * @experimental - */ - public static function buildFromDocument(\Google\Cloud\Language\V2\Document $document): self - { - return (new self()) - ->setDocument($document); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V2\Document $document - * Required. Input document. - * @type int $encoding_type - * The encoding type used by the API to calculate sentence offsets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V2\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V2\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V2\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate sentence offsets. - * - * Generated from protobuf field .google.cloud.language.v2.EncodingType encoding_type = 2; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate sentence offsets. - * - * Generated from protobuf field .google.cloud.language.v2.EncodingType encoding_type = 2; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V2\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/AnalyzeSentimentResponse.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/AnalyzeSentimentResponse.php deleted file mode 100644 index 5ad7db33502e..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/AnalyzeSentimentResponse.php +++ /dev/null @@ -1,195 +0,0 @@ -google.cloud.language.v2.AnalyzeSentimentResponse - */ -class AnalyzeSentimentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The overall sentiment of the input document. - * - * Generated from protobuf field .google.cloud.language.v2.Sentiment document_sentiment = 1; - */ - protected $document_sentiment = null; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][] field for more details. - * - * Generated from protobuf field string language_code = 2; - */ - protected $language_code = ''; - /** - * The sentiment for all the sentences in the document. - * - * Generated from protobuf field repeated .google.cloud.language.v2.Sentence sentences = 3; - */ - private $sentences; - /** - * Whether the language is officially supported. The API may still return a - * response when the language is not supported, but it is on a best effort - * basis. - * - * Generated from protobuf field bool language_supported = 4; - */ - protected $language_supported = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V2\Sentiment $document_sentiment - * The overall sentiment of the input document. - * @type string $language_code - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][] field for more details. - * @type array<\Google\Cloud\Language\V2\Sentence>|\Google\Protobuf\Internal\RepeatedField $sentences - * The sentiment for all the sentences in the document. - * @type bool $language_supported - * Whether the language is officially supported. The API may still return a - * response when the language is not supported, but it is on a best effort - * basis. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The overall sentiment of the input document. - * - * Generated from protobuf field .google.cloud.language.v2.Sentiment document_sentiment = 1; - * @return \Google\Cloud\Language\V2\Sentiment|null - */ - public function getDocumentSentiment() - { - return $this->document_sentiment; - } - - public function hasDocumentSentiment() - { - return isset($this->document_sentiment); - } - - public function clearDocumentSentiment() - { - unset($this->document_sentiment); - } - - /** - * The overall sentiment of the input document. - * - * Generated from protobuf field .google.cloud.language.v2.Sentiment document_sentiment = 1; - * @param \Google\Cloud\Language\V2\Sentiment $var - * @return $this - */ - public function setDocumentSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V2\Sentiment::class); - $this->document_sentiment = $var; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][] field for more details. - * - * Generated from protobuf field string language_code = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][] field for more details. - * - * Generated from protobuf field string language_code = 2; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * The sentiment for all the sentences in the document. - * - * Generated from protobuf field repeated .google.cloud.language.v2.Sentence sentences = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSentences() - { - return $this->sentences; - } - - /** - * The sentiment for all the sentences in the document. - * - * Generated from protobuf field repeated .google.cloud.language.v2.Sentence sentences = 3; - * @param array<\Google\Cloud\Language\V2\Sentence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSentences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V2\Sentence::class); - $this->sentences = $arr; - - return $this; - } - - /** - * Whether the language is officially supported. The API may still return a - * response when the language is not supported, but it is on a best effort - * basis. - * - * Generated from protobuf field bool language_supported = 4; - * @return bool - */ - public function getLanguageSupported() - { - return $this->language_supported; - } - - /** - * Whether the language is officially supported. The API may still return a - * response when the language is not supported, but it is on a best effort - * basis. - * - * Generated from protobuf field bool language_supported = 4; - * @param bool $var - * @return $this - */ - public function setLanguageSupported($var) - { - GPBUtil::checkBool($var); - $this->language_supported = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/AnnotateTextRequest.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/AnnotateTextRequest.php deleted file mode 100644 index 66385ddee011..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/AnnotateTextRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.language.v2.AnnotateTextRequest - */ -class AnnotateTextRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * Required. The enabled features. - * - * Generated from protobuf field .google.cloud.language.v2.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $features = null; - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v2.EncodingType encoding_type = 3; - */ - protected $encoding_type = 0; - - /** - * @param \Google\Cloud\Language\V2\Document $document Required. Input document. - * @param \Google\Cloud\Language\V2\AnnotateTextRequest\Features $features Required. The enabled features. - * @param int $encodingType The encoding type used by the API to calculate offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V2\EncodingType} - * - * @return \Google\Cloud\Language\V2\AnnotateTextRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Language\V2\Document $document, \Google\Cloud\Language\V2\AnnotateTextRequest\Features $features, int $encodingType): self - { - return (new self()) - ->setDocument($document) - ->setFeatures($features) - ->setEncodingType($encodingType); - } - - /** - * @param \Google\Cloud\Language\V2\Document $document Required. Input document. - * @param \Google\Cloud\Language\V2\AnnotateTextRequest\Features $features Required. The enabled features. - * - * @return \Google\Cloud\Language\V2\AnnotateTextRequest - * - * @experimental - */ - public static function buildFromDocumentFeatures(\Google\Cloud\Language\V2\Document $document, \Google\Cloud\Language\V2\AnnotateTextRequest\Features $features): self - { - return (new self()) - ->setDocument($document) - ->setFeatures($features); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V2\Document $document - * Required. Input document. - * @type \Google\Cloud\Language\V2\AnnotateTextRequest\Features $features - * Required. The enabled features. - * @type int $encoding_type - * The encoding type used by the API to calculate offsets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V2\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V2\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V2\Document::class); - $this->document = $var; - - return $this; - } - - /** - * Required. The enabled features. - * - * Generated from protobuf field .google.cloud.language.v2.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V2\AnnotateTextRequest\Features|null - */ - public function getFeatures() - { - return $this->features; - } - - public function hasFeatures() - { - return isset($this->features); - } - - public function clearFeatures() - { - unset($this->features); - } - - /** - * Required. The enabled features. - * - * Generated from protobuf field .google.cloud.language.v2.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V2\AnnotateTextRequest\Features $var - * @return $this - */ - public function setFeatures($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V2\AnnotateTextRequest\Features::class); - $this->features = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v2.EncodingType encoding_type = 3; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v2.EncodingType encoding_type = 3; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V2\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/AnnotateTextRequest/Features.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/AnnotateTextRequest/Features.php deleted file mode 100644 index 5f6215a09cf1..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/AnnotateTextRequest/Features.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.language.v2.AnnotateTextRequest.Features - */ -class Features extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Extract entities. - * - * Generated from protobuf field bool extract_entities = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $extract_entities = false; - /** - * Optional. Extract document-level sentiment. - * - * Generated from protobuf field bool extract_document_sentiment = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $extract_document_sentiment = false; - /** - * Optional. Classify the full document into categories. - * - * Generated from protobuf field bool classify_text = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $classify_text = false; - /** - * Optional. Moderate the document for harmful and sensitive categories. - * - * Generated from protobuf field bool moderate_text = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $moderate_text = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $extract_entities - * Optional. Extract entities. - * @type bool $extract_document_sentiment - * Optional. Extract document-level sentiment. - * @type bool $classify_text - * Optional. Classify the full document into categories. - * @type bool $moderate_text - * Optional. Moderate the document for harmful and sensitive categories. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Extract entities. - * - * Generated from protobuf field bool extract_entities = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getExtractEntities() - { - return $this->extract_entities; - } - - /** - * Optional. Extract entities. - * - * Generated from protobuf field bool extract_entities = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setExtractEntities($var) - { - GPBUtil::checkBool($var); - $this->extract_entities = $var; - - return $this; - } - - /** - * Optional. Extract document-level sentiment. - * - * Generated from protobuf field bool extract_document_sentiment = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getExtractDocumentSentiment() - { - return $this->extract_document_sentiment; - } - - /** - * Optional. Extract document-level sentiment. - * - * Generated from protobuf field bool extract_document_sentiment = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setExtractDocumentSentiment($var) - { - GPBUtil::checkBool($var); - $this->extract_document_sentiment = $var; - - return $this; - } - - /** - * Optional. Classify the full document into categories. - * - * Generated from protobuf field bool classify_text = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getClassifyText() - { - return $this->classify_text; - } - - /** - * Optional. Classify the full document into categories. - * - * Generated from protobuf field bool classify_text = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setClassifyText($var) - { - GPBUtil::checkBool($var); - $this->classify_text = $var; - - return $this; - } - - /** - * Optional. Moderate the document for harmful and sensitive categories. - * - * Generated from protobuf field bool moderate_text = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getModerateText() - { - return $this->moderate_text; - } - - /** - * Optional. Moderate the document for harmful and sensitive categories. - * - * Generated from protobuf field bool moderate_text = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setModerateText($var) - { - GPBUtil::checkBool($var); - $this->moderate_text = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Features::class, \Google\Cloud\Language\V2\AnnotateTextRequest_Features::class); - diff --git a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/AnnotateTextResponse.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/AnnotateTextResponse.php deleted file mode 100644 index cef311e72b5d..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/AnnotateTextResponse.php +++ /dev/null @@ -1,321 +0,0 @@ -google.cloud.language.v2.AnnotateTextResponse - */ -class AnnotateTextResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Sentences in the input document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment]. - * - * Generated from protobuf field repeated .google.cloud.language.v2.Sentence sentences = 1; - */ - private $sentences; - /** - * Entities, along with their semantic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v2.AnnotateTextRequest.Features.extract_entities] - * or - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_entity_sentiment]. - * - * Generated from protobuf field repeated .google.cloud.language.v2.Entity entities = 2; - */ - private $entities; - /** - * The overall sentiment for the document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment]. - * - * Generated from protobuf field .google.cloud.language.v2.Sentiment document_sentiment = 3; - */ - protected $document_sentiment = null; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][] field for more details. - * - * Generated from protobuf field string language_code = 4; - */ - protected $language_code = ''; - /** - * Categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v2.ClassificationCategory categories = 5; - */ - private $categories; - /** - * Harmful and sensitive categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v2.ClassificationCategory moderation_categories = 6; - */ - private $moderation_categories; - /** - * Whether the language is officially supported by all requested features. - * The API may still return a response when the language is not supported, but - * it is on a best effort basis. - * - * Generated from protobuf field bool language_supported = 7; - */ - protected $language_supported = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V2\Sentence>|\Google\Protobuf\Internal\RepeatedField $sentences - * Sentences in the input document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment]. - * @type array<\Google\Cloud\Language\V2\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * Entities, along with their semantic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v2.AnnotateTextRequest.Features.extract_entities] - * or - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_entity_sentiment]. - * @type \Google\Cloud\Language\V2\Sentiment $document_sentiment - * The overall sentiment for the document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment]. - * @type string $language_code - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][] field for more details. - * @type array<\Google\Cloud\Language\V2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $categories - * Categories identified in the input document. - * @type array<\Google\Cloud\Language\V2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $moderation_categories - * Harmful and sensitive categories identified in the input document. - * @type bool $language_supported - * Whether the language is officially supported by all requested features. - * The API may still return a response when the language is not supported, but - * it is on a best effort basis. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Sentences in the input document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment]. - * - * Generated from protobuf field repeated .google.cloud.language.v2.Sentence sentences = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSentences() - { - return $this->sentences; - } - - /** - * Sentences in the input document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment]. - * - * Generated from protobuf field repeated .google.cloud.language.v2.Sentence sentences = 1; - * @param array<\Google\Cloud\Language\V2\Sentence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSentences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V2\Sentence::class); - $this->sentences = $arr; - - return $this; - } - - /** - * Entities, along with their semantic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v2.AnnotateTextRequest.Features.extract_entities] - * or - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_entity_sentiment]. - * - * Generated from protobuf field repeated .google.cloud.language.v2.Entity entities = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * Entities, along with their semantic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v2.AnnotateTextRequest.Features.extract_entities] - * or - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_entity_sentiment]. - * - * Generated from protobuf field repeated .google.cloud.language.v2.Entity entities = 2; - * @param array<\Google\Cloud\Language\V2\Entity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V2\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * The overall sentiment for the document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment]. - * - * Generated from protobuf field .google.cloud.language.v2.Sentiment document_sentiment = 3; - * @return \Google\Cloud\Language\V2\Sentiment|null - */ - public function getDocumentSentiment() - { - return $this->document_sentiment; - } - - public function hasDocumentSentiment() - { - return isset($this->document_sentiment); - } - - public function clearDocumentSentiment() - { - unset($this->document_sentiment); - } - - /** - * The overall sentiment for the document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment]. - * - * Generated from protobuf field .google.cloud.language.v2.Sentiment document_sentiment = 3; - * @param \Google\Cloud\Language\V2\Sentiment $var - * @return $this - */ - public function setDocumentSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V2\Sentiment::class); - $this->document_sentiment = $var; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][] field for more details. - * - * Generated from protobuf field string language_code = 4; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][] field for more details. - * - * Generated from protobuf field string language_code = 4; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v2.ClassificationCategory categories = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCategories() - { - return $this->categories; - } - - /** - * Categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v2.ClassificationCategory categories = 5; - * @param array<\Google\Cloud\Language\V2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V2\ClassificationCategory::class); - $this->categories = $arr; - - return $this; - } - - /** - * Harmful and sensitive categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v2.ClassificationCategory moderation_categories = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getModerationCategories() - { - return $this->moderation_categories; - } - - /** - * Harmful and sensitive categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v2.ClassificationCategory moderation_categories = 6; - * @param array<\Google\Cloud\Language\V2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setModerationCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V2\ClassificationCategory::class); - $this->moderation_categories = $arr; - - return $this; - } - - /** - * Whether the language is officially supported by all requested features. - * The API may still return a response when the language is not supported, but - * it is on a best effort basis. - * - * Generated from protobuf field bool language_supported = 7; - * @return bool - */ - public function getLanguageSupported() - { - return $this->language_supported; - } - - /** - * Whether the language is officially supported by all requested features. - * The API may still return a response when the language is not supported, but - * it is on a best effort basis. - * - * Generated from protobuf field bool language_supported = 7; - * @param bool $var - * @return $this - */ - public function setLanguageSupported($var) - { - GPBUtil::checkBool($var); - $this->language_supported = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/ClassificationCategory.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/ClassificationCategory.php deleted file mode 100644 index 9d10a2af683f..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/ClassificationCategory.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.language.v2.ClassificationCategory - */ -class ClassificationCategory extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the category representing the document. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The classifier's confidence of the category. Number represents how certain - * the classifier is that this category represents the given text. - * - * Generated from protobuf field float confidence = 2; - */ - protected $confidence = 0.0; - /** - * Optional. The classifier's severity of the category. This is only present - * when the ModerateTextRequest.ModelVersion is set to MODEL_VERSION_2, and - * the corresponding category has a severity score. - * - * Generated from protobuf field float severity = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $severity = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the category representing the document. - * @type float $confidence - * The classifier's confidence of the category. Number represents how certain - * the classifier is that this category represents the given text. - * @type float $severity - * Optional. The classifier's severity of the category. This is only present - * when the ModerateTextRequest.ModelVersion is set to MODEL_VERSION_2, and - * the corresponding category has a severity score. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The name of the category representing the document. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the category representing the document. - * - * 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 classifier's confidence of the category. Number represents how certain - * the classifier is that this category represents the given text. - * - * Generated from protobuf field float confidence = 2; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * The classifier's confidence of the category. Number represents how certain - * the classifier is that this category represents the given text. - * - * Generated from protobuf field float confidence = 2; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - - /** - * Optional. The classifier's severity of the category. This is only present - * when the ModerateTextRequest.ModelVersion is set to MODEL_VERSION_2, and - * the corresponding category has a severity score. - * - * Generated from protobuf field float severity = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * Optional. The classifier's severity of the category. This is only present - * when the ModerateTextRequest.ModelVersion is set to MODEL_VERSION_2, and - * the corresponding category has a severity score. - * - * Generated from protobuf field float severity = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkFloat($var); - $this->severity = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/ClassifyTextRequest.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/ClassifyTextRequest.php deleted file mode 100644 index 235042d3130e..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/ClassifyTextRequest.php +++ /dev/null @@ -1,90 +0,0 @@ -google.cloud.language.v2.ClassifyTextRequest - */ -class ClassifyTextRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - - /** - * @param \Google\Cloud\Language\V2\Document $document Required. Input document. - * - * @return \Google\Cloud\Language\V2\ClassifyTextRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Language\V2\Document $document): self - { - return (new self()) - ->setDocument($document); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V2\Document $document - * Required. Input document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V2\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V2\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V2\Document::class); - $this->document = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/ClassifyTextResponse.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/ClassifyTextResponse.php deleted file mode 100644 index 1a1d7fa69ba5..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/ClassifyTextResponse.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.language.v2.ClassifyTextResponse - */ -class ClassifyTextResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v2.ClassificationCategory categories = 1; - */ - private $categories; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][] field for more details. - * - * Generated from protobuf field string language_code = 2; - */ - protected $language_code = ''; - /** - * Whether the language is officially supported. The API may still return a - * response when the language is not supported, but it is on a best effort - * basis. - * - * Generated from protobuf field bool language_supported = 3; - */ - protected $language_supported = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $categories - * Categories representing the input document. - * @type string $language_code - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][] field for more details. - * @type bool $language_supported - * Whether the language is officially supported. The API may still return a - * response when the language is not supported, but it is on a best effort - * basis. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v2.ClassificationCategory categories = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCategories() - { - return $this->categories; - } - - /** - * Categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v2.ClassificationCategory categories = 1; - * @param array<\Google\Cloud\Language\V2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V2\ClassificationCategory::class); - $this->categories = $arr; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][] field for more details. - * - * Generated from protobuf field string language_code = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][] field for more details. - * - * Generated from protobuf field string language_code = 2; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Whether the language is officially supported. The API may still return a - * response when the language is not supported, but it is on a best effort - * basis. - * - * Generated from protobuf field bool language_supported = 3; - * @return bool - */ - public function getLanguageSupported() - { - return $this->language_supported; - } - - /** - * Whether the language is officially supported. The API may still return a - * response when the language is not supported, but it is on a best effort - * basis. - * - * Generated from protobuf field bool language_supported = 3; - * @param bool $var - * @return $this - */ - public function setLanguageSupported($var) - { - GPBUtil::checkBool($var); - $this->language_supported = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/Document.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/Document.php deleted file mode 100644 index 714652e3e386..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/Document.php +++ /dev/null @@ -1,220 +0,0 @@ -google.cloud.language.v2.Document - */ -class Document extends \Google\Protobuf\Internal\Message -{ - /** - * Required. If the type is not set or is `TYPE_UNSPECIFIED`, - * returns an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field .google.cloud.language.v2.Document.Type type = 1; - */ - protected $type = 0; - /** - * Optional. The language of the document (if not specified, the language is - * automatically detected). Both ISO and BCP-47 language codes are - * accepted.
- * [Language - * Support](https://cloud.google.com/natural-language/docs/languages) lists - * currently supported languages for each API method. If the language (either - * specified by the caller or automatically detected) is not supported by the - * called API method, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $language_code = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Required. If the type is not set or is `TYPE_UNSPECIFIED`, - * returns an `INVALID_ARGUMENT` error. - * @type string $content - * The content of the input in string format. - * Cloud audit logging exempt since it is based on user data. - * @type string $gcs_content_uri - * The Google Cloud Storage URI where the file content is located. - * This URI must be of the form: gs://bucket_name/object_name. For more - * details, see https://cloud.google.com/storage/docs/reference-uris. - * NOTE: Cloud Storage object versioning is not supported. - * @type string $language_code - * Optional. The language of the document (if not specified, the language is - * automatically detected). Both ISO and BCP-47 language codes are - * accepted.
- * [Language - * Support](https://cloud.google.com/natural-language/docs/languages) lists - * currently supported languages for each API method. If the language (either - * specified by the caller or automatically detected) is not supported by the - * called API method, an `INVALID_ARGUMENT` error is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. If the type is not set or is `TYPE_UNSPECIFIED`, - * returns an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field .google.cloud.language.v2.Document.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. If the type is not set or is `TYPE_UNSPECIFIED`, - * returns an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field .google.cloud.language.v2.Document.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V2\Document\Type::class); - $this->type = $var; - - return $this; - } - - /** - * The content of the input in string format. - * Cloud audit logging exempt since it is based on user data. - * - * Generated from protobuf field string content = 2; - * @return string - */ - public function getContent() - { - return $this->readOneof(2); - } - - public function hasContent() - { - return $this->hasOneof(2); - } - - /** - * The content of the input in string format. - * Cloud audit logging exempt since it is based on user data. - * - * Generated from protobuf field string content = 2; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The Google Cloud Storage URI where the file content is located. - * This URI must be of the form: gs://bucket_name/object_name. For more - * details, see https://cloud.google.com/storage/docs/reference-uris. - * NOTE: Cloud Storage object versioning is not supported. - * - * Generated from protobuf field string gcs_content_uri = 3; - * @return string - */ - public function getGcsContentUri() - { - return $this->readOneof(3); - } - - public function hasGcsContentUri() - { - return $this->hasOneof(3); - } - - /** - * The Google Cloud Storage URI where the file content is located. - * This URI must be of the form: gs://bucket_name/object_name. For more - * details, see https://cloud.google.com/storage/docs/reference-uris. - * NOTE: Cloud Storage object versioning is not supported. - * - * Generated from protobuf field string gcs_content_uri = 3; - * @param string $var - * @return $this - */ - public function setGcsContentUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Optional. The language of the document (if not specified, the language is - * automatically detected). Both ISO and BCP-47 language codes are - * accepted.
- * [Language - * Support](https://cloud.google.com/natural-language/docs/languages) lists - * currently supported languages for each API method. If the language (either - * specified by the caller or automatically detected) is not supported by the - * called API method, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Optional. The language of the document (if not specified, the language is - * automatically detected). Both ISO and BCP-47 language codes are - * accepted.
- * [Language - * Support](https://cloud.google.com/natural-language/docs/languages) lists - * currently supported languages for each API method. If the language (either - * specified by the caller or automatically detected) is not supported by the - * called API method, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/Document/Type.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/Document/Type.php deleted file mode 100644 index 895a27351b36..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/Document/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.language.v2.Document.Type - */ -class Type -{ - /** - * The content type is not specified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Plain text - * - * Generated from protobuf enum PLAIN_TEXT = 1; - */ - const PLAIN_TEXT = 1; - /** - * HTML - * - * Generated from protobuf enum HTML = 2; - */ - const HTML = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::PLAIN_TEXT => 'PLAIN_TEXT', - self::HTML => 'HTML', - ]; - - 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(Type::class, \Google\Cloud\Language\V2\Document_Type::class); - diff --git a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/EncodingType.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/EncodingType.php deleted file mode 100644 index 07fd2d00a609..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/EncodingType.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.language.v2.EncodingType - */ -class EncodingType -{ - /** - * If `EncodingType` is not specified, encoding-dependent information (such as - * `begin_offset`) will be set at `-1`. - * - * Generated from protobuf enum NONE = 0; - */ - const NONE = 0; - /** - * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-8 encoding of the input. C++ and Go are examples of languages - * that use this encoding natively. - * - * Generated from protobuf enum UTF8 = 1; - */ - const UTF8 = 1; - /** - * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-16 encoding of the input. Java and JavaScript are examples of - * languages that use this encoding natively. - * - * Generated from protobuf enum UTF16 = 2; - */ - const UTF16 = 2; - /** - * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-32 encoding of the input. Python is an example of a language - * that uses this encoding natively. - * - * Generated from protobuf enum UTF32 = 3; - */ - const UTF32 = 3; - - private static $valueToName = [ - self::NONE => 'NONE', - self::UTF8 => 'UTF8', - self::UTF16 => 'UTF16', - self::UTF32 => 'UTF32', - ]; - - 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/Language/v2/proto/src/Google/Cloud/Language/V2/Entity.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/Entity.php deleted file mode 100644 index 667bd46d6941..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/Entity.php +++ /dev/null @@ -1,239 +0,0 @@ -google.cloud.language.v2.Entity - */ -class Entity extends \Google\Protobuf\Internal\Message -{ - /** - * The representative name for the entity. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The entity type. - * - * Generated from protobuf field .google.cloud.language.v2.Entity.Type type = 2; - */ - protected $type = 0; - /** - * Metadata associated with the entity. - * For the metadata - * associated with other entity types, see the Type table below. - * - * Generated from protobuf field map metadata = 3; - */ - private $metadata; - /** - * The mentions of this entity in the input document. The API currently - * supports proper noun mentions. - * - * Generated from protobuf field repeated .google.cloud.language.v2.EntityMention mentions = 5; - */ - private $mentions; - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the aggregate sentiment expressed - * for this entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v2.Sentiment sentiment = 6; - */ - protected $sentiment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The representative name for the entity. - * @type int $type - * The entity type. - * @type array|\Google\Protobuf\Internal\MapField $metadata - * Metadata associated with the entity. - * For the metadata - * associated with other entity types, see the Type table below. - * @type array<\Google\Cloud\Language\V2\EntityMention>|\Google\Protobuf\Internal\RepeatedField $mentions - * The mentions of this entity in the input document. The API currently - * supports proper noun mentions. - * @type \Google\Cloud\Language\V2\Sentiment $sentiment - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the aggregate sentiment expressed - * for this entity in the provided document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The representative name for the entity. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The representative name for the entity. - * - * 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 entity type. - * - * Generated from protobuf field .google.cloud.language.v2.Entity.Type type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The entity type. - * - * Generated from protobuf field .google.cloud.language.v2.Entity.Type type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V2\Entity\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Metadata associated with the entity. - * For the metadata - * associated with other entity types, see the Type table below. - * - * Generated from protobuf field map metadata = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * Metadata associated with the entity. - * For the metadata - * associated with other entity types, see the Type table below. - * - * Generated from protobuf field map metadata = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata = $arr; - - return $this; - } - - /** - * The mentions of this entity in the input document. The API currently - * supports proper noun mentions. - * - * Generated from protobuf field repeated .google.cloud.language.v2.EntityMention mentions = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMentions() - { - return $this->mentions; - } - - /** - * The mentions of this entity in the input document. The API currently - * supports proper noun mentions. - * - * Generated from protobuf field repeated .google.cloud.language.v2.EntityMention mentions = 5; - * @param array<\Google\Cloud\Language\V2\EntityMention>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMentions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V2\EntityMention::class); - $this->mentions = $arr; - - return $this; - } - - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the aggregate sentiment expressed - * for this entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v2.Sentiment sentiment = 6; - * @return \Google\Cloud\Language\V2\Sentiment|null - */ - public function getSentiment() - { - return $this->sentiment; - } - - public function hasSentiment() - { - return isset($this->sentiment); - } - - public function clearSentiment() - { - unset($this->sentiment); - } - - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the aggregate sentiment expressed - * for this entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v2.Sentiment sentiment = 6; - * @param \Google\Cloud\Language\V2\Sentiment $var - * @return $this - */ - public function setSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V2\Sentiment::class); - $this->sentiment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/Entity/Type.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/Entity/Type.php deleted file mode 100644 index 11df33671075..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/Entity/Type.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.language.v2.Entity.Type - */ -class Type -{ - /** - * Unknown - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * Person - * - * Generated from protobuf enum PERSON = 1; - */ - const PERSON = 1; - /** - * Location - * - * Generated from protobuf enum LOCATION = 2; - */ - const LOCATION = 2; - /** - * Organization - * - * Generated from protobuf enum ORGANIZATION = 3; - */ - const ORGANIZATION = 3; - /** - * Event - * - * Generated from protobuf enum EVENT = 4; - */ - const EVENT = 4; - /** - * Artwork - * - * Generated from protobuf enum WORK_OF_ART = 5; - */ - const WORK_OF_ART = 5; - /** - * Consumer product - * - * Generated from protobuf enum CONSUMER_GOOD = 6; - */ - const CONSUMER_GOOD = 6; - /** - * Other types of entities - * - * Generated from protobuf enum OTHER = 7; - */ - const OTHER = 7; - /** - * Phone number - * The metadata lists the phone number, formatted according to local - * convention, plus whichever additional elements appear in the text: - * * `number` - the actual number, broken down into sections as per local - * convention - * * `national_prefix` - country code, if detected - * * `area_code` - region or area code, if detected - * * `extension` - phone extension (to be dialed after connection), if - * detected - * - * Generated from protobuf enum PHONE_NUMBER = 9; - */ - const PHONE_NUMBER = 9; - /** - * Address - * The metadata identifies the street number and locality plus whichever - * additional elements appear in the text: - * * `street_number` - street number - * * `locality` - city or town - * * `street_name` - street/route name, if detected - * * `postal_code` - postal code, if detected - * * `country` - country, if detected - * * `broad_region` - administrative area, such as the state, if detected - * * `narrow_region` - smaller administrative area, such as county, if - * detected - * * `sublocality` - used in Asian addresses to demark a district within a - * city, if detected - * - * Generated from protobuf enum ADDRESS = 10; - */ - const ADDRESS = 10; - /** - * Date - * The metadata identifies the components of the date: - * * `year` - four digit year, if detected - * * `month` - two digit month number, if detected - * * `day` - two digit day number, if detected - * - * Generated from protobuf enum DATE = 11; - */ - const DATE = 11; - /** - * Number - * The metadata is the number itself. - * - * Generated from protobuf enum NUMBER = 12; - */ - const NUMBER = 12; - /** - * Price - * The metadata identifies the `value` and `currency`. - * - * Generated from protobuf enum PRICE = 13; - */ - const PRICE = 13; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::PERSON => 'PERSON', - self::LOCATION => 'LOCATION', - self::ORGANIZATION => 'ORGANIZATION', - self::EVENT => 'EVENT', - self::WORK_OF_ART => 'WORK_OF_ART', - self::CONSUMER_GOOD => 'CONSUMER_GOOD', - self::OTHER => 'OTHER', - self::PHONE_NUMBER => 'PHONE_NUMBER', - self::ADDRESS => 'ADDRESS', - self::DATE => 'DATE', - self::NUMBER => 'NUMBER', - self::PRICE => 'PRICE', - ]; - - 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(Type::class, \Google\Cloud\Language\V2\Entity_Type::class); - diff --git a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/EntityMention.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/EntityMention.php deleted file mode 100644 index 383471bb3f87..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/EntityMention.php +++ /dev/null @@ -1,210 +0,0 @@ -google.cloud.language.v2.EntityMention - */ -class EntityMention extends \Google\Protobuf\Internal\Message -{ - /** - * The mention text. - * - * Generated from protobuf field .google.cloud.language.v2.TextSpan text = 1; - */ - protected $text = null; - /** - * The type of the entity mention. - * - * Generated from protobuf field .google.cloud.language.v2.EntityMention.Type type = 2; - */ - protected $type = 0; - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the sentiment expressed for this - * mention of the entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v2.Sentiment sentiment = 3; - */ - protected $sentiment = null; - /** - * Probability score associated with the entity. - * The score shows the probability of the entity mention being the entity - * type. The score is in (0, 1] range. - * - * Generated from protobuf field float probability = 4; - */ - protected $probability = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V2\TextSpan $text - * The mention text. - * @type int $type - * The type of the entity mention. - * @type \Google\Cloud\Language\V2\Sentiment $sentiment - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the sentiment expressed for this - * mention of the entity in the provided document. - * @type float $probability - * Probability score associated with the entity. - * The score shows the probability of the entity mention being the entity - * type. The score is in (0, 1] range. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The mention text. - * - * Generated from protobuf field .google.cloud.language.v2.TextSpan text = 1; - * @return \Google\Cloud\Language\V2\TextSpan|null - */ - public function getText() - { - return $this->text; - } - - public function hasText() - { - return isset($this->text); - } - - public function clearText() - { - unset($this->text); - } - - /** - * The mention text. - * - * Generated from protobuf field .google.cloud.language.v2.TextSpan text = 1; - * @param \Google\Cloud\Language\V2\TextSpan $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V2\TextSpan::class); - $this->text = $var; - - return $this; - } - - /** - * The type of the entity mention. - * - * Generated from protobuf field .google.cloud.language.v2.EntityMention.Type type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the entity mention. - * - * Generated from protobuf field .google.cloud.language.v2.EntityMention.Type type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V2\EntityMention\Type::class); - $this->type = $var; - - return $this; - } - - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the sentiment expressed for this - * mention of the entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v2.Sentiment sentiment = 3; - * @return \Google\Cloud\Language\V2\Sentiment|null - */ - public function getSentiment() - { - return $this->sentiment; - } - - public function hasSentiment() - { - return isset($this->sentiment); - } - - public function clearSentiment() - { - unset($this->sentiment); - } - - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_entity_sentiment] - * is set to true, this field will contain the sentiment expressed for this - * mention of the entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v2.Sentiment sentiment = 3; - * @param \Google\Cloud\Language\V2\Sentiment $var - * @return $this - */ - public function setSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V2\Sentiment::class); - $this->sentiment = $var; - - return $this; - } - - /** - * Probability score associated with the entity. - * The score shows the probability of the entity mention being the entity - * type. The score is in (0, 1] range. - * - * Generated from protobuf field float probability = 4; - * @return float - */ - public function getProbability() - { - return $this->probability; - } - - /** - * Probability score associated with the entity. - * The score shows the probability of the entity mention being the entity - * type. The score is in (0, 1] range. - * - * Generated from protobuf field float probability = 4; - * @param float $var - * @return $this - */ - public function setProbability($var) - { - GPBUtil::checkFloat($var); - $this->probability = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/EntityMention/Type.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/EntityMention/Type.php deleted file mode 100644 index a14ce2ec410d..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/EntityMention/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.language.v2.EntityMention.Type - */ -class Type -{ - /** - * Unknown - * - * Generated from protobuf enum TYPE_UNKNOWN = 0; - */ - const TYPE_UNKNOWN = 0; - /** - * Proper name - * - * Generated from protobuf enum PROPER = 1; - */ - const PROPER = 1; - /** - * Common noun (or noun compound) - * - * Generated from protobuf enum COMMON = 2; - */ - const COMMON = 2; - - private static $valueToName = [ - self::TYPE_UNKNOWN => 'TYPE_UNKNOWN', - self::PROPER => 'PROPER', - self::COMMON => 'COMMON', - ]; - - 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(Type::class, \Google\Cloud\Language\V2\EntityMention_Type::class); - diff --git a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/ModerateTextRequest.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/ModerateTextRequest.php deleted file mode 100644 index 945e1a2da76f..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/ModerateTextRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.language.v2.ModerateTextRequest - */ -class ModerateTextRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * Optional. The model version to use for ModerateText. - * - * Generated from protobuf field .google.cloud.language.v2.ModerateTextRequest.ModelVersion model_version = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $model_version = 0; - - /** - * @param \Google\Cloud\Language\V2\Document $document Required. Input document. - * - * @return \Google\Cloud\Language\V2\ModerateTextRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Language\V2\Document $document): self - { - return (new self()) - ->setDocument($document); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V2\Document $document - * Required. Input document. - * @type int $model_version - * Optional. The model version to use for ModerateText. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V2\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V2\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V2\Document::class); - $this->document = $var; - - return $this; - } - - /** - * Optional. The model version to use for ModerateText. - * - * Generated from protobuf field .google.cloud.language.v2.ModerateTextRequest.ModelVersion model_version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getModelVersion() - { - return $this->model_version; - } - - /** - * Optional. The model version to use for ModerateText. - * - * Generated from protobuf field .google.cloud.language.v2.ModerateTextRequest.ModelVersion model_version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setModelVersion($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V2\ModerateTextRequest\ModelVersion::class); - $this->model_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/ModerateTextRequest/ModelVersion.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/ModerateTextRequest/ModelVersion.php deleted file mode 100644 index 2f417e19cd5c..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/ModerateTextRequest/ModelVersion.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.language.v2.ModerateTextRequest.ModelVersion - */ -class ModelVersion -{ - /** - * The default model version. - * - * Generated from protobuf enum MODEL_VERSION_UNSPECIFIED = 0; - */ - const MODEL_VERSION_UNSPECIFIED = 0; - /** - * Use the v1 model, this model is used by default when not provided. - * The v1 model only returns probability (confidence) score for each - * category. - * - * Generated from protobuf enum MODEL_VERSION_1 = 1; - */ - const MODEL_VERSION_1 = 1; - /** - * Use the v2 model. - * The v2 model only returns probability (confidence) score for each - * category, and returns severity score for a subset of the categories. - * - * Generated from protobuf enum MODEL_VERSION_2 = 2; - */ - const MODEL_VERSION_2 = 2; - - private static $valueToName = [ - self::MODEL_VERSION_UNSPECIFIED => 'MODEL_VERSION_UNSPECIFIED', - self::MODEL_VERSION_1 => 'MODEL_VERSION_1', - self::MODEL_VERSION_2 => 'MODEL_VERSION_2', - ]; - - 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(ModelVersion::class, \Google\Cloud\Language\V2\ModerateTextRequest_ModelVersion::class); - diff --git a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/ModerateTextResponse.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/ModerateTextResponse.php deleted file mode 100644 index c25b611f41c4..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/ModerateTextResponse.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.language.v2.ModerateTextResponse - */ -class ModerateTextResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Harmful and sensitive categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v2.ClassificationCategory moderation_categories = 1; - */ - private $moderation_categories; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][] field for more details. - * - * Generated from protobuf field string language_code = 2; - */ - protected $language_code = ''; - /** - * Whether the language is officially supported. The API may still return a - * response when the language is not supported, but it is on a best effort - * basis. - * - * Generated from protobuf field bool language_supported = 3; - */ - protected $language_supported = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $moderation_categories - * Harmful and sensitive categories representing the input document. - * @type string $language_code - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][] field for more details. - * @type bool $language_supported - * Whether the language is officially supported. The API may still return a - * response when the language is not supported, but it is on a best effort - * basis. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Harmful and sensitive categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v2.ClassificationCategory moderation_categories = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getModerationCategories() - { - return $this->moderation_categories; - } - - /** - * Harmful and sensitive categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v2.ClassificationCategory moderation_categories = 1; - * @param array<\Google\Cloud\Language\V2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setModerationCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V2\ClassificationCategory::class); - $this->moderation_categories = $arr; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][] field for more details. - * - * Generated from protobuf field string language_code = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][] field for more details. - * - * Generated from protobuf field string language_code = 2; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Whether the language is officially supported. The API may still return a - * response when the language is not supported, but it is on a best effort - * basis. - * - * Generated from protobuf field bool language_supported = 3; - * @return bool - */ - public function getLanguageSupported() - { - return $this->language_supported; - } - - /** - * Whether the language is officially supported. The API may still return a - * response when the language is not supported, but it is on a best effort - * basis. - * - * Generated from protobuf field bool language_supported = 3; - * @param bool $var - * @return $this - */ - public function setLanguageSupported($var) - { - GPBUtil::checkBool($var); - $this->language_supported = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/Sentence.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/Sentence.php deleted file mode 100644 index de53cc064ee0..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/Sentence.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.language.v2.Sentence - */ -class Sentence extends \Google\Protobuf\Internal\Message -{ - /** - * The sentence text. - * - * Generated from protobuf field .google.cloud.language.v2.TextSpan text = 1; - */ - protected $text = null; - /** - * For calls to [AnalyzeSentiment][] or if - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment] - * is set to true, this field will contain the sentiment for the sentence. - * - * Generated from protobuf field .google.cloud.language.v2.Sentiment sentiment = 2; - */ - protected $sentiment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V2\TextSpan $text - * The sentence text. - * @type \Google\Cloud\Language\V2\Sentiment $sentiment - * For calls to [AnalyzeSentiment][] or if - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment] - * is set to true, this field will contain the sentiment for the sentence. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The sentence text. - * - * Generated from protobuf field .google.cloud.language.v2.TextSpan text = 1; - * @return \Google\Cloud\Language\V2\TextSpan|null - */ - public function getText() - { - return $this->text; - } - - public function hasText() - { - return isset($this->text); - } - - public function clearText() - { - unset($this->text); - } - - /** - * The sentence text. - * - * Generated from protobuf field .google.cloud.language.v2.TextSpan text = 1; - * @param \Google\Cloud\Language\V2\TextSpan $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V2\TextSpan::class); - $this->text = $var; - - return $this; - } - - /** - * For calls to [AnalyzeSentiment][] or if - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment] - * is set to true, this field will contain the sentiment for the sentence. - * - * Generated from protobuf field .google.cloud.language.v2.Sentiment sentiment = 2; - * @return \Google\Cloud\Language\V2\Sentiment|null - */ - public function getSentiment() - { - return $this->sentiment; - } - - public function hasSentiment() - { - return isset($this->sentiment); - } - - public function clearSentiment() - { - unset($this->sentiment); - } - - /** - * For calls to [AnalyzeSentiment][] or if - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_document_sentiment] - * is set to true, this field will contain the sentiment for the sentence. - * - * Generated from protobuf field .google.cloud.language.v2.Sentiment sentiment = 2; - * @param \Google\Cloud\Language\V2\Sentiment $var - * @return $this - */ - public function setSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V2\Sentiment::class); - $this->sentiment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/Sentiment.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/Sentiment.php deleted file mode 100644 index 3b4032e2bc72..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/Sentiment.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.language.v2.Sentiment - */ -class Sentiment extends \Google\Protobuf\Internal\Message -{ - /** - * A non-negative number in the [0, +inf) range, which represents - * the absolute magnitude of sentiment regardless of score (positive or - * negative). - * - * Generated from protobuf field float magnitude = 1; - */ - protected $magnitude = 0.0; - /** - * Sentiment score between -1.0 (negative sentiment) and 1.0 - * (positive sentiment). - * - * Generated from protobuf field float score = 2; - */ - protected $score = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $magnitude - * A non-negative number in the [0, +inf) range, which represents - * the absolute magnitude of sentiment regardless of score (positive or - * negative). - * @type float $score - * Sentiment score between -1.0 (negative sentiment) and 1.0 - * (positive sentiment). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * A non-negative number in the [0, +inf) range, which represents - * the absolute magnitude of sentiment regardless of score (positive or - * negative). - * - * Generated from protobuf field float magnitude = 1; - * @return float - */ - public function getMagnitude() - { - return $this->magnitude; - } - - /** - * A non-negative number in the [0, +inf) range, which represents - * the absolute magnitude of sentiment regardless of score (positive or - * negative). - * - * Generated from protobuf field float magnitude = 1; - * @param float $var - * @return $this - */ - public function setMagnitude($var) - { - GPBUtil::checkFloat($var); - $this->magnitude = $var; - - return $this; - } - - /** - * Sentiment score between -1.0 (negative sentiment) and 1.0 - * (positive sentiment). - * - * Generated from protobuf field float score = 2; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * Sentiment score between -1.0 (negative sentiment) and 1.0 - * (positive sentiment). - * - * Generated from protobuf field float score = 2; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/TextSpan.php b/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/TextSpan.php deleted file mode 100644 index ad314e58615f..000000000000 --- a/owl-bot-staging/Language/v2/proto/src/Google/Cloud/Language/V2/TextSpan.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.language.v2.TextSpan - */ -class TextSpan extends \Google\Protobuf\Internal\Message -{ - /** - * The content of the text span, which is a substring of the document. - * - * Generated from protobuf field string content = 1; - */ - protected $content = ''; - /** - * The API calculates the beginning offset of the content in the original - * document according to the - * [EncodingType][google.cloud.language.v2.EncodingType] specified in the API - * request. - * - * Generated from protobuf field int32 begin_offset = 2; - */ - protected $begin_offset = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $content - * The content of the text span, which is a substring of the document. - * @type int $begin_offset - * The API calculates the beginning offset of the content in the original - * document according to the - * [EncodingType][google.cloud.language.v2.EncodingType] specified in the API - * request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The content of the text span, which is a substring of the document. - * - * Generated from protobuf field string content = 1; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * The content of the text span, which is a substring of the document. - * - * Generated from protobuf field string content = 1; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, True); - $this->content = $var; - - return $this; - } - - /** - * The API calculates the beginning offset of the content in the original - * document according to the - * [EncodingType][google.cloud.language.v2.EncodingType] specified in the API - * request. - * - * Generated from protobuf field int32 begin_offset = 2; - * @return int - */ - public function getBeginOffset() - { - return $this->begin_offset; - } - - /** - * The API calculates the beginning offset of the content in the original - * document according to the - * [EncodingType][google.cloud.language.v2.EncodingType] specified in the API - * request. - * - * Generated from protobuf field int32 begin_offset = 2; - * @param int $var - * @return $this - */ - public function setBeginOffset($var) - { - GPBUtil::checkInt32($var); - $this->begin_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v2/samples/V2/LanguageServiceClient/analyze_entities.php b/owl-bot-staging/Language/v2/samples/V2/LanguageServiceClient/analyze_entities.php deleted file mode 100644 index 6cce94a995d0..000000000000 --- a/owl-bot-staging/Language/v2/samples/V2/LanguageServiceClient/analyze_entities.php +++ /dev/null @@ -1,62 +0,0 @@ -setDocument($document); - - // Call the API and handle any network failures. - try { - /** @var AnalyzeEntitiesResponse $response */ - $response = $languageServiceClient->analyzeEntities($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v2_generated_LanguageService_AnalyzeEntities_sync] diff --git a/owl-bot-staging/Language/v2/samples/V2/LanguageServiceClient/analyze_sentiment.php b/owl-bot-staging/Language/v2/samples/V2/LanguageServiceClient/analyze_sentiment.php deleted file mode 100644 index 62642617005c..000000000000 --- a/owl-bot-staging/Language/v2/samples/V2/LanguageServiceClient/analyze_sentiment.php +++ /dev/null @@ -1,60 +0,0 @@ -setDocument($document); - - // Call the API and handle any network failures. - try { - /** @var AnalyzeSentimentResponse $response */ - $response = $languageServiceClient->analyzeSentiment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v2_generated_LanguageService_AnalyzeSentiment_sync] diff --git a/owl-bot-staging/Language/v2/samples/V2/LanguageServiceClient/annotate_text.php b/owl-bot-staging/Language/v2/samples/V2/LanguageServiceClient/annotate_text.php deleted file mode 100644 index 5234d922950e..000000000000 --- a/owl-bot-staging/Language/v2/samples/V2/LanguageServiceClient/annotate_text.php +++ /dev/null @@ -1,63 +0,0 @@ -setDocument($document) - ->setFeatures($features); - - // Call the API and handle any network failures. - try { - /** @var AnnotateTextResponse $response */ - $response = $languageServiceClient->annotateText($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v2_generated_LanguageService_AnnotateText_sync] diff --git a/owl-bot-staging/Language/v2/samples/V2/LanguageServiceClient/classify_text.php b/owl-bot-staging/Language/v2/samples/V2/LanguageServiceClient/classify_text.php deleted file mode 100644 index 1dbca7ddb5ed..000000000000 --- a/owl-bot-staging/Language/v2/samples/V2/LanguageServiceClient/classify_text.php +++ /dev/null @@ -1,60 +0,0 @@ -setDocument($document); - - // Call the API and handle any network failures. - try { - /** @var ClassifyTextResponse $response */ - $response = $languageServiceClient->classifyText($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v2_generated_LanguageService_ClassifyText_sync] diff --git a/owl-bot-staging/Language/v2/samples/V2/LanguageServiceClient/moderate_text.php b/owl-bot-staging/Language/v2/samples/V2/LanguageServiceClient/moderate_text.php deleted file mode 100644 index abc5009b947b..000000000000 --- a/owl-bot-staging/Language/v2/samples/V2/LanguageServiceClient/moderate_text.php +++ /dev/null @@ -1,60 +0,0 @@ -setDocument($document); - - // Call the API and handle any network failures. - try { - /** @var ModerateTextResponse $response */ - $response = $languageServiceClient->moderateText($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v2_generated_LanguageService_ModerateText_sync] diff --git a/owl-bot-staging/Language/v2/src/V2/Client/LanguageServiceClient.php b/owl-bot-staging/Language/v2/src/V2/Client/LanguageServiceClient.php deleted file mode 100644 index aaaa774e2c19..000000000000 --- a/owl-bot-staging/Language/v2/src/V2/Client/LanguageServiceClient.php +++ /dev/null @@ -1,313 +0,0 @@ - analyzeEntitiesAsync(AnalyzeEntitiesRequest $request, array $optionalArgs = []) - * @method PromiseInterface analyzeSentimentAsync(AnalyzeSentimentRequest $request, array $optionalArgs = []) - * @method PromiseInterface annotateTextAsync(AnnotateTextRequest $request, array $optionalArgs = []) - * @method PromiseInterface classifyTextAsync(ClassifyTextRequest $request, array $optionalArgs = []) - * @method PromiseInterface moderateTextAsync(ModerateTextRequest $request, array $optionalArgs = []) - */ -final class LanguageServiceClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.language.v2.LanguageService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'language.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'language.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-language', - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/language_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/language_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/language_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/language_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $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 'language.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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); - } - - /** - * Finds named entities (currently proper names and common nouns) in the text - * along with entity types, probability, mentions for each entity, and - * other properties. - * - * The async variant is {@see LanguageServiceClient::analyzeEntitiesAsync()} . - * - * @example samples/V2/LanguageServiceClient/analyze_entities.php - * - * @param AnalyzeEntitiesRequest $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 AnalyzeEntitiesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function analyzeEntities(AnalyzeEntitiesRequest $request, array $callOptions = []): AnalyzeEntitiesResponse - { - return $this->startApiCall('AnalyzeEntities', $request, $callOptions)->wait(); - } - - /** - * Analyzes the sentiment of the provided text. - * - * The async variant is {@see LanguageServiceClient::analyzeSentimentAsync()} . - * - * @example samples/V2/LanguageServiceClient/analyze_sentiment.php - * - * @param AnalyzeSentimentRequest $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 AnalyzeSentimentResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function analyzeSentiment(AnalyzeSentimentRequest $request, array $callOptions = []): AnalyzeSentimentResponse - { - return $this->startApiCall('AnalyzeSentiment', $request, $callOptions)->wait(); - } - - /** - * A convenience method that provides all features in one call. - * - * The async variant is {@see LanguageServiceClient::annotateTextAsync()} . - * - * @example samples/V2/LanguageServiceClient/annotate_text.php - * - * @param AnnotateTextRequest $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 AnnotateTextResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function annotateText(AnnotateTextRequest $request, array $callOptions = []): AnnotateTextResponse - { - return $this->startApiCall('AnnotateText', $request, $callOptions)->wait(); - } - - /** - * Classifies a document into categories. - * - * The async variant is {@see LanguageServiceClient::classifyTextAsync()} . - * - * @example samples/V2/LanguageServiceClient/classify_text.php - * - * @param ClassifyTextRequest $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 ClassifyTextResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function classifyText(ClassifyTextRequest $request, array $callOptions = []): ClassifyTextResponse - { - return $this->startApiCall('ClassifyText', $request, $callOptions)->wait(); - } - - /** - * Moderates a document for harmful and sensitive categories. - * - * The async variant is {@see LanguageServiceClient::moderateTextAsync()} . - * - * @example samples/V2/LanguageServiceClient/moderate_text.php - * - * @param ModerateTextRequest $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 ModerateTextResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function moderateText(ModerateTextRequest $request, array $callOptions = []): ModerateTextResponse - { - return $this->startApiCall('ModerateText', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Language/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Language/v2/src/V2/gapic_metadata.json deleted file mode 100644 index 78fe94f1b06f..000000000000 --- a/owl-bot-staging/Language/v2/src/V2/gapic_metadata.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.language.v2", - "libraryPackage": "Google\\Cloud\\Language\\V2", - "services": { - "LanguageService": { - "clients": { - "grpc": { - "libraryClient": "LanguageServiceGapicClient", - "rpcs": { - "AnalyzeEntities": { - "methods": [ - "analyzeEntities" - ] - }, - "AnalyzeSentiment": { - "methods": [ - "analyzeSentiment" - ] - }, - "AnnotateText": { - "methods": [ - "annotateText" - ] - }, - "ClassifyText": { - "methods": [ - "classifyText" - ] - }, - "ModerateText": { - "methods": [ - "moderateText" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Language/v2/src/V2/resources/language_service_client_config.json b/owl-bot-staging/Language/v2/src/V2/resources/language_service_client_config.json deleted file mode 100644 index 96098ac89a40..000000000000 --- a/owl-bot-staging/Language/v2/src/V2/resources/language_service_client_config.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "interfaces": { - "google.cloud.language.v2.LanguageService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "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": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "AnalyzeEntities": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "AnalyzeSentiment": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "AnnotateText": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ClassifyText": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ModerateText": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Language/v2/src/V2/resources/language_service_descriptor_config.php b/owl-bot-staging/Language/v2/src/V2/resources/language_service_descriptor_config.php deleted file mode 100644 index 30d7f3e157c9..000000000000 --- a/owl-bot-staging/Language/v2/src/V2/resources/language_service_descriptor_config.php +++ /dev/null @@ -1,48 +0,0 @@ - [ - 'google.cloud.language.v2.LanguageService' => [ - 'AnalyzeEntities' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Language\V2\AnalyzeEntitiesResponse', - ], - 'AnalyzeSentiment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Language\V2\AnalyzeSentimentResponse', - ], - 'AnnotateText' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Language\V2\AnnotateTextResponse', - ], - 'ClassifyText' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Language\V2\ClassifyTextResponse', - ], - 'ModerateText' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Language\V2\ModerateTextResponse', - ], - ], - ], -]; diff --git a/owl-bot-staging/Language/v2/src/V2/resources/language_service_rest_client_config.php b/owl-bot-staging/Language/v2/src/V2/resources/language_service_rest_client_config.php deleted file mode 100644 index fefa2cfbac7c..000000000000 --- a/owl-bot-staging/Language/v2/src/V2/resources/language_service_rest_client_config.php +++ /dev/null @@ -1,54 +0,0 @@ - [ - 'google.cloud.language.v2.LanguageService' => [ - 'AnalyzeEntities' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/documents:analyzeEntities', - 'body' => '*', - ], - 'AnalyzeSentiment' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/documents:analyzeSentiment', - 'body' => '*', - ], - 'AnnotateText' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/documents:annotateText', - 'body' => '*', - ], - 'ClassifyText' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/documents:classifyText', - 'body' => '*', - ], - 'ModerateText' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/documents:moderateText', - 'body' => '*', - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Language/v2/tests/Unit/V2/Client/LanguageServiceClientTest.php b/owl-bot-staging/Language/v2/tests/Unit/V2/Client/LanguageServiceClientTest.php deleted file mode 100644 index 1a73afe76923..000000000000 --- a/owl-bot-staging/Language/v2/tests/Unit/V2/Client/LanguageServiceClientTest.php +++ /dev/null @@ -1,439 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return LanguageServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new LanguageServiceClient($options); - } - - /** @test */ - public function analyzeEntitiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $languageCode = 'languageCode-412800396'; - $languageSupported = false; - $expectedResponse = new AnalyzeEntitiesResponse(); - $expectedResponse->setLanguageCode($languageCode); - $expectedResponse->setLanguageSupported($languageSupported); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $request = (new AnalyzeEntitiesRequest()) - ->setDocument($document); - $response = $gapicClient->analyzeEntities($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.language.v2.LanguageService/AnalyzeEntities', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeEntitiesExceptionTest() - { - $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 - $document = new Document(); - $request = (new AnalyzeEntitiesRequest()) - ->setDocument($document); - try { - $gapicClient->analyzeEntities($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 analyzeSentimentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $languageCode = 'languageCode-412800396'; - $languageSupported = false; - $expectedResponse = new AnalyzeSentimentResponse(); - $expectedResponse->setLanguageCode($languageCode); - $expectedResponse->setLanguageSupported($languageSupported); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $request = (new AnalyzeSentimentRequest()) - ->setDocument($document); - $response = $gapicClient->analyzeSentiment($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.language.v2.LanguageService/AnalyzeSentiment', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeSentimentExceptionTest() - { - $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 - $document = new Document(); - $request = (new AnalyzeSentimentRequest()) - ->setDocument($document); - try { - $gapicClient->analyzeSentiment($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 annotateTextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $languageCode = 'languageCode-412800396'; - $languageSupported = false; - $expectedResponse = new AnnotateTextResponse(); - $expectedResponse->setLanguageCode($languageCode); - $expectedResponse->setLanguageSupported($languageSupported); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $features = new Features(); - $request = (new AnnotateTextRequest()) - ->setDocument($document) - ->setFeatures($features); - $response = $gapicClient->annotateText($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.language.v2.LanguageService/AnnotateText', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $actualValue = $actualRequestObject->getFeatures(); - $this->assertProtobufEquals($features, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function annotateTextExceptionTest() - { - $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 - $document = new Document(); - $features = new Features(); - $request = (new AnnotateTextRequest()) - ->setDocument($document) - ->setFeatures($features); - try { - $gapicClient->annotateText($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 classifyTextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $languageCode = 'languageCode-412800396'; - $languageSupported = false; - $expectedResponse = new ClassifyTextResponse(); - $expectedResponse->setLanguageCode($languageCode); - $expectedResponse->setLanguageSupported($languageSupported); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $request = (new ClassifyTextRequest()) - ->setDocument($document); - $response = $gapicClient->classifyText($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.language.v2.LanguageService/ClassifyText', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function classifyTextExceptionTest() - { - $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 - $document = new Document(); - $request = (new ClassifyTextRequest()) - ->setDocument($document); - try { - $gapicClient->classifyText($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 moderateTextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $languageCode = 'languageCode-412800396'; - $languageSupported = false; - $expectedResponse = new ModerateTextResponse(); - $expectedResponse->setLanguageCode($languageCode); - $expectedResponse->setLanguageSupported($languageSupported); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $request = (new ModerateTextRequest()) - ->setDocument($document); - $response = $gapicClient->moderateText($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.language.v2.LanguageService/ModerateText', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function moderateTextExceptionTest() - { - $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 - $document = new Document(); - $request = (new ModerateTextRequest()) - ->setDocument($document); - try { - $gapicClient->moderateText($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 analyzeEntitiesAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $languageCode = 'languageCode-412800396'; - $languageSupported = false; - $expectedResponse = new AnalyzeEntitiesResponse(); - $expectedResponse->setLanguageCode($languageCode); - $expectedResponse->setLanguageSupported($languageSupported); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $request = (new AnalyzeEntitiesRequest()) - ->setDocument($document); - $response = $gapicClient->analyzeEntitiesAsync($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.language.v2.LanguageService/AnalyzeEntities', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/GPBMetadata/Google/Cloud/Lifesciences/V2Beta/Workflows.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/GPBMetadata/Google/Cloud/Lifesciences/V2Beta/Workflows.php deleted file mode 100644 index d665b620fe68..000000000000 Binary files a/owl-bot-staging/LifeSciences/v2beta/proto/src/GPBMetadata/Google/Cloud/Lifesciences/V2Beta/Workflows.php and /dev/null differ diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Accelerator.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Accelerator.php deleted file mode 100644 index 8c0183794ffe..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Accelerator.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.lifesciences.v2beta.Accelerator - */ -class Accelerator extends \Google\Protobuf\Internal\Message -{ - /** - * The accelerator type string (for example, "nvidia-tesla-t4"). - * Only NVIDIA GPU accelerators are currently supported. If an NVIDIA GPU is - * attached, the required runtime libraries will be made available to all - * containers under `/usr/local/nvidia`. The driver version to install must - * be specified using the NVIDIA driver version parameter on the virtual - * machine specification. Note that attaching a GPU increases the worker VM - * startup time by a few minutes. - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - /** - * How many accelerators of this type to attach. - * - * Generated from protobuf field int64 count = 2; - */ - protected $count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * The accelerator type string (for example, "nvidia-tesla-t4"). - * Only NVIDIA GPU accelerators are currently supported. If an NVIDIA GPU is - * attached, the required runtime libraries will be made available to all - * containers under `/usr/local/nvidia`. The driver version to install must - * be specified using the NVIDIA driver version parameter on the virtual - * machine specification. Note that attaching a GPU increases the worker VM - * startup time by a few minutes. - * @type int|string $count - * How many accelerators of this type to attach. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * The accelerator type string (for example, "nvidia-tesla-t4"). - * Only NVIDIA GPU accelerators are currently supported. If an NVIDIA GPU is - * attached, the required runtime libraries will be made available to all - * containers under `/usr/local/nvidia`. The driver version to install must - * be specified using the NVIDIA driver version parameter on the virtual - * machine specification. Note that attaching a GPU increases the worker VM - * startup time by a few minutes. - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The accelerator type string (for example, "nvidia-tesla-t4"). - * Only NVIDIA GPU accelerators are currently supported. If an NVIDIA GPU is - * attached, the required runtime libraries will be made available to all - * containers under `/usr/local/nvidia`. The driver version to install must - * be specified using the NVIDIA driver version parameter on the virtual - * machine specification. Note that attaching a GPU increases the worker VM - * startup time by a few minutes. - * - * Generated from protobuf field string type = 1; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * How many accelerators of this type to attach. - * - * Generated from protobuf field int64 count = 2; - * @return int|string - */ - public function getCount() - { - return $this->count; - } - - /** - * How many accelerators of this type to attach. - * - * Generated from protobuf field int64 count = 2; - * @param int|string $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt64($var); - $this->count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Action.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Action.php deleted file mode 100644 index 60946413bcf1..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Action.php +++ /dev/null @@ -1,1099 +0,0 @@ -google.cloud.lifesciences.v2beta.Action - */ -class Action extends \Google\Protobuf\Internal\Message -{ - /** - * An optional name for the container. The container hostname will be set to - * this name, making it useful for inter-container communication. The name - * must contain only upper and lowercase alphanumeric characters and hyphens - * and cannot start with a hyphen. - * - * Generated from protobuf field string container_name = 1; - */ - protected $container_name = ''; - /** - * Required. The URI to pull the container image from. Note that all images - * referenced by actions in the pipeline are pulled before the first action - * runs. If multiple actions reference the same image, it is only pulled once, - * ensuring that the same image is used for all actions in a single pipeline. - * The image URI can be either a complete host and image specification (e.g., - * quay.io/biocontainers/samtools), a library and image name (e.g., - * google/cloud-sdk) or a bare image name ('bash') to pull from the default - * library. No schema is required in any of these cases. - * If the specified image is not public, the service account specified for - * the Virtual Machine must have access to pull the images from GCR, or - * appropriate credentials must be specified in the - * [google.cloud.lifesciences.v2beta.Action.credentials][google.cloud.lifesciences.v2beta.Action.credentials] - * field. - * - * Generated from protobuf field string image_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $image_uri = ''; - /** - * If specified, overrides the `CMD` specified in the container. If the - * container also has an `ENTRYPOINT` the values are used as entrypoint - * arguments. Otherwise, they are used as a command and arguments to run - * inside the container. - * - * Generated from protobuf field repeated string commands = 3; - */ - private $commands; - /** - * If specified, overrides the `ENTRYPOINT` specified in the container. - * - * Generated from protobuf field string entrypoint = 4; - */ - protected $entrypoint = ''; - /** - * The environment to pass into the container. This environment is merged - * with values specified in the - * [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline] - * message, overwriting any duplicate values. - * In addition to the values passed here, a few other values are - * automatically injected into the environment. These cannot be hidden or - * overwritten. - * `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline failed - * because an action has exited with a non-zero status (and did not have the - * `IGNORE_EXIT_STATUS` flag set). This can be used to determine if additional - * debug or logging actions should execute. - * `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last - * non-background action that executed. This can be used by workflow engine - * authors to determine whether an individual action has succeeded or failed. - * - * Generated from protobuf field map environment = 5; - */ - private $environment; - /** - * The encrypted environment to pass into the container. This environment is - * merged with values specified in the - * [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline] - * message, overwriting any duplicate values. - * The secret must decrypt to a JSON-encoded dictionary where key-value pairs - * serve as environment variable names and their values. The decoded - * environment variables can overwrite the values specified by the - * `environment` field. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.Secret encrypted_environment = 21; - */ - protected $encrypted_environment = null; - /** - * An optional identifier for a PID namespace to run the action inside. - * Multiple actions should use the same string to share a namespace. If - * unspecified, a separate isolated namespace is used. - * - * Generated from protobuf field string pid_namespace = 6; - */ - protected $pid_namespace = ''; - /** - * A map of containers to host port mappings for this container. If the - * container already specifies exposed ports, use the - * `PUBLISH_EXPOSED_PORTS` flag instead. - * The host port number must be less than 65536. If it is zero, an unused - * random port is assigned. To determine the resulting port number, consult - * the `ContainerStartedEvent` in the operation metadata. - * - * Generated from protobuf field map port_mappings = 8; - */ - private $port_mappings; - /** - * A list of mounts to make available to the action. - * In addition to the values specified here, every action has a special - * virtual disk mounted under `/google` that contains log files and other - * operational components. - *
    - *
  • /google/logs All logs written during the pipeline - * execution.
  • - *
  • /google/logs/output The combined standard output and - * standard error of all actions run as part of the pipeline - * execution.
  • - *
  • /google/logs/action/*/stdout The complete contents of - * each individual action's standard output.
  • - *
  • /google/logs/action/*/stderr The complete contents of - * each individual action's standard error output.
  • - *
- * - * Generated from protobuf field repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; - */ - private $mounts; - /** - * Labels to associate with the action. This field is provided to assist - * workflow engine authors in identifying actions (for example, to indicate - * what sort of action they perform, such as localization or debugging). - * They are returned in the operation metadata, but are otherwise ignored. - * - * Generated from protobuf field map labels = 10; - */ - private $labels; - /** - * If the specified image is hosted on a private registry other than Google - * Container Registry, the credentials required to pull the image must be - * specified here as an encrypted secret. - * The secret must decrypt to a JSON-encoded dictionary containing both - * `username` and `password` keys. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.Secret credentials = 11; - */ - protected $credentials = null; - /** - * The maximum amount of time to give the action to complete. If the action - * fails to complete before the timeout, it will be terminated and the exit - * status will be non-zero. The pipeline will continue or terminate based - * on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS` flags. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 12; - */ - protected $timeout = null; - /** - * Normally, a non-zero exit status causes the pipeline to fail. This flag - * allows execution of other actions to continue instead. - * - * Generated from protobuf field bool ignore_exit_status = 13; - */ - protected $ignore_exit_status = false; - /** - * This flag allows an action to continue running in the background while - * executing subsequent actions. This is useful to provide services to - * other actions (or to provide debugging support tools like SSH servers). - * - * Generated from protobuf field bool run_in_background = 14; - */ - protected $run_in_background = false; - /** - * By default, after an action fails, no further actions are run. This flag - * indicates that this action must be run even if the pipeline has already - * failed. This is useful for actions that copy output files off of the VM - * or for debugging. Note that no actions will be run if image prefetching - * fails. - * - * Generated from protobuf field bool always_run = 15; - */ - protected $always_run = false; - /** - * Enable access to the FUSE device for this action. Filesystems can then - * be mounted into disks shared with other actions. The other actions do - * not need the `enable_fuse` flag to access the mounted filesystem. - * This has the effect of causing the container to be executed with - * `CAP_SYS_ADMIN` and exposes `/dev/fuse` to the container, so use it only - * for containers you trust. - * - * Generated from protobuf field bool enable_fuse = 16; - */ - protected $enable_fuse = false; - /** - * Exposes all ports specified by `EXPOSE` statements in the container. To - * discover the host side port numbers, consult the `ACTION_STARTED` event - * in the operation metadata. - * - * Generated from protobuf field bool publish_exposed_ports = 17; - */ - protected $publish_exposed_ports = false; - /** - * All container images are typically downloaded before any actions are - * executed. This helps prevent typos in URIs or issues like lack of disk - * space from wasting large amounts of compute resources. - * If set, this flag prevents the worker from downloading the image until - * just before the action is executed. - * - * Generated from protobuf field bool disable_image_prefetch = 18; - */ - protected $disable_image_prefetch = false; - /** - * A small portion of the container's standard error stream is typically - * captured and returned inside the `ContainerStoppedEvent`. Setting this - * flag disables this functionality. - * - * Generated from protobuf field bool disable_standard_error_capture = 19; - */ - protected $disable_standard_error_capture = false; - /** - * Prevents the container from accessing the external network. - * - * Generated from protobuf field bool block_external_network = 20; - */ - protected $block_external_network = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $container_name - * An optional name for the container. The container hostname will be set to - * this name, making it useful for inter-container communication. The name - * must contain only upper and lowercase alphanumeric characters and hyphens - * and cannot start with a hyphen. - * @type string $image_uri - * Required. The URI to pull the container image from. Note that all images - * referenced by actions in the pipeline are pulled before the first action - * runs. If multiple actions reference the same image, it is only pulled once, - * ensuring that the same image is used for all actions in a single pipeline. - * The image URI can be either a complete host and image specification (e.g., - * quay.io/biocontainers/samtools), a library and image name (e.g., - * google/cloud-sdk) or a bare image name ('bash') to pull from the default - * library. No schema is required in any of these cases. - * If the specified image is not public, the service account specified for - * the Virtual Machine must have access to pull the images from GCR, or - * appropriate credentials must be specified in the - * [google.cloud.lifesciences.v2beta.Action.credentials][google.cloud.lifesciences.v2beta.Action.credentials] - * field. - * @type array|\Google\Protobuf\Internal\RepeatedField $commands - * If specified, overrides the `CMD` specified in the container. If the - * container also has an `ENTRYPOINT` the values are used as entrypoint - * arguments. Otherwise, they are used as a command and arguments to run - * inside the container. - * @type string $entrypoint - * If specified, overrides the `ENTRYPOINT` specified in the container. - * @type array|\Google\Protobuf\Internal\MapField $environment - * The environment to pass into the container. This environment is merged - * with values specified in the - * [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline] - * message, overwriting any duplicate values. - * In addition to the values passed here, a few other values are - * automatically injected into the environment. These cannot be hidden or - * overwritten. - * `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline failed - * because an action has exited with a non-zero status (and did not have the - * `IGNORE_EXIT_STATUS` flag set). This can be used to determine if additional - * debug or logging actions should execute. - * `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last - * non-background action that executed. This can be used by workflow engine - * authors to determine whether an individual action has succeeded or failed. - * @type \Google\Cloud\LifeSciences\V2beta\Secret $encrypted_environment - * The encrypted environment to pass into the container. This environment is - * merged with values specified in the - * [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline] - * message, overwriting any duplicate values. - * The secret must decrypt to a JSON-encoded dictionary where key-value pairs - * serve as environment variable names and their values. The decoded - * environment variables can overwrite the values specified by the - * `environment` field. - * @type string $pid_namespace - * An optional identifier for a PID namespace to run the action inside. - * Multiple actions should use the same string to share a namespace. If - * unspecified, a separate isolated namespace is used. - * @type array|\Google\Protobuf\Internal\MapField $port_mappings - * A map of containers to host port mappings for this container. If the - * container already specifies exposed ports, use the - * `PUBLISH_EXPOSED_PORTS` flag instead. - * The host port number must be less than 65536. If it is zero, an unused - * random port is assigned. To determine the resulting port number, consult - * the `ContainerStartedEvent` in the operation metadata. - * @type array<\Google\Cloud\LifeSciences\V2beta\Mount>|\Google\Protobuf\Internal\RepeatedField $mounts - * A list of mounts to make available to the action. - * In addition to the values specified here, every action has a special - * virtual disk mounted under `/google` that contains log files and other - * operational components. - *
    - *
  • /google/logs All logs written during the pipeline - * execution.
  • - *
  • /google/logs/output The combined standard output and - * standard error of all actions run as part of the pipeline - * execution.
  • - *
  • /google/logs/action/*/stdout The complete contents of - * each individual action's standard output.
  • - *
  • /google/logs/action/*/stderr The complete contents of - * each individual action's standard error output.
  • - *
- * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels to associate with the action. This field is provided to assist - * workflow engine authors in identifying actions (for example, to indicate - * what sort of action they perform, such as localization or debugging). - * They are returned in the operation metadata, but are otherwise ignored. - * @type \Google\Cloud\LifeSciences\V2beta\Secret $credentials - * If the specified image is hosted on a private registry other than Google - * Container Registry, the credentials required to pull the image must be - * specified here as an encrypted secret. - * The secret must decrypt to a JSON-encoded dictionary containing both - * `username` and `password` keys. - * @type \Google\Protobuf\Duration $timeout - * The maximum amount of time to give the action to complete. If the action - * fails to complete before the timeout, it will be terminated and the exit - * status will be non-zero. The pipeline will continue or terminate based - * on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS` flags. - * @type bool $ignore_exit_status - * Normally, a non-zero exit status causes the pipeline to fail. This flag - * allows execution of other actions to continue instead. - * @type bool $run_in_background - * This flag allows an action to continue running in the background while - * executing subsequent actions. This is useful to provide services to - * other actions (or to provide debugging support tools like SSH servers). - * @type bool $always_run - * By default, after an action fails, no further actions are run. This flag - * indicates that this action must be run even if the pipeline has already - * failed. This is useful for actions that copy output files off of the VM - * or for debugging. Note that no actions will be run if image prefetching - * fails. - * @type bool $enable_fuse - * Enable access to the FUSE device for this action. Filesystems can then - * be mounted into disks shared with other actions. The other actions do - * not need the `enable_fuse` flag to access the mounted filesystem. - * This has the effect of causing the container to be executed with - * `CAP_SYS_ADMIN` and exposes `/dev/fuse` to the container, so use it only - * for containers you trust. - * @type bool $publish_exposed_ports - * Exposes all ports specified by `EXPOSE` statements in the container. To - * discover the host side port numbers, consult the `ACTION_STARTED` event - * in the operation metadata. - * @type bool $disable_image_prefetch - * All container images are typically downloaded before any actions are - * executed. This helps prevent typos in URIs or issues like lack of disk - * space from wasting large amounts of compute resources. - * If set, this flag prevents the worker from downloading the image until - * just before the action is executed. - * @type bool $disable_standard_error_capture - * A small portion of the container's standard error stream is typically - * captured and returned inside the `ContainerStoppedEvent`. Setting this - * flag disables this functionality. - * @type bool $block_external_network - * Prevents the container from accessing the external network. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * An optional name for the container. The container hostname will be set to - * this name, making it useful for inter-container communication. The name - * must contain only upper and lowercase alphanumeric characters and hyphens - * and cannot start with a hyphen. - * - * Generated from protobuf field string container_name = 1; - * @return string - */ - public function getContainerName() - { - return $this->container_name; - } - - /** - * An optional name for the container. The container hostname will be set to - * this name, making it useful for inter-container communication. The name - * must contain only upper and lowercase alphanumeric characters and hyphens - * and cannot start with a hyphen. - * - * Generated from protobuf field string container_name = 1; - * @param string $var - * @return $this - */ - public function setContainerName($var) - { - GPBUtil::checkString($var, True); - $this->container_name = $var; - - return $this; - } - - /** - * Required. The URI to pull the container image from. Note that all images - * referenced by actions in the pipeline are pulled before the first action - * runs. If multiple actions reference the same image, it is only pulled once, - * ensuring that the same image is used for all actions in a single pipeline. - * The image URI can be either a complete host and image specification (e.g., - * quay.io/biocontainers/samtools), a library and image name (e.g., - * google/cloud-sdk) or a bare image name ('bash') to pull from the default - * library. No schema is required in any of these cases. - * If the specified image is not public, the service account specified for - * the Virtual Machine must have access to pull the images from GCR, or - * appropriate credentials must be specified in the - * [google.cloud.lifesciences.v2beta.Action.credentials][google.cloud.lifesciences.v2beta.Action.credentials] - * field. - * - * Generated from protobuf field string image_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getImageUri() - { - return $this->image_uri; - } - - /** - * Required. The URI to pull the container image from. Note that all images - * referenced by actions in the pipeline are pulled before the first action - * runs. If multiple actions reference the same image, it is only pulled once, - * ensuring that the same image is used for all actions in a single pipeline. - * The image URI can be either a complete host and image specification (e.g., - * quay.io/biocontainers/samtools), a library and image name (e.g., - * google/cloud-sdk) or a bare image name ('bash') to pull from the default - * library. No schema is required in any of these cases. - * If the specified image is not public, the service account specified for - * the Virtual Machine must have access to pull the images from GCR, or - * appropriate credentials must be specified in the - * [google.cloud.lifesciences.v2beta.Action.credentials][google.cloud.lifesciences.v2beta.Action.credentials] - * field. - * - * Generated from protobuf field string image_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setImageUri($var) - { - GPBUtil::checkString($var, True); - $this->image_uri = $var; - - return $this; - } - - /** - * If specified, overrides the `CMD` specified in the container. If the - * container also has an `ENTRYPOINT` the values are used as entrypoint - * arguments. Otherwise, they are used as a command and arguments to run - * inside the container. - * - * Generated from protobuf field repeated string commands = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCommands() - { - return $this->commands; - } - - /** - * If specified, overrides the `CMD` specified in the container. If the - * container also has an `ENTRYPOINT` the values are used as entrypoint - * arguments. Otherwise, they are used as a command and arguments to run - * inside the container. - * - * Generated from protobuf field repeated string commands = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCommands($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->commands = $arr; - - return $this; - } - - /** - * If specified, overrides the `ENTRYPOINT` specified in the container. - * - * Generated from protobuf field string entrypoint = 4; - * @return string - */ - public function getEntrypoint() - { - return $this->entrypoint; - } - - /** - * If specified, overrides the `ENTRYPOINT` specified in the container. - * - * Generated from protobuf field string entrypoint = 4; - * @param string $var - * @return $this - */ - public function setEntrypoint($var) - { - GPBUtil::checkString($var, True); - $this->entrypoint = $var; - - return $this; - } - - /** - * The environment to pass into the container. This environment is merged - * with values specified in the - * [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline] - * message, overwriting any duplicate values. - * In addition to the values passed here, a few other values are - * automatically injected into the environment. These cannot be hidden or - * overwritten. - * `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline failed - * because an action has exited with a non-zero status (and did not have the - * `IGNORE_EXIT_STATUS` flag set). This can be used to determine if additional - * debug or logging actions should execute. - * `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last - * non-background action that executed. This can be used by workflow engine - * authors to determine whether an individual action has succeeded or failed. - * - * Generated from protobuf field map environment = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * The environment to pass into the container. This environment is merged - * with values specified in the - * [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline] - * message, overwriting any duplicate values. - * In addition to the values passed here, a few other values are - * automatically injected into the environment. These cannot be hidden or - * overwritten. - * `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline failed - * because an action has exited with a non-zero status (and did not have the - * `IGNORE_EXIT_STATUS` flag set). This can be used to determine if additional - * debug or logging actions should execute. - * `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last - * non-background action that executed. This can be used by workflow engine - * authors to determine whether an individual action has succeeded or failed. - * - * Generated from protobuf field map environment = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setEnvironment($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->environment = $arr; - - return $this; - } - - /** - * The encrypted environment to pass into the container. This environment is - * merged with values specified in the - * [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline] - * message, overwriting any duplicate values. - * The secret must decrypt to a JSON-encoded dictionary where key-value pairs - * serve as environment variable names and their values. The decoded - * environment variables can overwrite the values specified by the - * `environment` field. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.Secret encrypted_environment = 21; - * @return \Google\Cloud\LifeSciences\V2beta\Secret|null - */ - public function getEncryptedEnvironment() - { - return $this->encrypted_environment; - } - - public function hasEncryptedEnvironment() - { - return isset($this->encrypted_environment); - } - - public function clearEncryptedEnvironment() - { - unset($this->encrypted_environment); - } - - /** - * The encrypted environment to pass into the container. This environment is - * merged with values specified in the - * [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline] - * message, overwriting any duplicate values. - * The secret must decrypt to a JSON-encoded dictionary where key-value pairs - * serve as environment variable names and their values. The decoded - * environment variables can overwrite the values specified by the - * `environment` field. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.Secret encrypted_environment = 21; - * @param \Google\Cloud\LifeSciences\V2beta\Secret $var - * @return $this - */ - public function setEncryptedEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\LifeSciences\V2beta\Secret::class); - $this->encrypted_environment = $var; - - return $this; - } - - /** - * An optional identifier for a PID namespace to run the action inside. - * Multiple actions should use the same string to share a namespace. If - * unspecified, a separate isolated namespace is used. - * - * Generated from protobuf field string pid_namespace = 6; - * @return string - */ - public function getPidNamespace() - { - return $this->pid_namespace; - } - - /** - * An optional identifier for a PID namespace to run the action inside. - * Multiple actions should use the same string to share a namespace. If - * unspecified, a separate isolated namespace is used. - * - * Generated from protobuf field string pid_namespace = 6; - * @param string $var - * @return $this - */ - public function setPidNamespace($var) - { - GPBUtil::checkString($var, True); - $this->pid_namespace = $var; - - return $this; - } - - /** - * A map of containers to host port mappings for this container. If the - * container already specifies exposed ports, use the - * `PUBLISH_EXPOSED_PORTS` flag instead. - * The host port number must be less than 65536. If it is zero, an unused - * random port is assigned. To determine the resulting port number, consult - * the `ContainerStartedEvent` in the operation metadata. - * - * Generated from protobuf field map port_mappings = 8; - * @return \Google\Protobuf\Internal\MapField - */ - public function getPortMappings() - { - return $this->port_mappings; - } - - /** - * A map of containers to host port mappings for this container. If the - * container already specifies exposed ports, use the - * `PUBLISH_EXPOSED_PORTS` flag instead. - * The host port number must be less than 65536. If it is zero, an unused - * random port is assigned. To determine the resulting port number, consult - * the `ContainerStartedEvent` in the operation metadata. - * - * Generated from protobuf field map port_mappings = 8; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setPortMappings($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::INT32, \Google\Protobuf\Internal\GPBType::INT32); - $this->port_mappings = $arr; - - return $this; - } - - /** - * A list of mounts to make available to the action. - * In addition to the values specified here, every action has a special - * virtual disk mounted under `/google` that contains log files and other - * operational components. - *
    - *
  • /google/logs All logs written during the pipeline - * execution.
  • - *
  • /google/logs/output The combined standard output and - * standard error of all actions run as part of the pipeline - * execution.
  • - *
  • /google/logs/action/*/stdout The complete contents of - * each individual action's standard output.
  • - *
  • /google/logs/action/*/stderr The complete contents of - * each individual action's standard error output.
  • - *
- * - * Generated from protobuf field repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMounts() - { - return $this->mounts; - } - - /** - * A list of mounts to make available to the action. - * In addition to the values specified here, every action has a special - * virtual disk mounted under `/google` that contains log files and other - * operational components. - *
    - *
  • /google/logs All logs written during the pipeline - * execution.
  • - *
  • /google/logs/output The combined standard output and - * standard error of all actions run as part of the pipeline - * execution.
  • - *
  • /google/logs/action/*/stdout The complete contents of - * each individual action's standard output.
  • - *
  • /google/logs/action/*/stderr The complete contents of - * each individual action's standard error output.
  • - *
- * - * Generated from protobuf field repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; - * @param array<\Google\Cloud\LifeSciences\V2beta\Mount>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\LifeSciences\V2beta\Mount::class); - $this->mounts = $arr; - - return $this; - } - - /** - * Labels to associate with the action. This field is provided to assist - * workflow engine authors in identifying actions (for example, to indicate - * what sort of action they perform, such as localization or debugging). - * They are returned in the operation metadata, but are otherwise ignored. - * - * Generated from protobuf field map labels = 10; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels to associate with the action. This field is provided to assist - * workflow engine authors in identifying actions (for example, to indicate - * what sort of action they perform, such as localization or debugging). - * They are returned in the operation metadata, but are otherwise ignored. - * - * 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; - } - - /** - * If the specified image is hosted on a private registry other than Google - * Container Registry, the credentials required to pull the image must be - * specified here as an encrypted secret. - * The secret must decrypt to a JSON-encoded dictionary containing both - * `username` and `password` keys. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.Secret credentials = 11; - * @return \Google\Cloud\LifeSciences\V2beta\Secret|null - */ - public function getCredentials() - { - return $this->credentials; - } - - public function hasCredentials() - { - return isset($this->credentials); - } - - public function clearCredentials() - { - unset($this->credentials); - } - - /** - * If the specified image is hosted on a private registry other than Google - * Container Registry, the credentials required to pull the image must be - * specified here as an encrypted secret. - * The secret must decrypt to a JSON-encoded dictionary containing both - * `username` and `password` keys. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.Secret credentials = 11; - * @param \Google\Cloud\LifeSciences\V2beta\Secret $var - * @return $this - */ - public function setCredentials($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\LifeSciences\V2beta\Secret::class); - $this->credentials = $var; - - return $this; - } - - /** - * The maximum amount of time to give the action to complete. If the action - * fails to complete before the timeout, it will be terminated and the exit - * status will be non-zero. The pipeline will continue or terminate based - * on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS` flags. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 12; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeout() - { - return $this->timeout; - } - - public function hasTimeout() - { - return isset($this->timeout); - } - - public function clearTimeout() - { - unset($this->timeout); - } - - /** - * The maximum amount of time to give the action to complete. If the action - * fails to complete before the timeout, it will be terminated and the exit - * status will be non-zero. The pipeline will continue or terminate based - * on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS` flags. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 12; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timeout = $var; - - return $this; - } - - /** - * Normally, a non-zero exit status causes the pipeline to fail. This flag - * allows execution of other actions to continue instead. - * - * Generated from protobuf field bool ignore_exit_status = 13; - * @return bool - */ - public function getIgnoreExitStatus() - { - return $this->ignore_exit_status; - } - - /** - * Normally, a non-zero exit status causes the pipeline to fail. This flag - * allows execution of other actions to continue instead. - * - * Generated from protobuf field bool ignore_exit_status = 13; - * @param bool $var - * @return $this - */ - public function setIgnoreExitStatus($var) - { - GPBUtil::checkBool($var); - $this->ignore_exit_status = $var; - - return $this; - } - - /** - * This flag allows an action to continue running in the background while - * executing subsequent actions. This is useful to provide services to - * other actions (or to provide debugging support tools like SSH servers). - * - * Generated from protobuf field bool run_in_background = 14; - * @return bool - */ - public function getRunInBackground() - { - return $this->run_in_background; - } - - /** - * This flag allows an action to continue running in the background while - * executing subsequent actions. This is useful to provide services to - * other actions (or to provide debugging support tools like SSH servers). - * - * Generated from protobuf field bool run_in_background = 14; - * @param bool $var - * @return $this - */ - public function setRunInBackground($var) - { - GPBUtil::checkBool($var); - $this->run_in_background = $var; - - return $this; - } - - /** - * By default, after an action fails, no further actions are run. This flag - * indicates that this action must be run even if the pipeline has already - * failed. This is useful for actions that copy output files off of the VM - * or for debugging. Note that no actions will be run if image prefetching - * fails. - * - * Generated from protobuf field bool always_run = 15; - * @return bool - */ - public function getAlwaysRun() - { - return $this->always_run; - } - - /** - * By default, after an action fails, no further actions are run. This flag - * indicates that this action must be run even if the pipeline has already - * failed. This is useful for actions that copy output files off of the VM - * or for debugging. Note that no actions will be run if image prefetching - * fails. - * - * Generated from protobuf field bool always_run = 15; - * @param bool $var - * @return $this - */ - public function setAlwaysRun($var) - { - GPBUtil::checkBool($var); - $this->always_run = $var; - - return $this; - } - - /** - * Enable access to the FUSE device for this action. Filesystems can then - * be mounted into disks shared with other actions. The other actions do - * not need the `enable_fuse` flag to access the mounted filesystem. - * This has the effect of causing the container to be executed with - * `CAP_SYS_ADMIN` and exposes `/dev/fuse` to the container, so use it only - * for containers you trust. - * - * Generated from protobuf field bool enable_fuse = 16; - * @return bool - */ - public function getEnableFuse() - { - return $this->enable_fuse; - } - - /** - * Enable access to the FUSE device for this action. Filesystems can then - * be mounted into disks shared with other actions. The other actions do - * not need the `enable_fuse` flag to access the mounted filesystem. - * This has the effect of causing the container to be executed with - * `CAP_SYS_ADMIN` and exposes `/dev/fuse` to the container, so use it only - * for containers you trust. - * - * Generated from protobuf field bool enable_fuse = 16; - * @param bool $var - * @return $this - */ - public function setEnableFuse($var) - { - GPBUtil::checkBool($var); - $this->enable_fuse = $var; - - return $this; - } - - /** - * Exposes all ports specified by `EXPOSE` statements in the container. To - * discover the host side port numbers, consult the `ACTION_STARTED` event - * in the operation metadata. - * - * Generated from protobuf field bool publish_exposed_ports = 17; - * @return bool - */ - public function getPublishExposedPorts() - { - return $this->publish_exposed_ports; - } - - /** - * Exposes all ports specified by `EXPOSE` statements in the container. To - * discover the host side port numbers, consult the `ACTION_STARTED` event - * in the operation metadata. - * - * Generated from protobuf field bool publish_exposed_ports = 17; - * @param bool $var - * @return $this - */ - public function setPublishExposedPorts($var) - { - GPBUtil::checkBool($var); - $this->publish_exposed_ports = $var; - - return $this; - } - - /** - * All container images are typically downloaded before any actions are - * executed. This helps prevent typos in URIs or issues like lack of disk - * space from wasting large amounts of compute resources. - * If set, this flag prevents the worker from downloading the image until - * just before the action is executed. - * - * Generated from protobuf field bool disable_image_prefetch = 18; - * @return bool - */ - public function getDisableImagePrefetch() - { - return $this->disable_image_prefetch; - } - - /** - * All container images are typically downloaded before any actions are - * executed. This helps prevent typos in URIs or issues like lack of disk - * space from wasting large amounts of compute resources. - * If set, this flag prevents the worker from downloading the image until - * just before the action is executed. - * - * Generated from protobuf field bool disable_image_prefetch = 18; - * @param bool $var - * @return $this - */ - public function setDisableImagePrefetch($var) - { - GPBUtil::checkBool($var); - $this->disable_image_prefetch = $var; - - return $this; - } - - /** - * A small portion of the container's standard error stream is typically - * captured and returned inside the `ContainerStoppedEvent`. Setting this - * flag disables this functionality. - * - * Generated from protobuf field bool disable_standard_error_capture = 19; - * @return bool - */ - public function getDisableStandardErrorCapture() - { - return $this->disable_standard_error_capture; - } - - /** - * A small portion of the container's standard error stream is typically - * captured and returned inside the `ContainerStoppedEvent`. Setting this - * flag disables this functionality. - * - * Generated from protobuf field bool disable_standard_error_capture = 19; - * @param bool $var - * @return $this - */ - public function setDisableStandardErrorCapture($var) - { - GPBUtil::checkBool($var); - $this->disable_standard_error_capture = $var; - - return $this; - } - - /** - * Prevents the container from accessing the external network. - * - * Generated from protobuf field bool block_external_network = 20; - * @return bool - */ - public function getBlockExternalNetwork() - { - return $this->block_external_network; - } - - /** - * Prevents the container from accessing the external network. - * - * Generated from protobuf field bool block_external_network = 20; - * @param bool $var - * @return $this - */ - public function setBlockExternalNetwork($var) - { - GPBUtil::checkBool($var); - $this->block_external_network = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/ContainerKilledEvent.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/ContainerKilledEvent.php deleted file mode 100644 index cbaa3430b815..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/ContainerKilledEvent.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.lifesciences.v2beta.ContainerKilledEvent - */ -class ContainerKilledEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The numeric ID of the action that started the container. - * - * Generated from protobuf field int32 action_id = 1; - */ - protected $action_id = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $action_id - * The numeric ID of the action that started the container. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * The numeric ID of the action that started the container. - * - * Generated from protobuf field int32 action_id = 1; - * @return int - */ - public function getActionId() - { - return $this->action_id; - } - - /** - * The numeric ID of the action that started the container. - * - * Generated from protobuf field int32 action_id = 1; - * @param int $var - * @return $this - */ - public function setActionId($var) - { - GPBUtil::checkInt32($var); - $this->action_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/ContainerStartedEvent.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/ContainerStartedEvent.php deleted file mode 100644 index 9fcce69db437..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/ContainerStartedEvent.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.lifesciences.v2beta.ContainerStartedEvent - */ -class ContainerStartedEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The numeric ID of the action that started this container. - * - * Generated from protobuf field int32 action_id = 1; - */ - protected $action_id = 0; - /** - * The container-to-host port mappings installed for this container. This - * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag - * as well as any specified in the `Action` definition. - * - * Generated from protobuf field map port_mappings = 2; - */ - private $port_mappings; - /** - * The public IP address that can be used to connect to the container. This - * field is only populated when at least one port mapping is present. If the - * instance was created with a private address, this field will be empty even - * if port mappings exist. - * - * Generated from protobuf field string ip_address = 3; - */ - protected $ip_address = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $action_id - * The numeric ID of the action that started this container. - * @type array|\Google\Protobuf\Internal\MapField $port_mappings - * The container-to-host port mappings installed for this container. This - * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag - * as well as any specified in the `Action` definition. - * @type string $ip_address - * The public IP address that can be used to connect to the container. This - * field is only populated when at least one port mapping is present. If the - * instance was created with a private address, this field will be empty even - * if port mappings exist. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * The numeric ID of the action that started this container. - * - * Generated from protobuf field int32 action_id = 1; - * @return int - */ - public function getActionId() - { - return $this->action_id; - } - - /** - * The numeric ID of the action that started this container. - * - * Generated from protobuf field int32 action_id = 1; - * @param int $var - * @return $this - */ - public function setActionId($var) - { - GPBUtil::checkInt32($var); - $this->action_id = $var; - - return $this; - } - - /** - * The container-to-host port mappings installed for this container. This - * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag - * as well as any specified in the `Action` definition. - * - * Generated from protobuf field map port_mappings = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getPortMappings() - { - return $this->port_mappings; - } - - /** - * The container-to-host port mappings installed for this container. This - * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag - * as well as any specified in the `Action` definition. - * - * Generated from protobuf field map port_mappings = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setPortMappings($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::INT32, \Google\Protobuf\Internal\GPBType::INT32); - $this->port_mappings = $arr; - - return $this; - } - - /** - * The public IP address that can be used to connect to the container. This - * field is only populated when at least one port mapping is present. If the - * instance was created with a private address, this field will be empty even - * if port mappings exist. - * - * Generated from protobuf field string ip_address = 3; - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * The public IP address that can be used to connect to the container. This - * field is only populated when at least one port mapping is present. If the - * instance was created with a private address, this field will be empty even - * if port mappings exist. - * - * Generated from protobuf field string ip_address = 3; - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/ContainerStoppedEvent.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/ContainerStoppedEvent.php deleted file mode 100644 index faf44a387a52..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/ContainerStoppedEvent.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.lifesciences.v2beta.ContainerStoppedEvent - */ -class ContainerStoppedEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The numeric ID of the action that started this container. - * - * Generated from protobuf field int32 action_id = 1; - */ - protected $action_id = 0; - /** - * The exit status of the container. - * - * Generated from protobuf field int32 exit_status = 2; - */ - protected $exit_status = 0; - /** - * The tail end of any content written to standard error by the container. - * If the content emits large amounts of debugging noise or contains - * sensitive information, you can prevent the content from being printed by - * setting the `DISABLE_STANDARD_ERROR_CAPTURE` flag. - * Note that only a small amount of the end of the stream is captured here. - * The entire stream is stored in the `/google/logs` directory mounted into - * each action, and can be copied off the machine as described elsewhere. - * - * Generated from protobuf field string stderr = 3; - */ - protected $stderr = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $action_id - * The numeric ID of the action that started this container. - * @type int $exit_status - * The exit status of the container. - * @type string $stderr - * The tail end of any content written to standard error by the container. - * If the content emits large amounts of debugging noise or contains - * sensitive information, you can prevent the content from being printed by - * setting the `DISABLE_STANDARD_ERROR_CAPTURE` flag. - * Note that only a small amount of the end of the stream is captured here. - * The entire stream is stored in the `/google/logs` directory mounted into - * each action, and can be copied off the machine as described elsewhere. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * The numeric ID of the action that started this container. - * - * Generated from protobuf field int32 action_id = 1; - * @return int - */ - public function getActionId() - { - return $this->action_id; - } - - /** - * The numeric ID of the action that started this container. - * - * Generated from protobuf field int32 action_id = 1; - * @param int $var - * @return $this - */ - public function setActionId($var) - { - GPBUtil::checkInt32($var); - $this->action_id = $var; - - return $this; - } - - /** - * The exit status of the container. - * - * Generated from protobuf field int32 exit_status = 2; - * @return int - */ - public function getExitStatus() - { - return $this->exit_status; - } - - /** - * The exit status of the container. - * - * Generated from protobuf field int32 exit_status = 2; - * @param int $var - * @return $this - */ - public function setExitStatus($var) - { - GPBUtil::checkInt32($var); - $this->exit_status = $var; - - return $this; - } - - /** - * The tail end of any content written to standard error by the container. - * If the content emits large amounts of debugging noise or contains - * sensitive information, you can prevent the content from being printed by - * setting the `DISABLE_STANDARD_ERROR_CAPTURE` flag. - * Note that only a small amount of the end of the stream is captured here. - * The entire stream is stored in the `/google/logs` directory mounted into - * each action, and can be copied off the machine as described elsewhere. - * - * Generated from protobuf field string stderr = 3; - * @return string - */ - public function getStderr() - { - return $this->stderr; - } - - /** - * The tail end of any content written to standard error by the container. - * If the content emits large amounts of debugging noise or contains - * sensitive information, you can prevent the content from being printed by - * setting the `DISABLE_STANDARD_ERROR_CAPTURE` flag. - * Note that only a small amount of the end of the stream is captured here. - * The entire stream is stored in the `/google/logs` directory mounted into - * each action, and can be copied off the machine as described elsewhere. - * - * Generated from protobuf field string stderr = 3; - * @param string $var - * @return $this - */ - public function setStderr($var) - { - GPBUtil::checkString($var, True); - $this->stderr = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/DelayedEvent.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/DelayedEvent.php deleted file mode 100644 index 48021f37b2c7..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/DelayedEvent.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.lifesciences.v2beta.DelayedEvent - */ -class DelayedEvent extends \Google\Protobuf\Internal\Message -{ - /** - * A textual description of the cause of the delay. The string can change - * without notice because it is often generated by another service (such as - * Compute Engine). - * - * Generated from protobuf field string cause = 1; - */ - protected $cause = ''; - /** - * If the delay was caused by a resource shortage, this field lists the - * Compute Engine metrics that are preventing this operation from running - * (for example, `CPUS` or `INSTANCES`). If the particular metric is not - * known, a single `UNKNOWN` metric will be present. - * - * Generated from protobuf field repeated string metrics = 2; - */ - private $metrics; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cause - * A textual description of the cause of the delay. The string can change - * without notice because it is often generated by another service (such as - * Compute Engine). - * @type array|\Google\Protobuf\Internal\RepeatedField $metrics - * If the delay was caused by a resource shortage, this field lists the - * Compute Engine metrics that are preventing this operation from running - * (for example, `CPUS` or `INSTANCES`). If the particular metric is not - * known, a single `UNKNOWN` metric will be present. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * A textual description of the cause of the delay. The string can change - * without notice because it is often generated by another service (such as - * Compute Engine). - * - * Generated from protobuf field string cause = 1; - * @return string - */ - public function getCause() - { - return $this->cause; - } - - /** - * A textual description of the cause of the delay. The string can change - * without notice because it is often generated by another service (such as - * Compute Engine). - * - * Generated from protobuf field string cause = 1; - * @param string $var - * @return $this - */ - public function setCause($var) - { - GPBUtil::checkString($var, True); - $this->cause = $var; - - return $this; - } - - /** - * If the delay was caused by a resource shortage, this field lists the - * Compute Engine metrics that are preventing this operation from running - * (for example, `CPUS` or `INSTANCES`). If the particular metric is not - * known, a single `UNKNOWN` metric will be present. - * - * Generated from protobuf field repeated string metrics = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMetrics() - { - return $this->metrics; - } - - /** - * If the delay was caused by a resource shortage, this field lists the - * Compute Engine metrics that are preventing this operation from running - * (for example, `CPUS` or `INSTANCES`). If the particular metric is not - * known, a single `UNKNOWN` metric will be present. - * - * Generated from protobuf field repeated string metrics = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMetrics($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->metrics = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Disk.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Disk.php deleted file mode 100644 index 9f92bf51df25..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Disk.php +++ /dev/null @@ -1,201 +0,0 @@ -google.cloud.lifesciences.v2beta.Disk - */ -class Disk extends \Google\Protobuf\Internal\Message -{ - /** - * A user-supplied name for the disk. Used when mounting the disk into - * actions. The name must contain only upper and lowercase alphanumeric - * characters and hyphens and cannot start with a hyphen. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The size, in GB, of the disk to attach. If the size is not - * specified, a default is chosen to ensure reasonable I/O performance. - * If the disk type is specified as `local-ssd`, multiple local drives are - * automatically combined to provide the requested size. Note, however, that - * each physical SSD is 375GB in size, and no more than 8 drives can be - * attached to a single instance. - * - * Generated from protobuf field int32 size_gb = 2; - */ - protected $size_gb = 0; - /** - * The Compute Engine disk type. If unspecified, `pd-standard` is used. - * - * Generated from protobuf field string type = 3; - */ - protected $type = ''; - /** - * An optional image to put on the disk before attaching it to the VM. - * - * Generated from protobuf field string source_image = 4; - */ - protected $source_image = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * A user-supplied name for the disk. Used when mounting the disk into - * actions. The name must contain only upper and lowercase alphanumeric - * characters and hyphens and cannot start with a hyphen. - * @type int $size_gb - * The size, in GB, of the disk to attach. If the size is not - * specified, a default is chosen to ensure reasonable I/O performance. - * If the disk type is specified as `local-ssd`, multiple local drives are - * automatically combined to provide the requested size. Note, however, that - * each physical SSD is 375GB in size, and no more than 8 drives can be - * attached to a single instance. - * @type string $type - * The Compute Engine disk type. If unspecified, `pd-standard` is used. - * @type string $source_image - * An optional image to put on the disk before attaching it to the VM. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * A user-supplied name for the disk. Used when mounting the disk into - * actions. The name must contain only upper and lowercase alphanumeric - * characters and hyphens and cannot start with a hyphen. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * A user-supplied name for the disk. Used when mounting the disk into - * actions. The name must contain only upper and lowercase alphanumeric - * characters and hyphens and cannot start with a hyphen. - * - * 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 size, in GB, of the disk to attach. If the size is not - * specified, a default is chosen to ensure reasonable I/O performance. - * If the disk type is specified as `local-ssd`, multiple local drives are - * automatically combined to provide the requested size. Note, however, that - * each physical SSD is 375GB in size, and no more than 8 drives can be - * attached to a single instance. - * - * Generated from protobuf field int32 size_gb = 2; - * @return int - */ - public function getSizeGb() - { - return $this->size_gb; - } - - /** - * The size, in GB, of the disk to attach. If the size is not - * specified, a default is chosen to ensure reasonable I/O performance. - * If the disk type is specified as `local-ssd`, multiple local drives are - * automatically combined to provide the requested size. Note, however, that - * each physical SSD is 375GB in size, and no more than 8 drives can be - * attached to a single instance. - * - * Generated from protobuf field int32 size_gb = 2; - * @param int $var - * @return $this - */ - public function setSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->size_gb = $var; - - return $this; - } - - /** - * The Compute Engine disk type. If unspecified, `pd-standard` is used. - * - * Generated from protobuf field string type = 3; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The Compute Engine disk type. If unspecified, `pd-standard` is used. - * - * Generated from protobuf field string type = 3; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * An optional image to put on the disk before attaching it to the VM. - * - * Generated from protobuf field string source_image = 4; - * @return string - */ - public function getSourceImage() - { - return $this->source_image; - } - - /** - * An optional image to put on the disk before attaching it to the VM. - * - * Generated from protobuf field string source_image = 4; - * @param string $var - * @return $this - */ - public function setSourceImage($var) - { - GPBUtil::checkString($var, True); - $this->source_image = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Event.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Event.php deleted file mode 100644 index 3fd47e78473f..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Event.php +++ /dev/null @@ -1,488 +0,0 @@ -google.cloud.lifesciences.v2beta.Event - */ -class Event extends \Google\Protobuf\Internal\Message -{ - /** - * The time at which the event occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp timestamp = 1; - */ - protected $timestamp = null; - /** - * A human-readable description of the event. Note that these strings can - * change at any time without notice. Any application logic must use the - * information in the `details` field. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - protected $details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $timestamp - * The time at which the event occurred. - * @type string $description - * A human-readable description of the event. Note that these strings can - * change at any time without notice. Any application logic must use the - * information in the `details` field. - * @type \Google\Cloud\LifeSciences\V2beta\DelayedEvent $delayed - * See - * [google.cloud.lifesciences.v2beta.DelayedEvent][google.cloud.lifesciences.v2beta.DelayedEvent]. - * @type \Google\Cloud\LifeSciences\V2beta\WorkerAssignedEvent $worker_assigned - * See - * [google.cloud.lifesciences.v2beta.WorkerAssignedEvent][google.cloud.lifesciences.v2beta.WorkerAssignedEvent]. - * @type \Google\Cloud\LifeSciences\V2beta\WorkerReleasedEvent $worker_released - * See - * [google.cloud.lifesciences.v2beta.WorkerReleasedEvent][google.cloud.lifesciences.v2beta.WorkerReleasedEvent]. - * @type \Google\Cloud\LifeSciences\V2beta\PullStartedEvent $pull_started - * See - * [google.cloud.lifesciences.v2beta.PullStartedEvent][google.cloud.lifesciences.v2beta.PullStartedEvent]. - * @type \Google\Cloud\LifeSciences\V2beta\PullStoppedEvent $pull_stopped - * See - * [google.cloud.lifesciences.v2beta.PullStoppedEvent][google.cloud.lifesciences.v2beta.PullStoppedEvent]. - * @type \Google\Cloud\LifeSciences\V2beta\ContainerStartedEvent $container_started - * See - * [google.cloud.lifesciences.v2beta.ContainerStartedEvent][google.cloud.lifesciences.v2beta.ContainerStartedEvent]. - * @type \Google\Cloud\LifeSciences\V2beta\ContainerStoppedEvent $container_stopped - * See - * [google.cloud.lifesciences.v2beta.ContainerStoppedEvent][google.cloud.lifesciences.v2beta.ContainerStoppedEvent]. - * @type \Google\Cloud\LifeSciences\V2beta\ContainerKilledEvent $container_killed - * See - * [google.cloud.lifesciences.v2beta.ContainerKilledEvent][google.cloud.lifesciences.v2beta.ContainerKilledEvent]. - * @type \Google\Cloud\LifeSciences\V2beta\UnexpectedExitStatusEvent $unexpected_exit_status - * See - * [google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent][google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent]. - * @type \Google\Cloud\LifeSciences\V2beta\FailedEvent $failed - * See - * [google.cloud.lifesciences.v2beta.FailedEvent][google.cloud.lifesciences.v2beta.FailedEvent]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * The time at which the event occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp timestamp = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTimestamp() - { - return $this->timestamp; - } - - public function hasTimestamp() - { - return isset($this->timestamp); - } - - public function clearTimestamp() - { - unset($this->timestamp); - } - - /** - * The time at which the event occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp timestamp = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTimestamp($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->timestamp = $var; - - return $this; - } - - /** - * A human-readable description of the event. Note that these strings can - * change at any time without notice. Any application logic must use the - * information in the `details` field. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A human-readable description of the event. Note that these strings can - * change at any time without notice. Any application logic must use the - * information in the `details` field. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * See - * [google.cloud.lifesciences.v2beta.DelayedEvent][google.cloud.lifesciences.v2beta.DelayedEvent]. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.DelayedEvent delayed = 17; - * @return \Google\Cloud\LifeSciences\V2beta\DelayedEvent|null - */ - public function getDelayed() - { - return $this->readOneof(17); - } - - public function hasDelayed() - { - return $this->hasOneof(17); - } - - /** - * See - * [google.cloud.lifesciences.v2beta.DelayedEvent][google.cloud.lifesciences.v2beta.DelayedEvent]. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.DelayedEvent delayed = 17; - * @param \Google\Cloud\LifeSciences\V2beta\DelayedEvent $var - * @return $this - */ - public function setDelayed($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\LifeSciences\V2beta\DelayedEvent::class); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * See - * [google.cloud.lifesciences.v2beta.WorkerAssignedEvent][google.cloud.lifesciences.v2beta.WorkerAssignedEvent]. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.WorkerAssignedEvent worker_assigned = 18; - * @return \Google\Cloud\LifeSciences\V2beta\WorkerAssignedEvent|null - */ - public function getWorkerAssigned() - { - return $this->readOneof(18); - } - - public function hasWorkerAssigned() - { - return $this->hasOneof(18); - } - - /** - * See - * [google.cloud.lifesciences.v2beta.WorkerAssignedEvent][google.cloud.lifesciences.v2beta.WorkerAssignedEvent]. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.WorkerAssignedEvent worker_assigned = 18; - * @param \Google\Cloud\LifeSciences\V2beta\WorkerAssignedEvent $var - * @return $this - */ - public function setWorkerAssigned($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\LifeSciences\V2beta\WorkerAssignedEvent::class); - $this->writeOneof(18, $var); - - return $this; - } - - /** - * See - * [google.cloud.lifesciences.v2beta.WorkerReleasedEvent][google.cloud.lifesciences.v2beta.WorkerReleasedEvent]. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.WorkerReleasedEvent worker_released = 19; - * @return \Google\Cloud\LifeSciences\V2beta\WorkerReleasedEvent|null - */ - public function getWorkerReleased() - { - return $this->readOneof(19); - } - - public function hasWorkerReleased() - { - return $this->hasOneof(19); - } - - /** - * See - * [google.cloud.lifesciences.v2beta.WorkerReleasedEvent][google.cloud.lifesciences.v2beta.WorkerReleasedEvent]. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.WorkerReleasedEvent worker_released = 19; - * @param \Google\Cloud\LifeSciences\V2beta\WorkerReleasedEvent $var - * @return $this - */ - public function setWorkerReleased($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\LifeSciences\V2beta\WorkerReleasedEvent::class); - $this->writeOneof(19, $var); - - return $this; - } - - /** - * See - * [google.cloud.lifesciences.v2beta.PullStartedEvent][google.cloud.lifesciences.v2beta.PullStartedEvent]. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.PullStartedEvent pull_started = 20; - * @return \Google\Cloud\LifeSciences\V2beta\PullStartedEvent|null - */ - public function getPullStarted() - { - return $this->readOneof(20); - } - - public function hasPullStarted() - { - return $this->hasOneof(20); - } - - /** - * See - * [google.cloud.lifesciences.v2beta.PullStartedEvent][google.cloud.lifesciences.v2beta.PullStartedEvent]. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.PullStartedEvent pull_started = 20; - * @param \Google\Cloud\LifeSciences\V2beta\PullStartedEvent $var - * @return $this - */ - public function setPullStarted($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\LifeSciences\V2beta\PullStartedEvent::class); - $this->writeOneof(20, $var); - - return $this; - } - - /** - * See - * [google.cloud.lifesciences.v2beta.PullStoppedEvent][google.cloud.lifesciences.v2beta.PullStoppedEvent]. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.PullStoppedEvent pull_stopped = 21; - * @return \Google\Cloud\LifeSciences\V2beta\PullStoppedEvent|null - */ - public function getPullStopped() - { - return $this->readOneof(21); - } - - public function hasPullStopped() - { - return $this->hasOneof(21); - } - - /** - * See - * [google.cloud.lifesciences.v2beta.PullStoppedEvent][google.cloud.lifesciences.v2beta.PullStoppedEvent]. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.PullStoppedEvent pull_stopped = 21; - * @param \Google\Cloud\LifeSciences\V2beta\PullStoppedEvent $var - * @return $this - */ - public function setPullStopped($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\LifeSciences\V2beta\PullStoppedEvent::class); - $this->writeOneof(21, $var); - - return $this; - } - - /** - * See - * [google.cloud.lifesciences.v2beta.ContainerStartedEvent][google.cloud.lifesciences.v2beta.ContainerStartedEvent]. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.ContainerStartedEvent container_started = 22; - * @return \Google\Cloud\LifeSciences\V2beta\ContainerStartedEvent|null - */ - public function getContainerStarted() - { - return $this->readOneof(22); - } - - public function hasContainerStarted() - { - return $this->hasOneof(22); - } - - /** - * See - * [google.cloud.lifesciences.v2beta.ContainerStartedEvent][google.cloud.lifesciences.v2beta.ContainerStartedEvent]. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.ContainerStartedEvent container_started = 22; - * @param \Google\Cloud\LifeSciences\V2beta\ContainerStartedEvent $var - * @return $this - */ - public function setContainerStarted($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\LifeSciences\V2beta\ContainerStartedEvent::class); - $this->writeOneof(22, $var); - - return $this; - } - - /** - * See - * [google.cloud.lifesciences.v2beta.ContainerStoppedEvent][google.cloud.lifesciences.v2beta.ContainerStoppedEvent]. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.ContainerStoppedEvent container_stopped = 23; - * @return \Google\Cloud\LifeSciences\V2beta\ContainerStoppedEvent|null - */ - public function getContainerStopped() - { - return $this->readOneof(23); - } - - public function hasContainerStopped() - { - return $this->hasOneof(23); - } - - /** - * See - * [google.cloud.lifesciences.v2beta.ContainerStoppedEvent][google.cloud.lifesciences.v2beta.ContainerStoppedEvent]. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.ContainerStoppedEvent container_stopped = 23; - * @param \Google\Cloud\LifeSciences\V2beta\ContainerStoppedEvent $var - * @return $this - */ - public function setContainerStopped($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\LifeSciences\V2beta\ContainerStoppedEvent::class); - $this->writeOneof(23, $var); - - return $this; - } - - /** - * See - * [google.cloud.lifesciences.v2beta.ContainerKilledEvent][google.cloud.lifesciences.v2beta.ContainerKilledEvent]. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.ContainerKilledEvent container_killed = 24; - * @return \Google\Cloud\LifeSciences\V2beta\ContainerKilledEvent|null - */ - public function getContainerKilled() - { - return $this->readOneof(24); - } - - public function hasContainerKilled() - { - return $this->hasOneof(24); - } - - /** - * See - * [google.cloud.lifesciences.v2beta.ContainerKilledEvent][google.cloud.lifesciences.v2beta.ContainerKilledEvent]. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.ContainerKilledEvent container_killed = 24; - * @param \Google\Cloud\LifeSciences\V2beta\ContainerKilledEvent $var - * @return $this - */ - public function setContainerKilled($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\LifeSciences\V2beta\ContainerKilledEvent::class); - $this->writeOneof(24, $var); - - return $this; - } - - /** - * See - * [google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent][google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent]. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent unexpected_exit_status = 25; - * @return \Google\Cloud\LifeSciences\V2beta\UnexpectedExitStatusEvent|null - */ - public function getUnexpectedExitStatus() - { - return $this->readOneof(25); - } - - public function hasUnexpectedExitStatus() - { - return $this->hasOneof(25); - } - - /** - * See - * [google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent][google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent]. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent unexpected_exit_status = 25; - * @param \Google\Cloud\LifeSciences\V2beta\UnexpectedExitStatusEvent $var - * @return $this - */ - public function setUnexpectedExitStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\LifeSciences\V2beta\UnexpectedExitStatusEvent::class); - $this->writeOneof(25, $var); - - return $this; - } - - /** - * See - * [google.cloud.lifesciences.v2beta.FailedEvent][google.cloud.lifesciences.v2beta.FailedEvent]. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.FailedEvent failed = 26; - * @return \Google\Cloud\LifeSciences\V2beta\FailedEvent|null - */ - public function getFailed() - { - return $this->readOneof(26); - } - - public function hasFailed() - { - return $this->hasOneof(26); - } - - /** - * See - * [google.cloud.lifesciences.v2beta.FailedEvent][google.cloud.lifesciences.v2beta.FailedEvent]. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.FailedEvent failed = 26; - * @param \Google\Cloud\LifeSciences\V2beta\FailedEvent $var - * @return $this - */ - public function setFailed($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\LifeSciences\V2beta\FailedEvent::class); - $this->writeOneof(26, $var); - - return $this; - } - - /** - * @return string - */ - public function getDetails() - { - return $this->whichOneof("details"); - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/ExistingDisk.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/ExistingDisk.php deleted file mode 100644 index 31e65479b79b..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/ExistingDisk.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.lifesciences.v2beta.ExistingDisk - */ -class ExistingDisk extends \Google\Protobuf\Internal\Message -{ - /** - * If `disk` contains slashes, the Cloud Life Sciences API assumes that it is - * a complete URL for the disk. If `disk` does not contain slashes, the Cloud - * Life Sciences API assumes that the disk is a zonal disk and a URL will be - * generated of the form `zones//disks/`, where `` is the - * zone in which the instance is allocated. The disk must be ext4 formatted. - * If all `Mount` references to this disk have the `read_only` flag set to - * true, the disk will be attached in `read-only` mode and can be shared with - * other instances. Otherwise, the disk will be available for writing but - * cannot be shared. - * - * Generated from protobuf field string disk = 1; - */ - protected $disk = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $disk - * If `disk` contains slashes, the Cloud Life Sciences API assumes that it is - * a complete URL for the disk. If `disk` does not contain slashes, the Cloud - * Life Sciences API assumes that the disk is a zonal disk and a URL will be - * generated of the form `zones//disks/`, where `` is the - * zone in which the instance is allocated. The disk must be ext4 formatted. - * If all `Mount` references to this disk have the `read_only` flag set to - * true, the disk will be attached in `read-only` mode and can be shared with - * other instances. Otherwise, the disk will be available for writing but - * cannot be shared. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * If `disk` contains slashes, the Cloud Life Sciences API assumes that it is - * a complete URL for the disk. If `disk` does not contain slashes, the Cloud - * Life Sciences API assumes that the disk is a zonal disk and a URL will be - * generated of the form `zones//disks/`, where `` is the - * zone in which the instance is allocated. The disk must be ext4 formatted. - * If all `Mount` references to this disk have the `read_only` flag set to - * true, the disk will be attached in `read-only` mode and can be shared with - * other instances. Otherwise, the disk will be available for writing but - * cannot be shared. - * - * Generated from protobuf field string disk = 1; - * @return string - */ - public function getDisk() - { - return $this->disk; - } - - /** - * If `disk` contains slashes, the Cloud Life Sciences API assumes that it is - * a complete URL for the disk. If `disk` does not contain slashes, the Cloud - * Life Sciences API assumes that the disk is a zonal disk and a URL will be - * generated of the form `zones//disks/`, where `` is the - * zone in which the instance is allocated. The disk must be ext4 formatted. - * If all `Mount` references to this disk have the `read_only` flag set to - * true, the disk will be attached in `read-only` mode and can be shared with - * other instances. Otherwise, the disk will be available for writing but - * cannot be shared. - * - * Generated from protobuf field string disk = 1; - * @param string $var - * @return $this - */ - public function setDisk($var) - { - GPBUtil::checkString($var, True); - $this->disk = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/FailedEvent.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/FailedEvent.php deleted file mode 100644 index c92baa2e6650..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/FailedEvent.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.lifesciences.v2beta.FailedEvent - */ -class FailedEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The Google standard error code that best describes this failure. - * - * Generated from protobuf field .google.rpc.Code code = 1; - */ - protected $code = 0; - /** - * The human-readable description of the cause of the failure. - * - * Generated from protobuf field string cause = 2; - */ - protected $cause = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * The Google standard error code that best describes this failure. - * @type string $cause - * The human-readable description of the cause of the failure. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * The Google standard error code that best describes this failure. - * - * Generated from protobuf field .google.rpc.Code code = 1; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * The Google standard error code that best describes this failure. - * - * Generated from protobuf field .google.rpc.Code code = 1; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Rpc\Code::class); - $this->code = $var; - - return $this; - } - - /** - * The human-readable description of the cause of the failure. - * - * Generated from protobuf field string cause = 2; - * @return string - */ - public function getCause() - { - return $this->cause; - } - - /** - * The human-readable description of the cause of the failure. - * - * Generated from protobuf field string cause = 2; - * @param string $var - * @return $this - */ - public function setCause($var) - { - GPBUtil::checkString($var, True); - $this->cause = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Metadata.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Metadata.php deleted file mode 100644 index a06a77dc22d2..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Metadata.php +++ /dev/null @@ -1,320 +0,0 @@ -google.cloud.lifesciences.v2beta.Metadata - */ -class Metadata extends \Google\Protobuf\Internal\Message -{ - /** - * The pipeline this operation represents. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1; - */ - protected $pipeline = null; - /** - * The user-defined labels associated with this operation. - * - * Generated from protobuf field map labels = 2; - */ - private $labels; - /** - * The list of events that have happened so far during the execution of this - * operation. - * - * Generated from protobuf field repeated .google.cloud.lifesciences.v2beta.Event events = 3; - */ - private $events; - /** - * The time at which the operation was created by the API. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; - */ - protected $create_time = null; - /** - * The first time at which resources were allocated to execute the pipeline. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; - */ - protected $start_time = null; - /** - * The time at which execution was completed and resources were cleaned up. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; - */ - protected $end_time = null; - /** - * The name of the Cloud Pub/Sub topic where notifications of operation status - * changes are sent. - * - * Generated from protobuf field string pub_sub_topic = 7; - */ - protected $pub_sub_topic = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\LifeSciences\V2beta\Pipeline $pipeline - * The pipeline this operation represents. - * @type array|\Google\Protobuf\Internal\MapField $labels - * The user-defined labels associated with this operation. - * @type array<\Google\Cloud\LifeSciences\V2beta\Event>|\Google\Protobuf\Internal\RepeatedField $events - * The list of events that have happened so far during the execution of this - * operation. - * @type \Google\Protobuf\Timestamp $create_time - * The time at which the operation was created by the API. - * @type \Google\Protobuf\Timestamp $start_time - * The first time at which resources were allocated to execute the pipeline. - * @type \Google\Protobuf\Timestamp $end_time - * The time at which execution was completed and resources were cleaned up. - * @type string $pub_sub_topic - * The name of the Cloud Pub/Sub topic where notifications of operation status - * changes are sent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * The pipeline this operation represents. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1; - * @return \Google\Cloud\LifeSciences\V2beta\Pipeline|null - */ - public function getPipeline() - { - return $this->pipeline; - } - - public function hasPipeline() - { - return isset($this->pipeline); - } - - public function clearPipeline() - { - unset($this->pipeline); - } - - /** - * The pipeline this operation represents. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1; - * @param \Google\Cloud\LifeSciences\V2beta\Pipeline $var - * @return $this - */ - public function setPipeline($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\LifeSciences\V2beta\Pipeline::class); - $this->pipeline = $var; - - return $this; - } - - /** - * The user-defined labels associated with this operation. - * - * Generated from protobuf field map labels = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * The user-defined labels associated with this operation. - * - * Generated from protobuf field map labels = 2; - * @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; - } - - /** - * The list of events that have happened so far during the execution of this - * operation. - * - * Generated from protobuf field repeated .google.cloud.lifesciences.v2beta.Event events = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEvents() - { - return $this->events; - } - - /** - * The list of events that have happened so far during the execution of this - * operation. - * - * Generated from protobuf field repeated .google.cloud.lifesciences.v2beta.Event events = 3; - * @param array<\Google\Cloud\LifeSciences\V2beta\Event>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\LifeSciences\V2beta\Event::class); - $this->events = $arr; - - return $this; - } - - /** - * The time at which the operation was created by the API. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; - * @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); - } - - /** - * The time at which the operation was created by the API. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The first time at which resources were allocated to execute the pipeline. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The first time at which resources were allocated to execute the pipeline. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time at which execution was completed and resources were cleaned up. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time at which execution was completed and resources were cleaned up. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The name of the Cloud Pub/Sub topic where notifications of operation status - * changes are sent. - * - * Generated from protobuf field string pub_sub_topic = 7; - * @return string - */ - public function getPubSubTopic() - { - return $this->pub_sub_topic; - } - - /** - * The name of the Cloud Pub/Sub topic where notifications of operation status - * changes are sent. - * - * Generated from protobuf field string pub_sub_topic = 7; - * @param string $var - * @return $this - */ - public function setPubSubTopic($var) - { - GPBUtil::checkString($var, True); - $this->pub_sub_topic = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Mount.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Mount.php deleted file mode 100644 index 8832f77a319a..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Mount.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.lifesciences.v2beta.Mount - */ -class Mount extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the disk to mount, as specified in the resources section. - * - * Generated from protobuf field string disk = 1; - */ - protected $disk = ''; - /** - * The path to mount the disk inside the container. - * - * Generated from protobuf field string path = 2; - */ - protected $path = ''; - /** - * If true, the disk is mounted read-only inside the container. - * - * Generated from protobuf field bool read_only = 3; - */ - protected $read_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $disk - * The name of the disk to mount, as specified in the resources section. - * @type string $path - * The path to mount the disk inside the container. - * @type bool $read_only - * If true, the disk is mounted read-only inside the container. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * The name of the disk to mount, as specified in the resources section. - * - * Generated from protobuf field string disk = 1; - * @return string - */ - public function getDisk() - { - return $this->disk; - } - - /** - * The name of the disk to mount, as specified in the resources section. - * - * Generated from protobuf field string disk = 1; - * @param string $var - * @return $this - */ - public function setDisk($var) - { - GPBUtil::checkString($var, True); - $this->disk = $var; - - return $this; - } - - /** - * The path to mount the disk inside the container. - * - * Generated from protobuf field string path = 2; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * The path to mount the disk inside the container. - * - * Generated from protobuf field string path = 2; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * If true, the disk is mounted read-only inside the container. - * - * Generated from protobuf field bool read_only = 3; - * @return bool - */ - public function getReadOnly() - { - return $this->read_only; - } - - /** - * If true, the disk is mounted read-only inside the container. - * - * Generated from protobuf field bool read_only = 3; - * @param bool $var - * @return $this - */ - public function setReadOnly($var) - { - GPBUtil::checkBool($var); - $this->read_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/NFSMount.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/NFSMount.php deleted file mode 100644 index 4c3c5cd37013..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/NFSMount.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.lifesciences.v2beta.NFSMount - */ -class NFSMount extends \Google\Protobuf\Internal\Message -{ - /** - * A target NFS mount. The target must be specified as `address:/mount". - * - * Generated from protobuf field string target = 1; - */ - protected $target = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $target - * A target NFS mount. The target must be specified as `address:/mount". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * A target NFS mount. The target must be specified as `address:/mount". - * - * Generated from protobuf field string target = 1; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * A target NFS mount. The target must be specified as `address:/mount". - * - * Generated from protobuf field string target = 1; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Network.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Network.php deleted file mode 100644 index e0663ecc2d38..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Network.php +++ /dev/null @@ -1,187 +0,0 @@ -google.cloud.lifesciences.v2beta.Network - */ -class Network extends \Google\Protobuf\Internal\Message -{ - /** - * The network name to attach the VM's network interface to. The value will - * be prefixed with `global/networks/` unless it contains a `/`, in which - * case it is assumed to be a fully specified network resource URL. - * If unspecified, the global default network is used. - * - * Generated from protobuf field string network = 1; - */ - protected $network = ''; - /** - * If set to true, do not attach a public IP address to the VM. Note that - * without a public IP address, additional configuration is required to - * allow the VM to access Google services. - * See https://cloud.google.com/vpc/docs/configure-private-google-access - * for more information. - * - * Generated from protobuf field bool use_private_address = 2; - */ - protected $use_private_address = false; - /** - * If the specified network is configured for custom subnet creation, the - * name of the subnetwork to attach the instance to must be specified here. - * The value is prefixed with `regions/*/subnetworks/` unless it contains a - * `/`, in which case it is assumed to be a fully specified subnetwork - * resource URL. - * If the `*` character appears in the value, it is replaced with the region - * that the virtual machine has been allocated in. - * - * Generated from protobuf field string subnetwork = 3; - */ - protected $subnetwork = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network - * The network name to attach the VM's network interface to. The value will - * be prefixed with `global/networks/` unless it contains a `/`, in which - * case it is assumed to be a fully specified network resource URL. - * If unspecified, the global default network is used. - * @type bool $use_private_address - * If set to true, do not attach a public IP address to the VM. Note that - * without a public IP address, additional configuration is required to - * allow the VM to access Google services. - * See https://cloud.google.com/vpc/docs/configure-private-google-access - * for more information. - * @type string $subnetwork - * If the specified network is configured for custom subnet creation, the - * name of the subnetwork to attach the instance to must be specified here. - * The value is prefixed with `regions/*/subnetworks/` unless it contains a - * `/`, in which case it is assumed to be a fully specified subnetwork - * resource URL. - * If the `*` character appears in the value, it is replaced with the region - * that the virtual machine has been allocated in. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * The network name to attach the VM's network interface to. The value will - * be prefixed with `global/networks/` unless it contains a `/`, in which - * case it is assumed to be a fully specified network resource URL. - * If unspecified, the global default network is used. - * - * Generated from protobuf field string network = 1; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * The network name to attach the VM's network interface to. The value will - * be prefixed with `global/networks/` unless it contains a `/`, in which - * case it is assumed to be a fully specified network resource URL. - * If unspecified, the global default network is used. - * - * Generated from protobuf field string network = 1; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * If set to true, do not attach a public IP address to the VM. Note that - * without a public IP address, additional configuration is required to - * allow the VM to access Google services. - * See https://cloud.google.com/vpc/docs/configure-private-google-access - * for more information. - * - * Generated from protobuf field bool use_private_address = 2; - * @return bool - */ - public function getUsePrivateAddress() - { - return $this->use_private_address; - } - - /** - * If set to true, do not attach a public IP address to the VM. Note that - * without a public IP address, additional configuration is required to - * allow the VM to access Google services. - * See https://cloud.google.com/vpc/docs/configure-private-google-access - * for more information. - * - * Generated from protobuf field bool use_private_address = 2; - * @param bool $var - * @return $this - */ - public function setUsePrivateAddress($var) - { - GPBUtil::checkBool($var); - $this->use_private_address = $var; - - return $this; - } - - /** - * If the specified network is configured for custom subnet creation, the - * name of the subnetwork to attach the instance to must be specified here. - * The value is prefixed with `regions/*/subnetworks/` unless it contains a - * `/`, in which case it is assumed to be a fully specified subnetwork - * resource URL. - * If the `*` character appears in the value, it is replaced with the region - * that the virtual machine has been allocated in. - * - * Generated from protobuf field string subnetwork = 3; - * @return string - */ - public function getSubnetwork() - { - return $this->subnetwork; - } - - /** - * If the specified network is configured for custom subnet creation, the - * name of the subnetwork to attach the instance to must be specified here. - * The value is prefixed with `regions/*/subnetworks/` unless it contains a - * `/`, in which case it is assumed to be a fully specified subnetwork - * resource URL. - * If the `*` character appears in the value, it is replaced with the region - * that the virtual machine has been allocated in. - * - * Generated from protobuf field string subnetwork = 3; - * @param string $var - * @return $this - */ - public function setSubnetwork($var) - { - GPBUtil::checkString($var, True); - $this->subnetwork = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/PersistentDisk.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/PersistentDisk.php deleted file mode 100644 index 985feaa1b929..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/PersistentDisk.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.lifesciences.v2beta.PersistentDisk - */ -class PersistentDisk extends \Google\Protobuf\Internal\Message -{ - /** - * The size, in GB, of the disk to attach. If the size is not - * specified, a default is chosen to ensure reasonable I/O performance. - * If the disk type is specified as `local-ssd`, multiple local drives are - * automatically combined to provide the requested size. Note, however, that - * each physical SSD is 375GB in size, and no more than 8 drives can be - * attached to a single instance. - * - * Generated from protobuf field int32 size_gb = 1; - */ - protected $size_gb = 0; - /** - * The Compute Engine disk type. If unspecified, `pd-standard` is used. - * - * Generated from protobuf field string type = 2; - */ - protected $type = ''; - /** - * An image to put on the disk before attaching it to the VM. - * - * Generated from protobuf field string source_image = 3; - */ - protected $source_image = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $size_gb - * The size, in GB, of the disk to attach. If the size is not - * specified, a default is chosen to ensure reasonable I/O performance. - * If the disk type is specified as `local-ssd`, multiple local drives are - * automatically combined to provide the requested size. Note, however, that - * each physical SSD is 375GB in size, and no more than 8 drives can be - * attached to a single instance. - * @type string $type - * The Compute Engine disk type. If unspecified, `pd-standard` is used. - * @type string $source_image - * An image to put on the disk before attaching it to the VM. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * The size, in GB, of the disk to attach. If the size is not - * specified, a default is chosen to ensure reasonable I/O performance. - * If the disk type is specified as `local-ssd`, multiple local drives are - * automatically combined to provide the requested size. Note, however, that - * each physical SSD is 375GB in size, and no more than 8 drives can be - * attached to a single instance. - * - * Generated from protobuf field int32 size_gb = 1; - * @return int - */ - public function getSizeGb() - { - return $this->size_gb; - } - - /** - * The size, in GB, of the disk to attach. If the size is not - * specified, a default is chosen to ensure reasonable I/O performance. - * If the disk type is specified as `local-ssd`, multiple local drives are - * automatically combined to provide the requested size. Note, however, that - * each physical SSD is 375GB in size, and no more than 8 drives can be - * attached to a single instance. - * - * Generated from protobuf field int32 size_gb = 1; - * @param int $var - * @return $this - */ - public function setSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->size_gb = $var; - - return $this; - } - - /** - * The Compute Engine disk type. If unspecified, `pd-standard` is used. - * - * Generated from protobuf field string type = 2; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The Compute Engine disk type. If unspecified, `pd-standard` is used. - * - * Generated from protobuf field string type = 2; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * An image to put on the disk before attaching it to the VM. - * - * Generated from protobuf field string source_image = 3; - * @return string - */ - public function getSourceImage() - { - return $this->source_image; - } - - /** - * An image to put on the disk before attaching it to the VM. - * - * Generated from protobuf field string source_image = 3; - * @param string $var - * @return $this - */ - public function setSourceImage($var) - { - GPBUtil::checkString($var, True); - $this->source_image = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Pipeline.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Pipeline.php deleted file mode 100644 index 6351d430b2b7..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Pipeline.php +++ /dev/null @@ -1,277 +0,0 @@ -google.cloud.lifesciences.v2beta.Pipeline - */ -class Pipeline extends \Google\Protobuf\Internal\Message -{ - /** - * The list of actions to execute, in the order they are specified. - * - * Generated from protobuf field repeated .google.cloud.lifesciences.v2beta.Action actions = 1; - */ - private $actions; - /** - * The resources required for execution. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.Resources resources = 2; - */ - protected $resources = null; - /** - * The environment to pass into every action. Each action can also specify - * additional environment variables but cannot delete an entry from this map - * (though they can overwrite it with a different value). - * - * Generated from protobuf field map environment = 3; - */ - private $environment; - /** - * The encrypted environment to pass into every action. Each action can also - * specify its own encrypted environment. - * The secret must decrypt to a JSON-encoded dictionary where key-value pairs - * serve as environment variable names and their values. The decoded - * environment variables can overwrite the values specified by the - * `environment` field. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.Secret encrypted_environment = 5; - */ - protected $encrypted_environment = null; - /** - * The maximum amount of time to give the pipeline to complete. This includes - * the time spent waiting for a worker to be allocated. If the pipeline fails - * to complete before the timeout, it will be cancelled and the error code - * will be set to DEADLINE_EXCEEDED. - * If unspecified, it will default to 7 days. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 4; - */ - protected $timeout = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\LifeSciences\V2beta\Action>|\Google\Protobuf\Internal\RepeatedField $actions - * The list of actions to execute, in the order they are specified. - * @type \Google\Cloud\LifeSciences\V2beta\Resources $resources - * The resources required for execution. - * @type array|\Google\Protobuf\Internal\MapField $environment - * The environment to pass into every action. Each action can also specify - * additional environment variables but cannot delete an entry from this map - * (though they can overwrite it with a different value). - * @type \Google\Cloud\LifeSciences\V2beta\Secret $encrypted_environment - * The encrypted environment to pass into every action. Each action can also - * specify its own encrypted environment. - * The secret must decrypt to a JSON-encoded dictionary where key-value pairs - * serve as environment variable names and their values. The decoded - * environment variables can overwrite the values specified by the - * `environment` field. - * @type \Google\Protobuf\Duration $timeout - * The maximum amount of time to give the pipeline to complete. This includes - * the time spent waiting for a worker to be allocated. If the pipeline fails - * to complete before the timeout, it will be cancelled and the error code - * will be set to DEADLINE_EXCEEDED. - * If unspecified, it will default to 7 days. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * The list of actions to execute, in the order they are specified. - * - * Generated from protobuf field repeated .google.cloud.lifesciences.v2beta.Action actions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getActions() - { - return $this->actions; - } - - /** - * The list of actions to execute, in the order they are specified. - * - * Generated from protobuf field repeated .google.cloud.lifesciences.v2beta.Action actions = 1; - * @param array<\Google\Cloud\LifeSciences\V2beta\Action>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setActions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\LifeSciences\V2beta\Action::class); - $this->actions = $arr; - - return $this; - } - - /** - * The resources required for execution. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.Resources resources = 2; - * @return \Google\Cloud\LifeSciences\V2beta\Resources|null - */ - public function getResources() - { - return $this->resources; - } - - public function hasResources() - { - return isset($this->resources); - } - - public function clearResources() - { - unset($this->resources); - } - - /** - * The resources required for execution. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.Resources resources = 2; - * @param \Google\Cloud\LifeSciences\V2beta\Resources $var - * @return $this - */ - public function setResources($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\LifeSciences\V2beta\Resources::class); - $this->resources = $var; - - return $this; - } - - /** - * The environment to pass into every action. Each action can also specify - * additional environment variables but cannot delete an entry from this map - * (though they can overwrite it with a different value). - * - * Generated from protobuf field map environment = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * The environment to pass into every action. Each action can also specify - * additional environment variables but cannot delete an entry from this map - * (though they can overwrite it with a different value). - * - * Generated from protobuf field map environment = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setEnvironment($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->environment = $arr; - - return $this; - } - - /** - * The encrypted environment to pass into every action. Each action can also - * specify its own encrypted environment. - * The secret must decrypt to a JSON-encoded dictionary where key-value pairs - * serve as environment variable names and their values. The decoded - * environment variables can overwrite the values specified by the - * `environment` field. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.Secret encrypted_environment = 5; - * @return \Google\Cloud\LifeSciences\V2beta\Secret|null - */ - public function getEncryptedEnvironment() - { - return $this->encrypted_environment; - } - - public function hasEncryptedEnvironment() - { - return isset($this->encrypted_environment); - } - - public function clearEncryptedEnvironment() - { - unset($this->encrypted_environment); - } - - /** - * The encrypted environment to pass into every action. Each action can also - * specify its own encrypted environment. - * The secret must decrypt to a JSON-encoded dictionary where key-value pairs - * serve as environment variable names and their values. The decoded - * environment variables can overwrite the values specified by the - * `environment` field. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.Secret encrypted_environment = 5; - * @param \Google\Cloud\LifeSciences\V2beta\Secret $var - * @return $this - */ - public function setEncryptedEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\LifeSciences\V2beta\Secret::class); - $this->encrypted_environment = $var; - - return $this; - } - - /** - * The maximum amount of time to give the pipeline to complete. This includes - * the time spent waiting for a worker to be allocated. If the pipeline fails - * to complete before the timeout, it will be cancelled and the error code - * will be set to DEADLINE_EXCEEDED. - * If unspecified, it will default to 7 days. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeout() - { - return $this->timeout; - } - - public function hasTimeout() - { - return isset($this->timeout); - } - - public function clearTimeout() - { - unset($this->timeout); - } - - /** - * The maximum amount of time to give the pipeline to complete. This includes - * the time spent waiting for a worker to be allocated. If the pipeline fails - * to complete before the timeout, it will be cancelled and the error code - * will be set to DEADLINE_EXCEEDED. - * If unspecified, it will default to 7 days. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timeout = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/PullStartedEvent.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/PullStartedEvent.php deleted file mode 100644 index 295409c26ba0..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/PullStartedEvent.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.lifesciences.v2beta.PullStartedEvent - */ -class PullStartedEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The URI of the image that was pulled. - * - * Generated from protobuf field string image_uri = 1; - */ - protected $image_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $image_uri - * The URI of the image that was pulled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * The URI of the image that was pulled. - * - * Generated from protobuf field string image_uri = 1; - * @return string - */ - public function getImageUri() - { - return $this->image_uri; - } - - /** - * The URI of the image that was pulled. - * - * Generated from protobuf field string image_uri = 1; - * @param string $var - * @return $this - */ - public function setImageUri($var) - { - GPBUtil::checkString($var, True); - $this->image_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/PullStoppedEvent.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/PullStoppedEvent.php deleted file mode 100644 index 35ce70556057..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/PullStoppedEvent.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.lifesciences.v2beta.PullStoppedEvent - */ -class PullStoppedEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The URI of the image that was pulled. - * - * Generated from protobuf field string image_uri = 1; - */ - protected $image_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $image_uri - * The URI of the image that was pulled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * The URI of the image that was pulled. - * - * Generated from protobuf field string image_uri = 1; - * @return string - */ - public function getImageUri() - { - return $this->image_uri; - } - - /** - * The URI of the image that was pulled. - * - * Generated from protobuf field string image_uri = 1; - * @param string $var - * @return $this - */ - public function setImageUri($var) - { - GPBUtil::checkString($var, True); - $this->image_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Resources.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Resources.php deleted file mode 100644 index df892573ebc4..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Resources.php +++ /dev/null @@ -1,154 +0,0 @@ -google.cloud.lifesciences.v2beta.Resources - */ -class Resources extends \Google\Protobuf\Internal\Message -{ - /** - * The list of regions allowed for VM allocation. If set, the `zones` field - * must not be set. - * - * Generated from protobuf field repeated string regions = 2; - */ - private $regions; - /** - * The list of zones allowed for VM allocation. If set, the `regions` field - * must not be set. - * - * Generated from protobuf field repeated string zones = 3; - */ - private $zones; - /** - * The virtual machine specification. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.VirtualMachine virtual_machine = 4; - */ - protected $virtual_machine = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $regions - * The list of regions allowed for VM allocation. If set, the `zones` field - * must not be set. - * @type array|\Google\Protobuf\Internal\RepeatedField $zones - * The list of zones allowed for VM allocation. If set, the `regions` field - * must not be set. - * @type \Google\Cloud\LifeSciences\V2beta\VirtualMachine $virtual_machine - * The virtual machine specification. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * The list of regions allowed for VM allocation. If set, the `zones` field - * must not be set. - * - * Generated from protobuf field repeated string regions = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRegions() - { - return $this->regions; - } - - /** - * The list of regions allowed for VM allocation. If set, the `zones` field - * must not be set. - * - * Generated from protobuf field repeated string regions = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRegions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->regions = $arr; - - return $this; - } - - /** - * The list of zones allowed for VM allocation. If set, the `regions` field - * must not be set. - * - * Generated from protobuf field repeated string zones = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getZones() - { - return $this->zones; - } - - /** - * The list of zones allowed for VM allocation. If set, the `regions` field - * must not be set. - * - * Generated from protobuf field repeated string zones = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setZones($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->zones = $arr; - - return $this; - } - - /** - * The virtual machine specification. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.VirtualMachine virtual_machine = 4; - * @return \Google\Cloud\LifeSciences\V2beta\VirtualMachine|null - */ - public function getVirtualMachine() - { - return $this->virtual_machine; - } - - public function hasVirtualMachine() - { - return isset($this->virtual_machine); - } - - public function clearVirtualMachine() - { - unset($this->virtual_machine); - } - - /** - * The virtual machine specification. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.VirtualMachine virtual_machine = 4; - * @param \Google\Cloud\LifeSciences\V2beta\VirtualMachine $var - * @return $this - */ - public function setVirtualMachine($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\LifeSciences\V2beta\VirtualMachine::class); - $this->virtual_machine = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/RunPipelineRequest.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/RunPipelineRequest.php deleted file mode 100644 index 3d7634c4f03e..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/RunPipelineRequest.php +++ /dev/null @@ -1,209 +0,0 @@ -google.cloud.lifesciences.v2beta.RunPipelineRequest - */ -class RunPipelineRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The project and location that this request should be executed against. - * - * Generated from protobuf field string parent = 4; - */ - protected $parent = ''; - /** - * Required. The description of the pipeline to run. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $pipeline = null; - /** - * User-defined labels to associate with the returned operation. These - * labels are not propagated to any Google Cloud Platform resources used by - * the operation, and can be modified at any time. - * To associate labels with resources created while executing the operation, - * see the appropriate resource message (for example, `VirtualMachine`). - * - * Generated from protobuf field map labels = 2; - */ - private $labels; - /** - * The name of an existing Pub/Sub topic. The server will publish - * messages to this topic whenever the status of the operation changes. - * The Life Sciences Service Agent account must have publisher permissions to - * the specified topic or notifications will not be sent. - * - * Generated from protobuf field string pub_sub_topic = 3; - */ - protected $pub_sub_topic = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The project and location that this request should be executed against. - * @type \Google\Cloud\LifeSciences\V2beta\Pipeline $pipeline - * Required. The description of the pipeline to run. - * @type array|\Google\Protobuf\Internal\MapField $labels - * User-defined labels to associate with the returned operation. These - * labels are not propagated to any Google Cloud Platform resources used by - * the operation, and can be modified at any time. - * To associate labels with resources created while executing the operation, - * see the appropriate resource message (for example, `VirtualMachine`). - * @type string $pub_sub_topic - * The name of an existing Pub/Sub topic. The server will publish - * messages to this topic whenever the status of the operation changes. - * The Life Sciences Service Agent account must have publisher permissions to - * the specified topic or notifications will not be sent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * The project and location that this request should be executed against. - * - * Generated from protobuf field string parent = 4; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The project and location that this request should be executed against. - * - * Generated from protobuf field string parent = 4; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The description of the pipeline to run. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\LifeSciences\V2beta\Pipeline|null - */ - public function getPipeline() - { - return $this->pipeline; - } - - public function hasPipeline() - { - return isset($this->pipeline); - } - - public function clearPipeline() - { - unset($this->pipeline); - } - - /** - * Required. The description of the pipeline to run. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\LifeSciences\V2beta\Pipeline $var - * @return $this - */ - public function setPipeline($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\LifeSciences\V2beta\Pipeline::class); - $this->pipeline = $var; - - return $this; - } - - /** - * User-defined labels to associate with the returned operation. These - * labels are not propagated to any Google Cloud Platform resources used by - * the operation, and can be modified at any time. - * To associate labels with resources created while executing the operation, - * see the appropriate resource message (for example, `VirtualMachine`). - * - * Generated from protobuf field map labels = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * User-defined labels to associate with the returned operation. These - * labels are not propagated to any Google Cloud Platform resources used by - * the operation, and can be modified at any time. - * To associate labels with resources created while executing the operation, - * see the appropriate resource message (for example, `VirtualMachine`). - * - * Generated from protobuf field map labels = 2; - * @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; - } - - /** - * The name of an existing Pub/Sub topic. The server will publish - * messages to this topic whenever the status of the operation changes. - * The Life Sciences Service Agent account must have publisher permissions to - * the specified topic or notifications will not be sent. - * - * Generated from protobuf field string pub_sub_topic = 3; - * @return string - */ - public function getPubSubTopic() - { - return $this->pub_sub_topic; - } - - /** - * The name of an existing Pub/Sub topic. The server will publish - * messages to this topic whenever the status of the operation changes. - * The Life Sciences Service Agent account must have publisher permissions to - * the specified topic or notifications will not be sent. - * - * Generated from protobuf field string pub_sub_topic = 3; - * @param string $var - * @return $this - */ - public function setPubSubTopic($var) - { - GPBUtil::checkString($var, True); - $this->pub_sub_topic = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/RunPipelineResponse.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/RunPipelineResponse.php deleted file mode 100644 index a7f338e16cb7..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/RunPipelineResponse.php +++ /dev/null @@ -1,34 +0,0 @@ -google.cloud.lifesciences.v2beta.RunPipelineResponse - */ -class RunPipelineResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Secret.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Secret.php deleted file mode 100644 index 8e7db4eeb4bc..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Secret.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.lifesciences.v2beta.Secret - */ -class Secret extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the Cloud KMS key that will be used to decrypt the secret - * value. The VM service account must have the required permissions and - * authentication scopes to invoke the `decrypt` method on the specified key. - * - * Generated from protobuf field string key_name = 1; - */ - protected $key_name = ''; - /** - * The value of the cipherText response from the `encrypt` method. This field - * is intentionally unaudited. - * - * Generated from protobuf field string cipher_text = 2; - */ - protected $cipher_text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key_name - * The name of the Cloud KMS key that will be used to decrypt the secret - * value. The VM service account must have the required permissions and - * authentication scopes to invoke the `decrypt` method on the specified key. - * @type string $cipher_text - * The value of the cipherText response from the `encrypt` method. This field - * is intentionally unaudited. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * The name of the Cloud KMS key that will be used to decrypt the secret - * value. The VM service account must have the required permissions and - * authentication scopes to invoke the `decrypt` method on the specified key. - * - * Generated from protobuf field string key_name = 1; - * @return string - */ - public function getKeyName() - { - return $this->key_name; - } - - /** - * The name of the Cloud KMS key that will be used to decrypt the secret - * value. The VM service account must have the required permissions and - * authentication scopes to invoke the `decrypt` method on the specified key. - * - * Generated from protobuf field string key_name = 1; - * @param string $var - * @return $this - */ - public function setKeyName($var) - { - GPBUtil::checkString($var, True); - $this->key_name = $var; - - return $this; - } - - /** - * The value of the cipherText response from the `encrypt` method. This field - * is intentionally unaudited. - * - * Generated from protobuf field string cipher_text = 2; - * @return string - */ - public function getCipherText() - { - return $this->cipher_text; - } - - /** - * The value of the cipherText response from the `encrypt` method. This field - * is intentionally unaudited. - * - * Generated from protobuf field string cipher_text = 2; - * @param string $var - * @return $this - */ - public function setCipherText($var) - { - GPBUtil::checkString($var, True); - $this->cipher_text = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/ServiceAccount.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/ServiceAccount.php deleted file mode 100644 index cbe399edea64..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/ServiceAccount.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.lifesciences.v2beta.ServiceAccount - */ -class ServiceAccount extends \Google\Protobuf\Internal\Message -{ - /** - * Email address of the service account. If not specified, the default - * Compute Engine service account for the project will be used. - * - * Generated from protobuf field string email = 1; - */ - protected $email = ''; - /** - * List of scopes to be enabled for this service account on the VM, in - * addition to the cloud-platform API scope that will be added by default. - * - * Generated from protobuf field repeated string scopes = 2; - */ - private $scopes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $email - * Email address of the service account. If not specified, the default - * Compute Engine service account for the project will be used. - * @type array|\Google\Protobuf\Internal\RepeatedField $scopes - * List of scopes to be enabled for this service account on the VM, in - * addition to the cloud-platform API scope that will be added by default. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * Email address of the service account. If not specified, the default - * Compute Engine service account for the project will be used. - * - * Generated from protobuf field string email = 1; - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Email address of the service account. If not specified, the default - * Compute Engine service account for the project will be used. - * - * Generated from protobuf field string email = 1; - * @param string $var - * @return $this - */ - public function setEmail($var) - { - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - - /** - * List of scopes to be enabled for this service account on the VM, in - * addition to the cloud-platform API scope that will be added by default. - * - * Generated from protobuf field repeated string scopes = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getScopes() - { - return $this->scopes; - } - - /** - * List of scopes to be enabled for this service account on the VM, in - * addition to the cloud-platform API scope that will be added by default. - * - * Generated from protobuf field repeated string scopes = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setScopes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->scopes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/UnexpectedExitStatusEvent.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/UnexpectedExitStatusEvent.php deleted file mode 100644 index a2e5307b0de0..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/UnexpectedExitStatusEvent.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent - */ -class UnexpectedExitStatusEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The numeric ID of the action that started the container. - * - * Generated from protobuf field int32 action_id = 1; - */ - protected $action_id = 0; - /** - * The exit status of the container. - * - * Generated from protobuf field int32 exit_status = 2; - */ - protected $exit_status = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $action_id - * The numeric ID of the action that started the container. - * @type int $exit_status - * The exit status of the container. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * The numeric ID of the action that started the container. - * - * Generated from protobuf field int32 action_id = 1; - * @return int - */ - public function getActionId() - { - return $this->action_id; - } - - /** - * The numeric ID of the action that started the container. - * - * Generated from protobuf field int32 action_id = 1; - * @param int $var - * @return $this - */ - public function setActionId($var) - { - GPBUtil::checkInt32($var); - $this->action_id = $var; - - return $this; - } - - /** - * The exit status of the container. - * - * Generated from protobuf field int32 exit_status = 2; - * @return int - */ - public function getExitStatus() - { - return $this->exit_status; - } - - /** - * The exit status of the container. - * - * Generated from protobuf field int32 exit_status = 2; - * @param int $var - * @return $this - */ - public function setExitStatus($var) - { - GPBUtil::checkInt32($var); - $this->exit_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/VirtualMachine.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/VirtualMachine.php deleted file mode 100644 index 5b9fa04cfbb4..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/VirtualMachine.php +++ /dev/null @@ -1,744 +0,0 @@ -google.cloud.lifesciences.v2beta.VirtualMachine - */ -class VirtualMachine extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The machine type of the virtual machine to create. Must be the - * short name of a standard machine type (such as "n1-standard-1") or a custom - * machine type (such as "custom-1-4096", where "1" indicates the number of - * vCPUs and "4096" indicates the memory in MB). See [Creating an instance - * with a custom machine - * type](https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type#create) - * for more specifications on creating a custom machine type. - * - * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $machine_type = ''; - /** - * If true, allocate a preemptible VM. - * - * Generated from protobuf field bool preemptible = 2; - */ - protected $preemptible = false; - /** - * Optional set of labels to apply to the VM and any attached disk resources. - * These labels must adhere to the [name and value - * restrictions](https://cloud.google.com/compute/docs/labeling-resources) on - * VM labels imposed by Compute Engine. - * Labels keys with the prefix 'google-' are reserved for use by Google. - * Labels applied at creation time to the VM. Applied on a best-effort basis - * to attached disk resources shortly after VM creation. - * - * Generated from protobuf field map labels = 3; - */ - private $labels; - /** - * The list of disks to create and attach to the VM. - * Specify either the `volumes[]` field or the `disks[]` field, but not both. - * - * Generated from protobuf field repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; - */ - private $disks; - /** - * The VM network configuration. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.Network network = 5; - */ - protected $network = null; - /** - * The list of accelerators to attach to the VM. - * - * Generated from protobuf field repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; - */ - private $accelerators; - /** - * The service account to install on the VM. This account does not need - * any permissions other than those required by the pipeline. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.ServiceAccount service_account = 7; - */ - protected $service_account = null; - /** - * The size of the boot disk, in GB. The boot disk must be large - * enough to accommodate all of the Docker images from each action in the - * pipeline at the same time. If not specified, a small but reasonable - * default value is used. - * - * Generated from protobuf field int32 boot_disk_size_gb = 8; - */ - protected $boot_disk_size_gb = 0; - /** - * The CPU platform to request. An instance based on a newer platform can be - * allocated, but never one with fewer capabilities. The value of this - * parameter must be a valid Compute Engine CPU platform name (such as "Intel - * Skylake"). This parameter is only useful for carefully optimized work - * loads where the CPU platform has a significant impact. - * For more information about the effect of this parameter, see - * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. - * - * Generated from protobuf field string cpu_platform = 9; - */ - protected $cpu_platform = ''; - /** - * The host operating system image to use. - * Currently, only Container-Optimized OS images can be used. - * The default value is `projects/cos-cloud/global/images/family/cos-stable`, - * which selects the latest stable release of Container-Optimized OS. - * This option is provided to allow testing against the beta release of the - * operating system to ensure that the new version does not interact - * negatively with production pipelines. - * To test a pipeline against the beta release of Container-Optimized OS, - * use the value `projects/cos-cloud/global/images/family/cos-beta`. - * - * Generated from protobuf field string boot_image = 10; - */ - protected $boot_image = ''; - /** - * The NVIDIA driver version to use when attaching an NVIDIA GPU accelerator. - * The version specified here must be compatible with the GPU libraries - * contained in the container being executed, and must be one of the drivers - * hosted in the `nvidia-drivers-us-public` bucket on Google Cloud Storage. - * - * Generated from protobuf field string nvidia_driver_version = 11 [deprecated = true]; - * @deprecated - */ - protected $nvidia_driver_version = ''; - /** - * Whether Stackdriver monitoring should be enabled on the VM. - * - * Generated from protobuf field bool enable_stackdriver_monitoring = 12; - */ - protected $enable_stackdriver_monitoring = false; - /** - * The Compute Engine Disk Images to use as a Docker cache. The disks will be - * mounted into the Docker folder in a way that the images present in the - * cache will not need to be pulled. The digests of the cached images must - * match those of the tags used or the latest version will still be pulled. - * The root directory of the ext4 image must contain `image` and `overlay2` - * directories copied from the Docker directory of a VM where the desired - * Docker images have already been pulled. Any images pulled that are not - * cached will be stored on the first cache disk instead of the boot disk. - * Only a single image is supported. - * - * Generated from protobuf field repeated string docker_cache_images = 13; - */ - private $docker_cache_images; - /** - * The list of disks and other storage to create or attach to the VM. - * Specify either the `volumes[]` field or the `disks[]` field, but not both. - * - * Generated from protobuf field repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; - */ - private $volumes; - /** - * If specified, the VM will only be allocated inside the matching - * reservation. It will fail if the VM parameters don't match the reservation. - * - * Generated from protobuf field string reservation = 15; - */ - protected $reservation = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $machine_type - * Required. The machine type of the virtual machine to create. Must be the - * short name of a standard machine type (such as "n1-standard-1") or a custom - * machine type (such as "custom-1-4096", where "1" indicates the number of - * vCPUs and "4096" indicates the memory in MB). See [Creating an instance - * with a custom machine - * type](https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type#create) - * for more specifications on creating a custom machine type. - * @type bool $preemptible - * If true, allocate a preemptible VM. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional set of labels to apply to the VM and any attached disk resources. - * These labels must adhere to the [name and value - * restrictions](https://cloud.google.com/compute/docs/labeling-resources) on - * VM labels imposed by Compute Engine. - * Labels keys with the prefix 'google-' are reserved for use by Google. - * Labels applied at creation time to the VM. Applied on a best-effort basis - * to attached disk resources shortly after VM creation. - * @type array<\Google\Cloud\LifeSciences\V2beta\Disk>|\Google\Protobuf\Internal\RepeatedField $disks - * The list of disks to create and attach to the VM. - * Specify either the `volumes[]` field or the `disks[]` field, but not both. - * @type \Google\Cloud\LifeSciences\V2beta\Network $network - * The VM network configuration. - * @type array<\Google\Cloud\LifeSciences\V2beta\Accelerator>|\Google\Protobuf\Internal\RepeatedField $accelerators - * The list of accelerators to attach to the VM. - * @type \Google\Cloud\LifeSciences\V2beta\ServiceAccount $service_account - * The service account to install on the VM. This account does not need - * any permissions other than those required by the pipeline. - * @type int $boot_disk_size_gb - * The size of the boot disk, in GB. The boot disk must be large - * enough to accommodate all of the Docker images from each action in the - * pipeline at the same time. If not specified, a small but reasonable - * default value is used. - * @type string $cpu_platform - * The CPU platform to request. An instance based on a newer platform can be - * allocated, but never one with fewer capabilities. The value of this - * parameter must be a valid Compute Engine CPU platform name (such as "Intel - * Skylake"). This parameter is only useful for carefully optimized work - * loads where the CPU platform has a significant impact. - * For more information about the effect of this parameter, see - * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. - * @type string $boot_image - * The host operating system image to use. - * Currently, only Container-Optimized OS images can be used. - * The default value is `projects/cos-cloud/global/images/family/cos-stable`, - * which selects the latest stable release of Container-Optimized OS. - * This option is provided to allow testing against the beta release of the - * operating system to ensure that the new version does not interact - * negatively with production pipelines. - * To test a pipeline against the beta release of Container-Optimized OS, - * use the value `projects/cos-cloud/global/images/family/cos-beta`. - * @type string $nvidia_driver_version - * The NVIDIA driver version to use when attaching an NVIDIA GPU accelerator. - * The version specified here must be compatible with the GPU libraries - * contained in the container being executed, and must be one of the drivers - * hosted in the `nvidia-drivers-us-public` bucket on Google Cloud Storage. - * @type bool $enable_stackdriver_monitoring - * Whether Stackdriver monitoring should be enabled on the VM. - * @type array|\Google\Protobuf\Internal\RepeatedField $docker_cache_images - * The Compute Engine Disk Images to use as a Docker cache. The disks will be - * mounted into the Docker folder in a way that the images present in the - * cache will not need to be pulled. The digests of the cached images must - * match those of the tags used or the latest version will still be pulled. - * The root directory of the ext4 image must contain `image` and `overlay2` - * directories copied from the Docker directory of a VM where the desired - * Docker images have already been pulled. Any images pulled that are not - * cached will be stored on the first cache disk instead of the boot disk. - * Only a single image is supported. - * @type array<\Google\Cloud\LifeSciences\V2beta\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes - * The list of disks and other storage to create or attach to the VM. - * Specify either the `volumes[]` field or the `disks[]` field, but not both. - * @type string $reservation - * If specified, the VM will only be allocated inside the matching - * reservation. It will fail if the VM parameters don't match the reservation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * Required. The machine type of the virtual machine to create. Must be the - * short name of a standard machine type (such as "n1-standard-1") or a custom - * machine type (such as "custom-1-4096", where "1" indicates the number of - * vCPUs and "4096" indicates the memory in MB). See [Creating an instance - * with a custom machine - * type](https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type#create) - * for more specifications on creating a custom machine type. - * - * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * Required. The machine type of the virtual machine to create. Must be the - * short name of a standard machine type (such as "n1-standard-1") or a custom - * machine type (such as "custom-1-4096", where "1" indicates the number of - * vCPUs and "4096" indicates the memory in MB). See [Creating an instance - * with a custom machine - * type](https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type#create) - * for more specifications on creating a custom machine type. - * - * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * If true, allocate a preemptible VM. - * - * Generated from protobuf field bool preemptible = 2; - * @return bool - */ - public function getPreemptible() - { - return $this->preemptible; - } - - /** - * If true, allocate a preemptible VM. - * - * Generated from protobuf field bool preemptible = 2; - * @param bool $var - * @return $this - */ - public function setPreemptible($var) - { - GPBUtil::checkBool($var); - $this->preemptible = $var; - - return $this; - } - - /** - * Optional set of labels to apply to the VM and any attached disk resources. - * These labels must adhere to the [name and value - * restrictions](https://cloud.google.com/compute/docs/labeling-resources) on - * VM labels imposed by Compute Engine. - * Labels keys with the prefix 'google-' are reserved for use by Google. - * Labels applied at creation time to the VM. Applied on a best-effort basis - * to attached disk resources shortly after VM creation. - * - * Generated from protobuf field map labels = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional set of labels to apply to the VM and any attached disk resources. - * These labels must adhere to the [name and value - * restrictions](https://cloud.google.com/compute/docs/labeling-resources) on - * VM labels imposed by Compute Engine. - * Labels keys with the prefix 'google-' are reserved for use by Google. - * Labels applied at creation time to the VM. Applied on a best-effort basis - * to attached disk resources shortly after VM creation. - * - * Generated from protobuf field map labels = 3; - * @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; - } - - /** - * The list of disks to create and attach to the VM. - * Specify either the `volumes[]` field or the `disks[]` field, but not both. - * - * Generated from protobuf field repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDisks() - { - return $this->disks; - } - - /** - * The list of disks to create and attach to the VM. - * Specify either the `volumes[]` field or the `disks[]` field, but not both. - * - * Generated from protobuf field repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; - * @param array<\Google\Cloud\LifeSciences\V2beta\Disk>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDisks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\LifeSciences\V2beta\Disk::class); - $this->disks = $arr; - - return $this; - } - - /** - * The VM network configuration. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.Network network = 5; - * @return \Google\Cloud\LifeSciences\V2beta\Network|null - */ - public function getNetwork() - { - return $this->network; - } - - public function hasNetwork() - { - return isset($this->network); - } - - public function clearNetwork() - { - unset($this->network); - } - - /** - * The VM network configuration. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.Network network = 5; - * @param \Google\Cloud\LifeSciences\V2beta\Network $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\LifeSciences\V2beta\Network::class); - $this->network = $var; - - return $this; - } - - /** - * The list of accelerators to attach to the VM. - * - * Generated from protobuf field repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAccelerators() - { - return $this->accelerators; - } - - /** - * The list of accelerators to attach to the VM. - * - * Generated from protobuf field repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; - * @param array<\Google\Cloud\LifeSciences\V2beta\Accelerator>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAccelerators($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\LifeSciences\V2beta\Accelerator::class); - $this->accelerators = $arr; - - return $this; - } - - /** - * The service account to install on the VM. This account does not need - * any permissions other than those required by the pipeline. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.ServiceAccount service_account = 7; - * @return \Google\Cloud\LifeSciences\V2beta\ServiceAccount|null - */ - public function getServiceAccount() - { - return $this->service_account; - } - - public function hasServiceAccount() - { - return isset($this->service_account); - } - - public function clearServiceAccount() - { - unset($this->service_account); - } - - /** - * The service account to install on the VM. This account does not need - * any permissions other than those required by the pipeline. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.ServiceAccount service_account = 7; - * @param \Google\Cloud\LifeSciences\V2beta\ServiceAccount $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\LifeSciences\V2beta\ServiceAccount::class); - $this->service_account = $var; - - return $this; - } - - /** - * The size of the boot disk, in GB. The boot disk must be large - * enough to accommodate all of the Docker images from each action in the - * pipeline at the same time. If not specified, a small but reasonable - * default value is used. - * - * Generated from protobuf field int32 boot_disk_size_gb = 8; - * @return int - */ - public function getBootDiskSizeGb() - { - return $this->boot_disk_size_gb; - } - - /** - * The size of the boot disk, in GB. The boot disk must be large - * enough to accommodate all of the Docker images from each action in the - * pipeline at the same time. If not specified, a small but reasonable - * default value is used. - * - * Generated from protobuf field int32 boot_disk_size_gb = 8; - * @param int $var - * @return $this - */ - public function setBootDiskSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->boot_disk_size_gb = $var; - - return $this; - } - - /** - * The CPU platform to request. An instance based on a newer platform can be - * allocated, but never one with fewer capabilities. The value of this - * parameter must be a valid Compute Engine CPU platform name (such as "Intel - * Skylake"). This parameter is only useful for carefully optimized work - * loads where the CPU platform has a significant impact. - * For more information about the effect of this parameter, see - * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. - * - * Generated from protobuf field string cpu_platform = 9; - * @return string - */ - public function getCpuPlatform() - { - return $this->cpu_platform; - } - - /** - * The CPU platform to request. An instance based on a newer platform can be - * allocated, but never one with fewer capabilities. The value of this - * parameter must be a valid Compute Engine CPU platform name (such as "Intel - * Skylake"). This parameter is only useful for carefully optimized work - * loads where the CPU platform has a significant impact. - * For more information about the effect of this parameter, see - * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. - * - * Generated from protobuf field string cpu_platform = 9; - * @param string $var - * @return $this - */ - public function setCpuPlatform($var) - { - GPBUtil::checkString($var, True); - $this->cpu_platform = $var; - - return $this; - } - - /** - * The host operating system image to use. - * Currently, only Container-Optimized OS images can be used. - * The default value is `projects/cos-cloud/global/images/family/cos-stable`, - * which selects the latest stable release of Container-Optimized OS. - * This option is provided to allow testing against the beta release of the - * operating system to ensure that the new version does not interact - * negatively with production pipelines. - * To test a pipeline against the beta release of Container-Optimized OS, - * use the value `projects/cos-cloud/global/images/family/cos-beta`. - * - * Generated from protobuf field string boot_image = 10; - * @return string - */ - public function getBootImage() - { - return $this->boot_image; - } - - /** - * The host operating system image to use. - * Currently, only Container-Optimized OS images can be used. - * The default value is `projects/cos-cloud/global/images/family/cos-stable`, - * which selects the latest stable release of Container-Optimized OS. - * This option is provided to allow testing against the beta release of the - * operating system to ensure that the new version does not interact - * negatively with production pipelines. - * To test a pipeline against the beta release of Container-Optimized OS, - * use the value `projects/cos-cloud/global/images/family/cos-beta`. - * - * Generated from protobuf field string boot_image = 10; - * @param string $var - * @return $this - */ - public function setBootImage($var) - { - GPBUtil::checkString($var, True); - $this->boot_image = $var; - - return $this; - } - - /** - * The NVIDIA driver version to use when attaching an NVIDIA GPU accelerator. - * The version specified here must be compatible with the GPU libraries - * contained in the container being executed, and must be one of the drivers - * hosted in the `nvidia-drivers-us-public` bucket on Google Cloud Storage. - * - * Generated from protobuf field string nvidia_driver_version = 11 [deprecated = true]; - * @return string - * @deprecated - */ - public function getNvidiaDriverVersion() - { - @trigger_error('nvidia_driver_version is deprecated.', E_USER_DEPRECATED); - return $this->nvidia_driver_version; - } - - /** - * The NVIDIA driver version to use when attaching an NVIDIA GPU accelerator. - * The version specified here must be compatible with the GPU libraries - * contained in the container being executed, and must be one of the drivers - * hosted in the `nvidia-drivers-us-public` bucket on Google Cloud Storage. - * - * Generated from protobuf field string nvidia_driver_version = 11 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setNvidiaDriverVersion($var) - { - @trigger_error('nvidia_driver_version is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->nvidia_driver_version = $var; - - return $this; - } - - /** - * Whether Stackdriver monitoring should be enabled on the VM. - * - * Generated from protobuf field bool enable_stackdriver_monitoring = 12; - * @return bool - */ - public function getEnableStackdriverMonitoring() - { - return $this->enable_stackdriver_monitoring; - } - - /** - * Whether Stackdriver monitoring should be enabled on the VM. - * - * Generated from protobuf field bool enable_stackdriver_monitoring = 12; - * @param bool $var - * @return $this - */ - public function setEnableStackdriverMonitoring($var) - { - GPBUtil::checkBool($var); - $this->enable_stackdriver_monitoring = $var; - - return $this; - } - - /** - * The Compute Engine Disk Images to use as a Docker cache. The disks will be - * mounted into the Docker folder in a way that the images present in the - * cache will not need to be pulled. The digests of the cached images must - * match those of the tags used or the latest version will still be pulled. - * The root directory of the ext4 image must contain `image` and `overlay2` - * directories copied from the Docker directory of a VM where the desired - * Docker images have already been pulled. Any images pulled that are not - * cached will be stored on the first cache disk instead of the boot disk. - * Only a single image is supported. - * - * Generated from protobuf field repeated string docker_cache_images = 13; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDockerCacheImages() - { - return $this->docker_cache_images; - } - - /** - * The Compute Engine Disk Images to use as a Docker cache. The disks will be - * mounted into the Docker folder in a way that the images present in the - * cache will not need to be pulled. The digests of the cached images must - * match those of the tags used or the latest version will still be pulled. - * The root directory of the ext4 image must contain `image` and `overlay2` - * directories copied from the Docker directory of a VM where the desired - * Docker images have already been pulled. Any images pulled that are not - * cached will be stored on the first cache disk instead of the boot disk. - * Only a single image is supported. - * - * Generated from protobuf field repeated string docker_cache_images = 13; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDockerCacheImages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->docker_cache_images = $arr; - - return $this; - } - - /** - * The list of disks and other storage to create or attach to the VM. - * Specify either the `volumes[]` field or the `disks[]` field, but not both. - * - * Generated from protobuf field repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVolumes() - { - return $this->volumes; - } - - /** - * The list of disks and other storage to create or attach to the VM. - * Specify either the `volumes[]` field or the `disks[]` field, but not both. - * - * Generated from protobuf field repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; - * @param array<\Google\Cloud\LifeSciences\V2beta\Volume>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVolumes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\LifeSciences\V2beta\Volume::class); - $this->volumes = $arr; - - return $this; - } - - /** - * If specified, the VM will only be allocated inside the matching - * reservation. It will fail if the VM parameters don't match the reservation. - * - * Generated from protobuf field string reservation = 15; - * @return string - */ - public function getReservation() - { - return $this->reservation; - } - - /** - * If specified, the VM will only be allocated inside the matching - * reservation. It will fail if the VM parameters don't match the reservation. - * - * Generated from protobuf field string reservation = 15; - * @param string $var - * @return $this - */ - public function setReservation($var) - { - GPBUtil::checkString($var, True); - $this->reservation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Volume.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Volume.php deleted file mode 100644 index 9b2da83dfeb1..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/Volume.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.lifesciences.v2beta.Volume - */ -class Volume extends \Google\Protobuf\Internal\Message -{ - /** - * A user-supplied name for the volume. Used when mounting the volume into - * [`Actions`][google.cloud.lifesciences.v2beta.Action]. The name must contain - * only upper and lowercase alphanumeric characters and hyphens and cannot - * start with a hyphen. - * - * Generated from protobuf field string volume = 1; - */ - protected $volume = ''; - protected $storage; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $volume - * A user-supplied name for the volume. Used when mounting the volume into - * [`Actions`][google.cloud.lifesciences.v2beta.Action]. The name must contain - * only upper and lowercase alphanumeric characters and hyphens and cannot - * start with a hyphen. - * @type \Google\Cloud\LifeSciences\V2beta\PersistentDisk $persistent_disk - * Configuration for a persistent disk. - * @type \Google\Cloud\LifeSciences\V2beta\ExistingDisk $existing_disk - * Configuration for a existing disk. - * @type \Google\Cloud\LifeSciences\V2beta\NFSMount $nfs_mount - * Configuration for an NFS mount. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * A user-supplied name for the volume. Used when mounting the volume into - * [`Actions`][google.cloud.lifesciences.v2beta.Action]. The name must contain - * only upper and lowercase alphanumeric characters and hyphens and cannot - * start with a hyphen. - * - * Generated from protobuf field string volume = 1; - * @return string - */ - public function getVolume() - { - return $this->volume; - } - - /** - * A user-supplied name for the volume. Used when mounting the volume into - * [`Actions`][google.cloud.lifesciences.v2beta.Action]. The name must contain - * only upper and lowercase alphanumeric characters and hyphens and cannot - * start with a hyphen. - * - * Generated from protobuf field string volume = 1; - * @param string $var - * @return $this - */ - public function setVolume($var) - { - GPBUtil::checkString($var, True); - $this->volume = $var; - - return $this; - } - - /** - * Configuration for a persistent disk. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.PersistentDisk persistent_disk = 2; - * @return \Google\Cloud\LifeSciences\V2beta\PersistentDisk|null - */ - public function getPersistentDisk() - { - return $this->readOneof(2); - } - - public function hasPersistentDisk() - { - return $this->hasOneof(2); - } - - /** - * Configuration for a persistent disk. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.PersistentDisk persistent_disk = 2; - * @param \Google\Cloud\LifeSciences\V2beta\PersistentDisk $var - * @return $this - */ - public function setPersistentDisk($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\LifeSciences\V2beta\PersistentDisk::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Configuration for a existing disk. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.ExistingDisk existing_disk = 3; - * @return \Google\Cloud\LifeSciences\V2beta\ExistingDisk|null - */ - public function getExistingDisk() - { - return $this->readOneof(3); - } - - public function hasExistingDisk() - { - return $this->hasOneof(3); - } - - /** - * Configuration for a existing disk. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.ExistingDisk existing_disk = 3; - * @param \Google\Cloud\LifeSciences\V2beta\ExistingDisk $var - * @return $this - */ - public function setExistingDisk($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\LifeSciences\V2beta\ExistingDisk::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Configuration for an NFS mount. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.NFSMount nfs_mount = 4; - * @return \Google\Cloud\LifeSciences\V2beta\NFSMount|null - */ - public function getNfsMount() - { - return $this->readOneof(4); - } - - public function hasNfsMount() - { - return $this->hasOneof(4); - } - - /** - * Configuration for an NFS mount. - * - * Generated from protobuf field .google.cloud.lifesciences.v2beta.NFSMount nfs_mount = 4; - * @param \Google\Cloud\LifeSciences\V2beta\NFSMount $var - * @return $this - */ - public function setNfsMount($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\LifeSciences\V2beta\NFSMount::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getStorage() - { - return $this->whichOneof("storage"); - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/WorkerAssignedEvent.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/WorkerAssignedEvent.php deleted file mode 100644 index 59739bb1f03d..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/WorkerAssignedEvent.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.lifesciences.v2beta.WorkerAssignedEvent - */ -class WorkerAssignedEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The zone the worker is running in. - * - * Generated from protobuf field string zone = 1; - */ - protected $zone = ''; - /** - * The worker's instance name. - * - * Generated from protobuf field string instance = 2; - */ - protected $instance = ''; - /** - * The machine type that was assigned for the worker. - * - * Generated from protobuf field string machine_type = 3; - */ - protected $machine_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $zone - * The zone the worker is running in. - * @type string $instance - * The worker's instance name. - * @type string $machine_type - * The machine type that was assigned for the worker. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * The zone the worker is running in. - * - * Generated from protobuf field string zone = 1; - * @return string - */ - public function getZone() - { - return $this->zone; - } - - /** - * The zone the worker is running in. - * - * Generated from protobuf field string zone = 1; - * @param string $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkString($var, True); - $this->zone = $var; - - return $this; - } - - /** - * The worker's instance name. - * - * Generated from protobuf field string instance = 2; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * The worker's instance name. - * - * Generated from protobuf field string instance = 2; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * The machine type that was assigned for the worker. - * - * Generated from protobuf field string machine_type = 3; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * The machine type that was assigned for the worker. - * - * Generated from protobuf field string machine_type = 3; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/WorkerReleasedEvent.php b/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/WorkerReleasedEvent.php deleted file mode 100644 index 8cc7ed6a39bc..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/proto/src/Google/Cloud/LifeSciences/V2beta/WorkerReleasedEvent.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.lifesciences.v2beta.WorkerReleasedEvent - */ -class WorkerReleasedEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The zone the worker was running in. - * - * Generated from protobuf field string zone = 1; - */ - protected $zone = ''; - /** - * The worker's instance name. - * - * Generated from protobuf field string instance = 2; - */ - protected $instance = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $zone - * The zone the worker was running in. - * @type string $instance - * The worker's instance name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * The zone the worker was running in. - * - * Generated from protobuf field string zone = 1; - * @return string - */ - public function getZone() - { - return $this->zone; - } - - /** - * The zone the worker was running in. - * - * Generated from protobuf field string zone = 1; - * @param string $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkString($var, True); - $this->zone = $var; - - return $this; - } - - /** - * The worker's instance name. - * - * Generated from protobuf field string instance = 2; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * The worker's instance name. - * - * Generated from protobuf field string instance = 2; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LifeSciences/v2beta/samples/V2beta/WorkflowsServiceV2BetaClient/get_location.php b/owl-bot-staging/LifeSciences/v2beta/samples/V2beta/WorkflowsServiceV2BetaClient/get_location.php deleted file mode 100644 index 5b76a1118def..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/samples/V2beta/WorkflowsServiceV2BetaClient/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 lifesciences_v2beta_generated_WorkflowsServiceV2Beta_GetLocation_sync] diff --git a/owl-bot-staging/LifeSciences/v2beta/samples/V2beta/WorkflowsServiceV2BetaClient/list_locations.php b/owl-bot-staging/LifeSciences/v2beta/samples/V2beta/WorkflowsServiceV2BetaClient/list_locations.php deleted file mode 100644 index 39bc099688ad..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/samples/V2beta/WorkflowsServiceV2BetaClient/list_locations.php +++ /dev/null @@ -1,62 +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 lifesciences_v2beta_generated_WorkflowsServiceV2Beta_ListLocations_sync] diff --git a/owl-bot-staging/LifeSciences/v2beta/samples/V2beta/WorkflowsServiceV2BetaClient/run_pipeline.php b/owl-bot-staging/LifeSciences/v2beta/samples/V2beta/WorkflowsServiceV2BetaClient/run_pipeline.php deleted file mode 100644 index a75e879d366f..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/samples/V2beta/WorkflowsServiceV2BetaClient/run_pipeline.php +++ /dev/null @@ -1,88 +0,0 @@ -setPipeline($pipeline); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $workflowsServiceV2BetaClient->runPipeline($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var RunPipelineResponse $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()); - } -} -// [END lifesciences_v2beta_generated_WorkflowsServiceV2Beta_RunPipeline_sync] diff --git a/owl-bot-staging/LifeSciences/v2beta/src/V2beta/Client/WorkflowsServiceV2BetaClient.php b/owl-bot-staging/LifeSciences/v2beta/src/V2beta/Client/WorkflowsServiceV2BetaClient.php deleted file mode 100644 index 2f4eaa89ebaa..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/src/V2beta/Client/WorkflowsServiceV2BetaClient.php +++ /dev/null @@ -1,320 +0,0 @@ - runPipelineAsync(RunPipelineRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class WorkflowsServiceV2BetaClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.lifesciences.v2beta.WorkflowsServiceV2Beta'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'lifesciences.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'lifesciences.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', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/workflows_service_v2_beta_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/workflows_service_v2_beta_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/workflows_service_v2_beta_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/workflows_service_v2_beta_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - * - * @experimental - */ - 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 - * - * @experimental - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $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 'lifesciences.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $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); - } - - /** - * Runs a pipeline. The returned Operation's [metadata] - * [google.longrunning.Operation.metadata] field will contain a - * [google.cloud.lifesciences.v2beta.Metadata][google.cloud.lifesciences.v2beta.Metadata] - * object describing the status of the pipeline execution. The - * [response][google.longrunning.Operation.response] field will contain a - * [google.cloud.lifesciences.v2beta.RunPipelineResponse][google.cloud.lifesciences.v2beta.RunPipelineResponse] - * object if the pipeline completes successfully. - * - * **Note:** Before you can use this method, the *Life Sciences Service Agent* - * must have access to your project. This is done automatically when the - * Cloud Life Sciences API is first enabled, but if you delete this permission - * you must disable and re-enable the API to grant the Life Sciences - * Service Agent the required permissions. - * Authorization requires the following [Google - * IAM](https://cloud.google.com/iam/) permission: - * - * * `lifesciences.workflows.run` - * - * The async variant is {@see WorkflowsServiceV2BetaClient::runPipelineAsync()} . - * - * @example samples/V2beta/WorkflowsServiceV2BetaClient/run_pipeline.php - * - * @param RunPipelineRequest $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. - * - * @experimental - */ - public function runPipeline(RunPipelineRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RunPipeline', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see WorkflowsServiceV2BetaClient::getLocationAsync()} . - * - * @example samples/V2beta/WorkflowsServiceV2BetaClient/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. - * - * @experimental - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see WorkflowsServiceV2BetaClient::listLocationsAsync()} . - * - * @example samples/V2beta/WorkflowsServiceV2BetaClient/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. - * - * @experimental - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/LifeSciences/v2beta/src/V2beta/Gapic/WorkflowsServiceV2BetaGapicClient.php b/owl-bot-staging/LifeSciences/v2beta/src/V2beta/Gapic/WorkflowsServiceV2BetaGapicClient.php deleted file mode 100644 index 6c5f487f2533..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/src/V2beta/Gapic/WorkflowsServiceV2BetaGapicClient.php +++ /dev/null @@ -1,471 +0,0 @@ -runPipeline($pipeline); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $workflowsServiceV2BetaClient->runPipeline($pipeline); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $workflowsServiceV2BetaClient->resumeOperation($operationName, 'runPipeline'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $workflowsServiceV2BetaClient->close(); - * } - * ``` - * - * @experimental - * - * @deprecated Please use the new service client {@see \Google\Cloud\LifeSciences\V2beta\Client\WorkflowsServiceV2BetaClient}. - */ -class WorkflowsServiceV2BetaGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.lifesciences.v2beta.WorkflowsServiceV2Beta'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'lifesciences.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'lifesciences.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/workflows_service_v2_beta_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/workflows_service_v2_beta_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/workflows_service_v2_beta_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/workflows_service_v2_beta_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - * - * @experimental - */ - 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 - * - * @experimental - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $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 'lifesciences.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Runs a pipeline. The returned Operation's [metadata] - * [google.longrunning.Operation.metadata] field will contain a - * [google.cloud.lifesciences.v2beta.Metadata][google.cloud.lifesciences.v2beta.Metadata] - * object describing the status of the pipeline execution. The - * [response][google.longrunning.Operation.response] field will contain a - * [google.cloud.lifesciences.v2beta.RunPipelineResponse][google.cloud.lifesciences.v2beta.RunPipelineResponse] - * object if the pipeline completes successfully. - * - * **Note:** Before you can use this method, the *Life Sciences Service Agent* - * must have access to your project. This is done automatically when the - * Cloud Life Sciences API is first enabled, but if you delete this permission - * you must disable and re-enable the API to grant the Life Sciences - * Service Agent the required permissions. - * Authorization requires the following [Google - * IAM](https://cloud.google.com/iam/) permission: - * - * * `lifesciences.workflows.run` - * - * Sample code: - * ``` - * $workflowsServiceV2BetaClient = new WorkflowsServiceV2BetaClient(); - * try { - * $pipeline = new Pipeline(); - * $operationResponse = $workflowsServiceV2BetaClient->runPipeline($pipeline); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $workflowsServiceV2BetaClient->runPipeline($pipeline); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $workflowsServiceV2BetaClient->resumeOperation($operationName, 'runPipeline'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $workflowsServiceV2BetaClient->close(); - * } - * ``` - * - * @param Pipeline $pipeline Required. The description of the pipeline to run. - * @param array $optionalArgs { - * Optional. - * - * @type string $parent - * The project and location that this request should be executed against. - * @type array $labels - * User-defined labels to associate with the returned operation. These - * labels are not propagated to any Google Cloud Platform resources used by - * the operation, and can be modified at any time. - * - * To associate labels with resources created while executing the operation, - * see the appropriate resource message (for example, `VirtualMachine`). - * @type string $pubSubTopic - * The name of an existing Pub/Sub topic. The server will publish - * messages to this topic whenever the status of the operation changes. - * The Life Sciences Service Agent account must have publisher permissions to - * the specified topic or notifications will not be sent. - * @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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function runPipeline($pipeline, array $optionalArgs = []) - { - $request = new RunPipelineRequest(); - $requestParamHeaders = []; - $request->setPipeline($pipeline); - if (isset($optionalArgs['parent'])) { - $request->setParent($optionalArgs['parent']); - $requestParamHeaders['parent'] = $optionalArgs['parent']; - } - - if (isset($optionalArgs['labels'])) { - $request->setLabels($optionalArgs['labels']); - } - - if (isset($optionalArgs['pubSubTopic'])) { - $request->setPubSubTopic($optionalArgs['pubSubTopic']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('RunPipeline', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $workflowsServiceV2BetaClient = new WorkflowsServiceV2BetaClient(); - * try { - * $response = $workflowsServiceV2BetaClient->getLocation(); - * } finally { - * $workflowsServiceV2BetaClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @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 \Google\Cloud\Location\Location - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $workflowsServiceV2BetaClient = new WorkflowsServiceV2BetaClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $workflowsServiceV2BetaClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $workflowsServiceV2BetaClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $workflowsServiceV2BetaClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/LifeSciences/v2beta/src/V2beta/WorkflowsServiceV2BetaClient.php b/owl-bot-staging/LifeSciences/v2beta/src/V2beta/WorkflowsServiceV2BetaClient.php deleted file mode 100644 index 1041230affb7..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/src/V2beta/WorkflowsServiceV2BetaClient.php +++ /dev/null @@ -1,36 +0,0 @@ - [ - 'google.cloud.lifesciences.v2beta.WorkflowsServiceV2Beta' => [ - 'RunPipeline' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\LifeSciences\V2beta\RunPipelineResponse', - 'metadataReturnType' => '\Google\Cloud\LifeSciences\V2beta\Metadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - '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', - ], - ], - ], -]; diff --git a/owl-bot-staging/LifeSciences/v2beta/src/V2beta/resources/workflows_service_v2_beta_rest_client_config.php b/owl-bot-staging/LifeSciences/v2beta/src/V2beta/resources/workflows_service_v2_beta_rest_client_config.php deleted file mode 100644 index 1d308717cd6c..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/src/V2beta/resources/workflows_service_v2_beta_rest_client_config.php +++ /dev/null @@ -1,101 +0,0 @@ - [ - 'google.cloud.lifesciences.v2beta.WorkflowsServiceV2Beta' => [ - 'RunPipeline' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{parent=projects/*/locations/*}/pipelines:run', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/LifeSciences/v2beta/tests/Unit/V2beta/Client/WorkflowsServiceV2BetaClientTest.php b/owl-bot-staging/LifeSciences/v2beta/tests/Unit/V2beta/Client/WorkflowsServiceV2BetaClientTest.php deleted file mode 100644 index 84144beec5c9..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/tests/Unit/V2beta/Client/WorkflowsServiceV2BetaClientTest.php +++ /dev/null @@ -1,380 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return WorkflowsServiceV2BetaClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new WorkflowsServiceV2BetaClient($options); - } - - /** @test */ - public function runPipelineTest() - { - $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/runPipelineTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new RunPipelineResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/runPipelineTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $pipeline = new Pipeline(); - $request = (new RunPipelineRequest()) - ->setPipeline($pipeline); - $response = $gapicClient->runPipeline($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.lifesciences.v2beta.WorkflowsServiceV2Beta/RunPipeline', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getPipeline(); - $this->assertProtobufEquals($pipeline, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runPipelineTest'); - $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 runPipelineExceptionTest() - { - $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/runPipelineTest'); - $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 - $pipeline = new Pipeline(); - $request = (new RunPipelineRequest()) - ->setPipeline($pipeline); - $response = $gapicClient->runPipeline($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runPipelineTest'); - 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 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 runPipelineAsyncTest() - { - $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/runPipelineTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new RunPipelineResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/runPipelineTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $pipeline = new Pipeline(); - $request = (new RunPipelineRequest()) - ->setPipeline($pipeline); - $response = $gapicClient->runPipelineAsync($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.lifesciences.v2beta.WorkflowsServiceV2Beta/RunPipeline', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getPipeline(); - $this->assertProtobufEquals($pipeline, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runPipelineTest'); - $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/LifeSciences/v2beta/tests/Unit/V2beta/WorkflowsServiceV2BetaClientTest.php b/owl-bot-staging/LifeSciences/v2beta/tests/Unit/V2beta/WorkflowsServiceV2BetaClientTest.php deleted file mode 100644 index 5185443d3f24..000000000000 --- a/owl-bot-staging/LifeSciences/v2beta/tests/Unit/V2beta/WorkflowsServiceV2BetaClientTest.php +++ /dev/null @@ -1,305 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return WorkflowsServiceV2BetaClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new WorkflowsServiceV2BetaClient($options); - } - - /** @test */ - public function runPipelineTest() - { - $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/runPipelineTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new RunPipelineResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/runPipelineTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $pipeline = new Pipeline(); - $response = $gapicClient->runPipeline($pipeline); - $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.lifesciences.v2beta.WorkflowsServiceV2Beta/RunPipeline', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getPipeline(); - $this->assertProtobufEquals($pipeline, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runPipelineTest'); - $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 runPipelineExceptionTest() - { - $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/runPipelineTest'); - $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 - $pipeline = new Pipeline(); - $response = $gapicClient->runPipeline($pipeline); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runPipelineTest'); - 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 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); - $response = $gapicClient->getLocation(); - $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); - try { - $gapicClient->getLocation(); - // 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); - $response = $gapicClient->listLocations(); - $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); - try { - $gapicClient->listLocations(); - // 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()); - } -} diff --git a/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LogEntry.php b/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LogEntry.php deleted file mode 100644 index 91b3c9554457..000000000000 Binary files a/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LogEntry.php and /dev/null differ diff --git a/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/Logging.php b/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/Logging.php deleted file mode 100644 index 94124b0b1c3d..000000000000 Binary files a/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/Logging.php and /dev/null differ diff --git a/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LoggingConfig.php b/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LoggingConfig.php deleted file mode 100644 index bf1460169773..000000000000 Binary files a/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LoggingConfig.php and /dev/null differ diff --git a/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LoggingMetrics.php b/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LoggingMetrics.php deleted file mode 100644 index 02afd309bfb7..000000000000 Binary files a/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LoggingMetrics.php and /dev/null differ diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BigQueryDataset.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BigQueryDataset.php deleted file mode 100644 index 6ac6f6925f99..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BigQueryDataset.php +++ /dev/null @@ -1,87 +0,0 @@ -google.logging.v2.BigQueryDataset - */ -class BigQueryDataset extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The full resource name of the BigQuery dataset. The DATASET_ID - * will match the ID of the link, so the link must match the naming - * restrictions of BigQuery datasets (alphanumeric characters and underscores - * only). - * The dataset will have a resource path of - * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET_ID]" - * - * Generated from protobuf field string dataset_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $dataset_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $dataset_id - * Output only. The full resource name of the BigQuery dataset. The DATASET_ID - * will match the ID of the link, so the link must match the naming - * restrictions of BigQuery datasets (alphanumeric characters and underscores - * only). - * The dataset will have a resource path of - * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET_ID]" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The full resource name of the BigQuery dataset. The DATASET_ID - * will match the ID of the link, so the link must match the naming - * restrictions of BigQuery datasets (alphanumeric characters and underscores - * only). - * The dataset will have a resource path of - * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET_ID]" - * - * Generated from protobuf field string dataset_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDatasetId() - { - return $this->dataset_id; - } - - /** - * Output only. The full resource name of the BigQuery dataset. The DATASET_ID - * will match the ID of the link, so the link must match the naming - * restrictions of BigQuery datasets (alphanumeric characters and underscores - * only). - * The dataset will have a resource path of - * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET_ID]" - * - * Generated from protobuf field string dataset_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDatasetId($var) - { - GPBUtil::checkString($var, True); - $this->dataset_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BigQueryOptions.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BigQueryOptions.php deleted file mode 100644 index 54745c3ee82a..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BigQueryOptions.php +++ /dev/null @@ -1,149 +0,0 @@ -google.logging.v2.BigQueryOptions - */ -class BigQueryOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Whether to use [BigQuery's partition - * tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By - * default, Cloud Logging creates dated tables based on the log entries' - * timestamps, e.g. syslog_20170523. With partitioned tables the date suffix - * is no longer present and [special query - * syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) - * has to be used instead. In both cases, tables are sharded based on UTC - * timezone. - * - * Generated from protobuf field bool use_partitioned_tables = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $use_partitioned_tables = false; - /** - * Output only. True if new timestamp column based partitioning is in use, - * false if legacy ingestion-time partitioning is in use. - * All new sinks will have this field set true and will use timestamp column - * based partitioning. If use_partitioned_tables is false, this value has no - * meaning and will be false. Legacy sinks using partitioned tables will have - * this field set to false. - * - * Generated from protobuf field bool uses_timestamp_column_partitioning = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uses_timestamp_column_partitioning = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $use_partitioned_tables - * Optional. Whether to use [BigQuery's partition - * tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By - * default, Cloud Logging creates dated tables based on the log entries' - * timestamps, e.g. syslog_20170523. With partitioned tables the date suffix - * is no longer present and [special query - * syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) - * has to be used instead. In both cases, tables are sharded based on UTC - * timezone. - * @type bool $uses_timestamp_column_partitioning - * Output only. True if new timestamp column based partitioning is in use, - * false if legacy ingestion-time partitioning is in use. - * All new sinks will have this field set true and will use timestamp column - * based partitioning. If use_partitioned_tables is false, this value has no - * meaning and will be false. Legacy sinks using partitioned tables will have - * this field set to false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Whether to use [BigQuery's partition - * tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By - * default, Cloud Logging creates dated tables based on the log entries' - * timestamps, e.g. syslog_20170523. With partitioned tables the date suffix - * is no longer present and [special query - * syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) - * has to be used instead. In both cases, tables are sharded based on UTC - * timezone. - * - * Generated from protobuf field bool use_partitioned_tables = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getUsePartitionedTables() - { - return $this->use_partitioned_tables; - } - - /** - * Optional. Whether to use [BigQuery's partition - * tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By - * default, Cloud Logging creates dated tables based on the log entries' - * timestamps, e.g. syslog_20170523. With partitioned tables the date suffix - * is no longer present and [special query - * syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) - * has to be used instead. In both cases, tables are sharded based on UTC - * timezone. - * - * Generated from protobuf field bool use_partitioned_tables = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setUsePartitionedTables($var) - { - GPBUtil::checkBool($var); - $this->use_partitioned_tables = $var; - - return $this; - } - - /** - * Output only. True if new timestamp column based partitioning is in use, - * false if legacy ingestion-time partitioning is in use. - * All new sinks will have this field set true and will use timestamp column - * based partitioning. If use_partitioned_tables is false, this value has no - * meaning and will be false. Legacy sinks using partitioned tables will have - * this field set to false. - * - * Generated from protobuf field bool uses_timestamp_column_partitioning = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getUsesTimestampColumnPartitioning() - { - return $this->uses_timestamp_column_partitioning; - } - - /** - * Output only. True if new timestamp column based partitioning is in use, - * false if legacy ingestion-time partitioning is in use. - * All new sinks will have this field set true and will use timestamp column - * based partitioning. If use_partitioned_tables is false, this value has no - * meaning and will be false. Legacy sinks using partitioned tables will have - * this field set to false. - * - * Generated from protobuf field bool uses_timestamp_column_partitioning = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setUsesTimestampColumnPartitioning($var) - { - GPBUtil::checkBool($var); - $this->uses_timestamp_column_partitioning = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BucketMetadata.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BucketMetadata.php deleted file mode 100644 index 57713f08b32f..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BucketMetadata.php +++ /dev/null @@ -1,230 +0,0 @@ -google.logging.v2.BucketMetadata - */ -class BucketMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The create time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The end time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * State of an operation. - * - * Generated from protobuf field .google.logging.v2.OperationState state = 3; - */ - protected $state = 0; - protected $request; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The create time of an operation. - * @type \Google\Protobuf\Timestamp $end_time - * The end time of an operation. - * @type int $state - * State of an operation. - * @type \Google\Cloud\Logging\V2\CreateBucketRequest $create_bucket_request - * LongRunningCreateBucket RPC request. - * @type \Google\Cloud\Logging\V2\UpdateBucketRequest $update_bucket_request - * LongRunningUpdateBucket RPC request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * The create time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The create time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The end time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The end time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * State of an operation. - * - * Generated from protobuf field .google.logging.v2.OperationState state = 3; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * State of an operation. - * - * Generated from protobuf field .google.logging.v2.OperationState state = 3; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * LongRunningCreateBucket RPC request. - * - * Generated from protobuf field .google.logging.v2.CreateBucketRequest create_bucket_request = 4; - * @return \Google\Cloud\Logging\V2\CreateBucketRequest|null - */ - public function getCreateBucketRequest() - { - return $this->readOneof(4); - } - - public function hasCreateBucketRequest() - { - return $this->hasOneof(4); - } - - /** - * LongRunningCreateBucket RPC request. - * - * Generated from protobuf field .google.logging.v2.CreateBucketRequest create_bucket_request = 4; - * @param \Google\Cloud\Logging\V2\CreateBucketRequest $var - * @return $this - */ - public function setCreateBucketRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\CreateBucketRequest::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * LongRunningUpdateBucket RPC request. - * - * Generated from protobuf field .google.logging.v2.UpdateBucketRequest update_bucket_request = 5; - * @return \Google\Cloud\Logging\V2\UpdateBucketRequest|null - */ - public function getUpdateBucketRequest() - { - return $this->readOneof(5); - } - - public function hasUpdateBucketRequest() - { - return $this->hasOneof(5); - } - - /** - * LongRunningUpdateBucket RPC request. - * - * Generated from protobuf field .google.logging.v2.UpdateBucketRequest update_bucket_request = 5; - * @param \Google\Cloud\Logging\V2\UpdateBucketRequest $var - * @return $this - */ - public function setUpdateBucketRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\UpdateBucketRequest::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getRequest() - { - return $this->whichOneof("request"); - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CmekSettings.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CmekSettings.php deleted file mode 100644 index 80371e43baa0..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CmekSettings.php +++ /dev/null @@ -1,320 +0,0 @@ -google.logging.v2.CmekSettings - */ -class CmekSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the CMEK settings. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` - * To enable CMEK for the Log Router, set this field to a valid - * `kms_key_name` for which the associated service account has the required - * cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key. - * The Cloud KMS key used by the Log Router can be updated by changing the - * `kms_key_name` to a new valid key name or disabled by setting the key name - * to an empty string. Encryption operations that are in progress will be - * completed with the key that was in use when they started. Decryption - * operations will be completed using the key that was used at the time of - * encryption unless access to that key has been revoked. - * To disable CMEK for the Log Router, set this field to an empty string. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string kms_key_name = 2; - */ - protected $kms_key_name = ''; - /** - * The CryptoKeyVersion resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1"` - * This is a read-only field used to convey the specific configured - * CryptoKeyVersion of `kms_key` that has been configured. It will be - * populated in cases where the CMEK settings are bound to a single key - * version. - * If this field is populated, the `kms_key` is tied to a specific - * CryptoKeyVersion. - * - * Generated from protobuf field string kms_key_version_name = 4; - */ - protected $kms_key_version_name = ''; - /** - * Output only. The service account that will be used by the Log Router to - * access your Cloud KMS key. - * Before enabling CMEK for Log Router, you must first assign the - * cloudkms.cryptoKeyEncrypterDecrypter role to the service account that - * the Log Router will use to access your Cloud KMS key. Use - * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to - * obtain the service account ID. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $service_account_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the CMEK settings. - * @type string $kms_key_name - * The resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` - * To enable CMEK for the Log Router, set this field to a valid - * `kms_key_name` for which the associated service account has the required - * cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key. - * The Cloud KMS key used by the Log Router can be updated by changing the - * `kms_key_name` to a new valid key name or disabled by setting the key name - * to an empty string. Encryption operations that are in progress will be - * completed with the key that was in use when they started. Decryption - * operations will be completed using the key that was used at the time of - * encryption unless access to that key has been revoked. - * To disable CMEK for the Log Router, set this field to an empty string. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * @type string $kms_key_version_name - * The CryptoKeyVersion resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1"` - * This is a read-only field used to convey the specific configured - * CryptoKeyVersion of `kms_key` that has been configured. It will be - * populated in cases where the CMEK settings are bound to a single key - * version. - * If this field is populated, the `kms_key` is tied to a specific - * CryptoKeyVersion. - * @type string $service_account_id - * Output only. The service account that will be used by the Log Router to - * access your Cloud KMS key. - * Before enabling CMEK for Log Router, you must first assign the - * cloudkms.cryptoKeyEncrypterDecrypter role to the service account that - * the Log Router will use to access your Cloud KMS key. Use - * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to - * obtain the service account ID. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the CMEK settings. - * - * 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 of the CMEK settings. - * - * 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 resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` - * To enable CMEK for the Log Router, set this field to a valid - * `kms_key_name` for which the associated service account has the required - * cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key. - * The Cloud KMS key used by the Log Router can be updated by changing the - * `kms_key_name` to a new valid key name or disabled by setting the key name - * to an empty string. Encryption operations that are in progress will be - * completed with the key that was in use when they started. Decryption - * operations will be completed using the key that was used at the time of - * encryption unless access to that key has been revoked. - * To disable CMEK for the Log Router, set this field to an empty string. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string kms_key_name = 2; - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * The resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` - * To enable CMEK for the Log Router, set this field to a valid - * `kms_key_name` for which the associated service account has the required - * cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key. - * The Cloud KMS key used by the Log Router can be updated by changing the - * `kms_key_name` to a new valid key name or disabled by setting the key name - * to an empty string. Encryption operations that are in progress will be - * completed with the key that was in use when they started. Decryption - * operations will be completed using the key that was used at the time of - * encryption unless access to that key has been revoked. - * To disable CMEK for the Log Router, set this field to an empty string. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string kms_key_name = 2; - * @param string $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_name = $var; - - return $this; - } - - /** - * The CryptoKeyVersion resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1"` - * This is a read-only field used to convey the specific configured - * CryptoKeyVersion of `kms_key` that has been configured. It will be - * populated in cases where the CMEK settings are bound to a single key - * version. - * If this field is populated, the `kms_key` is tied to a specific - * CryptoKeyVersion. - * - * Generated from protobuf field string kms_key_version_name = 4; - * @return string - */ - public function getKmsKeyVersionName() - { - return $this->kms_key_version_name; - } - - /** - * The CryptoKeyVersion resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1"` - * This is a read-only field used to convey the specific configured - * CryptoKeyVersion of `kms_key` that has been configured. It will be - * populated in cases where the CMEK settings are bound to a single key - * version. - * If this field is populated, the `kms_key` is tied to a specific - * CryptoKeyVersion. - * - * Generated from protobuf field string kms_key_version_name = 4; - * @param string $var - * @return $this - */ - public function setKmsKeyVersionName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_version_name = $var; - - return $this; - } - - /** - * Output only. The service account that will be used by the Log Router to - * access your Cloud KMS key. - * Before enabling CMEK for Log Router, you must first assign the - * cloudkms.cryptoKeyEncrypterDecrypter role to the service account that - * the Log Router will use to access your Cloud KMS key. Use - * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to - * obtain the service account ID. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getServiceAccountId() - { - return $this->service_account_id; - } - - /** - * Output only. The service account that will be used by the Log Router to - * access your Cloud KMS key. - * Before enabling CMEK for Log Router, you must first assign the - * cloudkms.cryptoKeyEncrypterDecrypter role to the service account that - * the Log Router will use to access your Cloud KMS key. Use - * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to - * obtain the service account ID. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setServiceAccountId($var) - { - GPBUtil::checkString($var, True); - $this->service_account_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesMetadata.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesMetadata.php deleted file mode 100644 index ad1fe195b4f9..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesMetadata.php +++ /dev/null @@ -1,317 +0,0 @@ -google.logging.v2.CopyLogEntriesMetadata - */ -class CopyLogEntriesMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The create time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The end time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * State of an operation. - * - * Generated from protobuf field .google.logging.v2.OperationState state = 3; - */ - protected $state = 0; - /** - * Identifies whether the user has requested cancellation of the operation. - * - * Generated from protobuf field bool cancellation_requested = 4; - */ - protected $cancellation_requested = false; - /** - * CopyLogEntries RPC request. - * - * Generated from protobuf field .google.logging.v2.CopyLogEntriesRequest request = 5; - */ - protected $request = null; - /** - * Estimated progress of the operation (0 - 100%). - * - * Generated from protobuf field int32 progress = 6; - */ - protected $progress = 0; - /** - * The IAM identity of a service account that must be granted access to the - * destination. - * If the service account is not granted permission to the destination within - * an hour, the operation will be cancelled. - * For example: `"serviceAccount:foo@bar.com"` - * - * Generated from protobuf field string writer_identity = 7; - */ - protected $writer_identity = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The create time of an operation. - * @type \Google\Protobuf\Timestamp $end_time - * The end time of an operation. - * @type int $state - * State of an operation. - * @type bool $cancellation_requested - * Identifies whether the user has requested cancellation of the operation. - * @type \Google\Cloud\Logging\V2\CopyLogEntriesRequest $request - * CopyLogEntries RPC request. - * @type int $progress - * Estimated progress of the operation (0 - 100%). - * @type string $writer_identity - * The IAM identity of a service account that must be granted access to the - * destination. - * If the service account is not granted permission to the destination within - * an hour, the operation will be cancelled. - * For example: `"serviceAccount:foo@bar.com"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * The create time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The create time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The end time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The end time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * State of an operation. - * - * Generated from protobuf field .google.logging.v2.OperationState state = 3; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * State of an operation. - * - * Generated from protobuf field .google.logging.v2.OperationState state = 3; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * Identifies whether the user has requested cancellation of the operation. - * - * Generated from protobuf field bool cancellation_requested = 4; - * @return bool - */ - public function getCancellationRequested() - { - return $this->cancellation_requested; - } - - /** - * Identifies whether the user has requested cancellation of the operation. - * - * Generated from protobuf field bool cancellation_requested = 4; - * @param bool $var - * @return $this - */ - public function setCancellationRequested($var) - { - GPBUtil::checkBool($var); - $this->cancellation_requested = $var; - - return $this; - } - - /** - * CopyLogEntries RPC request. - * - * Generated from protobuf field .google.logging.v2.CopyLogEntriesRequest request = 5; - * @return \Google\Cloud\Logging\V2\CopyLogEntriesRequest|null - */ - public function getRequest() - { - return $this->request; - } - - public function hasRequest() - { - return isset($this->request); - } - - public function clearRequest() - { - unset($this->request); - } - - /** - * CopyLogEntries RPC request. - * - * Generated from protobuf field .google.logging.v2.CopyLogEntriesRequest request = 5; - * @param \Google\Cloud\Logging\V2\CopyLogEntriesRequest $var - * @return $this - */ - public function setRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\CopyLogEntriesRequest::class); - $this->request = $var; - - return $this; - } - - /** - * Estimated progress of the operation (0 - 100%). - * - * Generated from protobuf field int32 progress = 6; - * @return int - */ - public function getProgress() - { - return $this->progress; - } - - /** - * Estimated progress of the operation (0 - 100%). - * - * Generated from protobuf field int32 progress = 6; - * @param int $var - * @return $this - */ - public function setProgress($var) - { - GPBUtil::checkInt32($var); - $this->progress = $var; - - return $this; - } - - /** - * The IAM identity of a service account that must be granted access to the - * destination. - * If the service account is not granted permission to the destination within - * an hour, the operation will be cancelled. - * For example: `"serviceAccount:foo@bar.com"` - * - * Generated from protobuf field string writer_identity = 7; - * @return string - */ - public function getWriterIdentity() - { - return $this->writer_identity; - } - - /** - * The IAM identity of a service account that must be granted access to the - * destination. - * If the service account is not granted permission to the destination within - * an hour, the operation will be cancelled. - * For example: `"serviceAccount:foo@bar.com"` - * - * Generated from protobuf field string writer_identity = 7; - * @param string $var - * @return $this - */ - public function setWriterIdentity($var) - { - GPBUtil::checkString($var, True); - $this->writer_identity = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesRequest.php deleted file mode 100644 index db42fc75bd5d..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesRequest.php +++ /dev/null @@ -1,147 +0,0 @@ -google.logging.v2.CopyLogEntriesRequest - */ -class CopyLogEntriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Log bucket from which to copy log entries. - * For example: - * `"projects/my-project/locations/global/buckets/my-source-bucket"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. A filter specifying which log entries to copy. The filter must be - * no more than 20k characters. An empty filter matches all log entries. - * - * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Required. Destination to which to copy log entries. - * - * Generated from protobuf field string destination = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $destination = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Log bucket from which to copy log entries. - * For example: - * `"projects/my-project/locations/global/buckets/my-source-bucket"` - * @type string $filter - * Optional. A filter specifying which log entries to copy. The filter must be - * no more than 20k characters. An empty filter matches all log entries. - * @type string $destination - * Required. Destination to which to copy log entries. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. Log bucket from which to copy log entries. - * For example: - * `"projects/my-project/locations/global/buckets/my-source-bucket"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Log bucket from which to copy log entries. - * For example: - * `"projects/my-project/locations/global/buckets/my-source-bucket"` - * - * 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; - } - - /** - * Optional. A filter specifying which log entries to copy. The filter must be - * no more than 20k characters. An empty filter matches all log entries. - * - * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. A filter specifying which log entries to copy. The filter must be - * no more than 20k characters. An empty filter matches all log entries. - * - * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Required. Destination to which to copy log entries. - * - * Generated from protobuf field string destination = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDestination() - { - return $this->destination; - } - - /** - * Required. Destination to which to copy log entries. - * - * Generated from protobuf field string destination = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDestination($var) - { - GPBUtil::checkString($var, True); - $this->destination = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesResponse.php deleted file mode 100644 index 103ccdbe1933..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.logging.v2.CopyLogEntriesResponse - */ -class CopyLogEntriesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Number of log entries copied. - * - * Generated from protobuf field int64 log_entries_copied_count = 1; - */ - protected $log_entries_copied_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $log_entries_copied_count - * Number of log entries copied. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Number of log entries copied. - * - * Generated from protobuf field int64 log_entries_copied_count = 1; - * @return int|string - */ - public function getLogEntriesCopiedCount() - { - return $this->log_entries_copied_count; - } - - /** - * Number of log entries copied. - * - * Generated from protobuf field int64 log_entries_copied_count = 1; - * @param int|string $var - * @return $this - */ - public function setLogEntriesCopiedCount($var) - { - GPBUtil::checkInt64($var); - $this->log_entries_copied_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateBucketRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateBucketRequest.php deleted file mode 100644 index d91743acf052..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateBucketRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -google.logging.v2.CreateBucketRequest - */ -class CreateBucketRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource in which to create the log bucket: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * For example: - * `"projects/my-project/locations/global"` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers - * are limited to 100 characters and can include only letters, digits, - * underscores, hyphens, and periods. - * - * Generated from protobuf field string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bucket_id = ''; - /** - * Required. The new bucket. The region specified in the new bucket must be - * compliant with any Location Restriction Org Policy. The name field in the - * bucket is ignored. - * - * Generated from protobuf field .google.logging.v2.LogBucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bucket = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource in which to create the log bucket: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * For example: - * `"projects/my-project/locations/global"` - * @type string $bucket_id - * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers - * are limited to 100 characters and can include only letters, digits, - * underscores, hyphens, and periods. - * @type \Google\Cloud\Logging\V2\LogBucket $bucket - * Required. The new bucket. The region specified in the new bucket must be - * compliant with any Location Restriction Org Policy. The name field in the - * bucket is ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource in which to create the log bucket: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * For example: - * `"projects/my-project/locations/global"` - * - * 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 in which to create the log bucket: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * For example: - * `"projects/my-project/locations/global"` - * - * 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 client-assigned identifier such as `"my-bucket"`. Identifiers - * are limited to 100 characters and can include only letters, digits, - * underscores, hyphens, and periods. - * - * Generated from protobuf field string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBucketId() - { - return $this->bucket_id; - } - - /** - * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers - * are limited to 100 characters and can include only letters, digits, - * underscores, hyphens, and periods. - * - * Generated from protobuf field string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBucketId($var) - { - GPBUtil::checkString($var, True); - $this->bucket_id = $var; - - return $this; - } - - /** - * Required. The new bucket. The region specified in the new bucket must be - * compliant with any Location Restriction Org Policy. The name field in the - * bucket is ignored. - * - * Generated from protobuf field .google.logging.v2.LogBucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\LogBucket|null - */ - public function getBucket() - { - return $this->bucket; - } - - public function hasBucket() - { - return isset($this->bucket); - } - - public function clearBucket() - { - unset($this->bucket); - } - - /** - * Required. The new bucket. The region specified in the new bucket must be - * compliant with any Location Restriction Org Policy. The name field in the - * bucket is ignored. - * - * Generated from protobuf field .google.logging.v2.LogBucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\LogBucket $var - * @return $this - */ - public function setBucket($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogBucket::class); - $this->bucket = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateExclusionRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateExclusionRequest.php deleted file mode 100644 index f0eeb1e08ec3..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateExclusionRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.logging.v2.CreateExclusionRequest - */ -class CreateExclusionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource in which to create the exclusion: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * For examples: - * `"projects/my-logging-project"` - * `"organizations/123456789"` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The new exclusion, whose `name` parameter is an exclusion name - * that is not already used in the parent resource. - * - * Generated from protobuf field .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $exclusion = null; - - /** - * @param string $parent Required. The parent resource in which to create the exclusion: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * For examples: - * - * `"projects/my-logging-project"` - * `"organizations/123456789"` - * Please see {@see ConfigServiceV2Client::projectName()} for help formatting this field. - * @param \Google\Cloud\Logging\V2\LogExclusion $exclusion Required. The new exclusion, whose `name` parameter is an exclusion name - * that is not already used in the parent resource. - * - * @return \Google\Cloud\Logging\V2\CreateExclusionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Logging\V2\LogExclusion $exclusion): self - { - return (new self()) - ->setParent($parent) - ->setExclusion($exclusion); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource in which to create the exclusion: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * For examples: - * `"projects/my-logging-project"` - * `"organizations/123456789"` - * @type \Google\Cloud\Logging\V2\LogExclusion $exclusion - * Required. The new exclusion, whose `name` parameter is an exclusion name - * that is not already used in the parent resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource in which to create the exclusion: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * For examples: - * `"projects/my-logging-project"` - * `"organizations/123456789"` - * - * 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 parent resource in which to create the exclusion: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * For examples: - * `"projects/my-logging-project"` - * `"organizations/123456789"` - * - * 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. The new exclusion, whose `name` parameter is an exclusion name - * that is not already used in the parent resource. - * - * Generated from protobuf field .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\LogExclusion|null - */ - public function getExclusion() - { - return $this->exclusion; - } - - public function hasExclusion() - { - return isset($this->exclusion); - } - - public function clearExclusion() - { - unset($this->exclusion); - } - - /** - * Required. The new exclusion, whose `name` parameter is an exclusion name - * that is not already used in the parent resource. - * - * Generated from protobuf field .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\LogExclusion $var - * @return $this - */ - public function setExclusion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogExclusion::class); - $this->exclusion = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateLinkRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateLinkRequest.php deleted file mode 100644 index 1c3ae384ab53..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateLinkRequest.php +++ /dev/null @@ -1,194 +0,0 @@ -google.logging.v2.CreateLinkRequest - */ -class CreateLinkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the bucket to create a link for. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The new link. - * - * Generated from protobuf field .google.logging.v2.Link link = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $link = null; - /** - * Required. The ID to use for the link. The link_id can have up to 100 - * characters. A valid link_id must only have alphanumeric characters and - * underscores within it. - * - * Generated from protobuf field string link_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $link_id = ''; - - /** - * @param string $parent Required. The full resource name of the bucket to create a link for. - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * Please see {@see ConfigServiceV2Client::logBucketName()} for help formatting this field. - * @param \Google\Cloud\Logging\V2\Link $link Required. The new link. - * @param string $linkId Required. The ID to use for the link. The link_id can have up to 100 - * characters. A valid link_id must only have alphanumeric characters and - * underscores within it. - * - * @return \Google\Cloud\Logging\V2\CreateLinkRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Logging\V2\Link $link, string $linkId): self - { - return (new self()) - ->setParent($parent) - ->setLink($link) - ->setLinkId($linkId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The full resource name of the bucket to create a link for. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * @type \Google\Cloud\Logging\V2\Link $link - * Required. The new link. - * @type string $link_id - * Required. The ID to use for the link. The link_id can have up to 100 - * characters. A valid link_id must only have alphanumeric characters and - * underscores within it. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the bucket to create a link for. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * 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 full resource name of the bucket to create a link for. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * 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. The new link. - * - * Generated from protobuf field .google.logging.v2.Link link = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\Link|null - */ - public function getLink() - { - return $this->link; - } - - public function hasLink() - { - return isset($this->link); - } - - public function clearLink() - { - unset($this->link); - } - - /** - * Required. The new link. - * - * Generated from protobuf field .google.logging.v2.Link link = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\Link $var - * @return $this - */ - public function setLink($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\Link::class); - $this->link = $var; - - return $this; - } - - /** - * Required. The ID to use for the link. The link_id can have up to 100 - * characters. A valid link_id must only have alphanumeric characters and - * underscores within it. - * - * Generated from protobuf field string link_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLinkId() - { - return $this->link_id; - } - - /** - * Required. The ID to use for the link. The link_id can have up to 100 - * characters. A valid link_id must only have alphanumeric characters and - * underscores within it. - * - * Generated from protobuf field string link_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setLinkId($var) - { - GPBUtil::checkString($var, True); - $this->link_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateLogMetricRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateLogMetricRequest.php deleted file mode 100644 index d0b0ec9da596..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateLogMetricRequest.php +++ /dev/null @@ -1,144 +0,0 @@ -google.logging.v2.CreateLogMetricRequest - */ -class CreateLogMetricRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the project in which to create the metric: - * "projects/[PROJECT_ID]" - * The new metric must be provided in the request. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The new logs-based metric, which must not have an identifier that - * already exists. - * - * Generated from protobuf field .google.logging.v2.LogMetric metric = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $metric = null; - - /** - * @param string $parent Required. The resource name of the project in which to create the metric: - * - * "projects/[PROJECT_ID]" - * - * The new metric must be provided in the request. Please see - * {@see MetricsServiceV2Client::projectName()} for help formatting this field. - * @param \Google\Cloud\Logging\V2\LogMetric $metric Required. The new logs-based metric, which must not have an identifier that - * already exists. - * - * @return \Google\Cloud\Logging\V2\CreateLogMetricRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Logging\V2\LogMetric $metric): self - { - return (new self()) - ->setParent($parent) - ->setMetric($metric); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the project in which to create the metric: - * "projects/[PROJECT_ID]" - * The new metric must be provided in the request. - * @type \Google\Cloud\Logging\V2\LogMetric $metric - * Required. The new logs-based metric, which must not have an identifier that - * already exists. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingMetrics::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the project in which to create the metric: - * "projects/[PROJECT_ID]" - * The new metric must be provided in the request. - * - * 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 project in which to create the metric: - * "projects/[PROJECT_ID]" - * The new metric must be provided in the request. - * - * 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. The new logs-based metric, which must not have an identifier that - * already exists. - * - * Generated from protobuf field .google.logging.v2.LogMetric metric = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\LogMetric|null - */ - public function getMetric() - { - return $this->metric; - } - - public function hasMetric() - { - return isset($this->metric); - } - - public function clearMetric() - { - unset($this->metric); - } - - /** - * Required. The new logs-based metric, which must not have an identifier that - * already exists. - * - * Generated from protobuf field .google.logging.v2.LogMetric metric = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\LogMetric $var - * @return $this - */ - public function setMetric($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogMetric::class); - $this->metric = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateSinkRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateSinkRequest.php deleted file mode 100644 index d9c12415acfe..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateSinkRequest.php +++ /dev/null @@ -1,244 +0,0 @@ -google.logging.v2.CreateSinkRequest - */ -class CreateSinkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource in which to create the sink: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * For examples: - * `"projects/my-project"` - * `"organizations/123456789"` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The new sink, whose `name` parameter is a sink identifier that - * is not already in use. - * - * Generated from protobuf field .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $sink = null; - /** - * Optional. Determines the kind of IAM identity returned as `writer_identity` - * in the new sink. If this value is omitted or set to false, and if the - * sink's parent is a project, then the value returned as `writer_identity` is - * the same group or service account used by Cloud Logging before the addition - * of writer identities to this API. The sink's destination must be in the - * same project as the sink itself. - * If this field is set to true, or if the sink is owned by a non-project - * resource such as an organization, then the value of `writer_identity` will - * be a unique service account used only for exports from the new sink. For - * more information, see `writer_identity` in - * [LogSink][google.logging.v2.LogSink]. - * - * Generated from protobuf field bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $unique_writer_identity = false; - - /** - * @param string $parent Required. The resource in which to create the sink: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * For examples: - * - * `"projects/my-project"` - * `"organizations/123456789"` - * Please see {@see ConfigServiceV2Client::projectName()} for help formatting this field. - * @param \Google\Cloud\Logging\V2\LogSink $sink Required. The new sink, whose `name` parameter is a sink identifier that - * is not already in use. - * - * @return \Google\Cloud\Logging\V2\CreateSinkRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Logging\V2\LogSink $sink): self - { - return (new self()) - ->setParent($parent) - ->setSink($sink); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource in which to create the sink: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * For examples: - * `"projects/my-project"` - * `"organizations/123456789"` - * @type \Google\Cloud\Logging\V2\LogSink $sink - * Required. The new sink, whose `name` parameter is a sink identifier that - * is not already in use. - * @type bool $unique_writer_identity - * Optional. Determines the kind of IAM identity returned as `writer_identity` - * in the new sink. If this value is omitted or set to false, and if the - * sink's parent is a project, then the value returned as `writer_identity` is - * the same group or service account used by Cloud Logging before the addition - * of writer identities to this API. The sink's destination must be in the - * same project as the sink itself. - * If this field is set to true, or if the sink is owned by a non-project - * resource such as an organization, then the value of `writer_identity` will - * be a unique service account used only for exports from the new sink. For - * more information, see `writer_identity` in - * [LogSink][google.logging.v2.LogSink]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource in which to create the sink: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * For examples: - * `"projects/my-project"` - * `"organizations/123456789"` - * - * 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 in which to create the sink: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * For examples: - * `"projects/my-project"` - * `"organizations/123456789"` - * - * 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. The new sink, whose `name` parameter is a sink identifier that - * is not already in use. - * - * Generated from protobuf field .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\LogSink|null - */ - public function getSink() - { - return $this->sink; - } - - public function hasSink() - { - return isset($this->sink); - } - - public function clearSink() - { - unset($this->sink); - } - - /** - * Required. The new sink, whose `name` parameter is a sink identifier that - * is not already in use. - * - * Generated from protobuf field .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\LogSink $var - * @return $this - */ - public function setSink($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogSink::class); - $this->sink = $var; - - return $this; - } - - /** - * Optional. Determines the kind of IAM identity returned as `writer_identity` - * in the new sink. If this value is omitted or set to false, and if the - * sink's parent is a project, then the value returned as `writer_identity` is - * the same group or service account used by Cloud Logging before the addition - * of writer identities to this API. The sink's destination must be in the - * same project as the sink itself. - * If this field is set to true, or if the sink is owned by a non-project - * resource such as an organization, then the value of `writer_identity` will - * be a unique service account used only for exports from the new sink. For - * more information, see `writer_identity` in - * [LogSink][google.logging.v2.LogSink]. - * - * Generated from protobuf field bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getUniqueWriterIdentity() - { - return $this->unique_writer_identity; - } - - /** - * Optional. Determines the kind of IAM identity returned as `writer_identity` - * in the new sink. If this value is omitted or set to false, and if the - * sink's parent is a project, then the value returned as `writer_identity` is - * the same group or service account used by Cloud Logging before the addition - * of writer identities to this API. The sink's destination must be in the - * same project as the sink itself. - * If this field is set to true, or if the sink is owned by a non-project - * resource such as an organization, then the value of `writer_identity` will - * be a unique service account used only for exports from the new sink. For - * more information, see `writer_identity` in - * [LogSink][google.logging.v2.LogSink]. - * - * Generated from protobuf field bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setUniqueWriterIdentity($var) - { - GPBUtil::checkBool($var); - $this->unique_writer_identity = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateViewRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateViewRequest.php deleted file mode 100644 index 08a1db42522e..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateViewRequest.php +++ /dev/null @@ -1,165 +0,0 @@ -google.logging.v2.CreateViewRequest - */ -class CreateViewRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The bucket in which to create the view - * `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. A client-assigned identifier such as `"my-view"`. Identifiers are - * limited to 100 characters and can include only letters, digits, - * underscores, hyphens, and periods. - * - * Generated from protobuf field string view_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $view_id = ''; - /** - * Required. The new view. - * - * Generated from protobuf field .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $view = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The bucket in which to create the view - * `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * @type string $view_id - * Required. A client-assigned identifier such as `"my-view"`. Identifiers are - * limited to 100 characters and can include only letters, digits, - * underscores, hyphens, and periods. - * @type \Google\Cloud\Logging\V2\LogView $view - * Required. The new view. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The bucket in which to create the view - * `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The bucket in which to create the view - * `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. A client-assigned identifier such as `"my-view"`. Identifiers are - * limited to 100 characters and can include only letters, digits, - * underscores, hyphens, and periods. - * - * Generated from protobuf field string view_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getViewId() - { - return $this->view_id; - } - - /** - * Required. A client-assigned identifier such as `"my-view"`. Identifiers are - * limited to 100 characters and can include only letters, digits, - * underscores, hyphens, and periods. - * - * Generated from protobuf field string view_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setViewId($var) - { - GPBUtil::checkString($var, True); - $this->view_id = $var; - - return $this; - } - - /** - * Required. The new view. - * - * Generated from protobuf field .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\LogView|null - */ - public function getView() - { - return $this->view; - } - - public function hasView() - { - return isset($this->view); - } - - public function clearView() - { - unset($this->view); - } - - /** - * Required. The new view. - * - * Generated from protobuf field .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\LogView $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteBucketRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteBucketRequest.php deleted file mode 100644 index ede048203de1..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteBucketRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.logging.v2.DeleteBucketRequest - */ -class DeleteBucketRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the bucket to delete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full resource name of the bucket to delete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the bucket to delete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * 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 full resource name of the bucket to delete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteExclusionRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteExclusionRequest.php deleted file mode 100644 index eb5b59dff63a..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteExclusionRequest.php +++ /dev/null @@ -1,114 +0,0 @@ -google.logging.v2.DeleteExclusionRequest - */ -class DeleteExclusionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of an existing exclusion to delete: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * - * 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 an existing exclusion to delete: - * - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * - * For example: - * - * `"projects/my-project/exclusions/my-exclusion"` - * Please see {@see ConfigServiceV2Client::logExclusionName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\DeleteExclusionRequest - * - * @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 an existing exclusion to delete: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of an existing exclusion to delete: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * - * 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 an existing exclusion to delete: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLinkRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLinkRequest.php deleted file mode 100644 index 902f2a0eb35f..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLinkRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.logging.v2.DeleteLinkRequest - */ -class DeleteLinkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the link to delete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full resource name of the link to delete. - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * Please see {@see ConfigServiceV2Client::linkName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\DeleteLinkRequest - * - * @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 full resource name of the link to delete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the link to delete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_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. The full resource name of the link to delete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_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/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLogMetricRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLogMetricRequest.php deleted file mode 100644 index f3577d8f6a8c..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLogMetricRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.logging.v2.DeleteLogMetricRequest - */ -class DeleteLogMetricRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the metric to delete: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * - * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $metric_name = ''; - - /** - * @param string $metricName Required. The resource name of the metric to delete: - * - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * Please see {@see MetricsServiceV2Client::logMetricName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\DeleteLogMetricRequest - * - * @experimental - */ - public static function build(string $metricName): self - { - return (new self()) - ->setMetricName($metricName); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $metric_name - * Required. The resource name of the metric to delete: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingMetrics::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the metric to delete: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * - * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getMetricName() - { - return $this->metric_name; - } - - /** - * Required. The resource name of the metric to delete: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * - * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setMetricName($var) - { - GPBUtil::checkString($var, True); - $this->metric_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLogRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLogRequest.php deleted file mode 100644 index c6956e8912eb..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLogRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -google.logging.v2.DeleteLogRequest - */ -class DeleteLogRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the log to delete: - * * `projects/[PROJECT_ID]/logs/[LOG_ID]` - * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - * * `folders/[FOLDER_ID]/logs/[LOG_ID]` - * `[LOG_ID]` must be URL-encoded. For example, - * `"projects/my-project-id/logs/syslog"`, - * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. - * For more information about log names, see - * [LogEntry][google.logging.v2.LogEntry]. - * - * Generated from protobuf field string log_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $log_name = ''; - - /** - * @param string $logName Required. The resource name of the log to delete: - * - * * `projects/[PROJECT_ID]/logs/[LOG_ID]` - * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - * * `folders/[FOLDER_ID]/logs/[LOG_ID]` - * - * `[LOG_ID]` must be URL-encoded. For example, - * `"projects/my-project-id/logs/syslog"`, - * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. - * - * For more information about log names, see - * [LogEntry][google.logging.v2.LogEntry]. Please see - * {@see LoggingServiceV2Client::logName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\DeleteLogRequest - * - * @experimental - */ - public static function build(string $logName): self - { - return (new self()) - ->setLogName($logName); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $log_name - * Required. The resource name of the log to delete: - * * `projects/[PROJECT_ID]/logs/[LOG_ID]` - * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - * * `folders/[FOLDER_ID]/logs/[LOG_ID]` - * `[LOG_ID]` must be URL-encoded. For example, - * `"projects/my-project-id/logs/syslog"`, - * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. - * For more information about log names, see - * [LogEntry][google.logging.v2.LogEntry]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the log to delete: - * * `projects/[PROJECT_ID]/logs/[LOG_ID]` - * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - * * `folders/[FOLDER_ID]/logs/[LOG_ID]` - * `[LOG_ID]` must be URL-encoded. For example, - * `"projects/my-project-id/logs/syslog"`, - * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. - * For more information about log names, see - * [LogEntry][google.logging.v2.LogEntry]. - * - * Generated from protobuf field string log_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getLogName() - { - return $this->log_name; - } - - /** - * Required. The resource name of the log to delete: - * * `projects/[PROJECT_ID]/logs/[LOG_ID]` - * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - * * `folders/[FOLDER_ID]/logs/[LOG_ID]` - * `[LOG_ID]` must be URL-encoded. For example, - * `"projects/my-project-id/logs/syslog"`, - * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. - * For more information about log names, see - * [LogEntry][google.logging.v2.LogEntry]. - * - * Generated from protobuf field string log_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLogName($var) - { - GPBUtil::checkString($var, True); - $this->log_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteSinkRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteSinkRequest.php deleted file mode 100644 index 1aa9c53fe858..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteSinkRequest.php +++ /dev/null @@ -1,119 +0,0 @@ -google.logging.v2.DeleteSinkRequest - */ -class DeleteSinkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the sink to delete, including the - * parent resource and the sink identifier: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * - * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $sink_name = ''; - - /** - * @param string $sinkName Required. The full resource name of the sink to delete, including the - * parent resource and the sink identifier: - * - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * - * For example: - * - * `"projects/my-project/sinks/my-sink"` - * Please see {@see ConfigServiceV2Client::logSinkName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\DeleteSinkRequest - * - * @experimental - */ - public static function build(string $sinkName): self - { - return (new self()) - ->setSinkName($sinkName); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sink_name - * Required. The full resource name of the sink to delete, including the - * parent resource and the sink identifier: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the sink to delete, including the - * parent resource and the sink identifier: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * - * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSinkName() - { - return $this->sink_name; - } - - /** - * Required. The full resource name of the sink to delete, including the - * parent resource and the sink identifier: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * - * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSinkName($var) - { - GPBUtil::checkString($var, True); - $this->sink_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteViewRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteViewRequest.php deleted file mode 100644 index bafd213c7851..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteViewRequest.php +++ /dev/null @@ -1,79 +0,0 @@ -google.logging.v2.DeleteViewRequest - */ -class DeleteViewRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the view to delete: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full resource name of the view to delete: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the view to delete: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * - * 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 full resource name of the view to delete: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetBucketRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetBucketRequest.php deleted file mode 100644 index 782c41088c2b..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetBucketRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.logging.v2.GetBucketRequest - */ -class GetBucketRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the bucket: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the bucket: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the bucket: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * 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 bucket: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetCmekSettingsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetCmekSettingsRequest.php deleted file mode 100644 index cafdee7bf6e4..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetCmekSettingsRequest.php +++ /dev/null @@ -1,111 +0,0 @@ -google.logging.v2.GetCmekSettingsRequest - */ -class GetCmekSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource for which to retrieve CMEK settings. - * "projects/[PROJECT_ID]/cmekSettings" - * "organizations/[ORGANIZATION_ID]/cmekSettings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - * "folders/[FOLDER_ID]/cmekSettings" - * For example: - * `"organizations/12345/cmekSettings"` - * Note: CMEK for the Log Router can be configured for Google Cloud projects, - * folders, organizations and billing accounts. Once configured for an - * organization, it applies to all projects and folders in the Google Cloud - * organization. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource for which to retrieve CMEK settings. - * "projects/[PROJECT_ID]/cmekSettings" - * "organizations/[ORGANIZATION_ID]/cmekSettings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - * "folders/[FOLDER_ID]/cmekSettings" - * For example: - * `"organizations/12345/cmekSettings"` - * Note: CMEK for the Log Router can be configured for Google Cloud projects, - * folders, organizations and billing accounts. Once configured for an - * organization, it applies to all projects and folders in the Google Cloud - * organization. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource for which to retrieve CMEK settings. - * "projects/[PROJECT_ID]/cmekSettings" - * "organizations/[ORGANIZATION_ID]/cmekSettings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - * "folders/[FOLDER_ID]/cmekSettings" - * For example: - * `"organizations/12345/cmekSettings"` - * Note: CMEK for the Log Router can be configured for Google Cloud projects, - * folders, organizations and billing accounts. Once configured for an - * organization, it applies to all projects and folders in the Google Cloud - * organization. - * - * 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 for which to retrieve CMEK settings. - * "projects/[PROJECT_ID]/cmekSettings" - * "organizations/[ORGANIZATION_ID]/cmekSettings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - * "folders/[FOLDER_ID]/cmekSettings" - * For example: - * `"organizations/12345/cmekSettings"` - * Note: CMEK for the Log Router can be configured for Google Cloud projects, - * folders, organizations and billing accounts. Once configured for an - * organization, it applies to all projects and folders in the Google Cloud - * organization. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetExclusionRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetExclusionRequest.php deleted file mode 100644 index 19decce698e9..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetExclusionRequest.php +++ /dev/null @@ -1,114 +0,0 @@ -google.logging.v2.GetExclusionRequest - */ -class GetExclusionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of an existing exclusion: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * - * 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 an existing exclusion: - * - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * - * For example: - * - * `"projects/my-project/exclusions/my-exclusion"` - * Please see {@see ConfigServiceV2Client::logExclusionName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\GetExclusionRequest - * - * @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 an existing exclusion: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of an existing exclusion: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * - * 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 an existing exclusion: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetLinkRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetLinkRequest.php deleted file mode 100644 index a6b8a3bcf256..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetLinkRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.logging.v2.GetLinkRequest - */ -class GetLinkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the link: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID] - * - * 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 link: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID] - * Please see {@see ConfigServiceV2Client::linkName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\GetLinkRequest - * - * @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 link: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the link: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_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. The resource name of the link: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_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/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetLogMetricRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetLogMetricRequest.php deleted file mode 100644 index 059645cf5c1f..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetLogMetricRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.logging.v2.GetLogMetricRequest - */ -class GetLogMetricRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the desired metric: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * - * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $metric_name = ''; - - /** - * @param string $metricName Required. The resource name of the desired metric: - * - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * Please see {@see MetricsServiceV2Client::logMetricName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\GetLogMetricRequest - * - * @experimental - */ - public static function build(string $metricName): self - { - return (new self()) - ->setMetricName($metricName); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $metric_name - * Required. The resource name of the desired metric: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingMetrics::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the desired metric: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * - * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getMetricName() - { - return $this->metric_name; - } - - /** - * Required. The resource name of the desired metric: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * - * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setMetricName($var) - { - GPBUtil::checkString($var, True); - $this->metric_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetSettingsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetSettingsRequest.php deleted file mode 100644 index 712d7fb12046..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetSettingsRequest.php +++ /dev/null @@ -1,139 +0,0 @@ -google.logging.v2.GetSettingsRequest - */ -class GetSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource for which to retrieve settings. - * "projects/[PROJECT_ID]/settings" - * "organizations/[ORGANIZATION_ID]/settings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/settings" - * "folders/[FOLDER_ID]/settings" - * For example: - * `"organizations/12345/settings"` - * Note: Settings for the Log Router can be get for Google Cloud projects, - * folders, organizations and billing accounts. Currently it can only be - * configured for organizations. Once configured for an organization, it - * applies to all projects and folders in the Google Cloud organization. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource for which to retrieve settings. - * - * "projects/[PROJECT_ID]/settings" - * "organizations/[ORGANIZATION_ID]/settings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/settings" - * "folders/[FOLDER_ID]/settings" - * - * For example: - * - * `"organizations/12345/settings"` - * - * Note: Settings for the Log Router can be get for Google Cloud projects, - * folders, organizations and billing accounts. Currently it can only be - * configured for organizations. Once configured for an organization, it - * applies to all projects and folders in the Google Cloud organization. Please see - * {@see ConfigServiceV2Client::settingsName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\GetSettingsRequest - * - * @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 for which to retrieve settings. - * "projects/[PROJECT_ID]/settings" - * "organizations/[ORGANIZATION_ID]/settings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/settings" - * "folders/[FOLDER_ID]/settings" - * For example: - * `"organizations/12345/settings"` - * Note: Settings for the Log Router can be get for Google Cloud projects, - * folders, organizations and billing accounts. Currently it can only be - * configured for organizations. Once configured for an organization, it - * applies to all projects and folders in the Google Cloud organization. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource for which to retrieve settings. - * "projects/[PROJECT_ID]/settings" - * "organizations/[ORGANIZATION_ID]/settings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/settings" - * "folders/[FOLDER_ID]/settings" - * For example: - * `"organizations/12345/settings"` - * Note: Settings for the Log Router can be get for Google Cloud projects, - * folders, organizations and billing accounts. Currently it can only be - * configured for organizations. Once configured for an organization, it - * applies to all projects and folders in the Google Cloud organization. - * - * 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 for which to retrieve settings. - * "projects/[PROJECT_ID]/settings" - * "organizations/[ORGANIZATION_ID]/settings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/settings" - * "folders/[FOLDER_ID]/settings" - * For example: - * `"organizations/12345/settings"` - * Note: Settings for the Log Router can be get for Google Cloud projects, - * folders, organizations and billing accounts. Currently it can only be - * configured for organizations. Once configured for an organization, it - * applies to all projects and folders in the Google Cloud organization. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetSinkRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetSinkRequest.php deleted file mode 100644 index ff2ef4775cfe..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetSinkRequest.php +++ /dev/null @@ -1,114 +0,0 @@ -google.logging.v2.GetSinkRequest - */ -class GetSinkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the sink: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * - * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $sink_name = ''; - - /** - * @param string $sinkName Required. The resource name of the sink: - * - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * - * For example: - * - * `"projects/my-project/sinks/my-sink"` - * Please see {@see ConfigServiceV2Client::logSinkName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\GetSinkRequest - * - * @experimental - */ - public static function build(string $sinkName): self - { - return (new self()) - ->setSinkName($sinkName); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sink_name - * Required. The resource name of the sink: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the sink: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * - * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSinkName() - { - return $this->sink_name; - } - - /** - * Required. The resource name of the sink: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * - * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSinkName($var) - { - GPBUtil::checkString($var, True); - $this->sink_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetViewRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetViewRequest.php deleted file mode 100644 index 3ed30a2531a5..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetViewRequest.php +++ /dev/null @@ -1,79 +0,0 @@ -google.logging.v2.GetViewRequest - */ -class GetViewRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the policy: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the policy: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the policy: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * - * 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 policy: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/IndexConfig.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/IndexConfig.php deleted file mode 100644 index a322960c0b42..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/IndexConfig.php +++ /dev/null @@ -1,173 +0,0 @@ -google.logging.v2.IndexConfig - */ -class IndexConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The LogEntry field path to index. - * Note that some paths are automatically indexed, and other paths are not - * eligible for indexing. See [indexing documentation]( - * https://cloud.google.com/logging/docs/view/advanced-queries#indexed-fields) - * for details. - * For example: `jsonPayload.request.status` - * - * Generated from protobuf field string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $field_path = ''; - /** - * Required. The type of data in this index. - * - * Generated from protobuf field .google.logging.v2.IndexType type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Output only. The timestamp when the index was last modified. - * This is used to return the timestamp, and will be ignored if supplied - * during update. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field_path - * Required. The LogEntry field path to index. - * Note that some paths are automatically indexed, and other paths are not - * eligible for indexing. See [indexing documentation]( - * https://cloud.google.com/logging/docs/view/advanced-queries#indexed-fields) - * for details. - * For example: `jsonPayload.request.status` - * @type int $type - * Required. The type of data in this index. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the index was last modified. - * This is used to return the timestamp, and will be ignored if supplied - * during update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The LogEntry field path to index. - * Note that some paths are automatically indexed, and other paths are not - * eligible for indexing. See [indexing documentation]( - * https://cloud.google.com/logging/docs/view/advanced-queries#indexed-fields) - * for details. - * For example: `jsonPayload.request.status` - * - * Generated from protobuf field string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFieldPath() - { - return $this->field_path; - } - - /** - * Required. The LogEntry field path to index. - * Note that some paths are automatically indexed, and other paths are not - * eligible for indexing. See [indexing documentation]( - * https://cloud.google.com/logging/docs/view/advanced-queries#indexed-fields) - * for details. - * For example: `jsonPayload.request.status` - * - * Generated from protobuf field string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFieldPath($var) - { - GPBUtil::checkString($var, True); - $this->field_path = $var; - - return $this; - } - - /** - * Required. The type of data in this index. - * - * Generated from protobuf field .google.logging.v2.IndexType type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The type of data in this index. - * - * Generated from protobuf field .google.logging.v2.IndexType type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\IndexType::class); - $this->type = $var; - - return $this; - } - - /** - * Output only. The timestamp when the index was last modified. - * This is used to return the timestamp, and will be ignored if supplied - * during update. - * - * 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 timestamp when the index was last modified. - * This is used to return the timestamp, and will be ignored if supplied - * during update. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/IndexType.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/IndexType.php deleted file mode 100644 index bbda5df5852a..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/IndexType.php +++ /dev/null @@ -1,62 +0,0 @@ -google.logging.v2.IndexType - */ -class IndexType -{ - /** - * The index's type is unspecified. - * - * Generated from protobuf enum INDEX_TYPE_UNSPECIFIED = 0; - */ - const INDEX_TYPE_UNSPECIFIED = 0; - /** - * The index is a string-type index. - * - * Generated from protobuf enum INDEX_TYPE_STRING = 1; - */ - const INDEX_TYPE_STRING = 1; - /** - * The index is a integer-type index. - * - * Generated from protobuf enum INDEX_TYPE_INTEGER = 2; - */ - const INDEX_TYPE_INTEGER = 2; - - private static $valueToName = [ - self::INDEX_TYPE_UNSPECIFIED => 'INDEX_TYPE_UNSPECIFIED', - self::INDEX_TYPE_STRING => 'INDEX_TYPE_STRING', - self::INDEX_TYPE_INTEGER => 'INDEX_TYPE_INTEGER', - ]; - - 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/LifecycleState.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LifecycleState.php deleted file mode 100644 index 0fe746cebd4d..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LifecycleState.php +++ /dev/null @@ -1,86 +0,0 @@ -google.logging.v2.LifecycleState - */ -class LifecycleState -{ - /** - * Unspecified state. This is only used/useful for distinguishing unset - * values. - * - * Generated from protobuf enum LIFECYCLE_STATE_UNSPECIFIED = 0; - */ - const LIFECYCLE_STATE_UNSPECIFIED = 0; - /** - * The normal and active state. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The resource has been marked for deletion by the user. For some resources - * (e.g. buckets), this can be reversed by an un-delete operation. - * - * Generated from protobuf enum DELETE_REQUESTED = 2; - */ - const DELETE_REQUESTED = 2; - /** - * The resource has been marked for an update by the user. It will remain in - * this state until the update is complete. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * The resource has been marked for creation by the user. It will remain in - * this state until the creation is complete. - * - * Generated from protobuf enum CREATING = 4; - */ - const CREATING = 4; - /** - * The resource is in an INTERNAL error state. - * - * Generated from protobuf enum FAILED = 5; - */ - const FAILED = 5; - - private static $valueToName = [ - self::LIFECYCLE_STATE_UNSPECIFIED => 'LIFECYCLE_STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::DELETE_REQUESTED => 'DELETE_REQUESTED', - self::UPDATING => 'UPDATING', - self::CREATING => 'CREATING', - 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); - } -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/Link.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/Link.php deleted file mode 100644 index 666ffc0feb1a..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/Link.php +++ /dev/null @@ -1,271 +0,0 @@ -google.logging.v2.Link - */ -class Link extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the link. The name can have up to 100 characters. - * A valid link id (at the end of the link name) must only have alphanumeric - * characters and underscores within it. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * For example: - * `projects/my-project/locations/global/buckets/my-bucket/links/my_link - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Describes this link. - * The maximum length of the description is 8000 characters. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Output only. The creation timestamp of the link. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The resource lifecycle state. - * - * Generated from protobuf field .google.logging.v2.LifecycleState lifecycle_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $lifecycle_state = 0; - /** - * The information of a BigQuery Dataset. When a link is created, a BigQuery - * dataset is created along with it, in the same project as the LogBucket it's - * linked to. This dataset will also have BigQuery Views corresponding to the - * LogViews in the bucket. - * - * Generated from protobuf field .google.logging.v2.BigQueryDataset bigquery_dataset = 5; - */ - protected $bigquery_dataset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the link. The name can have up to 100 characters. - * A valid link id (at the end of the link name) must only have alphanumeric - * characters and underscores within it. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * For example: - * `projects/my-project/locations/global/buckets/my-bucket/links/my_link - * @type string $description - * Describes this link. - * The maximum length of the description is 8000 characters. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation timestamp of the link. - * @type int $lifecycle_state - * Output only. The resource lifecycle state. - * @type \Google\Cloud\Logging\V2\BigQueryDataset $bigquery_dataset - * The information of a BigQuery Dataset. When a link is created, a BigQuery - * dataset is created along with it, in the same project as the LogBucket it's - * linked to. This dataset will also have BigQuery Views corresponding to the - * LogViews in the bucket. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the link. The name can have up to 100 characters. - * A valid link id (at the end of the link name) must only have alphanumeric - * characters and underscores within it. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * For example: - * `projects/my-project/locations/global/buckets/my-bucket/links/my_link - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the link. The name can have up to 100 characters. - * A valid link id (at the end of the link name) must only have alphanumeric - * characters and underscores within it. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * For example: - * `projects/my-project/locations/global/buckets/my-bucket/links/my_link - * - * 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; - } - - /** - * Describes this link. - * The maximum length of the description is 8000 characters. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Describes this link. - * The maximum length of the description is 8000 characters. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The creation timestamp of the link. - * - * 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 creation timestamp of the link. - * - * 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 resource lifecycle state. - * - * Generated from protobuf field .google.logging.v2.LifecycleState lifecycle_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getLifecycleState() - { - return $this->lifecycle_state; - } - - /** - * Output only. The resource lifecycle state. - * - * Generated from protobuf field .google.logging.v2.LifecycleState lifecycle_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setLifecycleState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\LifecycleState::class); - $this->lifecycle_state = $var; - - return $this; - } - - /** - * The information of a BigQuery Dataset. When a link is created, a BigQuery - * dataset is created along with it, in the same project as the LogBucket it's - * linked to. This dataset will also have BigQuery Views corresponding to the - * LogViews in the bucket. - * - * Generated from protobuf field .google.logging.v2.BigQueryDataset bigquery_dataset = 5; - * @return \Google\Cloud\Logging\V2\BigQueryDataset|null - */ - public function getBigqueryDataset() - { - return $this->bigquery_dataset; - } - - public function hasBigqueryDataset() - { - return isset($this->bigquery_dataset); - } - - public function clearBigqueryDataset() - { - unset($this->bigquery_dataset); - } - - /** - * The information of a BigQuery Dataset. When a link is created, a BigQuery - * dataset is created along with it, in the same project as the LogBucket it's - * linked to. This dataset will also have BigQuery Views corresponding to the - * LogViews in the bucket. - * - * Generated from protobuf field .google.logging.v2.BigQueryDataset bigquery_dataset = 5; - * @param \Google\Cloud\Logging\V2\BigQueryDataset $var - * @return $this - */ - public function setBigqueryDataset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\BigQueryDataset::class); - $this->bigquery_dataset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LinkMetadata.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LinkMetadata.php deleted file mode 100644 index 0b30b1b01e72..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LinkMetadata.php +++ /dev/null @@ -1,230 +0,0 @@ -google.logging.v2.LinkMetadata - */ -class LinkMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The start time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The end time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * State of an operation. - * - * Generated from protobuf field .google.logging.v2.OperationState state = 3; - */ - protected $state = 0; - protected $request; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The start time of an operation. - * @type \Google\Protobuf\Timestamp $end_time - * The end time of an operation. - * @type int $state - * State of an operation. - * @type \Google\Cloud\Logging\V2\CreateLinkRequest $create_link_request - * CreateLink RPC request. - * @type \Google\Cloud\Logging\V2\DeleteLinkRequest $delete_link_request - * DeleteLink RPC request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * The start time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The start time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The end time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The end time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * State of an operation. - * - * Generated from protobuf field .google.logging.v2.OperationState state = 3; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * State of an operation. - * - * Generated from protobuf field .google.logging.v2.OperationState state = 3; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * CreateLink RPC request. - * - * Generated from protobuf field .google.logging.v2.CreateLinkRequest create_link_request = 4; - * @return \Google\Cloud\Logging\V2\CreateLinkRequest|null - */ - public function getCreateLinkRequest() - { - return $this->readOneof(4); - } - - public function hasCreateLinkRequest() - { - return $this->hasOneof(4); - } - - /** - * CreateLink RPC request. - * - * Generated from protobuf field .google.logging.v2.CreateLinkRequest create_link_request = 4; - * @param \Google\Cloud\Logging\V2\CreateLinkRequest $var - * @return $this - */ - public function setCreateLinkRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\CreateLinkRequest::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * DeleteLink RPC request. - * - * Generated from protobuf field .google.logging.v2.DeleteLinkRequest delete_link_request = 5; - * @return \Google\Cloud\Logging\V2\DeleteLinkRequest|null - */ - public function getDeleteLinkRequest() - { - return $this->readOneof(5); - } - - public function hasDeleteLinkRequest() - { - return $this->hasOneof(5); - } - - /** - * DeleteLink RPC request. - * - * Generated from protobuf field .google.logging.v2.DeleteLinkRequest delete_link_request = 5; - * @param \Google\Cloud\Logging\V2\DeleteLinkRequest $var - * @return $this - */ - public function setDeleteLinkRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\DeleteLinkRequest::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getRequest() - { - return $this->whichOneof("request"); - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListBucketsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListBucketsRequest.php deleted file mode 100644 index aad5e2dc6e54..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListBucketsRequest.php +++ /dev/null @@ -1,206 +0,0 @@ -google.logging.v2.ListBucketsRequest - */ -class ListBucketsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource whose buckets are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - * Note: The locations portion of the resource must be specified, but - * supplying the character `-` in place of [LOCATION_ID] will return all - * buckets. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - - /** - * @param string $parent Required. The parent resource whose buckets are to be listed: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - * - * Note: The locations portion of the resource must be specified, but - * supplying the character `-` in place of [LOCATION_ID] will return all - * buckets. Please see - * {@see ConfigServiceV2Client::organizationLocationName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\ListBucketsRequest - * - * @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 parent resource whose buckets are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - * Note: The locations portion of the resource must be specified, but - * supplying the character `-` in place of [LOCATION_ID] will return all - * buckets. - * @type string $page_token - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * @type int $page_size - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource whose buckets are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - * Note: The locations portion of the resource must be specified, but - * supplying the character `-` in place of [LOCATION_ID] will return all - * buckets. - * - * 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 parent resource whose buckets are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - * Note: The locations portion of the resource must be specified, but - * supplying the character `-` in place of [LOCATION_ID] will return all - * buckets. - * - * 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. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.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. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListBucketsResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListBucketsResponse.php deleted file mode 100644 index 28df3a300104..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListBucketsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.logging.v2.ListBucketsResponse - */ -class ListBucketsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of buckets. - * - * Generated from protobuf field repeated .google.logging.v2.LogBucket buckets = 1; - */ - private $buckets; - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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\Logging\V2\LogBucket>|\Google\Protobuf\Internal\RepeatedField $buckets - * A list of buckets. - * @type string $next_page_token - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * A list of buckets. - * - * Generated from protobuf field repeated .google.logging.v2.LogBucket buckets = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBuckets() - { - return $this->buckets; - } - - /** - * A list of buckets. - * - * Generated from protobuf field repeated .google.logging.v2.LogBucket buckets = 1; - * @param array<\Google\Cloud\Logging\V2\LogBucket>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBuckets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogBucket::class); - $this->buckets = $arr; - - return $this; - } - - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListExclusionsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListExclusionsRequest.php deleted file mode 100644 index f95acdcf0447..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListExclusionsRequest.php +++ /dev/null @@ -1,190 +0,0 @@ -google.logging.v2.ListExclusionsRequest - */ -class ListExclusionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource whose exclusions are to be listed. - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - - /** - * @param string $parent Required. The parent resource whose exclusions are to be listed. - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * Please see {@see ConfigServiceV2Client::projectName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\ListExclusionsRequest - * - * @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 parent resource whose exclusions are to be listed. - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * @type string $page_token - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * @type int $page_size - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource whose exclusions are to be listed. - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * 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 parent resource whose exclusions are to be listed. - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * 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. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.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. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListExclusionsResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListExclusionsResponse.php deleted file mode 100644 index 55311d43e55f..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListExclusionsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.logging.v2.ListExclusionsResponse - */ -class ListExclusionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of exclusions. - * - * Generated from protobuf field repeated .google.logging.v2.LogExclusion exclusions = 1; - */ - private $exclusions; - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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\Logging\V2\LogExclusion>|\Google\Protobuf\Internal\RepeatedField $exclusions - * A list of exclusions. - * @type string $next_page_token - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * A list of exclusions. - * - * Generated from protobuf field repeated .google.logging.v2.LogExclusion exclusions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExclusions() - { - return $this->exclusions; - } - - /** - * A list of exclusions. - * - * Generated from protobuf field repeated .google.logging.v2.LogExclusion exclusions = 1; - * @param array<\Google\Cloud\Logging\V2\LogExclusion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExclusions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogExclusion::class); - $this->exclusions = $arr; - - return $this; - } - - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLinksRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLinksRequest.php deleted file mode 100644 index 388e5319092f..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLinksRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.logging.v2.ListLinksRequest - */ -class ListLinksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource whose links are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The maximum number of results to return from this request. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - - /** - * @param string $parent Required. The parent resource whose links are to be listed: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ - * Please see {@see ConfigServiceV2Client::logBucketName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\ListLinksRequest - * - * @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 parent resource whose links are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ - * @type string $page_token - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. - * @type int $page_size - * Optional. The maximum number of results to return from this request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource whose links are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ - * - * 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 parent resource whose links are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ - * - * 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. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. - * - * Generated from protobuf field string page_token = 2 [(.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. The maximum number of results to return from this request. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return from this request. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLinksResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLinksResponse.php deleted file mode 100644 index 0007fb97d2aa..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLinksResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.logging.v2.ListLinksResponse - */ -class ListLinksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of links. - * - * Generated from protobuf field repeated .google.logging.v2.Link links = 1; - */ - private $links; - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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\Logging\V2\Link>|\Google\Protobuf\Internal\RepeatedField $links - * A list of links. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * A list of links. - * - * Generated from protobuf field repeated .google.logging.v2.Link links = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLinks() - { - return $this->links; - } - - /** - * A list of links. - * - * Generated from protobuf field repeated .google.logging.v2.Link links = 1; - * @param array<\Google\Cloud\Logging\V2\Link>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLinks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\Link::class); - $this->links = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogEntriesRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogEntriesRequest.php deleted file mode 100644 index d0621c6c1304..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogEntriesRequest.php +++ /dev/null @@ -1,354 +0,0 @@ -google.logging.v2.ListLogEntriesRequest - */ -class ListLogEntriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Names of one or more parent resources from which to - * retrieve log entries: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * May alternatively be one or more views: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * Projects listed in the `project_ids` field are added to this list. - * A maximum of 100 resources may be specified in a single request. - * - * Generated from protobuf field repeated string resource_names = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $resource_names; - /** - * Optional. Only log entries that match the filter are returned. An empty - * filter matches all log entries in the resources listed in `resource_names`. - * Referencing a parent resource that is not listed in `resource_names` will - * cause the filter to return no results. The maximum length of a filter is - * 20,000 characters. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. How the results should be sorted. Presently, the only permitted - * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first - * option returns entries in order of increasing values of - * `LogEntry.timestamp` (oldest first), and the second option returns entries - * in order of decreasing timestamps (newest first). Entries with equal - * timestamps are returned in order of their `insert_id` values. - * - * Generated from protobuf field string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - /** - * Optional. The maximum number of results to return from this request. - * Default is 50. If the value is negative or exceeds 1000, the request is - * rejected. The presence of `next_page_token` in the response indicates that - * more results might be available. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string[] $resourceNames Required. Names of one or more parent resources from which to - * retrieve log entries: - * - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * - * May alternatively be one or more views: - * - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * - * Projects listed in the `project_ids` field are added to this list. - * A maximum of 100 resources may be specified in a single request. Please see - * {@see LoggingServiceV2Client::projectName()} for help formatting this field. - * @param string $filter Optional. Only log entries that match the filter are returned. An empty - * filter matches all log entries in the resources listed in `resource_names`. - * Referencing a parent resource that is not listed in `resource_names` will - * cause the filter to return no results. The maximum length of a filter is - * 20,000 characters. - * @param string $orderBy Optional. How the results should be sorted. Presently, the only permitted - * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first - * option returns entries in order of increasing values of - * `LogEntry.timestamp` (oldest first), and the second option returns entries - * in order of decreasing timestamps (newest first). Entries with equal - * timestamps are returned in order of their `insert_id` values. - * - * @return \Google\Cloud\Logging\V2\ListLogEntriesRequest - * - * @experimental - */ - public static function build(array $resourceNames, string $filter, string $orderBy): self - { - return (new self()) - ->setResourceNames($resourceNames) - ->setFilter($filter) - ->setOrderBy($orderBy); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $resource_names - * Required. Names of one or more parent resources from which to - * retrieve log entries: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * May alternatively be one or more views: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * Projects listed in the `project_ids` field are added to this list. - * A maximum of 100 resources may be specified in a single request. - * @type string $filter - * Optional. Only log entries that match the filter are returned. An empty - * filter matches all log entries in the resources listed in `resource_names`. - * Referencing a parent resource that is not listed in `resource_names` will - * cause the filter to return no results. The maximum length of a filter is - * 20,000 characters. - * @type string $order_by - * Optional. How the results should be sorted. Presently, the only permitted - * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first - * option returns entries in order of increasing values of - * `LogEntry.timestamp` (oldest first), and the second option returns entries - * in order of decreasing timestamps (newest first). Entries with equal - * timestamps are returned in order of their `insert_id` values. - * @type int $page_size - * Optional. The maximum number of results to return from this request. - * Default is 50. If the value is negative or exceeds 1000, the request is - * rejected. The presence of `next_page_token` in the response indicates that - * more results might be available. - * @type string $page_token - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * Required. Names of one or more parent resources from which to - * retrieve log entries: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * May alternatively be one or more views: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * Projects listed in the `project_ids` field are added to this list. - * A maximum of 100 resources may be specified in a single request. - * - * Generated from protobuf field repeated string resource_names = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResourceNames() - { - return $this->resource_names; - } - - /** - * Required. Names of one or more parent resources from which to - * retrieve log entries: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * May alternatively be one or more views: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * Projects listed in the `project_ids` field are added to this list. - * A maximum of 100 resources may be specified in a single request. - * - * Generated from protobuf field repeated string resource_names = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResourceNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->resource_names = $arr; - - return $this; - } - - /** - * Optional. Only log entries that match the filter are returned. An empty - * filter matches all log entries in the resources listed in `resource_names`. - * Referencing a parent resource that is not listed in `resource_names` will - * cause the filter to return no results. The maximum length of a filter is - * 20,000 characters. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Only log entries that match the filter are returned. An empty - * filter matches all log entries in the resources listed in `resource_names`. - * Referencing a parent resource that is not listed in `resource_names` will - * cause the filter to return no results. The maximum length of a filter is - * 20,000 characters. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. How the results should be sorted. Presently, the only permitted - * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first - * option returns entries in order of increasing values of - * `LogEntry.timestamp` (oldest first), and the second option returns entries - * in order of decreasing timestamps (newest first). Entries with equal - * timestamps are returned in order of their `insert_id` values. - * - * Generated from protobuf field string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. How the results should be sorted. Presently, the only permitted - * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first - * option returns entries in order of increasing values of - * `LogEntry.timestamp` (oldest first), and the second option returns entries - * in order of decreasing timestamps (newest first). Entries with equal - * timestamps are returned in order of their `insert_id` values. - * - * Generated from protobuf field string order_by = 3 [(.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. The maximum number of results to return from this request. - * Default is 50. If the value is negative or exceeds 1000, the request is - * rejected. The presence of `next_page_token` in the response indicates that - * more results might be available. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return from this request. - * Default is 50. If the value is negative or exceeds 1000, the request is - * rejected. The presence of `next_page_token` in the response indicates that - * more results might be available. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 5 [(.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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogEntriesResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogEntriesResponse.php deleted file mode 100644 index 74ceb744157d..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogEntriesResponse.php +++ /dev/null @@ -1,141 +0,0 @@ -google.logging.v2.ListLogEntriesResponse - */ -class ListLogEntriesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of log entries. If `entries` is empty, `nextPageToken` may still be - * returned, indicating that more entries may exist. See `nextPageToken` for - * more information. - * - * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 1; - */ - private $entries; - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * If a value for `next_page_token` appears and the `entries` field is empty, - * it means that the search found no log entries so far but it did not have - * time to search all the possible log entries. Retry the method with this - * value for `page_token` to continue the search. Alternatively, consider - * speeding up the search by changing your filter to specify a single log name - * or resource type, or to narrow the time range of the search. - * - * 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\Logging\V2\LogEntry>|\Google\Protobuf\Internal\RepeatedField $entries - * A list of log entries. If `entries` is empty, `nextPageToken` may still be - * returned, indicating that more entries may exist. See `nextPageToken` for - * more information. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * If a value for `next_page_token` appears and the `entries` field is empty, - * it means that the search found no log entries so far but it did not have - * time to search all the possible log entries. Retry the method with this - * value for `page_token` to continue the search. Alternatively, consider - * speeding up the search by changing your filter to specify a single log name - * or resource type, or to narrow the time range of the search. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * A list of log entries. If `entries` is empty, `nextPageToken` may still be - * returned, indicating that more entries may exist. See `nextPageToken` for - * more information. - * - * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * A list of log entries. If `entries` is empty, `nextPageToken` may still be - * returned, indicating that more entries may exist. See `nextPageToken` for - * more information. - * - * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 1; - * @param array<\Google\Cloud\Logging\V2\LogEntry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogEntry::class); - $this->entries = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * If a value for `next_page_token` appears and the `entries` field is empty, - * it means that the search found no log entries so far but it did not have - * time to search all the possible log entries. Retry the method with this - * value for `page_token` to continue the search. Alternatively, consider - * speeding up the search by changing your filter to specify a single log name - * or resource type, or to narrow the time range of the search. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * If a value for `next_page_token` appears and the `entries` field is empty, - * it means that the search found no log entries so far but it did not have - * time to search all the possible log entries. Retry the method with this - * value for `page_token` to continue the search. Alternatively, consider - * speeding up the search by changing your filter to specify a single log name - * or resource type, or to narrow the time range of the search. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogMetricsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogMetricsRequest.php deleted file mode 100644 index 8eb438b8fb93..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogMetricsRequest.php +++ /dev/null @@ -1,175 +0,0 @@ -google.logging.v2.ListLogMetricsRequest - */ -class ListLogMetricsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the project containing the metrics: - * "projects/[PROJECT_ID]" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - - /** - * @param string $parent Required. The name of the project containing the metrics: - * - * "projects/[PROJECT_ID]" - * Please see {@see MetricsServiceV2Client::projectName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\ListLogMetricsRequest - * - * @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 name of the project containing the metrics: - * "projects/[PROJECT_ID]" - * @type string $page_token - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * @type int $page_size - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingMetrics::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the project containing the metrics: - * "projects/[PROJECT_ID]" - * - * 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 of the project containing the metrics: - * "projects/[PROJECT_ID]" - * - * 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. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.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. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogMetricsResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogMetricsResponse.php deleted file mode 100644 index 62b84c3eb3e0..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogMetricsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.logging.v2.ListLogMetricsResponse - */ -class ListLogMetricsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of logs-based metrics. - * - * Generated from protobuf field repeated .google.logging.v2.LogMetric metrics = 1; - */ - private $metrics; - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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\Logging\V2\LogMetric>|\Google\Protobuf\Internal\RepeatedField $metrics - * A list of logs-based metrics. - * @type string $next_page_token - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingMetrics::initOnce(); - parent::__construct($data); - } - - /** - * A list of logs-based metrics. - * - * Generated from protobuf field repeated .google.logging.v2.LogMetric metrics = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMetrics() - { - return $this->metrics; - } - - /** - * A list of logs-based metrics. - * - * Generated from protobuf field repeated .google.logging.v2.LogMetric metrics = 1; - * @param array<\Google\Cloud\Logging\V2\LogMetric>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMetrics($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogMetric::class); - $this->metrics = $arr; - - return $this; - } - - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogsRequest.php deleted file mode 100644 index f8ea6ec58cd0..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogsRequest.php +++ /dev/null @@ -1,264 +0,0 @@ -google.logging.v2.ListLogsRequest - */ -class ListLogsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name to list logs for: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. List of resource names to list logs for: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * To support legacy queries, it could also be: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * The resource name in the `parent` field is added to this list. - * - * Generated from protobuf field repeated string resource_names = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - private $resource_names; - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name to list logs for: - * - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * Please see {@see LoggingServiceV2Client::projectName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\ListLogsRequest - * - * @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 to list logs for: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * @type array|\Google\Protobuf\Internal\RepeatedField $resource_names - * Optional. List of resource names to list logs for: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * To support legacy queries, it could also be: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * The resource name in the `parent` field is added to this list. - * @type int $page_size - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * @type string $page_token - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name to list logs for: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * - * 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 to list logs for: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * - * 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. List of resource names to list logs for: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * To support legacy queries, it could also be: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * The resource name in the `parent` field is added to this list. - * - * Generated from protobuf field repeated string resource_names = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResourceNames() - { - return $this->resource_names; - } - - /** - * Optional. List of resource names to list logs for: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * To support legacy queries, it could also be: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * The resource name in the `parent` field is added to this list. - * - * Generated from protobuf field repeated string resource_names = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResourceNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->resource_names = $arr; - - return $this; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * 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. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogsResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogsResponse.php deleted file mode 100644 index 64ae58f309ed..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogsResponse.php +++ /dev/null @@ -1,117 +0,0 @@ -google.logging.v2.ListLogsResponse - */ -class ListLogsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of log names. For example, - * `"projects/my-project/logs/syslog"` or - * `"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - * - * Generated from protobuf field repeated string log_names = 3; - */ - private $log_names; - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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\Protobuf\Internal\RepeatedField $log_names - * A list of log names. For example, - * `"projects/my-project/logs/syslog"` or - * `"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * A list of log names. For example, - * `"projects/my-project/logs/syslog"` or - * `"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - * - * Generated from protobuf field repeated string log_names = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLogNames() - { - return $this->log_names; - } - - /** - * A list of log names. For example, - * `"projects/my-project/logs/syslog"` or - * `"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - * - * Generated from protobuf field repeated string log_names = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLogNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->log_names = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListMonitoredResourceDescriptorsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListMonitoredResourceDescriptorsRequest.php deleted file mode 100644 index fb1027a08115..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListMonitoredResourceDescriptorsRequest.php +++ /dev/null @@ -1,121 +0,0 @@ -google.logging.v2.ListMonitoredResourceDescriptorsRequest - */ -class ListMonitoredResourceDescriptorsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $page_size - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * @type string $page_token - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListMonitoredResourceDescriptorsResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListMonitoredResourceDescriptorsResponse.php deleted file mode 100644 index a70971f90d43..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListMonitoredResourceDescriptorsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.logging.v2.ListMonitoredResourceDescriptorsResponse - */ -class ListMonitoredResourceDescriptorsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of resource descriptors. - * - * Generated from protobuf field repeated .google.api.MonitoredResourceDescriptor resource_descriptors = 1; - */ - private $resource_descriptors; - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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\Api\MonitoredResourceDescriptor>|\Google\Protobuf\Internal\RepeatedField $resource_descriptors - * A list of resource descriptors. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * A list of resource descriptors. - * - * Generated from protobuf field repeated .google.api.MonitoredResourceDescriptor resource_descriptors = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResourceDescriptors() - { - return $this->resource_descriptors; - } - - /** - * A list of resource descriptors. - * - * Generated from protobuf field repeated .google.api.MonitoredResourceDescriptor resource_descriptors = 1; - * @param array<\Google\Api\MonitoredResourceDescriptor>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResourceDescriptors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\MonitoredResourceDescriptor::class); - $this->resource_descriptors = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListSinksRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListSinksRequest.php deleted file mode 100644 index b4134922061c..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListSinksRequest.php +++ /dev/null @@ -1,190 +0,0 @@ -google.logging.v2.ListSinksRequest - */ -class ListSinksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource whose sinks are to be listed: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - - /** - * @param string $parent Required. The parent resource whose sinks are to be listed: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * Please see {@see ConfigServiceV2Client::projectName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\ListSinksRequest - * - * @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 parent resource whose sinks are to be listed: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * @type string $page_token - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * @type int $page_size - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource whose sinks are to be listed: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * 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 parent resource whose sinks are to be listed: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * 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. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.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. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListSinksResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListSinksResponse.php deleted file mode 100644 index 0f7ff3bce972..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListSinksResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.logging.v2.ListSinksResponse - */ -class ListSinksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of sinks. - * - * Generated from protobuf field repeated .google.logging.v2.LogSink sinks = 1; - */ - private $sinks; - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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\Logging\V2\LogSink>|\Google\Protobuf\Internal\RepeatedField $sinks - * A list of sinks. - * @type string $next_page_token - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * A list of sinks. - * - * Generated from protobuf field repeated .google.logging.v2.LogSink sinks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSinks() - { - return $this->sinks; - } - - /** - * A list of sinks. - * - * Generated from protobuf field repeated .google.logging.v2.LogSink sinks = 1; - * @param array<\Google\Cloud\Logging\V2\LogSink>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSinks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogSink::class); - $this->sinks = $arr; - - return $this; - } - - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListViewsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListViewsRequest.php deleted file mode 100644 index 05c05e527f2c..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListViewsRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.logging.v2.ListViewsRequest - */ -class ListViewsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The bucket whose views are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - - /** - * @param string $parent Required. The bucket whose views are to be listed: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * @return \Google\Cloud\Logging\V2\ListViewsRequest - * - * @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 bucket whose views are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * @type string $page_token - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * @type int $page_size - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The bucket whose views are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The bucket whose views are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.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. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListViewsResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListViewsResponse.php deleted file mode 100644 index 246cfb190d38..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListViewsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.logging.v2.ListViewsResponse - */ -class ListViewsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of views. - * - * Generated from protobuf field repeated .google.logging.v2.LogView views = 1; - */ - private $views; - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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\Logging\V2\LogView>|\Google\Protobuf\Internal\RepeatedField $views - * A list of views. - * @type string $next_page_token - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * A list of views. - * - * Generated from protobuf field repeated .google.logging.v2.LogView views = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getViews() - { - return $this->views; - } - - /** - * A list of views. - * - * Generated from protobuf field repeated .google.logging.v2.LogView views = 1; - * @param array<\Google\Cloud\Logging\V2\LogView>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setViews($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogView::class); - $this->views = $arr; - - return $this; - } - - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/LocationMetadata.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LocationMetadata.php deleted file mode 100644 index 9c896b21b87c..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LocationMetadata.php +++ /dev/null @@ -1,71 +0,0 @@ -google.logging.v2.LocationMetadata - */ -class LocationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Indicates whether or not Log Analytics features are supported in the given - * location. - * - * Generated from protobuf field bool log_analytics_enabled = 1; - */ - protected $log_analytics_enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $log_analytics_enabled - * Indicates whether or not Log Analytics features are supported in the given - * location. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Indicates whether or not Log Analytics features are supported in the given - * location. - * - * Generated from protobuf field bool log_analytics_enabled = 1; - * @return bool - */ - public function getLogAnalyticsEnabled() - { - return $this->log_analytics_enabled; - } - - /** - * Indicates whether or not Log Analytics features are supported in the given - * location. - * - * Generated from protobuf field bool log_analytics_enabled = 1; - * @param bool $var - * @return $this - */ - public function setLogAnalyticsEnabled($var) - { - GPBUtil::checkBool($var); - $this->log_analytics_enabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogBucket.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogBucket.php deleted file mode 100644 index 775a7fd41535..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogBucket.php +++ /dev/null @@ -1,525 +0,0 @@ -google.logging.v2.LogBucket - */ -class LogBucket extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the bucket. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket` - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support) - * For the location of `global` it is unspecified where log entries are - * actually stored. - * After a bucket has been created, the location cannot be changed. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Describes this bucket. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Output only. The creation timestamp of the bucket. This is not set for any - * of the default buckets. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last update timestamp of the bucket. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Logs will be retained by default for this amount of time, after which they - * will automatically be deleted. The minimum retention period is 1 day. If - * this value is set to zero at bucket creation time, the default time of 30 - * days will be used. - * - * Generated from protobuf field int32 retention_days = 11; - */ - protected $retention_days = 0; - /** - * Whether the bucket is locked. - * The retention period on a locked bucket cannot be changed. Locked buckets - * may only be deleted if they are empty. - * - * Generated from protobuf field bool locked = 9; - */ - protected $locked = false; - /** - * Output only. The bucket lifecycle state. - * - * Generated from protobuf field .google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $lifecycle_state = 0; - /** - * Whether log analytics is enabled for this bucket. - * Once enabled, log analytics features cannot be disabled. - * - * Generated from protobuf field bool analytics_enabled = 14; - */ - protected $analytics_enabled = false; - /** - * Log entry field paths that are denied access in this bucket. - * The following fields and their children are eligible: `textPayload`, - * `jsonPayload`, `protoPayload`, `httpRequest`, `labels`, `sourceLocation`. - * Restricting a repeated field will restrict all values. Adding a parent will - * block all child fields. (e.g. `foo.bar` will block `foo.bar.baz`) - * - * Generated from protobuf field repeated string restricted_fields = 15; - */ - private $restricted_fields; - /** - * A list of indexed fields and related configuration data. - * - * Generated from protobuf field repeated .google.logging.v2.IndexConfig index_configs = 17; - */ - private $index_configs; - /** - * The CMEK settings of the log bucket. If present, new log entries written to - * this log bucket are encrypted using the CMEK key provided in this - * configuration. If a log bucket has CMEK settings, the CMEK settings cannot - * be disabled later by updating the log bucket. Changing the KMS key is - * allowed. - * - * Generated from protobuf field .google.logging.v2.CmekSettings cmek_settings = 19; - */ - protected $cmek_settings = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the bucket. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket` - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support) - * For the location of `global` it is unspecified where log entries are - * actually stored. - * After a bucket has been created, the location cannot be changed. - * @type string $description - * Describes this bucket. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation timestamp of the bucket. This is not set for any - * of the default buckets. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update timestamp of the bucket. - * @type int $retention_days - * Logs will be retained by default for this amount of time, after which they - * will automatically be deleted. The minimum retention period is 1 day. If - * this value is set to zero at bucket creation time, the default time of 30 - * days will be used. - * @type bool $locked - * Whether the bucket is locked. - * The retention period on a locked bucket cannot be changed. Locked buckets - * may only be deleted if they are empty. - * @type int $lifecycle_state - * Output only. The bucket lifecycle state. - * @type bool $analytics_enabled - * Whether log analytics is enabled for this bucket. - * Once enabled, log analytics features cannot be disabled. - * @type array|\Google\Protobuf\Internal\RepeatedField $restricted_fields - * Log entry field paths that are denied access in this bucket. - * The following fields and their children are eligible: `textPayload`, - * `jsonPayload`, `protoPayload`, `httpRequest`, `labels`, `sourceLocation`. - * Restricting a repeated field will restrict all values. Adding a parent will - * block all child fields. (e.g. `foo.bar` will block `foo.bar.baz`) - * @type array<\Google\Cloud\Logging\V2\IndexConfig>|\Google\Protobuf\Internal\RepeatedField $index_configs - * A list of indexed fields and related configuration data. - * @type \Google\Cloud\Logging\V2\CmekSettings $cmek_settings - * The CMEK settings of the log bucket. If present, new log entries written to - * this log bucket are encrypted using the CMEK key provided in this - * configuration. If a log bucket has CMEK settings, the CMEK settings cannot - * be disabled later by updating the log bucket. Changing the KMS key is - * allowed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the bucket. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket` - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support) - * For the location of `global` it is unspecified where log entries are - * actually stored. - * After a bucket has been created, the location cannot be changed. - * - * 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 of the bucket. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket` - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support) - * For the location of `global` it is unspecified where log entries are - * actually stored. - * After a bucket has been created, the location cannot be changed. - * - * 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; - } - - /** - * Describes this bucket. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Describes this bucket. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The creation timestamp of the bucket. This is not set for any - * of the default buckets. - * - * 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 creation timestamp of the bucket. This is not set for any - * of the default buckets. - * - * 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 last update timestamp of the bucket. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last update timestamp of the bucket. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Logs will be retained by default for this amount of time, after which they - * will automatically be deleted. The minimum retention period is 1 day. If - * this value is set to zero at bucket creation time, the default time of 30 - * days will be used. - * - * Generated from protobuf field int32 retention_days = 11; - * @return int - */ - public function getRetentionDays() - { - return $this->retention_days; - } - - /** - * Logs will be retained by default for this amount of time, after which they - * will automatically be deleted. The minimum retention period is 1 day. If - * this value is set to zero at bucket creation time, the default time of 30 - * days will be used. - * - * Generated from protobuf field int32 retention_days = 11; - * @param int $var - * @return $this - */ - public function setRetentionDays($var) - { - GPBUtil::checkInt32($var); - $this->retention_days = $var; - - return $this; - } - - /** - * Whether the bucket is locked. - * The retention period on a locked bucket cannot be changed. Locked buckets - * may only be deleted if they are empty. - * - * Generated from protobuf field bool locked = 9; - * @return bool - */ - public function getLocked() - { - return $this->locked; - } - - /** - * Whether the bucket is locked. - * The retention period on a locked bucket cannot be changed. Locked buckets - * may only be deleted if they are empty. - * - * Generated from protobuf field bool locked = 9; - * @param bool $var - * @return $this - */ - public function setLocked($var) - { - GPBUtil::checkBool($var); - $this->locked = $var; - - return $this; - } - - /** - * Output only. The bucket lifecycle state. - * - * Generated from protobuf field .google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getLifecycleState() - { - return $this->lifecycle_state; - } - - /** - * Output only. The bucket lifecycle state. - * - * Generated from protobuf field .google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setLifecycleState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\LifecycleState::class); - $this->lifecycle_state = $var; - - return $this; - } - - /** - * Whether log analytics is enabled for this bucket. - * Once enabled, log analytics features cannot be disabled. - * - * Generated from protobuf field bool analytics_enabled = 14; - * @return bool - */ - public function getAnalyticsEnabled() - { - return $this->analytics_enabled; - } - - /** - * Whether log analytics is enabled for this bucket. - * Once enabled, log analytics features cannot be disabled. - * - * Generated from protobuf field bool analytics_enabled = 14; - * @param bool $var - * @return $this - */ - public function setAnalyticsEnabled($var) - { - GPBUtil::checkBool($var); - $this->analytics_enabled = $var; - - return $this; - } - - /** - * Log entry field paths that are denied access in this bucket. - * The following fields and their children are eligible: `textPayload`, - * `jsonPayload`, `protoPayload`, `httpRequest`, `labels`, `sourceLocation`. - * Restricting a repeated field will restrict all values. Adding a parent will - * block all child fields. (e.g. `foo.bar` will block `foo.bar.baz`) - * - * Generated from protobuf field repeated string restricted_fields = 15; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRestrictedFields() - { - return $this->restricted_fields; - } - - /** - * Log entry field paths that are denied access in this bucket. - * The following fields and their children are eligible: `textPayload`, - * `jsonPayload`, `protoPayload`, `httpRequest`, `labels`, `sourceLocation`. - * Restricting a repeated field will restrict all values. Adding a parent will - * block all child fields. (e.g. `foo.bar` will block `foo.bar.baz`) - * - * Generated from protobuf field repeated string restricted_fields = 15; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRestrictedFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->restricted_fields = $arr; - - return $this; - } - - /** - * A list of indexed fields and related configuration data. - * - * Generated from protobuf field repeated .google.logging.v2.IndexConfig index_configs = 17; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIndexConfigs() - { - return $this->index_configs; - } - - /** - * A list of indexed fields and related configuration data. - * - * Generated from protobuf field repeated .google.logging.v2.IndexConfig index_configs = 17; - * @param array<\Google\Cloud\Logging\V2\IndexConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIndexConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\IndexConfig::class); - $this->index_configs = $arr; - - return $this; - } - - /** - * The CMEK settings of the log bucket. If present, new log entries written to - * this log bucket are encrypted using the CMEK key provided in this - * configuration. If a log bucket has CMEK settings, the CMEK settings cannot - * be disabled later by updating the log bucket. Changing the KMS key is - * allowed. - * - * Generated from protobuf field .google.logging.v2.CmekSettings cmek_settings = 19; - * @return \Google\Cloud\Logging\V2\CmekSettings|null - */ - public function getCmekSettings() - { - return $this->cmek_settings; - } - - public function hasCmekSettings() - { - return isset($this->cmek_settings); - } - - public function clearCmekSettings() - { - unset($this->cmek_settings); - } - - /** - * The CMEK settings of the log bucket. If present, new log entries written to - * this log bucket are encrypted using the CMEK key provided in this - * configuration. If a log bucket has CMEK settings, the CMEK settings cannot - * be disabled later by updating the log bucket. Changing the KMS key is - * allowed. - * - * Generated from protobuf field .google.logging.v2.CmekSettings cmek_settings = 19; - * @param \Google\Cloud\Logging\V2\CmekSettings $var - * @return $this - */ - public function setCmekSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\CmekSettings::class); - $this->cmek_settings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntry.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntry.php deleted file mode 100644 index 3fc817730b2d..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntry.php +++ /dev/null @@ -1,1061 +0,0 @@ -google.logging.v2.LogEntry - */ -class LogEntry extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the log to which this log entry belongs: - * "projects/[PROJECT_ID]/logs/[LOG_ID]" - * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - * "folders/[FOLDER_ID]/logs/[LOG_ID]" - * A project number may be used in place of PROJECT_ID. The project number is - * translated to its corresponding PROJECT_ID internally and the `log_name` - * field will contain PROJECT_ID in queries and exports. - * `[LOG_ID]` must be URL-encoded within `log_name`. Example: - * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - * `[LOG_ID]` must be less than 512 characters long and can only include the - * following characters: upper and lower case alphanumeric characters, - * forward-slash, underscore, hyphen, and period. - * For backward compatibility, if `log_name` begins with a forward-slash, such - * as `/projects/...`, then the log entry is ingested as usual, but the - * forward-slash is removed. Listing the log entry will not show the leading - * slash and filtering for a log name with a leading slash will never return - * any results. - * - * Generated from protobuf field string log_name = 12 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $log_name = ''; - /** - * Required. The monitored resource that produced this log entry. - * Example: a log entry that reports a database error would be associated with - * the monitored resource designating the particular database that reported - * the error. - * - * Generated from protobuf field .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource = null; - /** - * Optional. The time the event described by the log entry occurred. This time - * is used to compute the log entry's age and to enforce the logs retention - * period. If this field is omitted in a new log entry, then Logging assigns - * it the current time. Timestamps have nanosecond accuracy, but trailing - * zeros in the fractional seconds might be omitted when the timestamp is - * displayed. - * Incoming log entries must have timestamps that don't exceed the - * [logs retention - * period](https://cloud.google.com/logging/quotas#logs_retention_periods) in - * the past, and that don't exceed 24 hours in the future. Log entries outside - * those time boundaries aren't ingested by Logging. - * - * Generated from protobuf field .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $timestamp = null; - /** - * Output only. The time the log entry was received by Logging. - * - * Generated from protobuf field .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $receive_timestamp = null; - /** - * Optional. The severity of the log entry. The default value is - * `LogSeverity.DEFAULT`. - * - * Generated from protobuf field .google.logging.type.LogSeverity severity = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $severity = 0; - /** - * Optional. A unique identifier for the log entry. If you provide a value, - * then Logging considers other log entries in the same project, with the same - * `timestamp`, and with the same `insert_id` to be duplicates which are - * removed in a single query result. However, there are no guarantees of - * de-duplication in the export of logs. - * If the `insert_id` is omitted when writing a log entry, the Logging API - * assigns its own unique identifier in this field. - * In queries, the `insert_id` is also used to order log entries that have - * the same `log_name` and `timestamp` values. - * - * Generated from protobuf field string insert_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $insert_id = ''; - /** - * Optional. Information about the HTTP request associated with this log - * entry, if applicable. - * - * Generated from protobuf field .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $http_request = null; - /** - * Optional. A map of key, value pairs that provides additional information - * about the log entry. The labels can be user-defined or system-defined. - * User-defined labels are arbitrary key, value pairs that you can use to - * classify logs. - * System-defined labels are defined by GCP services for platform logs. - * They have two components - a service namespace component and the - * attribute name. For example: `compute.googleapis.com/resource_name`. - * Cloud Logging truncates label keys that exceed 512 B and label - * values that exceed 64 KB upon their associated log entry being - * written. The truncation is indicated by an ellipsis at the - * end of the character string. - * - * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Information about an operation associated with the log entry, if - * applicable. - * - * Generated from protobuf field .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $operation = null; - /** - * Optional. The REST resource name of the trace being written to - * [Cloud Trace](https://cloud.google.com/trace) in - * association with this log entry. For example, if your trace data is stored - * in the Cloud project "my-trace-project" and if the service that is creating - * the log entry receives a trace header that includes the trace ID "12345", - * then the service should use "projects/my-tracing-project/traces/12345". - * The `trace` field provides the link between logs and traces. By using - * this field, you can navigate from a log entry to a trace. - * - * Generated from protobuf field string trace = 22 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $trace = ''; - /** - * Optional. The ID of the [Cloud Trace](https://cloud.google.com/trace) span - * associated with the current operation in which the log is being written. - * For example, if a span has the REST resource name of - * "projects/some-project/traces/some-trace/spans/some-span-id", then the - * `span_id` field is "some-span-id". - * A - * [Span](https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite#Span) - * represents a single operation within a trace. Whereas a trace may involve - * multiple different microservices running on multiple different machines, - * a span generally corresponds to a single logical operation being performed - * in a single instance of a microservice on one specific machine. Spans - * are the nodes within the tree that is a trace. - * Applications that are [instrumented for - * tracing](https://cloud.google.com/trace/docs/setup) will generally assign a - * new, unique span ID on each incoming request. It is also common to create - * and record additional spans corresponding to internal processing elements - * as well as issuing requests to dependencies. - * The span ID is expected to be a 16-character, hexadecimal encoding of an - * 8-byte array and should not be zero. It should be unique within the trace - * and should, ideally, be generated in a manner that is uniformly random. - * Example values: - * - `000000000000004a` - * - `7a2190356c3fc94b` - * - `0000f00300090021` - * - `d39223e101960076` - * - * Generated from protobuf field string span_id = 27 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $span_id = ''; - /** - * Optional. The sampling decision of the trace associated with the log entry. - * True means that the trace resource name in the `trace` field was sampled - * for storage in a trace backend. False means that the trace was not sampled - * for storage when this log entry was written, or the sampling decision was - * unknown at the time. A non-sampled `trace` value is still useful as a - * request correlation identifier. The default is False. - * - * Generated from protobuf field bool trace_sampled = 30 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $trace_sampled = false; - /** - * Optional. Source code location information associated with the log entry, - * if any. - * - * Generated from protobuf field .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $source_location = null; - /** - * Optional. Information indicating this LogEntry is part of a sequence of - * multiple log entries split from a single LogEntry. - * - * Generated from protobuf field .google.logging.v2.LogSplit split = 35 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $split = null; - protected $payload; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $log_name - * Required. The resource name of the log to which this log entry belongs: - * "projects/[PROJECT_ID]/logs/[LOG_ID]" - * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - * "folders/[FOLDER_ID]/logs/[LOG_ID]" - * A project number may be used in place of PROJECT_ID. The project number is - * translated to its corresponding PROJECT_ID internally and the `log_name` - * field will contain PROJECT_ID in queries and exports. - * `[LOG_ID]` must be URL-encoded within `log_name`. Example: - * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - * `[LOG_ID]` must be less than 512 characters long and can only include the - * following characters: upper and lower case alphanumeric characters, - * forward-slash, underscore, hyphen, and period. - * For backward compatibility, if `log_name` begins with a forward-slash, such - * as `/projects/...`, then the log entry is ingested as usual, but the - * forward-slash is removed. Listing the log entry will not show the leading - * slash and filtering for a log name with a leading slash will never return - * any results. - * @type \Google\Api\MonitoredResource $resource - * Required. The monitored resource that produced this log entry. - * Example: a log entry that reports a database error would be associated with - * the monitored resource designating the particular database that reported - * the error. - * @type \Google\Protobuf\Any $proto_payload - * The log entry payload, represented as a protocol buffer. Some Google - * Cloud Platform services use this field for their log entry payloads. - * The following protocol buffer types are supported; user-defined types - * are not supported: - * "type.googleapis.com/google.cloud.audit.AuditLog" - * "type.googleapis.com/google.appengine.logging.v1.RequestLog" - * @type string $text_payload - * The log entry payload, represented as a Unicode string (UTF-8). - * @type \Google\Protobuf\Struct $json_payload - * The log entry payload, represented as a structure that is - * expressed as a JSON object. - * @type \Google\Protobuf\Timestamp $timestamp - * Optional. The time the event described by the log entry occurred. This time - * is used to compute the log entry's age and to enforce the logs retention - * period. If this field is omitted in a new log entry, then Logging assigns - * it the current time. Timestamps have nanosecond accuracy, but trailing - * zeros in the fractional seconds might be omitted when the timestamp is - * displayed. - * Incoming log entries must have timestamps that don't exceed the - * [logs retention - * period](https://cloud.google.com/logging/quotas#logs_retention_periods) in - * the past, and that don't exceed 24 hours in the future. Log entries outside - * those time boundaries aren't ingested by Logging. - * @type \Google\Protobuf\Timestamp $receive_timestamp - * Output only. The time the log entry was received by Logging. - * @type int $severity - * Optional. The severity of the log entry. The default value is - * `LogSeverity.DEFAULT`. - * @type string $insert_id - * Optional. A unique identifier for the log entry. If you provide a value, - * then Logging considers other log entries in the same project, with the same - * `timestamp`, and with the same `insert_id` to be duplicates which are - * removed in a single query result. However, there are no guarantees of - * de-duplication in the export of logs. - * If the `insert_id` is omitted when writing a log entry, the Logging API - * assigns its own unique identifier in this field. - * In queries, the `insert_id` is also used to order log entries that have - * the same `log_name` and `timestamp` values. - * @type \Google\Cloud\Logging\Type\HttpRequest $http_request - * Optional. Information about the HTTP request associated with this log - * entry, if applicable. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. A map of key, value pairs that provides additional information - * about the log entry. The labels can be user-defined or system-defined. - * User-defined labels are arbitrary key, value pairs that you can use to - * classify logs. - * System-defined labels are defined by GCP services for platform logs. - * They have two components - a service namespace component and the - * attribute name. For example: `compute.googleapis.com/resource_name`. - * Cloud Logging truncates label keys that exceed 512 B and label - * values that exceed 64 KB upon their associated log entry being - * written. The truncation is indicated by an ellipsis at the - * end of the character string. - * @type \Google\Cloud\Logging\V2\LogEntryOperation $operation - * Optional. Information about an operation associated with the log entry, if - * applicable. - * @type string $trace - * Optional. The REST resource name of the trace being written to - * [Cloud Trace](https://cloud.google.com/trace) in - * association with this log entry. For example, if your trace data is stored - * in the Cloud project "my-trace-project" and if the service that is creating - * the log entry receives a trace header that includes the trace ID "12345", - * then the service should use "projects/my-tracing-project/traces/12345". - * The `trace` field provides the link between logs and traces. By using - * this field, you can navigate from a log entry to a trace. - * @type string $span_id - * Optional. The ID of the [Cloud Trace](https://cloud.google.com/trace) span - * associated with the current operation in which the log is being written. - * For example, if a span has the REST resource name of - * "projects/some-project/traces/some-trace/spans/some-span-id", then the - * `span_id` field is "some-span-id". - * A - * [Span](https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite#Span) - * represents a single operation within a trace. Whereas a trace may involve - * multiple different microservices running on multiple different machines, - * a span generally corresponds to a single logical operation being performed - * in a single instance of a microservice on one specific machine. Spans - * are the nodes within the tree that is a trace. - * Applications that are [instrumented for - * tracing](https://cloud.google.com/trace/docs/setup) will generally assign a - * new, unique span ID on each incoming request. It is also common to create - * and record additional spans corresponding to internal processing elements - * as well as issuing requests to dependencies. - * The span ID is expected to be a 16-character, hexadecimal encoding of an - * 8-byte array and should not be zero. It should be unique within the trace - * and should, ideally, be generated in a manner that is uniformly random. - * Example values: - * - `000000000000004a` - * - `7a2190356c3fc94b` - * - `0000f00300090021` - * - `d39223e101960076` - * @type bool $trace_sampled - * Optional. The sampling decision of the trace associated with the log entry. - * True means that the trace resource name in the `trace` field was sampled - * for storage in a trace backend. False means that the trace was not sampled - * for storage when this log entry was written, or the sampling decision was - * unknown at the time. A non-sampled `trace` value is still useful as a - * request correlation identifier. The default is False. - * @type \Google\Cloud\Logging\V2\LogEntrySourceLocation $source_location - * Optional. Source code location information associated with the log entry, - * if any. - * @type \Google\Cloud\Logging\V2\LogSplit $split - * Optional. Information indicating this LogEntry is part of a sequence of - * multiple log entries split from a single LogEntry. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LogEntry::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the log to which this log entry belongs: - * "projects/[PROJECT_ID]/logs/[LOG_ID]" - * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - * "folders/[FOLDER_ID]/logs/[LOG_ID]" - * A project number may be used in place of PROJECT_ID. The project number is - * translated to its corresponding PROJECT_ID internally and the `log_name` - * field will contain PROJECT_ID in queries and exports. - * `[LOG_ID]` must be URL-encoded within `log_name`. Example: - * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - * `[LOG_ID]` must be less than 512 characters long and can only include the - * following characters: upper and lower case alphanumeric characters, - * forward-slash, underscore, hyphen, and period. - * For backward compatibility, if `log_name` begins with a forward-slash, such - * as `/projects/...`, then the log entry is ingested as usual, but the - * forward-slash is removed. Listing the log entry will not show the leading - * slash and filtering for a log name with a leading slash will never return - * any results. - * - * Generated from protobuf field string log_name = 12 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLogName() - { - return $this->log_name; - } - - /** - * Required. The resource name of the log to which this log entry belongs: - * "projects/[PROJECT_ID]/logs/[LOG_ID]" - * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - * "folders/[FOLDER_ID]/logs/[LOG_ID]" - * A project number may be used in place of PROJECT_ID. The project number is - * translated to its corresponding PROJECT_ID internally and the `log_name` - * field will contain PROJECT_ID in queries and exports. - * `[LOG_ID]` must be URL-encoded within `log_name`. Example: - * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - * `[LOG_ID]` must be less than 512 characters long and can only include the - * following characters: upper and lower case alphanumeric characters, - * forward-slash, underscore, hyphen, and period. - * For backward compatibility, if `log_name` begins with a forward-slash, such - * as `/projects/...`, then the log entry is ingested as usual, but the - * forward-slash is removed. Listing the log entry will not show the leading - * slash and filtering for a log name with a leading slash will never return - * any results. - * - * Generated from protobuf field string log_name = 12 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setLogName($var) - { - GPBUtil::checkString($var, True); - $this->log_name = $var; - - return $this; - } - - /** - * Required. The monitored resource that produced this log entry. - * Example: a log entry that reports a database error would be associated with - * the monitored resource designating the particular database that reported - * the error. - * - * Generated from protobuf field .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Api\MonitoredResource|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * Required. The monitored resource that produced this log entry. - * Example: a log entry that reports a database error would be associated with - * the monitored resource designating the particular database that reported - * the error. - * - * Generated from protobuf field .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Api\MonitoredResource $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Api\MonitoredResource::class); - $this->resource = $var; - - return $this; - } - - /** - * The log entry payload, represented as a protocol buffer. Some Google - * Cloud Platform services use this field for their log entry payloads. - * The following protocol buffer types are supported; user-defined types - * are not supported: - * "type.googleapis.com/google.cloud.audit.AuditLog" - * "type.googleapis.com/google.appengine.logging.v1.RequestLog" - * - * Generated from protobuf field .google.protobuf.Any proto_payload = 2; - * @return \Google\Protobuf\Any|null - */ - public function getProtoPayload() - { - return $this->readOneof(2); - } - - public function hasProtoPayload() - { - return $this->hasOneof(2); - } - - /** - * The log entry payload, represented as a protocol buffer. Some Google - * Cloud Platform services use this field for their log entry payloads. - * The following protocol buffer types are supported; user-defined types - * are not supported: - * "type.googleapis.com/google.cloud.audit.AuditLog" - * "type.googleapis.com/google.appengine.logging.v1.RequestLog" - * - * Generated from protobuf field .google.protobuf.Any proto_payload = 2; - * @param \Google\Protobuf\Any $var - * @return $this - */ - public function setProtoPayload($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The log entry payload, represented as a Unicode string (UTF-8). - * - * Generated from protobuf field string text_payload = 3; - * @return string - */ - public function getTextPayload() - { - return $this->readOneof(3); - } - - public function hasTextPayload() - { - return $this->hasOneof(3); - } - - /** - * The log entry payload, represented as a Unicode string (UTF-8). - * - * Generated from protobuf field string text_payload = 3; - * @param string $var - * @return $this - */ - public function setTextPayload($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The log entry payload, represented as a structure that is - * expressed as a JSON object. - * - * Generated from protobuf field .google.protobuf.Struct json_payload = 6; - * @return \Google\Protobuf\Struct|null - */ - public function getJsonPayload() - { - return $this->readOneof(6); - } - - public function hasJsonPayload() - { - return $this->hasOneof(6); - } - - /** - * The log entry payload, represented as a structure that is - * expressed as a JSON object. - * - * Generated from protobuf field .google.protobuf.Struct json_payload = 6; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setJsonPayload($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Optional. The time the event described by the log entry occurred. This time - * is used to compute the log entry's age and to enforce the logs retention - * period. If this field is omitted in a new log entry, then Logging assigns - * it the current time. Timestamps have nanosecond accuracy, but trailing - * zeros in the fractional seconds might be omitted when the timestamp is - * displayed. - * Incoming log entries must have timestamps that don't exceed the - * [logs retention - * period](https://cloud.google.com/logging/quotas#logs_retention_periods) in - * the past, and that don't exceed 24 hours in the future. Log entries outside - * those time boundaries aren't ingested by Logging. - * - * Generated from protobuf field .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTimestamp() - { - return $this->timestamp; - } - - public function hasTimestamp() - { - return isset($this->timestamp); - } - - public function clearTimestamp() - { - unset($this->timestamp); - } - - /** - * Optional. The time the event described by the log entry occurred. This time - * is used to compute the log entry's age and to enforce the logs retention - * period. If this field is omitted in a new log entry, then Logging assigns - * it the current time. Timestamps have nanosecond accuracy, but trailing - * zeros in the fractional seconds might be omitted when the timestamp is - * displayed. - * Incoming log entries must have timestamps that don't exceed the - * [logs retention - * period](https://cloud.google.com/logging/quotas#logs_retention_periods) in - * the past, and that don't exceed 24 hours in the future. Log entries outside - * those time boundaries aren't ingested by Logging. - * - * Generated from protobuf field .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTimestamp($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->timestamp = $var; - - return $this; - } - - /** - * Output only. The time the log entry was received by Logging. - * - * Generated from protobuf field .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReceiveTimestamp() - { - return $this->receive_timestamp; - } - - public function hasReceiveTimestamp() - { - return isset($this->receive_timestamp); - } - - public function clearReceiveTimestamp() - { - unset($this->receive_timestamp); - } - - /** - * Output only. The time the log entry was received by Logging. - * - * Generated from protobuf field .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReceiveTimestamp($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->receive_timestamp = $var; - - return $this; - } - - /** - * Optional. The severity of the log entry. The default value is - * `LogSeverity.DEFAULT`. - * - * Generated from protobuf field .google.logging.type.LogSeverity severity = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * Optional. The severity of the log entry. The default value is - * `LogSeverity.DEFAULT`. - * - * Generated from protobuf field .google.logging.type.LogSeverity severity = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Logging\Type\LogSeverity::class); - $this->severity = $var; - - return $this; - } - - /** - * Optional. A unique identifier for the log entry. If you provide a value, - * then Logging considers other log entries in the same project, with the same - * `timestamp`, and with the same `insert_id` to be duplicates which are - * removed in a single query result. However, there are no guarantees of - * de-duplication in the export of logs. - * If the `insert_id` is omitted when writing a log entry, the Logging API - * assigns its own unique identifier in this field. - * In queries, the `insert_id` is also used to order log entries that have - * the same `log_name` and `timestamp` values. - * - * Generated from protobuf field string insert_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getInsertId() - { - return $this->insert_id; - } - - /** - * Optional. A unique identifier for the log entry. If you provide a value, - * then Logging considers other log entries in the same project, with the same - * `timestamp`, and with the same `insert_id` to be duplicates which are - * removed in a single query result. However, there are no guarantees of - * de-duplication in the export of logs. - * If the `insert_id` is omitted when writing a log entry, the Logging API - * assigns its own unique identifier in this field. - * In queries, the `insert_id` is also used to order log entries that have - * the same `log_name` and `timestamp` values. - * - * Generated from protobuf field string insert_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setInsertId($var) - { - GPBUtil::checkString($var, True); - $this->insert_id = $var; - - return $this; - } - - /** - * Optional. Information about the HTTP request associated with this log - * entry, if applicable. - * - * Generated from protobuf field .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Logging\Type\HttpRequest|null - */ - public function getHttpRequest() - { - return $this->http_request; - } - - public function hasHttpRequest() - { - return isset($this->http_request); - } - - public function clearHttpRequest() - { - unset($this->http_request); - } - - /** - * Optional. Information about the HTTP request associated with this log - * entry, if applicable. - * - * Generated from protobuf field .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Logging\Type\HttpRequest $var - * @return $this - */ - public function setHttpRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\Type\HttpRequest::class); - $this->http_request = $var; - - return $this; - } - - /** - * Optional. A map of key, value pairs that provides additional information - * about the log entry. The labels can be user-defined or system-defined. - * User-defined labels are arbitrary key, value pairs that you can use to - * classify logs. - * System-defined labels are defined by GCP services for platform logs. - * They have two components - a service namespace component and the - * attribute name. For example: `compute.googleapis.com/resource_name`. - * Cloud Logging truncates label keys that exceed 512 B and label - * values that exceed 64 KB upon their associated log entry being - * written. The truncation is indicated by an ellipsis at the - * end of the character string. - * - * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. A map of key, value pairs that provides additional information - * about the log entry. The labels can be user-defined or system-defined. - * User-defined labels are arbitrary key, value pairs that you can use to - * classify logs. - * System-defined labels are defined by GCP services for platform logs. - * They have two components - a service namespace component and the - * attribute name. For example: `compute.googleapis.com/resource_name`. - * Cloud Logging truncates label keys that exceed 512 B and label - * values that exceed 64 KB upon their associated log entry being - * written. The truncation is indicated by an ellipsis at the - * end of the character string. - * - * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @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; - } - - /** - * Optional. Information about an operation associated with the log entry, if - * applicable. - * - * Generated from protobuf field .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Logging\V2\LogEntryOperation|null - */ - public function getOperation() - { - return $this->operation; - } - - public function hasOperation() - { - return isset($this->operation); - } - - public function clearOperation() - { - unset($this->operation); - } - - /** - * Optional. Information about an operation associated with the log entry, if - * applicable. - * - * Generated from protobuf field .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Logging\V2\LogEntryOperation $var - * @return $this - */ - public function setOperation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogEntryOperation::class); - $this->operation = $var; - - return $this; - } - - /** - * Optional. The REST resource name of the trace being written to - * [Cloud Trace](https://cloud.google.com/trace) in - * association with this log entry. For example, if your trace data is stored - * in the Cloud project "my-trace-project" and if the service that is creating - * the log entry receives a trace header that includes the trace ID "12345", - * then the service should use "projects/my-tracing-project/traces/12345". - * The `trace` field provides the link between logs and traces. By using - * this field, you can navigate from a log entry to a trace. - * - * Generated from protobuf field string trace = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTrace() - { - return $this->trace; - } - - /** - * Optional. The REST resource name of the trace being written to - * [Cloud Trace](https://cloud.google.com/trace) in - * association with this log entry. For example, if your trace data is stored - * in the Cloud project "my-trace-project" and if the service that is creating - * the log entry receives a trace header that includes the trace ID "12345", - * then the service should use "projects/my-tracing-project/traces/12345". - * The `trace` field provides the link between logs and traces. By using - * this field, you can navigate from a log entry to a trace. - * - * Generated from protobuf field string trace = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTrace($var) - { - GPBUtil::checkString($var, True); - $this->trace = $var; - - return $this; - } - - /** - * Optional. The ID of the [Cloud Trace](https://cloud.google.com/trace) span - * associated with the current operation in which the log is being written. - * For example, if a span has the REST resource name of - * "projects/some-project/traces/some-trace/spans/some-span-id", then the - * `span_id` field is "some-span-id". - * A - * [Span](https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite#Span) - * represents a single operation within a trace. Whereas a trace may involve - * multiple different microservices running on multiple different machines, - * a span generally corresponds to a single logical operation being performed - * in a single instance of a microservice on one specific machine. Spans - * are the nodes within the tree that is a trace. - * Applications that are [instrumented for - * tracing](https://cloud.google.com/trace/docs/setup) will generally assign a - * new, unique span ID on each incoming request. It is also common to create - * and record additional spans corresponding to internal processing elements - * as well as issuing requests to dependencies. - * The span ID is expected to be a 16-character, hexadecimal encoding of an - * 8-byte array and should not be zero. It should be unique within the trace - * and should, ideally, be generated in a manner that is uniformly random. - * Example values: - * - `000000000000004a` - * - `7a2190356c3fc94b` - * - `0000f00300090021` - * - `d39223e101960076` - * - * Generated from protobuf field string span_id = 27 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSpanId() - { - return $this->span_id; - } - - /** - * Optional. The ID of the [Cloud Trace](https://cloud.google.com/trace) span - * associated with the current operation in which the log is being written. - * For example, if a span has the REST resource name of - * "projects/some-project/traces/some-trace/spans/some-span-id", then the - * `span_id` field is "some-span-id". - * A - * [Span](https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite#Span) - * represents a single operation within a trace. Whereas a trace may involve - * multiple different microservices running on multiple different machines, - * a span generally corresponds to a single logical operation being performed - * in a single instance of a microservice on one specific machine. Spans - * are the nodes within the tree that is a trace. - * Applications that are [instrumented for - * tracing](https://cloud.google.com/trace/docs/setup) will generally assign a - * new, unique span ID on each incoming request. It is also common to create - * and record additional spans corresponding to internal processing elements - * as well as issuing requests to dependencies. - * The span ID is expected to be a 16-character, hexadecimal encoding of an - * 8-byte array and should not be zero. It should be unique within the trace - * and should, ideally, be generated in a manner that is uniformly random. - * Example values: - * - `000000000000004a` - * - `7a2190356c3fc94b` - * - `0000f00300090021` - * - `d39223e101960076` - * - * Generated from protobuf field string span_id = 27 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSpanId($var) - { - GPBUtil::checkString($var, True); - $this->span_id = $var; - - return $this; - } - - /** - * Optional. The sampling decision of the trace associated with the log entry. - * True means that the trace resource name in the `trace` field was sampled - * for storage in a trace backend. False means that the trace was not sampled - * for storage when this log entry was written, or the sampling decision was - * unknown at the time. A non-sampled `trace` value is still useful as a - * request correlation identifier. The default is False. - * - * Generated from protobuf field bool trace_sampled = 30 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getTraceSampled() - { - return $this->trace_sampled; - } - - /** - * Optional. The sampling decision of the trace associated with the log entry. - * True means that the trace resource name in the `trace` field was sampled - * for storage in a trace backend. False means that the trace was not sampled - * for storage when this log entry was written, or the sampling decision was - * unknown at the time. A non-sampled `trace` value is still useful as a - * request correlation identifier. The default is False. - * - * Generated from protobuf field bool trace_sampled = 30 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setTraceSampled($var) - { - GPBUtil::checkBool($var); - $this->trace_sampled = $var; - - return $this; - } - - /** - * Optional. Source code location information associated with the log entry, - * if any. - * - * Generated from protobuf field .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Logging\V2\LogEntrySourceLocation|null - */ - public function getSourceLocation() - { - return $this->source_location; - } - - public function hasSourceLocation() - { - return isset($this->source_location); - } - - public function clearSourceLocation() - { - unset($this->source_location); - } - - /** - * Optional. Source code location information associated with the log entry, - * if any. - * - * Generated from protobuf field .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Logging\V2\LogEntrySourceLocation $var - * @return $this - */ - public function setSourceLocation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogEntrySourceLocation::class); - $this->source_location = $var; - - return $this; - } - - /** - * Optional. Information indicating this LogEntry is part of a sequence of - * multiple log entries split from a single LogEntry. - * - * Generated from protobuf field .google.logging.v2.LogSplit split = 35 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Logging\V2\LogSplit|null - */ - public function getSplit() - { - return $this->split; - } - - public function hasSplit() - { - return isset($this->split); - } - - public function clearSplit() - { - unset($this->split); - } - - /** - * Optional. Information indicating this LogEntry is part of a sequence of - * multiple log entries split from a single LogEntry. - * - * Generated from protobuf field .google.logging.v2.LogSplit split = 35 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Logging\V2\LogSplit $var - * @return $this - */ - public function setSplit($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogSplit::class); - $this->split = $var; - - return $this; - } - - /** - * @return string - */ - public function getPayload() - { - return $this->whichOneof("payload"); - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntryOperation.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntryOperation.php deleted file mode 100644 index 81a4bf2d70ae..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntryOperation.php +++ /dev/null @@ -1,182 +0,0 @@ -google.logging.v2.LogEntryOperation - */ -class LogEntryOperation extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. An arbitrary operation identifier. Log entries with the same - * identifier are assumed to be part of the same operation. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $id = ''; - /** - * Optional. An arbitrary producer identifier. The combination of `id` and - * `producer` must be globally unique. Examples for `producer`: - * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. - * - * Generated from protobuf field string producer = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $producer = ''; - /** - * Optional. Set this to True if this is the first log entry in the operation. - * - * Generated from protobuf field bool first = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $first = false; - /** - * Optional. Set this to True if this is the last log entry in the operation. - * - * Generated from protobuf field bool last = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $last = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Optional. An arbitrary operation identifier. Log entries with the same - * identifier are assumed to be part of the same operation. - * @type string $producer - * Optional. An arbitrary producer identifier. The combination of `id` and - * `producer` must be globally unique. Examples for `producer`: - * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. - * @type bool $first - * Optional. Set this to True if this is the first log entry in the operation. - * @type bool $last - * Optional. Set this to True if this is the last log entry in the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LogEntry::initOnce(); - parent::__construct($data); - } - - /** - * Optional. An arbitrary operation identifier. Log entries with the same - * identifier are assumed to be part of the same operation. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Optional. An arbitrary operation identifier. Log entries with the same - * identifier are assumed to be part of the same operation. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Optional. An arbitrary producer identifier. The combination of `id` and - * `producer` must be globally unique. Examples for `producer`: - * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. - * - * Generated from protobuf field string producer = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getProducer() - { - return $this->producer; - } - - /** - * Optional. An arbitrary producer identifier. The combination of `id` and - * `producer` must be globally unique. Examples for `producer`: - * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. - * - * Generated from protobuf field string producer = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setProducer($var) - { - GPBUtil::checkString($var, True); - $this->producer = $var; - - return $this; - } - - /** - * Optional. Set this to True if this is the first log entry in the operation. - * - * Generated from protobuf field bool first = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getFirst() - { - return $this->first; - } - - /** - * Optional. Set this to True if this is the first log entry in the operation. - * - * Generated from protobuf field bool first = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setFirst($var) - { - GPBUtil::checkBool($var); - $this->first = $var; - - return $this; - } - - /** - * Optional. Set this to True if this is the last log entry in the operation. - * - * Generated from protobuf field bool last = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getLast() - { - return $this->last; - } - - /** - * Optional. Set this to True if this is the last log entry in the operation. - * - * Generated from protobuf field bool last = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setLast($var) - { - GPBUtil::checkBool($var); - $this->last = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntrySourceLocation.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntrySourceLocation.php deleted file mode 100644 index 47279739bd52..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntrySourceLocation.php +++ /dev/null @@ -1,164 +0,0 @@ -google.logging.v2.LogEntrySourceLocation - */ -class LogEntrySourceLocation extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Source file name. Depending on the runtime environment, this - * might be a simple name or a fully-qualified name. - * - * Generated from protobuf field string file = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $file = ''; - /** - * Optional. Line within the source file. 1-based; 0 indicates no line number - * available. - * - * Generated from protobuf field int64 line = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $line = 0; - /** - * Optional. Human-readable name of the function or method being invoked, with - * optional context such as the class or package name. This information may be - * used in contexts such as the logs viewer, where a file and line number are - * less meaningful. The format can vary by language. For example: - * `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` - * (Python). - * - * Generated from protobuf field string function = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $function = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $file - * Optional. Source file name. Depending on the runtime environment, this - * might be a simple name or a fully-qualified name. - * @type int|string $line - * Optional. Line within the source file. 1-based; 0 indicates no line number - * available. - * @type string $function - * Optional. Human-readable name of the function or method being invoked, with - * optional context such as the class or package name. This information may be - * used in contexts such as the logs viewer, where a file and line number are - * less meaningful. The format can vary by language. For example: - * `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` - * (Python). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LogEntry::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Source file name. Depending on the runtime environment, this - * might be a simple name or a fully-qualified name. - * - * Generated from protobuf field string file = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFile() - { - return $this->file; - } - - /** - * Optional. Source file name. Depending on the runtime environment, this - * might be a simple name or a fully-qualified name. - * - * Generated from protobuf field string file = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFile($var) - { - GPBUtil::checkString($var, True); - $this->file = $var; - - return $this; - } - - /** - * Optional. Line within the source file. 1-based; 0 indicates no line number - * available. - * - * Generated from protobuf field int64 line = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getLine() - { - return $this->line; - } - - /** - * Optional. Line within the source file. 1-based; 0 indicates no line number - * available. - * - * Generated from protobuf field int64 line = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setLine($var) - { - GPBUtil::checkInt64($var); - $this->line = $var; - - return $this; - } - - /** - * Optional. Human-readable name of the function or method being invoked, with - * optional context such as the class or package name. This information may be - * used in contexts such as the logs viewer, where a file and line number are - * less meaningful. The format can vary by language. For example: - * `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` - * (Python). - * - * Generated from protobuf field string function = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFunction() - { - return $this->function; - } - - /** - * Optional. Human-readable name of the function or method being invoked, with - * optional context such as the class or package name. This information may be - * used in contexts such as the logs viewer, where a file and line number are - * less meaningful. The format can vary by language. For example: - * `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` - * (Python). - * - * Generated from protobuf field string function = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFunction($var) - { - GPBUtil::checkString($var, True); - $this->function = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogExclusion.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogExclusion.php deleted file mode 100644 index bc3c81c62318..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogExclusion.php +++ /dev/null @@ -1,321 +0,0 @@ -google.logging.v2.LogExclusion - */ -class LogExclusion extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A client-assigned identifier, such as - * `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and - * can include only letters, digits, underscores, hyphens, and periods. First - * character has to be alphanumeric. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. A description of this exclusion. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Required. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced-queries) that - * matches the log entries to be excluded. By using the [sample - * function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), - * you can exclude less than 100% of the matching log entries. - * For example, the following query matches 99% of low-severity log entries - * from Google Cloud Storage buckets: - * `resource.type=gcs_bucket severitystring filter = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $filter = ''; - /** - * Optional. If set to True, then this exclusion is disabled and it does not - * exclude any log entries. You can [update an - * exclusion][google.logging.v2.ConfigServiceV2.UpdateExclusion] to change the - * value of this field. - * - * Generated from protobuf field bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disabled = false; - /** - * Output only. The creation timestamp of the exclusion. - * This field may not be present for older exclusions. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last update timestamp of the exclusion. - * This field may not be present for older exclusions. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A client-assigned identifier, such as - * `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and - * can include only letters, digits, underscores, hyphens, and periods. First - * character has to be alphanumeric. - * @type string $description - * Optional. A description of this exclusion. - * @type string $filter - * Required. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced-queries) that - * matches the log entries to be excluded. By using the [sample - * function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), - * you can exclude less than 100% of the matching log entries. - * For example, the following query matches 99% of low-severity log entries - * from Google Cloud Storage buckets: - * `resource.type=gcs_bucket severitystring name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A client-assigned identifier, such as - * `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and - * can include only letters, digits, underscores, hyphens, and periods. First - * character has to be alphanumeric. - * - * 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; - } - - /** - * Optional. A description of this exclusion. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A description of this exclusion. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced-queries) that - * matches the log entries to be excluded. By using the [sample - * function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), - * you can exclude less than 100% of the matching log entries. - * For example, the following query matches 99% of low-severity log entries - * from Google Cloud Storage buckets: - * `resource.type=gcs_bucket severitystring filter = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Required. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced-queries) that - * matches the log entries to be excluded. By using the [sample - * function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), - * you can exclude less than 100% of the matching log entries. - * For example, the following query matches 99% of low-severity log entries - * from Google Cloud Storage buckets: - * `resource.type=gcs_bucket severitystring filter = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. If set to True, then this exclusion is disabled and it does not - * exclude any log entries. You can [update an - * exclusion][google.logging.v2.ConfigServiceV2.UpdateExclusion] to change the - * value of this field. - * - * Generated from protobuf field bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisabled() - { - return $this->disabled; - } - - /** - * Optional. If set to True, then this exclusion is disabled and it does not - * exclude any log entries. You can [update an - * exclusion][google.logging.v2.ConfigServiceV2.UpdateExclusion] to change the - * value of this field. - * - * Generated from protobuf field bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisabled($var) - { - GPBUtil::checkBool($var); - $this->disabled = $var; - - return $this; - } - - /** - * Output only. The creation timestamp of the exclusion. - * This field may not be present for older exclusions. - * - * 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 creation timestamp of the exclusion. - * This field may not be present for older exclusions. - * - * 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; - } - - /** - * Output only. The last update timestamp of the exclusion. - * This field may not be present for older exclusions. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last update timestamp of the exclusion. - * This field may not be present for older exclusions. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogMetric.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogMetric.php deleted file mode 100644 index b542f6adc62e..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogMetric.php +++ /dev/null @@ -1,767 +0,0 @@ -google.logging.v2.LogMetric - */ -class LogMetric extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The client-assigned metric identifier. - * Examples: `"error_count"`, `"nginx/requests"`. - * Metric identifiers are limited to 100 characters and can include only the - * following characters: `A-Z`, `a-z`, `0-9`, and the special characters - * `_-.,+!*',()%/`. The forward-slash character (`/`) denotes a hierarchy of - * name pieces, and it cannot be the first character of the name. - * This field is the `[METRIC_ID]` part of a metric resource name in the - * format "projects/[PROJECT_ID]/metrics/[METRIC_ID]". Example: If the - * resource name of a metric is - * `"projects/my-project/metrics/nginx%2Frequests"`, this field's value is - * `"nginx/requests"`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. A description of this metric, which is used in documentation. - * The maximum length of the description is 8000 characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Required. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced_filters) which - * is used to match log entries. Example: - * "resource.type=gae_app AND severity>=ERROR" - * The maximum length of the filter is 20000 characters. - * - * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $filter = ''; - /** - * Optional. The resource name of the Log Bucket that owns the Log Metric. - * Only Log Buckets in projects are supported. The bucket has to be in the - * same project as the metric. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket` - * If empty, then the Log Metric is considered a non-Bucket Log Metric. - * - * Generated from protobuf field string bucket_name = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $bucket_name = ''; - /** - * Optional. If set to True, then this metric is disabled and it does not - * generate any points. - * - * Generated from protobuf field bool disabled = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disabled = false; - /** - * Optional. The metric descriptor associated with the logs-based metric. - * If unspecified, it uses a default metric descriptor with a DELTA metric - * kind, INT64 value type, with no labels and a unit of "1". Such a metric - * counts the number of log entries matching the `filter` expression. - * The `name`, `type`, and `description` fields in the `metric_descriptor` - * are output only, and is constructed using the `name` and `description` - * field in the LogMetric. - * To create a logs-based metric that records a distribution of log values, a - * DELTA metric kind with a DISTRIBUTION value type must be used along with - * a `value_extractor` expression in the LogMetric. - * Each label in the metric descriptor must have a matching label - * name as the key and an extractor expression as the value in the - * `label_extractors` map. - * The `metric_kind` and `value_type` fields in the `metric_descriptor` cannot - * be updated once initially configured. New labels can be added in the - * `metric_descriptor`, but existing labels cannot be modified except for - * their description. - * - * Generated from protobuf field .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $metric_descriptor = null; - /** - * Optional. A `value_extractor` is required when using a distribution - * logs-based metric to extract the values to record from a log entry. - * Two functions are supported for value extraction: `EXTRACT(field)` or - * `REGEXP_EXTRACT(field, regex)`. The arguments are: - * 1. field: The name of the log entry field from which the value is to be - * extracted. - * 2. regex: A regular expression using the Google RE2 syntax - * (https://github.com/google/re2/wiki/Syntax) with a single capture - * group to extract data from the specified log entry field. The value - * of the field is converted to a string before applying the regex. - * It is an error to specify a regex that does not include exactly one - * capture group. - * The result of the extraction must be convertible to a double type, as the - * distribution always records double values. If either the extraction or - * the conversion to double fails, then those values are not recorded in the - * distribution. - * Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` - * - * Generated from protobuf field string value_extractor = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $value_extractor = ''; - /** - * Optional. A map from a label key string to an extractor expression which is - * used to extract data from a log entry field and assign as the label value. - * Each label key specified in the LabelDescriptor must have an associated - * extractor expression in this map. The syntax of the extractor expression - * is the same as for the `value_extractor` field. - * The extracted value is converted to the type defined in the label - * descriptor. If either the extraction or the type conversion fails, - * the label will have a default value. The default value for a string - * label is an empty string, for an integer label its 0, and for a boolean - * label its `false`. - * Note that there are upper bounds on the maximum number of labels and the - * number of active time series that are allowed in a project. - * - * Generated from protobuf field map label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $label_extractors; - /** - * Optional. The `bucket_options` are required when the logs-based metric is - * using a DISTRIBUTION value type and it describes the bucket boundaries - * used to create a histogram of the extracted values. - * - * Generated from protobuf field .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $bucket_options = null; - /** - * Output only. The creation timestamp of the metric. - * This field may not be present for older metrics. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last update timestamp of the metric. - * This field may not be present for older metrics. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Deprecated. The API version that created or updated this metric. - * The v2 format is used by default and cannot be changed. - * - * Generated from protobuf field .google.logging.v2.LogMetric.ApiVersion version = 4 [deprecated = true]; - * @deprecated - */ - protected $version = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The client-assigned metric identifier. - * Examples: `"error_count"`, `"nginx/requests"`. - * Metric identifiers are limited to 100 characters and can include only the - * following characters: `A-Z`, `a-z`, `0-9`, and the special characters - * `_-.,+!*',()%/`. The forward-slash character (`/`) denotes a hierarchy of - * name pieces, and it cannot be the first character of the name. - * This field is the `[METRIC_ID]` part of a metric resource name in the - * format "projects/[PROJECT_ID]/metrics/[METRIC_ID]". Example: If the - * resource name of a metric is - * `"projects/my-project/metrics/nginx%2Frequests"`, this field's value is - * `"nginx/requests"`. - * @type string $description - * Optional. A description of this metric, which is used in documentation. - * The maximum length of the description is 8000 characters. - * @type string $filter - * Required. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced_filters) which - * is used to match log entries. Example: - * "resource.type=gae_app AND severity>=ERROR" - * The maximum length of the filter is 20000 characters. - * @type string $bucket_name - * Optional. The resource name of the Log Bucket that owns the Log Metric. - * Only Log Buckets in projects are supported. The bucket has to be in the - * same project as the metric. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket` - * If empty, then the Log Metric is considered a non-Bucket Log Metric. - * @type bool $disabled - * Optional. If set to True, then this metric is disabled and it does not - * generate any points. - * @type \Google\Api\MetricDescriptor $metric_descriptor - * Optional. The metric descriptor associated with the logs-based metric. - * If unspecified, it uses a default metric descriptor with a DELTA metric - * kind, INT64 value type, with no labels and a unit of "1". Such a metric - * counts the number of log entries matching the `filter` expression. - * The `name`, `type`, and `description` fields in the `metric_descriptor` - * are output only, and is constructed using the `name` and `description` - * field in the LogMetric. - * To create a logs-based metric that records a distribution of log values, a - * DELTA metric kind with a DISTRIBUTION value type must be used along with - * a `value_extractor` expression in the LogMetric. - * Each label in the metric descriptor must have a matching label - * name as the key and an extractor expression as the value in the - * `label_extractors` map. - * The `metric_kind` and `value_type` fields in the `metric_descriptor` cannot - * be updated once initially configured. New labels can be added in the - * `metric_descriptor`, but existing labels cannot be modified except for - * their description. - * @type string $value_extractor - * Optional. A `value_extractor` is required when using a distribution - * logs-based metric to extract the values to record from a log entry. - * Two functions are supported for value extraction: `EXTRACT(field)` or - * `REGEXP_EXTRACT(field, regex)`. The arguments are: - * 1. field: The name of the log entry field from which the value is to be - * extracted. - * 2. regex: A regular expression using the Google RE2 syntax - * (https://github.com/google/re2/wiki/Syntax) with a single capture - * group to extract data from the specified log entry field. The value - * of the field is converted to a string before applying the regex. - * It is an error to specify a regex that does not include exactly one - * capture group. - * The result of the extraction must be convertible to a double type, as the - * distribution always records double values. If either the extraction or - * the conversion to double fails, then those values are not recorded in the - * distribution. - * Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` - * @type array|\Google\Protobuf\Internal\MapField $label_extractors - * Optional. A map from a label key string to an extractor expression which is - * used to extract data from a log entry field and assign as the label value. - * Each label key specified in the LabelDescriptor must have an associated - * extractor expression in this map. The syntax of the extractor expression - * is the same as for the `value_extractor` field. - * The extracted value is converted to the type defined in the label - * descriptor. If either the extraction or the type conversion fails, - * the label will have a default value. The default value for a string - * label is an empty string, for an integer label its 0, and for a boolean - * label its `false`. - * Note that there are upper bounds on the maximum number of labels and the - * number of active time series that are allowed in a project. - * @type \Google\Api\Distribution\BucketOptions $bucket_options - * Optional. The `bucket_options` are required when the logs-based metric is - * using a DISTRIBUTION value type and it describes the bucket boundaries - * used to create a histogram of the extracted values. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation timestamp of the metric. - * This field may not be present for older metrics. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update timestamp of the metric. - * This field may not be present for older metrics. - * @type int $version - * Deprecated. The API version that created or updated this metric. - * The v2 format is used by default and cannot be changed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingMetrics::initOnce(); - parent::__construct($data); - } - - /** - * Required. The client-assigned metric identifier. - * Examples: `"error_count"`, `"nginx/requests"`. - * Metric identifiers are limited to 100 characters and can include only the - * following characters: `A-Z`, `a-z`, `0-9`, and the special characters - * `_-.,+!*',()%/`. The forward-slash character (`/`) denotes a hierarchy of - * name pieces, and it cannot be the first character of the name. - * This field is the `[METRIC_ID]` part of a metric resource name in the - * format "projects/[PROJECT_ID]/metrics/[METRIC_ID]". Example: If the - * resource name of a metric is - * `"projects/my-project/metrics/nginx%2Frequests"`, this field's value is - * `"nginx/requests"`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The client-assigned metric identifier. - * Examples: `"error_count"`, `"nginx/requests"`. - * Metric identifiers are limited to 100 characters and can include only the - * following characters: `A-Z`, `a-z`, `0-9`, and the special characters - * `_-.,+!*',()%/`. The forward-slash character (`/`) denotes a hierarchy of - * name pieces, and it cannot be the first character of the name. - * This field is the `[METRIC_ID]` part of a metric resource name in the - * format "projects/[PROJECT_ID]/metrics/[METRIC_ID]". Example: If the - * resource name of a metric is - * `"projects/my-project/metrics/nginx%2Frequests"`, this field's value is - * `"nginx/requests"`. - * - * 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; - } - - /** - * Optional. A description of this metric, which is used in documentation. - * The maximum length of the description is 8000 characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A description of this metric, which is used in documentation. - * The maximum length of the description is 8000 characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced_filters) which - * is used to match log entries. Example: - * "resource.type=gae_app AND severity>=ERROR" - * The maximum length of the filter is 20000 characters. - * - * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Required. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced_filters) which - * is used to match log entries. Example: - * "resource.type=gae_app AND severity>=ERROR" - * The maximum length of the filter is 20000 characters. - * - * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. The resource name of the Log Bucket that owns the Log Metric. - * Only Log Buckets in projects are supported. The bucket has to be in the - * same project as the metric. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket` - * If empty, then the Log Metric is considered a non-Bucket Log Metric. - * - * Generated from protobuf field string bucket_name = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getBucketName() - { - return $this->bucket_name; - } - - /** - * Optional. The resource name of the Log Bucket that owns the Log Metric. - * Only Log Buckets in projects are supported. The bucket has to be in the - * same project as the metric. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket` - * If empty, then the Log Metric is considered a non-Bucket Log Metric. - * - * Generated from protobuf field string bucket_name = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setBucketName($var) - { - GPBUtil::checkString($var, True); - $this->bucket_name = $var; - - return $this; - } - - /** - * Optional. If set to True, then this metric is disabled and it does not - * generate any points. - * - * Generated from protobuf field bool disabled = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisabled() - { - return $this->disabled; - } - - /** - * Optional. If set to True, then this metric is disabled and it does not - * generate any points. - * - * Generated from protobuf field bool disabled = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisabled($var) - { - GPBUtil::checkBool($var); - $this->disabled = $var; - - return $this; - } - - /** - * Optional. The metric descriptor associated with the logs-based metric. - * If unspecified, it uses a default metric descriptor with a DELTA metric - * kind, INT64 value type, with no labels and a unit of "1". Such a metric - * counts the number of log entries matching the `filter` expression. - * The `name`, `type`, and `description` fields in the `metric_descriptor` - * are output only, and is constructed using the `name` and `description` - * field in the LogMetric. - * To create a logs-based metric that records a distribution of log values, a - * DELTA metric kind with a DISTRIBUTION value type must be used along with - * a `value_extractor` expression in the LogMetric. - * Each label in the metric descriptor must have a matching label - * name as the key and an extractor expression as the value in the - * `label_extractors` map. - * The `metric_kind` and `value_type` fields in the `metric_descriptor` cannot - * be updated once initially configured. New labels can be added in the - * `metric_descriptor`, but existing labels cannot be modified except for - * their description. - * - * Generated from protobuf field .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Api\MetricDescriptor|null - */ - public function getMetricDescriptor() - { - return $this->metric_descriptor; - } - - public function hasMetricDescriptor() - { - return isset($this->metric_descriptor); - } - - public function clearMetricDescriptor() - { - unset($this->metric_descriptor); - } - - /** - * Optional. The metric descriptor associated with the logs-based metric. - * If unspecified, it uses a default metric descriptor with a DELTA metric - * kind, INT64 value type, with no labels and a unit of "1". Such a metric - * counts the number of log entries matching the `filter` expression. - * The `name`, `type`, and `description` fields in the `metric_descriptor` - * are output only, and is constructed using the `name` and `description` - * field in the LogMetric. - * To create a logs-based metric that records a distribution of log values, a - * DELTA metric kind with a DISTRIBUTION value type must be used along with - * a `value_extractor` expression in the LogMetric. - * Each label in the metric descriptor must have a matching label - * name as the key and an extractor expression as the value in the - * `label_extractors` map. - * The `metric_kind` and `value_type` fields in the `metric_descriptor` cannot - * be updated once initially configured. New labels can be added in the - * `metric_descriptor`, but existing labels cannot be modified except for - * their description. - * - * Generated from protobuf field .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Api\MetricDescriptor $var - * @return $this - */ - public function setMetricDescriptor($var) - { - GPBUtil::checkMessage($var, \Google\Api\MetricDescriptor::class); - $this->metric_descriptor = $var; - - return $this; - } - - /** - * Optional. A `value_extractor` is required when using a distribution - * logs-based metric to extract the values to record from a log entry. - * Two functions are supported for value extraction: `EXTRACT(field)` or - * `REGEXP_EXTRACT(field, regex)`. The arguments are: - * 1. field: The name of the log entry field from which the value is to be - * extracted. - * 2. regex: A regular expression using the Google RE2 syntax - * (https://github.com/google/re2/wiki/Syntax) with a single capture - * group to extract data from the specified log entry field. The value - * of the field is converted to a string before applying the regex. - * It is an error to specify a regex that does not include exactly one - * capture group. - * The result of the extraction must be convertible to a double type, as the - * distribution always records double values. If either the extraction or - * the conversion to double fails, then those values are not recorded in the - * distribution. - * Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` - * - * Generated from protobuf field string value_extractor = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getValueExtractor() - { - return $this->value_extractor; - } - - /** - * Optional. A `value_extractor` is required when using a distribution - * logs-based metric to extract the values to record from a log entry. - * Two functions are supported for value extraction: `EXTRACT(field)` or - * `REGEXP_EXTRACT(field, regex)`. The arguments are: - * 1. field: The name of the log entry field from which the value is to be - * extracted. - * 2. regex: A regular expression using the Google RE2 syntax - * (https://github.com/google/re2/wiki/Syntax) with a single capture - * group to extract data from the specified log entry field. The value - * of the field is converted to a string before applying the regex. - * It is an error to specify a regex that does not include exactly one - * capture group. - * The result of the extraction must be convertible to a double type, as the - * distribution always records double values. If either the extraction or - * the conversion to double fails, then those values are not recorded in the - * distribution. - * Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` - * - * Generated from protobuf field string value_extractor = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setValueExtractor($var) - { - GPBUtil::checkString($var, True); - $this->value_extractor = $var; - - return $this; - } - - /** - * Optional. A map from a label key string to an extractor expression which is - * used to extract data from a log entry field and assign as the label value. - * Each label key specified in the LabelDescriptor must have an associated - * extractor expression in this map. The syntax of the extractor expression - * is the same as for the `value_extractor` field. - * The extracted value is converted to the type defined in the label - * descriptor. If either the extraction or the type conversion fails, - * the label will have a default value. The default value for a string - * label is an empty string, for an integer label its 0, and for a boolean - * label its `false`. - * Note that there are upper bounds on the maximum number of labels and the - * number of active time series that are allowed in a project. - * - * Generated from protobuf field map label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabelExtractors() - { - return $this->label_extractors; - } - - /** - * Optional. A map from a label key string to an extractor expression which is - * used to extract data from a log entry field and assign as the label value. - * Each label key specified in the LabelDescriptor must have an associated - * extractor expression in this map. The syntax of the extractor expression - * is the same as for the `value_extractor` field. - * The extracted value is converted to the type defined in the label - * descriptor. If either the extraction or the type conversion fails, - * the label will have a default value. The default value for a string - * label is an empty string, for an integer label its 0, and for a boolean - * label its `false`. - * Note that there are upper bounds on the maximum number of labels and the - * number of active time series that are allowed in a project. - * - * Generated from protobuf field map label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabelExtractors($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->label_extractors = $arr; - - return $this; - } - - /** - * Optional. The `bucket_options` are required when the logs-based metric is - * using a DISTRIBUTION value type and it describes the bucket boundaries - * used to create a histogram of the extracted values. - * - * Generated from protobuf field .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Api\Distribution\BucketOptions|null - */ - public function getBucketOptions() - { - return $this->bucket_options; - } - - public function hasBucketOptions() - { - return isset($this->bucket_options); - } - - public function clearBucketOptions() - { - unset($this->bucket_options); - } - - /** - * Optional. The `bucket_options` are required when the logs-based metric is - * using a DISTRIBUTION value type and it describes the bucket boundaries - * used to create a histogram of the extracted values. - * - * Generated from protobuf field .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Api\Distribution\BucketOptions $var - * @return $this - */ - public function setBucketOptions($var) - { - GPBUtil::checkMessage($var, \Google\Api\Distribution\BucketOptions::class); - $this->bucket_options = $var; - - return $this; - } - - /** - * Output only. The creation timestamp of the metric. - * This field may not be present for older metrics. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.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 creation timestamp of the metric. - * This field may not be present for older metrics. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.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 last update timestamp of the metric. - * This field may not be present for older metrics. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last update timestamp of the metric. - * This field may not be present for older metrics. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Deprecated. The API version that created or updated this metric. - * The v2 format is used by default and cannot be changed. - * - * Generated from protobuf field .google.logging.v2.LogMetric.ApiVersion version = 4 [deprecated = true]; - * @return int - * @deprecated - */ - public function getVersion() - { - @trigger_error('version is deprecated.', E_USER_DEPRECATED); - return $this->version; - } - - /** - * Deprecated. The API version that created or updated this metric. - * The v2 format is used by default and cannot be changed. - * - * Generated from protobuf field .google.logging.v2.LogMetric.ApiVersion version = 4 [deprecated = true]; - * @param int $var - * @return $this - * @deprecated - */ - public function setVersion($var) - { - @trigger_error('version is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\LogMetric\ApiVersion::class); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogMetric/ApiVersion.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogMetric/ApiVersion.php deleted file mode 100644 index 393ff635b652..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogMetric/ApiVersion.php +++ /dev/null @@ -1,57 +0,0 @@ -google.logging.v2.LogMetric.ApiVersion - */ -class ApiVersion -{ - /** - * Logging API v2. - * - * Generated from protobuf enum V2 = 0; - */ - const V2 = 0; - /** - * Logging API v1. - * - * Generated from protobuf enum V1 = 1; - */ - const V1 = 1; - - private static $valueToName = [ - self::V2 => 'V2', - self::V1 => 'V1', - ]; - - 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(ApiVersion::class, \Google\Cloud\Logging\V2\LogMetric_ApiVersion::class); - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSink.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSink.php deleted file mode 100644 index 1027b44a848d..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSink.php +++ /dev/null @@ -1,686 +0,0 @@ -google.logging.v2.LogSink - */ -class LogSink extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The client-assigned sink identifier, unique within the project. - * For example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited - * to 100 characters and can include only the following characters: upper and - * lower-case alphanumeric characters, underscores, hyphens, and periods. - * First character has to be alphanumeric. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The export destination: - * "storage.googleapis.com/[GCS_BUCKET]" - * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" - * "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" - * The sink's `writer_identity`, set when the sink is created, must have - * permission to write to the destination or else the log entries are not - * exported. For more information, see - * [Exporting Logs with - * Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * - * Generated from protobuf field string destination = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $destination = ''; - /** - * Optional. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced-queries). The - * only exported log entries are those that are in the resource owning the - * sink and that match the filter. - * For example: - * `logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR` - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. A description of this sink. - * The maximum length of the description is 8000 characters. - * - * Generated from protobuf field string description = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. If set to true, then this sink is disabled and it does not export - * any log entries. - * - * Generated from protobuf field bool disabled = 19 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disabled = false; - /** - * Optional. Log entries that match any of these exclusion filters will not be - * exported. - * If a log entry is matched by both `filter` and one of `exclusion_filters` - * it will not be exported. - * - * Generated from protobuf field repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $exclusions; - /** - * Deprecated. This field is unused. - * - * Generated from protobuf field .google.logging.v2.LogSink.VersionFormat output_version_format = 6 [deprecated = true]; - * @deprecated - */ - protected $output_version_format = 0; - /** - * Output only. An IAM identity—a service account or group—under - * which Cloud Logging writes the exported log entries to the sink's - * destination. This field is either set by specifying - * `custom_writer_identity` or set automatically by - * [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and - * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the - * value of `unique_writer_identity` in those methods. - * Until you grant this identity write-access to the destination, log entry - * exports from this sink will fail. For more information, see [Granting - * Access for a - * Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). - * Consult the destination service's documentation to determine the - * appropriate IAM roles to assign to the identity. - * Sinks that have a destination that is a log bucket in the same project as - * the sink cannot have a writer_identity and no additional permissions are - * required. - * - * Generated from protobuf field string writer_identity = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $writer_identity = ''; - /** - * Optional. This field applies only to sinks owned by organizations and - * folders. If the field is false, the default, only the logs owned by the - * sink's parent resource are available for export. If the field is true, then - * log entries from all the projects, folders, and billing accounts contained - * in the sink's parent resource are also available for export. Whether a - * particular log entry from the children is exported depends on the sink's - * filter expression. - * For example, if this field is true, then the filter - * `resource.type=gce_instance` would export all Compute Engine VM instance - * log entries from all projects in the sink's parent. - * To only export entries from certain child projects, filter on the project - * part of the log name: - * logName:("projects/test-project1/" OR "projects/test-project2/") AND - * resource.type=gce_instance - * - * Generated from protobuf field bool include_children = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $include_children = false; - /** - * Output only. The creation timestamp of the sink. - * This field may not be present for older sinks. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last update timestamp of the sink. - * This field may not be present for older sinks. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - protected $options; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The client-assigned sink identifier, unique within the project. - * For example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited - * to 100 characters and can include only the following characters: upper and - * lower-case alphanumeric characters, underscores, hyphens, and periods. - * First character has to be alphanumeric. - * @type string $destination - * Required. The export destination: - * "storage.googleapis.com/[GCS_BUCKET]" - * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" - * "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" - * The sink's `writer_identity`, set when the sink is created, must have - * permission to write to the destination or else the log entries are not - * exported. For more information, see - * [Exporting Logs with - * Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * @type string $filter - * Optional. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced-queries). The - * only exported log entries are those that are in the resource owning the - * sink and that match the filter. - * For example: - * `logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR` - * @type string $description - * Optional. A description of this sink. - * The maximum length of the description is 8000 characters. - * @type bool $disabled - * Optional. If set to true, then this sink is disabled and it does not export - * any log entries. - * @type array<\Google\Cloud\Logging\V2\LogExclusion>|\Google\Protobuf\Internal\RepeatedField $exclusions - * Optional. Log entries that match any of these exclusion filters will not be - * exported. - * If a log entry is matched by both `filter` and one of `exclusion_filters` - * it will not be exported. - * @type int $output_version_format - * Deprecated. This field is unused. - * @type string $writer_identity - * Output only. An IAM identity—a service account or group—under - * which Cloud Logging writes the exported log entries to the sink's - * destination. This field is either set by specifying - * `custom_writer_identity` or set automatically by - * [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and - * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the - * value of `unique_writer_identity` in those methods. - * Until you grant this identity write-access to the destination, log entry - * exports from this sink will fail. For more information, see [Granting - * Access for a - * Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). - * Consult the destination service's documentation to determine the - * appropriate IAM roles to assign to the identity. - * Sinks that have a destination that is a log bucket in the same project as - * the sink cannot have a writer_identity and no additional permissions are - * required. - * @type bool $include_children - * Optional. This field applies only to sinks owned by organizations and - * folders. If the field is false, the default, only the logs owned by the - * sink's parent resource are available for export. If the field is true, then - * log entries from all the projects, folders, and billing accounts contained - * in the sink's parent resource are also available for export. Whether a - * particular log entry from the children is exported depends on the sink's - * filter expression. - * For example, if this field is true, then the filter - * `resource.type=gce_instance` would export all Compute Engine VM instance - * log entries from all projects in the sink's parent. - * To only export entries from certain child projects, filter on the project - * part of the log name: - * logName:("projects/test-project1/" OR "projects/test-project2/") AND - * resource.type=gce_instance - * @type \Google\Cloud\Logging\V2\BigQueryOptions $bigquery_options - * Optional. Options that affect sinks exporting data to BigQuery. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation timestamp of the sink. - * This field may not be present for older sinks. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update timestamp of the sink. - * This field may not be present for older sinks. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The client-assigned sink identifier, unique within the project. - * For example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited - * to 100 characters and can include only the following characters: upper and - * lower-case alphanumeric characters, underscores, hyphens, and periods. - * First character has to be alphanumeric. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The client-assigned sink identifier, unique within the project. - * For example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited - * to 100 characters and can include only the following characters: upper and - * lower-case alphanumeric characters, underscores, hyphens, and periods. - * First character has to be alphanumeric. - * - * 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 export destination: - * "storage.googleapis.com/[GCS_BUCKET]" - * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" - * "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" - * The sink's `writer_identity`, set when the sink is created, must have - * permission to write to the destination or else the log entries are not - * exported. For more information, see - * [Exporting Logs with - * Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * - * Generated from protobuf field string destination = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getDestination() - { - return $this->destination; - } - - /** - * Required. The export destination: - * "storage.googleapis.com/[GCS_BUCKET]" - * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" - * "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" - * The sink's `writer_identity`, set when the sink is created, must have - * permission to write to the destination or else the log entries are not - * exported. For more information, see - * [Exporting Logs with - * Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * - * Generated from protobuf field string destination = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDestination($var) - { - GPBUtil::checkString($var, True); - $this->destination = $var; - - return $this; - } - - /** - * Optional. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced-queries). The - * only exported log entries are those that are in the resource owning the - * sink and that match the filter. - * For example: - * `logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR` - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced-queries). The - * only exported log entries are those that are in the resource owning the - * sink and that match the filter. - * For example: - * `logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR` - * - * 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. A description of this sink. - * The maximum length of the description is 8000 characters. - * - * Generated from protobuf field string description = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A description of this sink. - * The maximum length of the description is 8000 characters. - * - * Generated from protobuf field string description = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. If set to true, then this sink is disabled and it does not export - * any log entries. - * - * Generated from protobuf field bool disabled = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisabled() - { - return $this->disabled; - } - - /** - * Optional. If set to true, then this sink is disabled and it does not export - * any log entries. - * - * Generated from protobuf field bool disabled = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisabled($var) - { - GPBUtil::checkBool($var); - $this->disabled = $var; - - return $this; - } - - /** - * Optional. Log entries that match any of these exclusion filters will not be - * exported. - * If a log entry is matched by both `filter` and one of `exclusion_filters` - * it will not be exported. - * - * Generated from protobuf field repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExclusions() - { - return $this->exclusions; - } - - /** - * Optional. Log entries that match any of these exclusion filters will not be - * exported. - * If a log entry is matched by both `filter` and one of `exclusion_filters` - * it will not be exported. - * - * Generated from protobuf field repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Logging\V2\LogExclusion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExclusions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogExclusion::class); - $this->exclusions = $arr; - - return $this; - } - - /** - * Deprecated. This field is unused. - * - * Generated from protobuf field .google.logging.v2.LogSink.VersionFormat output_version_format = 6 [deprecated = true]; - * @return int - * @deprecated - */ - public function getOutputVersionFormat() - { - @trigger_error('output_version_format is deprecated.', E_USER_DEPRECATED); - return $this->output_version_format; - } - - /** - * Deprecated. This field is unused. - * - * Generated from protobuf field .google.logging.v2.LogSink.VersionFormat output_version_format = 6 [deprecated = true]; - * @param int $var - * @return $this - * @deprecated - */ - public function setOutputVersionFormat($var) - { - @trigger_error('output_version_format is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\LogSink\VersionFormat::class); - $this->output_version_format = $var; - - return $this; - } - - /** - * Output only. An IAM identity—a service account or group—under - * which Cloud Logging writes the exported log entries to the sink's - * destination. This field is either set by specifying - * `custom_writer_identity` or set automatically by - * [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and - * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the - * value of `unique_writer_identity` in those methods. - * Until you grant this identity write-access to the destination, log entry - * exports from this sink will fail. For more information, see [Granting - * Access for a - * Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). - * Consult the destination service's documentation to determine the - * appropriate IAM roles to assign to the identity. - * Sinks that have a destination that is a log bucket in the same project as - * the sink cannot have a writer_identity and no additional permissions are - * required. - * - * Generated from protobuf field string writer_identity = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getWriterIdentity() - { - return $this->writer_identity; - } - - /** - * Output only. An IAM identity—a service account or group—under - * which Cloud Logging writes the exported log entries to the sink's - * destination. This field is either set by specifying - * `custom_writer_identity` or set automatically by - * [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and - * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the - * value of `unique_writer_identity` in those methods. - * Until you grant this identity write-access to the destination, log entry - * exports from this sink will fail. For more information, see [Granting - * Access for a - * Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). - * Consult the destination service's documentation to determine the - * appropriate IAM roles to assign to the identity. - * Sinks that have a destination that is a log bucket in the same project as - * the sink cannot have a writer_identity and no additional permissions are - * required. - * - * Generated from protobuf field string writer_identity = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setWriterIdentity($var) - { - GPBUtil::checkString($var, True); - $this->writer_identity = $var; - - return $this; - } - - /** - * Optional. This field applies only to sinks owned by organizations and - * folders. If the field is false, the default, only the logs owned by the - * sink's parent resource are available for export. If the field is true, then - * log entries from all the projects, folders, and billing accounts contained - * in the sink's parent resource are also available for export. Whether a - * particular log entry from the children is exported depends on the sink's - * filter expression. - * For example, if this field is true, then the filter - * `resource.type=gce_instance` would export all Compute Engine VM instance - * log entries from all projects in the sink's parent. - * To only export entries from certain child projects, filter on the project - * part of the log name: - * logName:("projects/test-project1/" OR "projects/test-project2/") AND - * resource.type=gce_instance - * - * Generated from protobuf field bool include_children = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIncludeChildren() - { - return $this->include_children; - } - - /** - * Optional. This field applies only to sinks owned by organizations and - * folders. If the field is false, the default, only the logs owned by the - * sink's parent resource are available for export. If the field is true, then - * log entries from all the projects, folders, and billing accounts contained - * in the sink's parent resource are also available for export. Whether a - * particular log entry from the children is exported depends on the sink's - * filter expression. - * For example, if this field is true, then the filter - * `resource.type=gce_instance` would export all Compute Engine VM instance - * log entries from all projects in the sink's parent. - * To only export entries from certain child projects, filter on the project - * part of the log name: - * logName:("projects/test-project1/" OR "projects/test-project2/") AND - * resource.type=gce_instance - * - * Generated from protobuf field bool include_children = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIncludeChildren($var) - { - GPBUtil::checkBool($var); - $this->include_children = $var; - - return $this; - } - - /** - * Optional. Options that affect sinks exporting data to BigQuery. - * - * Generated from protobuf field .google.logging.v2.BigQueryOptions bigquery_options = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Logging\V2\BigQueryOptions|null - */ - public function getBigqueryOptions() - { - return $this->readOneof(12); - } - - public function hasBigqueryOptions() - { - return $this->hasOneof(12); - } - - /** - * Optional. Options that affect sinks exporting data to BigQuery. - * - * Generated from protobuf field .google.logging.v2.BigQueryOptions bigquery_options = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Logging\V2\BigQueryOptions $var - * @return $this - */ - public function setBigqueryOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\BigQueryOptions::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Output only. The creation timestamp of the sink. - * This field may not be present for older sinks. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.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 creation timestamp of the sink. - * This field may not be present for older sinks. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.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 last update timestamp of the sink. - * This field may not be present for older sinks. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last update timestamp of the sink. - * This field may not be present for older sinks. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getOptions() - { - return $this->whichOneof("options"); - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSink/VersionFormat.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSink/VersionFormat.php deleted file mode 100644 index 4cdb89f2b82d..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSink/VersionFormat.php +++ /dev/null @@ -1,64 +0,0 @@ -google.logging.v2.LogSink.VersionFormat - */ -class VersionFormat -{ - /** - * An unspecified format version that will default to V2. - * - * Generated from protobuf enum VERSION_FORMAT_UNSPECIFIED = 0; - */ - const VERSION_FORMAT_UNSPECIFIED = 0; - /** - * `LogEntry` version 2 format. - * - * Generated from protobuf enum V2 = 1; - */ - const V2 = 1; - /** - * `LogEntry` version 1 format. - * - * Generated from protobuf enum V1 = 2; - */ - const V1 = 2; - - private static $valueToName = [ - self::VERSION_FORMAT_UNSPECIFIED => 'VERSION_FORMAT_UNSPECIFIED', - self::V2 => 'V2', - self::V1 => 'V1', - ]; - - 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(VersionFormat::class, \Google\Cloud\Logging\V2\LogSink_VersionFormat::class); - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSplit.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSplit.php deleted file mode 100644 index 3cc2b008cfcb..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSplit.php +++ /dev/null @@ -1,153 +0,0 @@ -google.logging.v2.LogSplit - */ -class LogSplit extends \Google\Protobuf\Internal\Message -{ - /** - * A globally unique identifier for all log entries in a sequence of split log - * entries. All log entries with the same |LogSplit.uid| are assumed to be - * part of the same sequence of split log entries. - * - * Generated from protobuf field string uid = 1; - */ - protected $uid = ''; - /** - * The index of this LogEntry in the sequence of split log entries. Log - * entries are given |index| values 0, 1, ..., n-1 for a sequence of n log - * entries. - * - * Generated from protobuf field int32 index = 2; - */ - protected $index = 0; - /** - * The total number of log entries that the original LogEntry was split into. - * - * Generated from protobuf field int32 total_splits = 3; - */ - protected $total_splits = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uid - * A globally unique identifier for all log entries in a sequence of split log - * entries. All log entries with the same |LogSplit.uid| are assumed to be - * part of the same sequence of split log entries. - * @type int $index - * The index of this LogEntry in the sequence of split log entries. Log - * entries are given |index| values 0, 1, ..., n-1 for a sequence of n log - * entries. - * @type int $total_splits - * The total number of log entries that the original LogEntry was split into. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LogEntry::initOnce(); - parent::__construct($data); - } - - /** - * A globally unique identifier for all log entries in a sequence of split log - * entries. All log entries with the same |LogSplit.uid| are assumed to be - * part of the same sequence of split log entries. - * - * Generated from protobuf field string uid = 1; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * A globally unique identifier for all log entries in a sequence of split log - * entries. All log entries with the same |LogSplit.uid| are assumed to be - * part of the same sequence of split log entries. - * - * Generated from protobuf field string uid = 1; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * The index of this LogEntry in the sequence of split log entries. Log - * entries are given |index| values 0, 1, ..., n-1 for a sequence of n log - * entries. - * - * Generated from protobuf field int32 index = 2; - * @return int - */ - public function getIndex() - { - return $this->index; - } - - /** - * The index of this LogEntry in the sequence of split log entries. Log - * entries are given |index| values 0, 1, ..., n-1 for a sequence of n log - * entries. - * - * Generated from protobuf field int32 index = 2; - * @param int $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt32($var); - $this->index = $var; - - return $this; - } - - /** - * The total number of log entries that the original LogEntry was split into. - * - * Generated from protobuf field int32 total_splits = 3; - * @return int - */ - public function getTotalSplits() - { - return $this->total_splits; - } - - /** - * The total number of log entries that the original LogEntry was split into. - * - * Generated from protobuf field int32 total_splits = 3; - * @param int $var - * @return $this - */ - public function setTotalSplits($var) - { - GPBUtil::checkInt32($var); - $this->total_splits = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogView.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogView.php deleted file mode 100644 index 3b506053a5a4..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogView.php +++ /dev/null @@ -1,267 +0,0 @@ -google.logging.v2.LogView - */ -class LogView extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the view. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket/views/my-view` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Describes this view. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Output only. The creation timestamp of the view. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last update timestamp of the view. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Filter that restricts which log entries in a bucket are visible in this - * view. - * Filters are restricted to be a logical AND of ==/!= of any of the - * following: - * - originating project/folder/organization/billing account. - * - resource type - * - log id - * For example: - * SOURCE("projects/myproject") AND resource.type = "gce_instance" - * AND LOG_ID("stdout") - * - * Generated from protobuf field string filter = 7; - */ - protected $filter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the view. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket/views/my-view` - * @type string $description - * Describes this view. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation timestamp of the view. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update timestamp of the view. - * @type string $filter - * Filter that restricts which log entries in a bucket are visible in this - * view. - * Filters are restricted to be a logical AND of ==/!= of any of the - * following: - * - originating project/folder/organization/billing account. - * - resource type - * - log id - * For example: - * SOURCE("projects/myproject") AND resource.type = "gce_instance" - * AND LOG_ID("stdout") - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the view. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket/views/my-view` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the view. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket/views/my-view` - * - * 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; - } - - /** - * Describes this view. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Describes this view. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The creation timestamp of the view. - * - * 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 creation timestamp of the view. - * - * 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 last update timestamp of the view. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last update timestamp of the view. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Filter that restricts which log entries in a bucket are visible in this - * view. - * Filters are restricted to be a logical AND of ==/!= of any of the - * following: - * - originating project/folder/organization/billing account. - * - resource type - * - log id - * For example: - * SOURCE("projects/myproject") AND resource.type = "gce_instance" - * AND LOG_ID("stdout") - * - * Generated from protobuf field string filter = 7; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filter that restricts which log entries in a bucket are visible in this - * view. - * Filters are restricted to be a logical AND of ==/!= of any of the - * following: - * - originating project/folder/organization/billing account. - * - resource type - * - log id - * For example: - * SOURCE("projects/myproject") AND resource.type = "gce_instance" - * AND LOG_ID("stdout") - * - * Generated from protobuf field string filter = 7; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/OperationState.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/OperationState.php deleted file mode 100644 index 32d50436ce86..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/OperationState.php +++ /dev/null @@ -1,93 +0,0 @@ -google.logging.v2.OperationState - */ -class OperationState -{ - /** - * Should not be used. - * - * Generated from protobuf enum OPERATION_STATE_UNSPECIFIED = 0; - */ - const OPERATION_STATE_UNSPECIFIED = 0; - /** - * The operation is scheduled. - * - * Generated from protobuf enum OPERATION_STATE_SCHEDULED = 1; - */ - const OPERATION_STATE_SCHEDULED = 1; - /** - * Waiting for necessary permissions. - * - * Generated from protobuf enum OPERATION_STATE_WAITING_FOR_PERMISSIONS = 2; - */ - const OPERATION_STATE_WAITING_FOR_PERMISSIONS = 2; - /** - * The operation is running. - * - * Generated from protobuf enum OPERATION_STATE_RUNNING = 3; - */ - const OPERATION_STATE_RUNNING = 3; - /** - * The operation was completed successfully. - * - * Generated from protobuf enum OPERATION_STATE_SUCCEEDED = 4; - */ - const OPERATION_STATE_SUCCEEDED = 4; - /** - * The operation failed. - * - * Generated from protobuf enum OPERATION_STATE_FAILED = 5; - */ - const OPERATION_STATE_FAILED = 5; - /** - * The operation was cancelled by the user. - * - * Generated from protobuf enum OPERATION_STATE_CANCELLED = 6; - */ - const OPERATION_STATE_CANCELLED = 6; - - private static $valueToName = [ - self::OPERATION_STATE_UNSPECIFIED => 'OPERATION_STATE_UNSPECIFIED', - self::OPERATION_STATE_SCHEDULED => 'OPERATION_STATE_SCHEDULED', - self::OPERATION_STATE_WAITING_FOR_PERMISSIONS => 'OPERATION_STATE_WAITING_FOR_PERMISSIONS', - self::OPERATION_STATE_RUNNING => 'OPERATION_STATE_RUNNING', - self::OPERATION_STATE_SUCCEEDED => 'OPERATION_STATE_SUCCEEDED', - self::OPERATION_STATE_FAILED => 'OPERATION_STATE_FAILED', - self::OPERATION_STATE_CANCELLED => 'OPERATION_STATE_CANCELLED', - ]; - - 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/Settings.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/Settings.php deleted file mode 100644 index b66463e4ad75..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/Settings.php +++ /dev/null @@ -1,324 +0,0 @@ -google.logging.v2.Settings - */ -class Settings extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the settings. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Optional. The resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` - * To enable CMEK for the Log Router, set this field to a valid - * `kms_key_name` for which the associated service account has the required - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key. - * The Cloud KMS key used by the Log Router can be updated by changing the - * `kms_key_name` to a new valid key name. Encryption operations that are in - * progress will be completed with the key that was in use when they started. - * Decryption operations will be completed using the key that was used at the - * time of encryption unless access to that key has been revoked. - * To disable CMEK for the Log Router, set this field to an empty string. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kms_key_name = ''; - /** - * Output only. The service account that will be used by the Log Router to - * access your Cloud KMS key. - * Before enabling CMEK for Log Router, you must first assign the role - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that - * the Log Router will use to access your Cloud KMS key. Use - * [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings] to - * obtain the service account ID. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string kms_service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $kms_service_account_id = ''; - /** - * Optional. The Cloud region that will be used for _Default and _Required log - * buckets for newly created projects and folders. For example `europe-west1`. - * This setting does not affect the location of custom log buckets. - * - * Generated from protobuf field string storage_location = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $storage_location = ''; - /** - * Optional. If set to true, the _Default sink in newly created projects and - * folders will created in a disabled state. This can be used to automatically - * disable log ingestion if there is already an aggregated sink configured in - * the hierarchy. The _Default sink can be re-enabled manually if needed. - * - * Generated from protobuf field bool disable_default_sink = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disable_default_sink = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the settings. - * @type string $kms_key_name - * Optional. The resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` - * To enable CMEK for the Log Router, set this field to a valid - * `kms_key_name` for which the associated service account has the required - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key. - * The Cloud KMS key used by the Log Router can be updated by changing the - * `kms_key_name` to a new valid key name. Encryption operations that are in - * progress will be completed with the key that was in use when they started. - * Decryption operations will be completed using the key that was used at the - * time of encryption unless access to that key has been revoked. - * To disable CMEK for the Log Router, set this field to an empty string. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * @type string $kms_service_account_id - * Output only. The service account that will be used by the Log Router to - * access your Cloud KMS key. - * Before enabling CMEK for Log Router, you must first assign the role - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that - * the Log Router will use to access your Cloud KMS key. Use - * [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings] to - * obtain the service account ID. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * @type string $storage_location - * Optional. The Cloud region that will be used for _Default and _Required log - * buckets for newly created projects and folders. For example `europe-west1`. - * This setting does not affect the location of custom log buckets. - * @type bool $disable_default_sink - * Optional. If set to true, the _Default sink in newly created projects and - * folders will created in a disabled state. This can be used to automatically - * disable log ingestion if there is already an aggregated sink configured in - * the hierarchy. The _Default sink can be re-enabled manually if needed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the settings. - * - * 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 of the settings. - * - * 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. The resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` - * To enable CMEK for the Log Router, set this field to a valid - * `kms_key_name` for which the associated service account has the required - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key. - * The Cloud KMS key used by the Log Router can be updated by changing the - * `kms_key_name` to a new valid key name. Encryption operations that are in - * progress will be completed with the key that was in use when they started. - * Decryption operations will be completed using the key that was used at the - * time of encryption unless access to that key has been revoked. - * To disable CMEK for the Log Router, set this field to an empty string. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * Optional. The resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` - * To enable CMEK for the Log Router, set this field to a valid - * `kms_key_name` for which the associated service account has the required - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key. - * The Cloud KMS key used by the Log Router can be updated by changing the - * `kms_key_name` to a new valid key name. Encryption operations that are in - * progress will be completed with the key that was in use when they started. - * Decryption operations will be completed using the key that was used at the - * time of encryption unless access to that key has been revoked. - * To disable CMEK for the Log Router, set this field to an empty string. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_name = $var; - - return $this; - } - - /** - * Output only. The service account that will be used by the Log Router to - * access your Cloud KMS key. - * Before enabling CMEK for Log Router, you must first assign the role - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that - * the Log Router will use to access your Cloud KMS key. Use - * [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings] to - * obtain the service account ID. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string kms_service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getKmsServiceAccountId() - { - return $this->kms_service_account_id; - } - - /** - * Output only. The service account that will be used by the Log Router to - * access your Cloud KMS key. - * Before enabling CMEK for Log Router, you must first assign the role - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that - * the Log Router will use to access your Cloud KMS key. Use - * [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings] to - * obtain the service account ID. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string kms_service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setKmsServiceAccountId($var) - { - GPBUtil::checkString($var, True); - $this->kms_service_account_id = $var; - - return $this; - } - - /** - * Optional. The Cloud region that will be used for _Default and _Required log - * buckets for newly created projects and folders. For example `europe-west1`. - * This setting does not affect the location of custom log buckets. - * - * Generated from protobuf field string storage_location = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getStorageLocation() - { - return $this->storage_location; - } - - /** - * Optional. The Cloud region that will be used for _Default and _Required log - * buckets for newly created projects and folders. For example `europe-west1`. - * This setting does not affect the location of custom log buckets. - * - * Generated from protobuf field string storage_location = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setStorageLocation($var) - { - GPBUtil::checkString($var, True); - $this->storage_location = $var; - - return $this; - } - - /** - * Optional. If set to true, the _Default sink in newly created projects and - * folders will created in a disabled state. This can be used to automatically - * disable log ingestion if there is already an aggregated sink configured in - * the hierarchy. The _Default sink can be re-enabled manually if needed. - * - * Generated from protobuf field bool disable_default_sink = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisableDefaultSink() - { - return $this->disable_default_sink; - } - - /** - * Optional. If set to true, the _Default sink in newly created projects and - * folders will created in a disabled state. This can be used to automatically - * disable log ingestion if there is already an aggregated sink configured in - * the hierarchy. The _Default sink can be re-enabled manually if needed. - * - * Generated from protobuf field bool disable_default_sink = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisableDefaultSink($var) - { - GPBUtil::checkBool($var); - $this->disable_default_sink = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesRequest.php deleted file mode 100644 index 87b5718221cf..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesRequest.php +++ /dev/null @@ -1,209 +0,0 @@ -google.logging.v2.TailLogEntriesRequest - */ -class TailLogEntriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of a parent resource from which to retrieve log entries: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * May alternatively be one or more views: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * - * Generated from protobuf field repeated string resource_names = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $resource_names; - /** - * Optional. Only log entries that match the filter are returned. An empty - * filter matches all log entries in the resources listed in `resource_names`. - * Referencing a parent resource that is not listed in `resource_names` will - * cause the filter to return no results. The maximum length of a filter is - * 20,000 characters. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. The amount of time to buffer log entries at the server before - * being returned to prevent out of order results due to late arriving log - * entries. Valid values are between 0-60000 milliseconds. Defaults to 2000 - * milliseconds. - * - * Generated from protobuf field .google.protobuf.Duration buffer_window = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $buffer_window = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $resource_names - * Required. Name of a parent resource from which to retrieve log entries: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * May alternatively be one or more views: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * @type string $filter - * Optional. Only log entries that match the filter are returned. An empty - * filter matches all log entries in the resources listed in `resource_names`. - * Referencing a parent resource that is not listed in `resource_names` will - * cause the filter to return no results. The maximum length of a filter is - * 20,000 characters. - * @type \Google\Protobuf\Duration $buffer_window - * Optional. The amount of time to buffer log entries at the server before - * being returned to prevent out of order results due to late arriving log - * entries. Valid values are between 0-60000 milliseconds. Defaults to 2000 - * milliseconds. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of a parent resource from which to retrieve log entries: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * May alternatively be one or more views: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * - * Generated from protobuf field repeated string resource_names = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResourceNames() - { - return $this->resource_names; - } - - /** - * Required. Name of a parent resource from which to retrieve log entries: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * May alternatively be one or more views: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * - * Generated from protobuf field repeated string resource_names = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResourceNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->resource_names = $arr; - - return $this; - } - - /** - * Optional. Only log entries that match the filter are returned. An empty - * filter matches all log entries in the resources listed in `resource_names`. - * Referencing a parent resource that is not listed in `resource_names` will - * cause the filter to return no results. The maximum length of a filter is - * 20,000 characters. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Only log entries that match the filter are returned. An empty - * filter matches all log entries in the resources listed in `resource_names`. - * Referencing a parent resource that is not listed in `resource_names` will - * cause the filter to return no results. The maximum length of a filter is - * 20,000 characters. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. The amount of time to buffer log entries at the server before - * being returned to prevent out of order results due to late arriving log - * entries. Valid values are between 0-60000 milliseconds. Defaults to 2000 - * milliseconds. - * - * Generated from protobuf field .google.protobuf.Duration buffer_window = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getBufferWindow() - { - return $this->buffer_window; - } - - public function hasBufferWindow() - { - return isset($this->buffer_window); - } - - public function clearBufferWindow() - { - unset($this->buffer_window); - } - - /** - * Optional. The amount of time to buffer log entries at the server before - * being returned to prevent out of order results due to late arriving log - * entries. Valid values are between 0-60000 milliseconds. Defaults to 2000 - * milliseconds. - * - * Generated from protobuf field .google.protobuf.Duration buffer_window = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setBufferWindow($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->buffer_window = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse.php deleted file mode 100644 index a5d94ed0e2e6..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse.php +++ /dev/null @@ -1,125 +0,0 @@ -google.logging.v2.TailLogEntriesResponse - */ -class TailLogEntriesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of log entries. Each response in the stream will order entries with - * increasing values of `LogEntry.timestamp`. Ordering is not guaranteed - * between separate responses. - * - * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 1; - */ - private $entries; - /** - * If entries that otherwise would have been included in the session were not - * sent back to the client, counts of relevant entries omitted from the - * session with the reason that they were not included. There will be at most - * one of each reason per response. The counts represent the number of - * suppressed entries since the last streamed response. - * - * Generated from protobuf field repeated .google.logging.v2.TailLogEntriesResponse.SuppressionInfo suppression_info = 2; - */ - private $suppression_info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Logging\V2\LogEntry>|\Google\Protobuf\Internal\RepeatedField $entries - * A list of log entries. Each response in the stream will order entries with - * increasing values of `LogEntry.timestamp`. Ordering is not guaranteed - * between separate responses. - * @type array<\Google\Cloud\Logging\V2\TailLogEntriesResponse\SuppressionInfo>|\Google\Protobuf\Internal\RepeatedField $suppression_info - * If entries that otherwise would have been included in the session were not - * sent back to the client, counts of relevant entries omitted from the - * session with the reason that they were not included. There will be at most - * one of each reason per response. The counts represent the number of - * suppressed entries since the last streamed response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * A list of log entries. Each response in the stream will order entries with - * increasing values of `LogEntry.timestamp`. Ordering is not guaranteed - * between separate responses. - * - * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * A list of log entries. Each response in the stream will order entries with - * increasing values of `LogEntry.timestamp`. Ordering is not guaranteed - * between separate responses. - * - * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 1; - * @param array<\Google\Cloud\Logging\V2\LogEntry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogEntry::class); - $this->entries = $arr; - - return $this; - } - - /** - * If entries that otherwise would have been included in the session were not - * sent back to the client, counts of relevant entries omitted from the - * session with the reason that they were not included. There will be at most - * one of each reason per response. The counts represent the number of - * suppressed entries since the last streamed response. - * - * Generated from protobuf field repeated .google.logging.v2.TailLogEntriesResponse.SuppressionInfo suppression_info = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSuppressionInfo() - { - return $this->suppression_info; - } - - /** - * If entries that otherwise would have been included in the session were not - * sent back to the client, counts of relevant entries omitted from the - * session with the reason that they were not included. There will be at most - * one of each reason per response. The counts represent the number of - * suppressed entries since the last streamed response. - * - * Generated from protobuf field repeated .google.logging.v2.TailLogEntriesResponse.SuppressionInfo suppression_info = 2; - * @param array<\Google\Cloud\Logging\V2\TailLogEntriesResponse\SuppressionInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSuppressionInfo($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\TailLogEntriesResponse\SuppressionInfo::class); - $this->suppression_info = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse/SuppressionInfo.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse/SuppressionInfo.php deleted file mode 100644 index f8b88df264a0..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse/SuppressionInfo.php +++ /dev/null @@ -1,104 +0,0 @@ -google.logging.v2.TailLogEntriesResponse.SuppressionInfo - */ -class SuppressionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The reason that entries were omitted from the session. - * - * Generated from protobuf field .google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason reason = 1; - */ - protected $reason = 0; - /** - * A lower bound on the count of entries omitted due to `reason`. - * - * Generated from protobuf field int32 suppressed_count = 2; - */ - protected $suppressed_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $reason - * The reason that entries were omitted from the session. - * @type int $suppressed_count - * A lower bound on the count of entries omitted due to `reason`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * The reason that entries were omitted from the session. - * - * Generated from protobuf field .google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason reason = 1; - * @return int - */ - public function getReason() - { - return $this->reason; - } - - /** - * The reason that entries were omitted from the session. - * - * Generated from protobuf field .google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason reason = 1; - * @param int $var - * @return $this - */ - public function setReason($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\TailLogEntriesResponse\SuppressionInfo\Reason::class); - $this->reason = $var; - - return $this; - } - - /** - * A lower bound on the count of entries omitted due to `reason`. - * - * Generated from protobuf field int32 suppressed_count = 2; - * @return int - */ - public function getSuppressedCount() - { - return $this->suppressed_count; - } - - /** - * A lower bound on the count of entries omitted due to `reason`. - * - * Generated from protobuf field int32 suppressed_count = 2; - * @param int $var - * @return $this - */ - public function setSuppressedCount($var) - { - GPBUtil::checkInt32($var); - $this->suppressed_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SuppressionInfo::class, \Google\Cloud\Logging\V2\TailLogEntriesResponse_SuppressionInfo::class); - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse/SuppressionInfo/Reason.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse/SuppressionInfo/Reason.php deleted file mode 100644 index a626cf2f1b84..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse/SuppressionInfo/Reason.php +++ /dev/null @@ -1,68 +0,0 @@ -google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason - */ -class Reason -{ - /** - * Unexpected default. - * - * Generated from protobuf enum REASON_UNSPECIFIED = 0; - */ - const REASON_UNSPECIFIED = 0; - /** - * Indicates suppression occurred due to relevant entries being - * received in excess of rate limits. For quotas and limits, see - * [Logging API quotas and - * limits](https://cloud.google.com/logging/quotas#api-limits). - * - * Generated from protobuf enum RATE_LIMIT = 1; - */ - const RATE_LIMIT = 1; - /** - * Indicates suppression occurred due to the client not consuming - * responses quickly enough. - * - * Generated from protobuf enum NOT_CONSUMED = 2; - */ - const NOT_CONSUMED = 2; - - private static $valueToName = [ - self::REASON_UNSPECIFIED => 'REASON_UNSPECIFIED', - self::RATE_LIMIT => 'RATE_LIMIT', - self::NOT_CONSUMED => 'NOT_CONSUMED', - ]; - - 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(Reason::class, \Google\Cloud\Logging\V2\TailLogEntriesResponse_SuppressionInfo_Reason::class); - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UndeleteBucketRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UndeleteBucketRequest.php deleted file mode 100644 index f554eb9ad342..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UndeleteBucketRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.logging.v2.UndeleteBucketRequest - */ -class UndeleteBucketRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the bucket to undelete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full resource name of the bucket to undelete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the bucket to undelete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * 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 full resource name of the bucket to undelete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateBucketRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateBucketRequest.php deleted file mode 100644 index 8fc50d3f20df..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateBucketRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.logging.v2.UpdateBucketRequest - */ -class UpdateBucketRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the bucket to update. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The updated bucket. - * - * Generated from protobuf field .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bucket = null; - /** - * Required. Field mask that specifies the fields in `bucket` that need an - * update. A bucket field will be overwritten if, and only if, it is in the - * update mask. `name` and output only fields cannot be updated. - * For a detailed `FieldMask` definition, see: - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=retention_days` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full resource name of the bucket to update. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * @type \Google\Cloud\Logging\V2\LogBucket $bucket - * Required. The updated bucket. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask that specifies the fields in `bucket` that need an - * update. A bucket field will be overwritten if, and only if, it is in the - * update mask. `name` and output only fields cannot be updated. - * For a detailed `FieldMask` definition, see: - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=retention_days` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the bucket to update. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * 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 full resource name of the bucket to update. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * 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 updated bucket. - * - * Generated from protobuf field .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\LogBucket|null - */ - public function getBucket() - { - return $this->bucket; - } - - public function hasBucket() - { - return isset($this->bucket); - } - - public function clearBucket() - { - unset($this->bucket); - } - - /** - * Required. The updated bucket. - * - * Generated from protobuf field .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\LogBucket $var - * @return $this - */ - public function setBucket($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogBucket::class); - $this->bucket = $var; - - return $this; - } - - /** - * Required. Field mask that specifies the fields in `bucket` that need an - * update. A bucket field will be overwritten if, and only if, it is in the - * update mask. `name` and output only fields cannot be updated. - * For a detailed `FieldMask` definition, see: - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=retention_days` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.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. Field mask that specifies the fields in `bucket` that need an - * update. A bucket field will be overwritten if, and only if, it is in the - * update mask. `name` and output only fields cannot be updated. - * For a detailed `FieldMask` definition, see: - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=retention_days` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.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/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateCmekSettingsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateCmekSettingsRequest.php deleted file mode 100644 index 29cc0edeed5b..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateCmekSettingsRequest.php +++ /dev/null @@ -1,223 +0,0 @@ -google.logging.v2.UpdateCmekSettingsRequest - */ -class UpdateCmekSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name for the CMEK settings to update. - * "projects/[PROJECT_ID]/cmekSettings" - * "organizations/[ORGANIZATION_ID]/cmekSettings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - * "folders/[FOLDER_ID]/cmekSettings" - * For example: - * `"organizations/12345/cmekSettings"` - * Note: CMEK for the Log Router can currently only be configured for Google - * Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The CMEK settings to update. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cmek_settings = null; - /** - * Optional. Field mask identifying which fields from `cmek_settings` should - * be updated. A field will be overwritten if and only if it is in the update - * mask. Output only fields cannot be updated. - * See [FieldMask][google.protobuf.FieldMask] for more information. - * For example: `"updateMask=kmsKeyName"` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name for the CMEK settings to update. - * "projects/[PROJECT_ID]/cmekSettings" - * "organizations/[ORGANIZATION_ID]/cmekSettings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - * "folders/[FOLDER_ID]/cmekSettings" - * For example: - * `"organizations/12345/cmekSettings"` - * Note: CMEK for the Log Router can currently only be configured for Google - * Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * @type \Google\Cloud\Logging\V2\CmekSettings $cmek_settings - * Required. The CMEK settings to update. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask identifying which fields from `cmek_settings` should - * be updated. A field will be overwritten if and only if it is in the update - * mask. Output only fields cannot be updated. - * See [FieldMask][google.protobuf.FieldMask] for more information. - * For example: `"updateMask=kmsKeyName"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name for the CMEK settings to update. - * "projects/[PROJECT_ID]/cmekSettings" - * "organizations/[ORGANIZATION_ID]/cmekSettings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - * "folders/[FOLDER_ID]/cmekSettings" - * For example: - * `"organizations/12345/cmekSettings"` - * Note: CMEK for the Log Router can currently only be configured for Google - * Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name for the CMEK settings to update. - * "projects/[PROJECT_ID]/cmekSettings" - * "organizations/[ORGANIZATION_ID]/cmekSettings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - * "folders/[FOLDER_ID]/cmekSettings" - * For example: - * `"organizations/12345/cmekSettings"` - * Note: CMEK for the Log Router can currently only be configured for Google - * Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * - * 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 CMEK settings to update. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\CmekSettings|null - */ - public function getCmekSettings() - { - return $this->cmek_settings; - } - - public function hasCmekSettings() - { - return isset($this->cmek_settings); - } - - public function clearCmekSettings() - { - unset($this->cmek_settings); - } - - /** - * Required. The CMEK settings to update. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\CmekSettings $var - * @return $this - */ - public function setCmekSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\CmekSettings::class); - $this->cmek_settings = $var; - - return $this; - } - - /** - * Optional. Field mask identifying which fields from `cmek_settings` should - * be updated. A field will be overwritten if and only if it is in the update - * mask. Output only fields cannot be updated. - * See [FieldMask][google.protobuf.FieldMask] for more information. - * For example: `"updateMask=kmsKeyName"` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. Field mask identifying which fields from `cmek_settings` should - * be updated. A field will be overwritten if and only if it is in the update - * mask. Output only fields cannot be updated. - * See [FieldMask][google.protobuf.FieldMask] for more information. - * For example: `"updateMask=kmsKeyName"` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateExclusionRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateExclusionRequest.php deleted file mode 100644 index fb7e5656cd78..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateExclusionRequest.php +++ /dev/null @@ -1,242 +0,0 @@ -google.logging.v2.UpdateExclusionRequest - */ -class UpdateExclusionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the exclusion to update: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. New values for the existing exclusion. Only the fields specified - * in `update_mask` are relevant. - * - * Generated from protobuf field .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $exclusion = null; - /** - * Required. A non-empty list of fields to change in the existing exclusion. - * New values for the fields are taken from the corresponding fields in the - * [LogExclusion][google.logging.v2.LogExclusion] included in this request. - * Fields not mentioned in `update_mask` are not changed and are ignored in - * the request. - * For example, to change the filter and description of an exclusion, - * specify an `update_mask` of `"filter,description"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param string $name Required. The resource name of the exclusion to update: - * - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * - * For example: - * - * `"projects/my-project/exclusions/my-exclusion"` - * Please see {@see ConfigServiceV2Client::logExclusionName()} for help formatting this field. - * @param \Google\Cloud\Logging\V2\LogExclusion $exclusion Required. New values for the existing exclusion. Only the fields specified - * in `update_mask` are relevant. - * @param \Google\Protobuf\FieldMask $updateMask Required. A non-empty list of fields to change in the existing exclusion. - * New values for the fields are taken from the corresponding fields in the - * [LogExclusion][google.logging.v2.LogExclusion] included in this request. - * Fields not mentioned in `update_mask` are not changed and are ignored in - * the request. - * - * For example, to change the filter and description of an exclusion, - * specify an `update_mask` of `"filter,description"`. - * - * @return \Google\Cloud\Logging\V2\UpdateExclusionRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\Logging\V2\LogExclusion $exclusion, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setName($name) - ->setExclusion($exclusion) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the exclusion to update: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * @type \Google\Cloud\Logging\V2\LogExclusion $exclusion - * Required. New values for the existing exclusion. Only the fields specified - * in `update_mask` are relevant. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. A non-empty list of fields to change in the existing exclusion. - * New values for the fields are taken from the corresponding fields in the - * [LogExclusion][google.logging.v2.LogExclusion] included in this request. - * Fields not mentioned in `update_mask` are not changed and are ignored in - * the request. - * For example, to change the filter and description of an exclusion, - * specify an `update_mask` of `"filter,description"`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the exclusion to update: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * - * 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 exclusion to update: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * - * 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. New values for the existing exclusion. Only the fields specified - * in `update_mask` are relevant. - * - * Generated from protobuf field .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\LogExclusion|null - */ - public function getExclusion() - { - return $this->exclusion; - } - - public function hasExclusion() - { - return isset($this->exclusion); - } - - public function clearExclusion() - { - unset($this->exclusion); - } - - /** - * Required. New values for the existing exclusion. Only the fields specified - * in `update_mask` are relevant. - * - * Generated from protobuf field .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\LogExclusion $var - * @return $this - */ - public function setExclusion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogExclusion::class); - $this->exclusion = $var; - - return $this; - } - - /** - * Required. A non-empty list of fields to change in the existing exclusion. - * New values for the fields are taken from the corresponding fields in the - * [LogExclusion][google.logging.v2.LogExclusion] included in this request. - * Fields not mentioned in `update_mask` are not changed and are ignored in - * the request. - * For example, to change the filter and description of an exclusion, - * specify an `update_mask` of `"filter,description"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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. A non-empty list of fields to change in the existing exclusion. - * New values for the fields are taken from the corresponding fields in the - * [LogExclusion][google.logging.v2.LogExclusion] included in this request. - * Fields not mentioned in `update_mask` are not changed and are ignored in - * the request. - * For example, to change the filter and description of an exclusion, - * specify an `update_mask` of `"filter,description"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateLogMetricRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateLogMetricRequest.php deleted file mode 100644 index 1dfe995b2b6e..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateLogMetricRequest.php +++ /dev/null @@ -1,149 +0,0 @@ -google.logging.v2.UpdateLogMetricRequest - */ -class UpdateLogMetricRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the metric to update: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * The updated metric must be provided in the request and it's - * `name` field must be the same as `[METRIC_ID]` If the metric - * does not exist in `[PROJECT_ID]`, then a new metric is created. - * - * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $metric_name = ''; - /** - * Required. The updated metric. - * - * Generated from protobuf field .google.logging.v2.LogMetric metric = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $metric = null; - - /** - * @param string $metricName Required. The resource name of the metric to update: - * - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * - * The updated metric must be provided in the request and it's - * `name` field must be the same as `[METRIC_ID]` If the metric - * does not exist in `[PROJECT_ID]`, then a new metric is created. Please see - * {@see MetricsServiceV2Client::logMetricName()} for help formatting this field. - * @param \Google\Cloud\Logging\V2\LogMetric $metric Required. The updated metric. - * - * @return \Google\Cloud\Logging\V2\UpdateLogMetricRequest - * - * @experimental - */ - public static function build(string $metricName, \Google\Cloud\Logging\V2\LogMetric $metric): self - { - return (new self()) - ->setMetricName($metricName) - ->setMetric($metric); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $metric_name - * Required. The resource name of the metric to update: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * The updated metric must be provided in the request and it's - * `name` field must be the same as `[METRIC_ID]` If the metric - * does not exist in `[PROJECT_ID]`, then a new metric is created. - * @type \Google\Cloud\Logging\V2\LogMetric $metric - * Required. The updated metric. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingMetrics::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the metric to update: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * The updated metric must be provided in the request and it's - * `name` field must be the same as `[METRIC_ID]` If the metric - * does not exist in `[PROJECT_ID]`, then a new metric is created. - * - * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getMetricName() - { - return $this->metric_name; - } - - /** - * Required. The resource name of the metric to update: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * The updated metric must be provided in the request and it's - * `name` field must be the same as `[METRIC_ID]` If the metric - * does not exist in `[PROJECT_ID]`, then a new metric is created. - * - * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setMetricName($var) - { - GPBUtil::checkString($var, True); - $this->metric_name = $var; - - return $this; - } - - /** - * Required. The updated metric. - * - * Generated from protobuf field .google.logging.v2.LogMetric metric = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\LogMetric|null - */ - public function getMetric() - { - return $this->metric; - } - - public function hasMetric() - { - return isset($this->metric); - } - - public function clearMetric() - { - unset($this->metric); - } - - /** - * Required. The updated metric. - * - * Generated from protobuf field .google.logging.v2.LogMetric metric = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\LogMetric $var - * @return $this - */ - public function setMetric($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogMetric::class); - $this->metric = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateSettingsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateSettingsRequest.php deleted file mode 100644 index 66f44a442c13..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateSettingsRequest.php +++ /dev/null @@ -1,236 +0,0 @@ -google.logging.v2.UpdateSettingsRequest - */ -class UpdateSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name for the settings to update. - * "organizations/[ORGANIZATION_ID]/settings" - * For example: - * `"organizations/12345/settings"` - * Note: Settings for the Log Router can currently only be configured for - * Google Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The settings to update. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field .google.logging.v2.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $settings = null; - /** - * Optional. Field mask identifying which fields from `settings` should - * be updated. A field will be overwritten if and only if it is in the update - * mask. Output only fields cannot be updated. - * See [FieldMask][google.protobuf.FieldMask] for more information. - * For example: `"updateMask=kmsKeyName"` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Logging\V2\Settings $settings Required. The settings to update. - * - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask identifying which fields from `settings` should - * be updated. A field will be overwritten if and only if it is in the update - * mask. Output only fields cannot be updated. - * - * See [FieldMask][google.protobuf.FieldMask] for more information. - * - * For example: `"updateMask=kmsKeyName"` - * - * @return \Google\Cloud\Logging\V2\UpdateSettingsRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Logging\V2\Settings $settings, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSettings($settings) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name for the settings to update. - * "organizations/[ORGANIZATION_ID]/settings" - * For example: - * `"organizations/12345/settings"` - * Note: Settings for the Log Router can currently only be configured for - * Google Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * @type \Google\Cloud\Logging\V2\Settings $settings - * Required. The settings to update. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask identifying which fields from `settings` should - * be updated. A field will be overwritten if and only if it is in the update - * mask. Output only fields cannot be updated. - * See [FieldMask][google.protobuf.FieldMask] for more information. - * For example: `"updateMask=kmsKeyName"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name for the settings to update. - * "organizations/[ORGANIZATION_ID]/settings" - * For example: - * `"organizations/12345/settings"` - * Note: Settings for the Log Router can currently only be configured for - * Google Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name for the settings to update. - * "organizations/[ORGANIZATION_ID]/settings" - * For example: - * `"organizations/12345/settings"` - * Note: Settings for the Log Router can currently only be configured for - * Google Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * - * 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 settings to update. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field .google.logging.v2.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\Settings|null - */ - public function getSettings() - { - return $this->settings; - } - - public function hasSettings() - { - return isset($this->settings); - } - - public function clearSettings() - { - unset($this->settings); - } - - /** - * Required. The settings to update. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field .google.logging.v2.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\Settings $var - * @return $this - */ - public function setSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\Settings::class); - $this->settings = $var; - - return $this; - } - - /** - * Optional. Field mask identifying which fields from `settings` should - * be updated. A field will be overwritten if and only if it is in the update - * mask. Output only fields cannot be updated. - * See [FieldMask][google.protobuf.FieldMask] for more information. - * For example: `"updateMask=kmsKeyName"` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. Field mask identifying which fields from `settings` should - * be updated. A field will be overwritten if and only if it is in the update - * mask. Output only fields cannot be updated. - * See [FieldMask][google.protobuf.FieldMask] for more information. - * For example: `"updateMask=kmsKeyName"` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateSinkRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateSinkRequest.php deleted file mode 100644 index 0507e365155a..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateSinkRequest.php +++ /dev/null @@ -1,368 +0,0 @@ -google.logging.v2.UpdateSinkRequest - */ -class UpdateSinkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the sink to update, including the - * parent resource and the sink identifier: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * - * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $sink_name = ''; - /** - * Required. The updated sink, whose name is the same identifier that appears - * as part of `sink_name`. - * - * Generated from protobuf field .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $sink = null; - /** - * Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] - * for a description of this field. When updating a sink, the effect of this - * field on the value of `writer_identity` in the updated sink depends on both - * the old and new values of this field: - * + If the old and new values of this field are both false or both true, - * then there is no change to the sink's `writer_identity`. - * + If the old value is false and the new value is true, then - * `writer_identity` is changed to a unique service account. - * + It is an error if the old value is true and the new value is - * set to false or defaulted to false. - * - * Generated from protobuf field bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $unique_writer_identity = false; - /** - * Optional. Field mask that specifies the fields in `sink` that need - * an update. A sink field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. - * An empty `updateMask` is temporarily treated as using the following mask - * for backwards compatibility purposes: - * `destination,filter,includeChildren` - * At some point in the future, behavior will be removed and specifying an - * empty `updateMask` will be an error. - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=filter` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param string $sinkName Required. The full resource name of the sink to update, including the - * parent resource and the sink identifier: - * - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * - * For example: - * - * `"projects/my-project/sinks/my-sink"` - * Please see {@see ConfigServiceV2Client::logSinkName()} for help formatting this field. - * @param \Google\Cloud\Logging\V2\LogSink $sink Required. The updated sink, whose name is the same identifier that appears - * as part of `sink_name`. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask that specifies the fields in `sink` that need - * an update. A sink field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. - * - * An empty `updateMask` is temporarily treated as using the following mask - * for backwards compatibility purposes: - * - * `destination,filter,includeChildren` - * - * At some point in the future, behavior will be removed and specifying an - * empty `updateMask` will be an error. - * - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * - * For example: `updateMask=filter` - * - * @return \Google\Cloud\Logging\V2\UpdateSinkRequest - * - * @experimental - */ - public static function build(string $sinkName, \Google\Cloud\Logging\V2\LogSink $sink, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSinkName($sinkName) - ->setSink($sink) - ->setUpdateMask($updateMask); - } - - /** - * @param string $sinkName Required. The full resource name of the sink to update, including the - * parent resource and the sink identifier: - * - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * - * For example: - * - * `"projects/my-project/sinks/my-sink"` - * Please see {@see ConfigServiceV2Client::logSinkName()} for help formatting this field. - * @param \Google\Cloud\Logging\V2\LogSink $sink Required. The updated sink, whose name is the same identifier that appears - * as part of `sink_name`. - * - * @return \Google\Cloud\Logging\V2\UpdateSinkRequest - * - * @experimental - */ - public static function buildFromSinkNameSink(string $sinkName, \Google\Cloud\Logging\V2\LogSink $sink): self - { - return (new self()) - ->setSinkName($sinkName) - ->setSink($sink); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sink_name - * Required. The full resource name of the sink to update, including the - * parent resource and the sink identifier: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * @type \Google\Cloud\Logging\V2\LogSink $sink - * Required. The updated sink, whose name is the same identifier that appears - * as part of `sink_name`. - * @type bool $unique_writer_identity - * Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] - * for a description of this field. When updating a sink, the effect of this - * field on the value of `writer_identity` in the updated sink depends on both - * the old and new values of this field: - * + If the old and new values of this field are both false or both true, - * then there is no change to the sink's `writer_identity`. - * + If the old value is false and the new value is true, then - * `writer_identity` is changed to a unique service account. - * + It is an error if the old value is true and the new value is - * set to false or defaulted to false. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask that specifies the fields in `sink` that need - * an update. A sink field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. - * An empty `updateMask` is temporarily treated as using the following mask - * for backwards compatibility purposes: - * `destination,filter,includeChildren` - * At some point in the future, behavior will be removed and specifying an - * empty `updateMask` will be an error. - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=filter` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the sink to update, including the - * parent resource and the sink identifier: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * - * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSinkName() - { - return $this->sink_name; - } - - /** - * Required. The full resource name of the sink to update, including the - * parent resource and the sink identifier: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * - * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSinkName($var) - { - GPBUtil::checkString($var, True); - $this->sink_name = $var; - - return $this; - } - - /** - * Required. The updated sink, whose name is the same identifier that appears - * as part of `sink_name`. - * - * Generated from protobuf field .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\LogSink|null - */ - public function getSink() - { - return $this->sink; - } - - public function hasSink() - { - return isset($this->sink); - } - - public function clearSink() - { - unset($this->sink); - } - - /** - * Required. The updated sink, whose name is the same identifier that appears - * as part of `sink_name`. - * - * Generated from protobuf field .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\LogSink $var - * @return $this - */ - public function setSink($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogSink::class); - $this->sink = $var; - - return $this; - } - - /** - * Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] - * for a description of this field. When updating a sink, the effect of this - * field on the value of `writer_identity` in the updated sink depends on both - * the old and new values of this field: - * + If the old and new values of this field are both false or both true, - * then there is no change to the sink's `writer_identity`. - * + If the old value is false and the new value is true, then - * `writer_identity` is changed to a unique service account. - * + It is an error if the old value is true and the new value is - * set to false or defaulted to false. - * - * Generated from protobuf field bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getUniqueWriterIdentity() - { - return $this->unique_writer_identity; - } - - /** - * Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] - * for a description of this field. When updating a sink, the effect of this - * field on the value of `writer_identity` in the updated sink depends on both - * the old and new values of this field: - * + If the old and new values of this field are both false or both true, - * then there is no change to the sink's `writer_identity`. - * + If the old value is false and the new value is true, then - * `writer_identity` is changed to a unique service account. - * + It is an error if the old value is true and the new value is - * set to false or defaulted to false. - * - * Generated from protobuf field bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setUniqueWriterIdentity($var) - { - GPBUtil::checkBool($var); - $this->unique_writer_identity = $var; - - return $this; - } - - /** - * Optional. Field mask that specifies the fields in `sink` that need - * an update. A sink field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. - * An empty `updateMask` is temporarily treated as using the following mask - * for backwards compatibility purposes: - * `destination,filter,includeChildren` - * At some point in the future, behavior will be removed and specifying an - * empty `updateMask` will be an error. - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=filter` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. Field mask that specifies the fields in `sink` that need - * an update. A sink field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. - * An empty `updateMask` is temporarily treated as using the following mask - * for backwards compatibility purposes: - * `destination,filter,includeChildren` - * At some point in the future, behavior will be removed and specifying an - * empty `updateMask` will be an error. - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=filter` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateViewRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateViewRequest.php deleted file mode 100644 index 1058f7b4409d..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateViewRequest.php +++ /dev/null @@ -1,187 +0,0 @@ -google.logging.v2.UpdateViewRequest - */ -class UpdateViewRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the view to update - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The updated view. - * - * Generated from protobuf field .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $view = null; - /** - * Optional. Field mask that specifies the fields in `view` that need - * an update. A field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=filter` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full resource name of the view to update - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * @type \Google\Cloud\Logging\V2\LogView $view - * Required. The updated view. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask that specifies the fields in `view` that need - * an update. A field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=filter` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the view to update - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full resource name of the view to update - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * - * 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 updated view. - * - * Generated from protobuf field .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\LogView|null - */ - public function getView() - { - return $this->view; - } - - public function hasView() - { - return isset($this->view); - } - - public function clearView() - { - unset($this->view); - } - - /** - * Required. The updated view. - * - * Generated from protobuf field .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\LogView $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogView::class); - $this->view = $var; - - return $this; - } - - /** - * Optional. Field mask that specifies the fields in `view` that need - * an update. A field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=filter` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. Field mask that specifies the fields in `view` that need - * an update. A field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=filter` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesPartialErrors.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesPartialErrors.php deleted file mode 100644 index 7ff395ccb489..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesPartialErrors.php +++ /dev/null @@ -1,83 +0,0 @@ -google.logging.v2.WriteLogEntriesPartialErrors - */ -class WriteLogEntriesPartialErrors extends \Google\Protobuf\Internal\Message -{ - /** - * When `WriteLogEntriesRequest.partial_success` is true, records the error - * status for entries that were not written due to a permanent error, keyed - * by the entry's zero-based index in `WriteLogEntriesRequest.entries`. - * Failed requests for which no entries are written will not include - * per-entry errors. - * - * Generated from protobuf field map log_entry_errors = 1; - */ - private $log_entry_errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $log_entry_errors - * When `WriteLogEntriesRequest.partial_success` is true, records the error - * status for entries that were not written due to a permanent error, keyed - * by the entry's zero-based index in `WriteLogEntriesRequest.entries`. - * Failed requests for which no entries are written will not include - * per-entry errors. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * When `WriteLogEntriesRequest.partial_success` is true, records the error - * status for entries that were not written due to a permanent error, keyed - * by the entry's zero-based index in `WriteLogEntriesRequest.entries`. - * Failed requests for which no entries are written will not include - * per-entry errors. - * - * Generated from protobuf field map log_entry_errors = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLogEntryErrors() - { - return $this->log_entry_errors; - } - - /** - * When `WriteLogEntriesRequest.partial_success` is true, records the error - * status for entries that were not written due to a permanent error, keyed - * by the entry's zero-based index in `WriteLogEntriesRequest.entries`. - * Failed requests for which no entries are written will not include - * per-entry errors. - * - * Generated from protobuf field map log_entry_errors = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLogEntryErrors($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::INT32, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->log_entry_errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesRequest.php deleted file mode 100644 index 39843838b631..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesRequest.php +++ /dev/null @@ -1,507 +0,0 @@ -google.logging.v2.WriteLogEntriesRequest - */ -class WriteLogEntriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A default log resource name that is assigned to all log entries - * in `entries` that do not specify a value for `log_name`: - * * `projects/[PROJECT_ID]/logs/[LOG_ID]` - * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - * * `folders/[FOLDER_ID]/logs/[LOG_ID]` - * `[LOG_ID]` must be URL-encoded. For example: - * "projects/my-project-id/logs/syslog" - * "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" - * The permission `logging.logEntries.create` is needed on each project, - * organization, billing account, or folder that is receiving new log - * entries, whether the resource is specified in `logName` or in an - * individual log entry. - * - * Generated from protobuf field string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $log_name = ''; - /** - * Optional. A default monitored resource object that is assigned to all log - * entries in `entries` that do not specify a value for `resource`. Example: - * { "type": "gce_instance", - * "labels": { - * "zone": "us-central1-a", "instance_id": "00000000000000000000" }} - * See [LogEntry][google.logging.v2.LogEntry]. - * - * Generated from protobuf field .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $resource = null; - /** - * Optional. Default labels that are added to the `labels` field of all log - * entries in `entries`. If a log entry already has a label with the same key - * as a label in this parameter, then the log entry's label is not changed. - * See [LogEntry][google.logging.v2.LogEntry]. - * - * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Required. The log entries to send to Logging. The order of log - * entries in this list does not matter. Values supplied in this method's - * `log_name`, `resource`, and `labels` fields are copied into those log - * entries in this list that do not include values for their corresponding - * fields. For more information, see the - * [LogEntry][google.logging.v2.LogEntry] type. - * If the `timestamp` or `insert_id` fields are missing in log entries, then - * this method supplies the current time or a unique identifier, respectively. - * The supplied values are chosen so that, among the log entries that did not - * supply their own values, the entries earlier in the list will sort before - * the entries later in the list. See the `entries.list` method. - * Log entries with timestamps that are more than the - * [logs retention period](https://cloud.google.com/logging/quotas) in - * the past or more than 24 hours in the future will not be available when - * calling `entries.list`. However, those log entries can still be [exported - * with - * LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * To improve throughput and to avoid exceeding the - * [quota limit](https://cloud.google.com/logging/quotas) for calls to - * `entries.write`, you should try to include several log entries in this - * list, rather than calling this method for each individual log entry. - * - * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private $entries; - /** - * Optional. Whether a batch's valid entries should be written even if some - * other entry failed due to a permanent error such as INVALID_ARGUMENT or - * PERMISSION_DENIED. If any entry failed, then the response status is the - * response status of one of the failed entries. The response will include - * error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by - * the entries' zero-based index in the `entries`. Failed requests for which - * no entries are written will not include per-entry errors. - * - * Generated from protobuf field bool partial_success = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $partial_success = false; - /** - * Optional. If true, the request should expect normal response, but the - * entries won't be persisted nor exported. Useful for checking whether the - * logging API endpoints are working properly before sending valuable data. - * - * Generated from protobuf field bool dry_run = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $dry_run = false; - - /** - * @param string $logName Optional. A default log resource name that is assigned to all log entries - * in `entries` that do not specify a value for `log_name`: - * - * * `projects/[PROJECT_ID]/logs/[LOG_ID]` - * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - * * `folders/[FOLDER_ID]/logs/[LOG_ID]` - * - * `[LOG_ID]` must be URL-encoded. For example: - * - * "projects/my-project-id/logs/syslog" - * "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" - * - * The permission `logging.logEntries.create` is needed on each project, - * organization, billing account, or folder that is receiving new log - * entries, whether the resource is specified in `logName` or in an - * individual log entry. - * @param \Google\Api\MonitoredResource $resource Optional. A default monitored resource object that is assigned to all log - * entries in `entries` that do not specify a value for `resource`. Example: - * - * { "type": "gce_instance", - * "labels": { - * "zone": "us-central1-a", "instance_id": "00000000000000000000" }} - * - * See [LogEntry][google.logging.v2.LogEntry]. - * @param array $labels Optional. Default labels that are added to the `labels` field of all log - * entries in `entries`. If a log entry already has a label with the same key - * as a label in this parameter, then the log entry's label is not changed. - * See [LogEntry][google.logging.v2.LogEntry]. - * @param \Google\Cloud\Logging\V2\LogEntry[] $entries Required. The log entries to send to Logging. The order of log - * entries in this list does not matter. Values supplied in this method's - * `log_name`, `resource`, and `labels` fields are copied into those log - * entries in this list that do not include values for their corresponding - * fields. For more information, see the - * [LogEntry][google.logging.v2.LogEntry] type. - * - * If the `timestamp` or `insert_id` fields are missing in log entries, then - * this method supplies the current time or a unique identifier, respectively. - * The supplied values are chosen so that, among the log entries that did not - * supply their own values, the entries earlier in the list will sort before - * the entries later in the list. See the `entries.list` method. - * - * Log entries with timestamps that are more than the - * [logs retention period](https://cloud.google.com/logging/quotas) in - * the past or more than 24 hours in the future will not be available when - * calling `entries.list`. However, those log entries can still be [exported - * with - * LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * - * To improve throughput and to avoid exceeding the - * [quota limit](https://cloud.google.com/logging/quotas) for calls to - * `entries.write`, you should try to include several log entries in this - * list, rather than calling this method for each individual log entry. - * - * @return \Google\Cloud\Logging\V2\WriteLogEntriesRequest - * - * @experimental - */ - public static function build(string $logName, \Google\Api\MonitoredResource $resource, array $labels, array $entries): self - { - return (new self()) - ->setLogName($logName) - ->setResource($resource) - ->setLabels($labels) - ->setEntries($entries); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $log_name - * Optional. A default log resource name that is assigned to all log entries - * in `entries` that do not specify a value for `log_name`: - * * `projects/[PROJECT_ID]/logs/[LOG_ID]` - * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - * * `folders/[FOLDER_ID]/logs/[LOG_ID]` - * `[LOG_ID]` must be URL-encoded. For example: - * "projects/my-project-id/logs/syslog" - * "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" - * The permission `logging.logEntries.create` is needed on each project, - * organization, billing account, or folder that is receiving new log - * entries, whether the resource is specified in `logName` or in an - * individual log entry. - * @type \Google\Api\MonitoredResource $resource - * Optional. A default monitored resource object that is assigned to all log - * entries in `entries` that do not specify a value for `resource`. Example: - * { "type": "gce_instance", - * "labels": { - * "zone": "us-central1-a", "instance_id": "00000000000000000000" }} - * See [LogEntry][google.logging.v2.LogEntry]. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Default labels that are added to the `labels` field of all log - * entries in `entries`. If a log entry already has a label with the same key - * as a label in this parameter, then the log entry's label is not changed. - * See [LogEntry][google.logging.v2.LogEntry]. - * @type array<\Google\Cloud\Logging\V2\LogEntry>|\Google\Protobuf\Internal\RepeatedField $entries - * Required. The log entries to send to Logging. The order of log - * entries in this list does not matter. Values supplied in this method's - * `log_name`, `resource`, and `labels` fields are copied into those log - * entries in this list that do not include values for their corresponding - * fields. For more information, see the - * [LogEntry][google.logging.v2.LogEntry] type. - * If the `timestamp` or `insert_id` fields are missing in log entries, then - * this method supplies the current time or a unique identifier, respectively. - * The supplied values are chosen so that, among the log entries that did not - * supply their own values, the entries earlier in the list will sort before - * the entries later in the list. See the `entries.list` method. - * Log entries with timestamps that are more than the - * [logs retention period](https://cloud.google.com/logging/quotas) in - * the past or more than 24 hours in the future will not be available when - * calling `entries.list`. However, those log entries can still be [exported - * with - * LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * To improve throughput and to avoid exceeding the - * [quota limit](https://cloud.google.com/logging/quotas) for calls to - * `entries.write`, you should try to include several log entries in this - * list, rather than calling this method for each individual log entry. - * @type bool $partial_success - * Optional. Whether a batch's valid entries should be written even if some - * other entry failed due to a permanent error such as INVALID_ARGUMENT or - * PERMISSION_DENIED. If any entry failed, then the response status is the - * response status of one of the failed entries. The response will include - * error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by - * the entries' zero-based index in the `entries`. Failed requests for which - * no entries are written will not include per-entry errors. - * @type bool $dry_run - * Optional. If true, the request should expect normal response, but the - * entries won't be persisted nor exported. Useful for checking whether the - * logging API endpoints are working properly before sending valuable data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A default log resource name that is assigned to all log entries - * in `entries` that do not specify a value for `log_name`: - * * `projects/[PROJECT_ID]/logs/[LOG_ID]` - * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - * * `folders/[FOLDER_ID]/logs/[LOG_ID]` - * `[LOG_ID]` must be URL-encoded. For example: - * "projects/my-project-id/logs/syslog" - * "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" - * The permission `logging.logEntries.create` is needed on each project, - * organization, billing account, or folder that is receiving new log - * entries, whether the resource is specified in `logName` or in an - * individual log entry. - * - * Generated from protobuf field string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getLogName() - { - return $this->log_name; - } - - /** - * Optional. A default log resource name that is assigned to all log entries - * in `entries` that do not specify a value for `log_name`: - * * `projects/[PROJECT_ID]/logs/[LOG_ID]` - * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - * * `folders/[FOLDER_ID]/logs/[LOG_ID]` - * `[LOG_ID]` must be URL-encoded. For example: - * "projects/my-project-id/logs/syslog" - * "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" - * The permission `logging.logEntries.create` is needed on each project, - * organization, billing account, or folder that is receiving new log - * entries, whether the resource is specified in `logName` or in an - * individual log entry. - * - * Generated from protobuf field string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLogName($var) - { - GPBUtil::checkString($var, True); - $this->log_name = $var; - - return $this; - } - - /** - * Optional. A default monitored resource object that is assigned to all log - * entries in `entries` that do not specify a value for `resource`. Example: - * { "type": "gce_instance", - * "labels": { - * "zone": "us-central1-a", "instance_id": "00000000000000000000" }} - * See [LogEntry][google.logging.v2.LogEntry]. - * - * Generated from protobuf field .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Api\MonitoredResource|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * Optional. A default monitored resource object that is assigned to all log - * entries in `entries` that do not specify a value for `resource`. Example: - * { "type": "gce_instance", - * "labels": { - * "zone": "us-central1-a", "instance_id": "00000000000000000000" }} - * See [LogEntry][google.logging.v2.LogEntry]. - * - * Generated from protobuf field .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Api\MonitoredResource $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Api\MonitoredResource::class); - $this->resource = $var; - - return $this; - } - - /** - * Optional. Default labels that are added to the `labels` field of all log - * entries in `entries`. If a log entry already has a label with the same key - * as a label in this parameter, then the log entry's label is not changed. - * See [LogEntry][google.logging.v2.LogEntry]. - * - * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Default labels that are added to the `labels` field of all log - * entries in `entries`. If a log entry already has a label with the same key - * as a label in this parameter, then the log entry's label is not changed. - * See [LogEntry][google.logging.v2.LogEntry]. - * - * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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; - } - - /** - * Required. The log entries to send to Logging. The order of log - * entries in this list does not matter. Values supplied in this method's - * `log_name`, `resource`, and `labels` fields are copied into those log - * entries in this list that do not include values for their corresponding - * fields. For more information, see the - * [LogEntry][google.logging.v2.LogEntry] type. - * If the `timestamp` or `insert_id` fields are missing in log entries, then - * this method supplies the current time or a unique identifier, respectively. - * The supplied values are chosen so that, among the log entries that did not - * supply their own values, the entries earlier in the list will sort before - * the entries later in the list. See the `entries.list` method. - * Log entries with timestamps that are more than the - * [logs retention period](https://cloud.google.com/logging/quotas) in - * the past or more than 24 hours in the future will not be available when - * calling `entries.list`. However, those log entries can still be [exported - * with - * LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * To improve throughput and to avoid exceeding the - * [quota limit](https://cloud.google.com/logging/quotas) for calls to - * `entries.write`, you should try to include several log entries in this - * list, rather than calling this method for each individual log entry. - * - * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * Required. The log entries to send to Logging. The order of log - * entries in this list does not matter. Values supplied in this method's - * `log_name`, `resource`, and `labels` fields are copied into those log - * entries in this list that do not include values for their corresponding - * fields. For more information, see the - * [LogEntry][google.logging.v2.LogEntry] type. - * If the `timestamp` or `insert_id` fields are missing in log entries, then - * this method supplies the current time or a unique identifier, respectively. - * The supplied values are chosen so that, among the log entries that did not - * supply their own values, the entries earlier in the list will sort before - * the entries later in the list. See the `entries.list` method. - * Log entries with timestamps that are more than the - * [logs retention period](https://cloud.google.com/logging/quotas) in - * the past or more than 24 hours in the future will not be available when - * calling `entries.list`. However, those log entries can still be [exported - * with - * LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * To improve throughput and to avoid exceeding the - * [quota limit](https://cloud.google.com/logging/quotas) for calls to - * `entries.write`, you should try to include several log entries in this - * list, rather than calling this method for each individual log entry. - * - * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Logging\V2\LogEntry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogEntry::class); - $this->entries = $arr; - - return $this; - } - - /** - * Optional. Whether a batch's valid entries should be written even if some - * other entry failed due to a permanent error such as INVALID_ARGUMENT or - * PERMISSION_DENIED. If any entry failed, then the response status is the - * response status of one of the failed entries. The response will include - * error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by - * the entries' zero-based index in the `entries`. Failed requests for which - * no entries are written will not include per-entry errors. - * - * Generated from protobuf field bool partial_success = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getPartialSuccess() - { - return $this->partial_success; - } - - /** - * Optional. Whether a batch's valid entries should be written even if some - * other entry failed due to a permanent error such as INVALID_ARGUMENT or - * PERMISSION_DENIED. If any entry failed, then the response status is the - * response status of one of the failed entries. The response will include - * error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by - * the entries' zero-based index in the `entries`. Failed requests for which - * no entries are written will not include per-entry errors. - * - * Generated from protobuf field bool partial_success = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setPartialSuccess($var) - { - GPBUtil::checkBool($var); - $this->partial_success = $var; - - return $this; - } - - /** - * Optional. If true, the request should expect normal response, but the - * entries won't be persisted nor exported. Useful for checking whether the - * logging API endpoints are working properly before sending valuable data. - * - * Generated from protobuf field bool dry_run = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDryRun() - { - return $this->dry_run; - } - - /** - * Optional. If true, the request should expect normal response, but the - * entries won't be persisted nor exported. Useful for checking whether the - * logging API endpoints are working properly before sending valuable data. - * - * Generated from protobuf field bool dry_run = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDryRun($var) - { - GPBUtil::checkBool($var); - $this->dry_run = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesResponse.php deleted file mode 100644 index 006dcaf82055..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.logging.v2.WriteLogEntriesResponse - */ -class WriteLogEntriesResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/copy_log_entries.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/copy_log_entries.php deleted file mode 100644 index a4b599964ba5..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/copy_log_entries.php +++ /dev/null @@ -1,89 +0,0 @@ -setName($name) - ->setDestination($destination); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $configServiceV2Client->copyLogEntries($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CopyLogEntriesResponse $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 -{ - $name = '[NAME]'; - $destination = '[DESTINATION]'; - - copy_log_entries_sample($name, $destination); -} -// [END logging_v2_generated_ConfigServiceV2_CopyLogEntries_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_bucket.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_bucket.php deleted file mode 100644 index d865c3ae0448..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_bucket.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent) - ->setBucketId($bucketId) - ->setBucket($bucket); - - // Call the API and handle any network failures. - try { - /** @var LogBucket $response */ - $response = $configServiceV2Client->createBucket($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 = ConfigServiceV2Client::organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $bucketId = '[BUCKET_ID]'; - - create_bucket_sample($formattedParent, $bucketId); -} -// [END logging_v2_generated_ConfigServiceV2_CreateBucket_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_bucket_async.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_bucket_async.php deleted file mode 100644 index a55ec2edb499..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_bucket_async.php +++ /dev/null @@ -1,98 +0,0 @@ -setParent($formattedParent) - ->setBucketId($bucketId) - ->setBucket($bucket); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $configServiceV2Client->createBucketAsync($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var LogBucket $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 = ConfigServiceV2Client::organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $bucketId = '[BUCKET_ID]'; - - create_bucket_async_sample($formattedParent, $bucketId); -} -// [END logging_v2_generated_ConfigServiceV2_CreateBucketAsync_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_exclusion.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_exclusion.php deleted file mode 100644 index 04f33fe0a35d..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_exclusion.php +++ /dev/null @@ -1,106 +0,0 @@ -setName($exclusionName) - ->setFilter($exclusionFilter); - $request = (new CreateExclusionRequest()) - ->setParent($formattedParent) - ->setExclusion($exclusion); - - // Call the API and handle any network failures. - try { - /** @var LogExclusion $response */ - $response = $configServiceV2Client->createExclusion($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 = ConfigServiceV2Client::projectName('[PROJECT]'); - $exclusionName = '[NAME]'; - $exclusionFilter = '[FILTER]'; - - create_exclusion_sample($formattedParent, $exclusionName, $exclusionFilter); -} -// [END logging_v2_generated_ConfigServiceV2_CreateExclusion_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_link.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_link.php deleted file mode 100644 index d9e2e4458aca..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_link.php +++ /dev/null @@ -1,97 +0,0 @@ -setParent($formattedParent) - ->setLink($link) - ->setLinkId($linkId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $configServiceV2Client->createLink($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Link $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 = ConfigServiceV2Client::logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $linkId = '[LINK_ID]'; - - create_link_sample($formattedParent, $linkId); -} -// [END logging_v2_generated_ConfigServiceV2_CreateLink_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_sink.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_sink.php deleted file mode 100644 index 4d3d403e2d62..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_sink.php +++ /dev/null @@ -1,110 +0,0 @@ -setName($sinkName) - ->setDestination($sinkDestination); - $request = (new CreateSinkRequest()) - ->setParent($formattedParent) - ->setSink($sink); - - // Call the API and handle any network failures. - try { - /** @var LogSink $response */ - $response = $configServiceV2Client->createSink($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 = ConfigServiceV2Client::projectName('[PROJECT]'); - $sinkName = '[NAME]'; - $sinkDestination = '[DESTINATION]'; - - create_sink_sample($formattedParent, $sinkName, $sinkDestination); -} -// [END logging_v2_generated_ConfigServiceV2_CreateSink_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_view.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_view.php deleted file mode 100644 index df1dbfc81581..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_view.php +++ /dev/null @@ -1,84 +0,0 @@ -setParent($parent) - ->setViewId($viewId) - ->setView($view); - - // Call the API and handle any network failures. - try { - /** @var LogView $response */ - $response = $configServiceV2Client->createView($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 -{ - $parent = '[PARENT]'; - $viewId = '[VIEW_ID]'; - - create_view_sample($parent, $viewId); -} -// [END logging_v2_generated_ConfigServiceV2_CreateView_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_bucket.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_bucket.php deleted file mode 100644 index 680b4a279896..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_bucket.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $configServiceV2Client->deleteBucket($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 = ConfigServiceV2Client::logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - - delete_bucket_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_DeleteBucket_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_exclusion.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_exclusion.php deleted file mode 100644 index 253750cdf35f..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_exclusion.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $configServiceV2Client->deleteExclusion($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 = ConfigServiceV2Client::logExclusionName('[PROJECT]', '[EXCLUSION]'); - - delete_exclusion_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_DeleteExclusion_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_link.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_link.php deleted file mode 100644 index 2e721b397511..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_link.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $configServiceV2Client->deleteLink($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 = ConfigServiceV2Client::linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); - - delete_link_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_DeleteLink_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_sink.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_sink.php deleted file mode 100644 index 9e2accee12d0..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_sink.php +++ /dev/null @@ -1,80 +0,0 @@ -setSinkName($formattedSinkName); - - // Call the API and handle any network failures. - try { - $configServiceV2Client->deleteSink($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 -{ - $formattedSinkName = ConfigServiceV2Client::logSinkName('[PROJECT]', '[SINK]'); - - delete_sink_sample($formattedSinkName); -} -// [END logging_v2_generated_ConfigServiceV2_DeleteSink_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_view.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_view.php deleted file mode 100644 index 44132d1a1283..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_view.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $configServiceV2Client->deleteView($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 = ConfigServiceV2Client::logViewName( - '[PROJECT]', - '[LOCATION]', - '[BUCKET]', - '[VIEW]' - ); - - delete_view_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_DeleteView_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_bucket.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_bucket.php deleted file mode 100644 index d18529ce62d1..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_bucket.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var LogBucket $response */ - $response = $configServiceV2Client->getBucket($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 = ConfigServiceV2Client::logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - - get_bucket_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_GetBucket_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_cmek_settings.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_cmek_settings.php deleted file mode 100644 index 489460652e4b..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_cmek_settings.php +++ /dev/null @@ -1,66 +0,0 @@ -getCmekSettings($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END logging_v2_generated_ConfigServiceV2_GetCmekSettings_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_exclusion.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_exclusion.php deleted file mode 100644 index 041817249b9e..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_exclusion.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var LogExclusion $response */ - $response = $configServiceV2Client->getExclusion($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 = ConfigServiceV2Client::logExclusionName('[PROJECT]', '[EXCLUSION]'); - - get_exclusion_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_GetExclusion_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_link.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_link.php deleted file mode 100644 index 7ae90baa1c06..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_link.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Link $response */ - $response = $configServiceV2Client->getLink($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 = ConfigServiceV2Client::linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); - - get_link_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_GetLink_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_settings.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_settings.php deleted file mode 100644 index d9b670c87f67..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_settings.php +++ /dev/null @@ -1,94 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Settings $response */ - $response = $configServiceV2Client->getSettings($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 = ConfigServiceV2Client::settingsName('[PROJECT]'); - - get_settings_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_GetSettings_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_sink.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_sink.php deleted file mode 100644 index 55833a87f2aa..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_sink.php +++ /dev/null @@ -1,80 +0,0 @@ -setSinkName($formattedSinkName); - - // Call the API and handle any network failures. - try { - /** @var LogSink $response */ - $response = $configServiceV2Client->getSink($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 -{ - $formattedSinkName = ConfigServiceV2Client::logSinkName('[PROJECT]', '[SINK]'); - - get_sink_sample($formattedSinkName); -} -// [END logging_v2_generated_ConfigServiceV2_GetSink_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_view.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_view.php deleted file mode 100644 index 2a15574ab9b2..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_view.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var LogView $response */ - $response = $configServiceV2Client->getView($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 = ConfigServiceV2Client::logViewName( - '[PROJECT]', - '[LOCATION]', - '[BUCKET]', - '[VIEW]' - ); - - get_view_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_GetView_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_buckets.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_buckets.php deleted file mode 100644 index 16a2727411f5..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_buckets.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $configServiceV2Client->listBuckets($request); - - /** @var LogBucket $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 = ConfigServiceV2Client::organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - - list_buckets_sample($formattedParent); -} -// [END logging_v2_generated_ConfigServiceV2_ListBuckets_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_exclusions.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_exclusions.php deleted file mode 100644 index 06e4dd2c13c8..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_exclusions.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $configServiceV2Client->listExclusions($request); - - /** @var LogExclusion $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 = ConfigServiceV2Client::projectName('[PROJECT]'); - - list_exclusions_sample($formattedParent); -} -// [END logging_v2_generated_ConfigServiceV2_ListExclusions_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_links.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_links.php deleted file mode 100644 index 0e42774059a4..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_links.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $configServiceV2Client->listLinks($request); - - /** @var Link $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 = ConfigServiceV2Client::logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - - list_links_sample($formattedParent); -} -// [END logging_v2_generated_ConfigServiceV2_ListLinks_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_sinks.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_sinks.php deleted file mode 100644 index b2d1aef232fb..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_sinks.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $configServiceV2Client->listSinks($request); - - /** @var LogSink $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 = ConfigServiceV2Client::projectName('[PROJECT]'); - - list_sinks_sample($formattedParent); -} -// [END logging_v2_generated_ConfigServiceV2_ListSinks_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_views.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_views.php deleted file mode 100644 index 064a94ef5c68..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_views.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $configServiceV2Client->listViews($request); - - /** @var LogView $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 -{ - $parent = '[PARENT]'; - - list_views_sample($parent); -} -// [END logging_v2_generated_ConfigServiceV2_ListViews_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/undelete_bucket.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/undelete_bucket.php deleted file mode 100644 index c284363d055c..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/undelete_bucket.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $configServiceV2Client->undeleteBucket($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 = ConfigServiceV2Client::logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - - undelete_bucket_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_UndeleteBucket_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_bucket.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_bucket.php deleted file mode 100644 index e9fbbf0bf705..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_bucket.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName) - ->setBucket($bucket) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var LogBucket $response */ - $response = $configServiceV2Client->updateBucket($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 = ConfigServiceV2Client::logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - - update_bucket_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_UpdateBucket_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_bucket_async.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_bucket_async.php deleted file mode 100644 index c3d0c0da9941..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_bucket_async.php +++ /dev/null @@ -1,102 +0,0 @@ -setName($formattedName) - ->setBucket($bucket) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $configServiceV2Client->updateBucketAsync($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var LogBucket $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 = ConfigServiceV2Client::logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - - update_bucket_async_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_UpdateBucketAsync_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_cmek_settings.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_cmek_settings.php deleted file mode 100644 index f9e4305e561c..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_cmek_settings.php +++ /dev/null @@ -1,71 +0,0 @@ -updateCmekSettings($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END logging_v2_generated_ConfigServiceV2_UpdateCmekSettings_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_exclusion.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_exclusion.php deleted file mode 100644 index d1843d287bec..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_exclusion.php +++ /dev/null @@ -1,107 +0,0 @@ -setName($exclusionName) - ->setFilter($exclusionFilter); - $updateMask = new FieldMask(); - $request = (new UpdateExclusionRequest()) - ->setName($formattedName) - ->setExclusion($exclusion) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var LogExclusion $response */ - $response = $configServiceV2Client->updateExclusion($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 = ConfigServiceV2Client::logExclusionName('[PROJECT]', '[EXCLUSION]'); - $exclusionName = '[NAME]'; - $exclusionFilter = '[FILTER]'; - - update_exclusion_sample($formattedName, $exclusionName, $exclusionFilter); -} -// [END logging_v2_generated_ConfigServiceV2_UpdateExclusion_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_settings.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_settings.php deleted file mode 100644 index e6803c75a16c..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_settings.php +++ /dev/null @@ -1,97 +0,0 @@ -setName($name) - ->setSettings($settings); - - // Call the API and handle any network failures. - try { - /** @var Settings $response */ - $response = $configServiceV2Client->updateSettings($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]'; - - update_settings_sample($name); -} -// [END logging_v2_generated_ConfigServiceV2_UpdateSettings_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_sink.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_sink.php deleted file mode 100644 index c45f72b877e2..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_sink.php +++ /dev/null @@ -1,111 +0,0 @@ -setName($sinkName) - ->setDestination($sinkDestination); - $request = (new UpdateSinkRequest()) - ->setSinkName($formattedSinkName) - ->setSink($sink); - - // Call the API and handle any network failures. - try { - /** @var LogSink $response */ - $response = $configServiceV2Client->updateSink($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 -{ - $formattedSinkName = ConfigServiceV2Client::logSinkName('[PROJECT]', '[SINK]'); - $sinkName = '[NAME]'; - $sinkDestination = '[DESTINATION]'; - - update_sink_sample($formattedSinkName, $sinkName, $sinkDestination); -} -// [END logging_v2_generated_ConfigServiceV2_UpdateSink_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_view.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_view.php deleted file mode 100644 index 75ca0e8e8f6d..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_view.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($name) - ->setView($view); - - // Call the API and handle any network failures. - try { - /** @var LogView $response */ - $response = $configServiceV2Client->updateView($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]'; - - update_view_sample($name); -} -// [END logging_v2_generated_ConfigServiceV2_UpdateView_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/delete_log.php b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/delete_log.php deleted file mode 100644 index 55a2e6ce856c..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/delete_log.php +++ /dev/null @@ -1,84 +0,0 @@ -setLogName($formattedLogName); - - // Call the API and handle any network failures. - try { - $loggingServiceV2Client->deleteLog($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 -{ - $formattedLogName = LoggingServiceV2Client::logName('[PROJECT]', '[LOG]'); - - delete_log_sample($formattedLogName); -} -// [END logging_v2_generated_LoggingServiceV2_DeleteLog_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_log_entries.php b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_log_entries.php deleted file mode 100644 index 834f1608d9c7..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_log_entries.php +++ /dev/null @@ -1,96 +0,0 @@ -setResourceNames($formattedResourceNames); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $loggingServiceV2Client->listLogEntries($request); - - /** @var LogEntry $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 -{ - $formattedResourceNamesElement = LoggingServiceV2Client::projectName('[PROJECT]'); - - list_log_entries_sample($formattedResourceNamesElement); -} -// [END logging_v2_generated_LoggingServiceV2_ListLogEntries_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_logs.php b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_logs.php deleted file mode 100644 index 80d363576b74..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_logs.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $loggingServiceV2Client->listLogs($request); - - /** @var string $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element); - } - } 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 = LoggingServiceV2Client::projectName('[PROJECT]'); - - list_logs_sample($formattedParent); -} -// [END logging_v2_generated_LoggingServiceV2_ListLogs_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_monitored_resource_descriptors.php b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_monitored_resource_descriptors.php deleted file mode 100644 index 142c36fa3078..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_monitored_resource_descriptors.php +++ /dev/null @@ -1,62 +0,0 @@ -listMonitoredResourceDescriptors($request); - - /** @var MonitoredResourceDescriptor $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 logging_v2_generated_LoggingServiceV2_ListMonitoredResourceDescriptors_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/tail_log_entries.php b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/tail_log_entries.php deleted file mode 100644 index 0fd96b1551c7..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/tail_log_entries.php +++ /dev/null @@ -1,90 +0,0 @@ -setResourceNames($resourceNames); - - // Call the API and handle any network failures. - try { - /** @var BidiStream $stream */ - $stream = $loggingServiceV2Client->tailLogEntries(); - $stream->writeAll([$request,]); - - /** @var TailLogEntriesResponse $element */ - foreach ($stream->closeWriteAndReadAll() 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 -{ - $resourceNamesElement = '[RESOURCE_NAMES]'; - - tail_log_entries_sample($resourceNamesElement); -} -// [END logging_v2_generated_LoggingServiceV2_TailLogEntries_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/write_log_entries.php b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/write_log_entries.php deleted file mode 100644 index 47e89ffe8f84..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/write_log_entries.php +++ /dev/null @@ -1,105 +0,0 @@ -setLogName($entriesLogName) - ->setResource($entriesResource); - $entries = [$logEntry,]; - $request = (new WriteLogEntriesRequest()) - ->setEntries($entries); - - // Call the API and handle any network failures. - try { - /** @var WriteLogEntriesResponse $response */ - $response = $loggingServiceV2Client->writeLogEntries($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 -{ - $entriesLogName = '[LOG_NAME]'; - - write_log_entries_sample($entriesLogName); -} -// [END logging_v2_generated_LoggingServiceV2_WriteLogEntries_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/create_log_metric.php b/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/create_log_metric.php deleted file mode 100644 index 0a6d1ce19fca..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/create_log_metric.php +++ /dev/null @@ -1,104 +0,0 @@ -=ERROR" - * - * The maximum length of the filter is 20000 characters. - */ -function create_log_metric_sample( - string $formattedParent, - string $metricName, - string $metricFilter -): void { - // Create a client. - $metricsServiceV2Client = new MetricsServiceV2Client(); - - // Prepare the request message. - $metric = (new LogMetric()) - ->setName($metricName) - ->setFilter($metricFilter); - $request = (new CreateLogMetricRequest()) - ->setParent($formattedParent) - ->setMetric($metric); - - // Call the API and handle any network failures. - try { - /** @var LogMetric $response */ - $response = $metricsServiceV2Client->createLogMetric($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 = MetricsServiceV2Client::projectName('[PROJECT]'); - $metricName = '[NAME]'; - $metricFilter = '[FILTER]'; - - create_log_metric_sample($formattedParent, $metricName, $metricFilter); -} -// [END logging_v2_generated_MetricsServiceV2_CreateLogMetric_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/delete_log_metric.php b/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/delete_log_metric.php deleted file mode 100644 index d446ff2bfb26..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/delete_log_metric.php +++ /dev/null @@ -1,71 +0,0 @@ -setMetricName($formattedMetricName); - - // Call the API and handle any network failures. - try { - $metricsServiceV2Client->deleteLogMetric($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 -{ - $formattedMetricName = MetricsServiceV2Client::logMetricName('[PROJECT]', '[METRIC]'); - - delete_log_metric_sample($formattedMetricName); -} -// [END logging_v2_generated_MetricsServiceV2_DeleteLogMetric_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/get_log_metric.php b/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/get_log_metric.php deleted file mode 100644 index 5f445e6dc1bd..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/get_log_metric.php +++ /dev/null @@ -1,73 +0,0 @@ -setMetricName($formattedMetricName); - - // Call the API and handle any network failures. - try { - /** @var LogMetric $response */ - $response = $metricsServiceV2Client->getLogMetric($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 -{ - $formattedMetricName = MetricsServiceV2Client::logMetricName('[PROJECT]', '[METRIC]'); - - get_log_metric_sample($formattedMetricName); -} -// [END logging_v2_generated_MetricsServiceV2_GetLogMetric_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/list_log_metrics.php b/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/list_log_metrics.php deleted file mode 100644 index 8abfcaf2ec32..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/list_log_metrics.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $metricsServiceV2Client->listLogMetrics($request); - - /** @var LogMetric $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 = MetricsServiceV2Client::projectName('[PROJECT]'); - - list_log_metrics_sample($formattedParent); -} -// [END logging_v2_generated_MetricsServiceV2_ListLogMetrics_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/update_log_metric.php b/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/update_log_metric.php deleted file mode 100644 index b6024f7ad4bf..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/update_log_metric.php +++ /dev/null @@ -1,106 +0,0 @@ -=ERROR" - * - * The maximum length of the filter is 20000 characters. - */ -function update_log_metric_sample( - string $formattedMetricName, - string $metricName, - string $metricFilter -): void { - // Create a client. - $metricsServiceV2Client = new MetricsServiceV2Client(); - - // Prepare the request message. - $metric = (new LogMetric()) - ->setName($metricName) - ->setFilter($metricFilter); - $request = (new UpdateLogMetricRequest()) - ->setMetricName($formattedMetricName) - ->setMetric($metric); - - // Call the API and handle any network failures. - try { - /** @var LogMetric $response */ - $response = $metricsServiceV2Client->updateLogMetric($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 -{ - $formattedMetricName = MetricsServiceV2Client::logMetricName('[PROJECT]', '[METRIC]'); - $metricName = '[NAME]'; - $metricFilter = '[FILTER]'; - - update_log_metric_sample($formattedMetricName, $metricName, $metricFilter); -} -// [END logging_v2_generated_MetricsServiceV2_UpdateLogMetric_sync] diff --git a/owl-bot-staging/Logging/v2/src/V2/Client/ConfigServiceV2Client.php b/owl-bot-staging/Logging/v2/src/V2/Client/ConfigServiceV2Client.php deleted file mode 100644 index a8583cd6a5b1..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/Client/ConfigServiceV2Client.php +++ /dev/null @@ -1,2007 +0,0 @@ - copyLogEntriesAsync(CopyLogEntriesRequest $request, array $optionalArgs = []) - * @method PromiseInterface createBucketAsync(CreateBucketRequest $request, array $optionalArgs = []) - * @method PromiseInterface createBucketAsyncAsync(CreateBucketRequest $request, array $optionalArgs = []) - * @method PromiseInterface createExclusionAsync(CreateExclusionRequest $request, array $optionalArgs = []) - * @method PromiseInterface createLinkAsync(CreateLinkRequest $request, array $optionalArgs = []) - * @method PromiseInterface createSinkAsync(CreateSinkRequest $request, array $optionalArgs = []) - * @method PromiseInterface createViewAsync(CreateViewRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBucketAsync(DeleteBucketRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteExclusionAsync(DeleteExclusionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteLinkAsync(DeleteLinkRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSinkAsync(DeleteSinkRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteViewAsync(DeleteViewRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBucketAsync(GetBucketRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCmekSettingsAsync(GetCmekSettingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getExclusionAsync(GetExclusionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLinkAsync(GetLinkRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSettingsAsync(GetSettingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSinkAsync(GetSinkRequest $request, array $optionalArgs = []) - * @method PromiseInterface getViewAsync(GetViewRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBucketsAsync(ListBucketsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listExclusionsAsync(ListExclusionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLinksAsync(ListLinksRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSinksAsync(ListSinksRequest $request, array $optionalArgs = []) - * @method PromiseInterface listViewsAsync(ListViewsRequest $request, array $optionalArgs = []) - * @method PromiseInterface undeleteBucketAsync(UndeleteBucketRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBucketAsync(UpdateBucketRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBucketAsyncAsync(UpdateBucketRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCmekSettingsAsync(UpdateCmekSettingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateExclusionAsync(UpdateExclusionRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSettingsAsync(UpdateSettingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSinkAsync(UpdateSinkRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateViewAsync(UpdateViewRequest $request, array $optionalArgs = []) - */ -final class ConfigServiceV2Client -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.logging.v2.ConfigServiceV2'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'logging.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'logging.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/cloud-platform.read-only', - 'https://www.googleapis.com/auth/logging.admin', - 'https://www.googleapis.com/auth/logging.read', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/config_service_v2_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/config_service_v2_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/config_service_v2_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/config_service_v2_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 = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account resource. - * - * @param string $billingAccount - * - * @return string The formatted billing_account resource. - */ - public static function billingAccountName(string $billingAccount): string - { - return self::getPathTemplate('billingAccount')->render([ - 'billing_account' => $billingAccount, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_cmekSettings resource. - * - * @param string $billingAccount - * - * @return string The formatted billing_account_cmekSettings resource. - */ - public static function billingAccountCmekSettingsName(string $billingAccount): string - { - return self::getPathTemplate('billingAccountCmekSettings')->render([ - 'billing_account' => $billingAccount, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_exclusion resource. - * - * @param string $billingAccount - * @param string $exclusion - * - * @return string The formatted billing_account_exclusion resource. - */ - public static function billingAccountExclusionName(string $billingAccount, string $exclusion): string - { - return self::getPathTemplate('billingAccountExclusion')->render([ - 'billing_account' => $billingAccount, - 'exclusion' => $exclusion, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_location resource. - * - * @param string $billingAccount - * @param string $location - * - * @return string The formatted billing_account_location resource. - */ - public static function billingAccountLocationName(string $billingAccount, string $location): string - { - return self::getPathTemplate('billingAccountLocation')->render([ - 'billing_account' => $billingAccount, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_location_bucket resource. - * - * @param string $billingAccount - * @param string $location - * @param string $bucket - * - * @return string The formatted billing_account_location_bucket resource. - */ - public static function billingAccountLocationBucketName(string $billingAccount, string $location, string $bucket): string - { - return self::getPathTemplate('billingAccountLocationBucket')->render([ - 'billing_account' => $billingAccount, - 'location' => $location, - 'bucket' => $bucket, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_location_bucket_link resource. - * - * @param string $billingAccount - * @param string $location - * @param string $bucket - * @param string $link - * - * @return string The formatted billing_account_location_bucket_link resource. - */ - public static function billingAccountLocationBucketLinkName(string $billingAccount, string $location, string $bucket, string $link): string - { - return self::getPathTemplate('billingAccountLocationBucketLink')->render([ - 'billing_account' => $billingAccount, - 'location' => $location, - 'bucket' => $bucket, - 'link' => $link, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_location_bucket_view resource. - * - * @param string $billingAccount - * @param string $location - * @param string $bucket - * @param string $view - * - * @return string The formatted billing_account_location_bucket_view resource. - */ - public static function billingAccountLocationBucketViewName(string $billingAccount, string $location, string $bucket, string $view): string - { - return self::getPathTemplate('billingAccountLocationBucketView')->render([ - 'billing_account' => $billingAccount, - 'location' => $location, - 'bucket' => $bucket, - 'view' => $view, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_settings resource. - * - * @param string $billingAccount - * - * @return string The formatted billing_account_settings resource. - */ - public static function billingAccountSettingsName(string $billingAccount): string - { - return self::getPathTemplate('billingAccountSettings')->render([ - 'billing_account' => $billingAccount, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_sink resource. - * - * @param string $billingAccount - * @param string $sink - * - * @return string The formatted billing_account_sink resource. - */ - public static function billingAccountSinkName(string $billingAccount, string $sink): string - { - return self::getPathTemplate('billingAccountSink')->render([ - 'billing_account' => $billingAccount, - 'sink' => $sink, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * cmek_settings resource. - * - * @param string $project - * - * @return string The formatted cmek_settings resource. - */ - public static function cmekSettingsName(string $project): string - { - return self::getPathTemplate('cmekSettings')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a folder - * resource. - * - * @param string $folder - * - * @return string The formatted folder resource. - */ - public static function folderName(string $folder): string - { - return self::getPathTemplate('folder')->render([ - 'folder' => $folder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_cmekSettings resource. - * - * @param string $folder - * - * @return string The formatted folder_cmekSettings resource. - */ - public static function folderCmekSettingsName(string $folder): string - { - return self::getPathTemplate('folderCmekSettings')->render([ - 'folder' => $folder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_exclusion resource. - * - * @param string $folder - * @param string $exclusion - * - * @return string The formatted folder_exclusion resource. - */ - public static function folderExclusionName(string $folder, string $exclusion): string - { - return self::getPathTemplate('folderExclusion')->render([ - 'folder' => $folder, - 'exclusion' => $exclusion, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location resource. - * - * @param string $folder - * @param string $location - * - * @return string The formatted folder_location resource. - */ - public static function folderLocationName(string $folder, string $location): string - { - return self::getPathTemplate('folderLocation')->render([ - 'folder' => $folder, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_bucket resource. - * - * @param string $folder - * @param string $location - * @param string $bucket - * - * @return string The formatted folder_location_bucket resource. - */ - public static function folderLocationBucketName(string $folder, string $location, string $bucket): string - { - return self::getPathTemplate('folderLocationBucket')->render([ - 'folder' => $folder, - 'location' => $location, - 'bucket' => $bucket, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_bucket_link resource. - * - * @param string $folder - * @param string $location - * @param string $bucket - * @param string $link - * - * @return string The formatted folder_location_bucket_link resource. - */ - public static function folderLocationBucketLinkName(string $folder, string $location, string $bucket, string $link): string - { - return self::getPathTemplate('folderLocationBucketLink')->render([ - 'folder' => $folder, - 'location' => $location, - 'bucket' => $bucket, - 'link' => $link, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_bucket_view resource. - * - * @param string $folder - * @param string $location - * @param string $bucket - * @param string $view - * - * @return string The formatted folder_location_bucket_view resource. - */ - public static function folderLocationBucketViewName(string $folder, string $location, string $bucket, string $view): string - { - return self::getPathTemplate('folderLocationBucketView')->render([ - 'folder' => $folder, - 'location' => $location, - 'bucket' => $bucket, - 'view' => $view, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_settings resource. - * - * @param string $folder - * - * @return string The formatted folder_settings resource. - */ - public static function folderSettingsName(string $folder): string - { - return self::getPathTemplate('folderSettings')->render([ - 'folder' => $folder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a folder_sink - * resource. - * - * @param string $folder - * @param string $sink - * - * @return string The formatted folder_sink resource. - */ - public static function folderSinkName(string $folder, string $sink): string - { - return self::getPathTemplate('folderSink')->render([ - 'folder' => $folder, - 'sink' => $sink, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a link - * resource. - * - * @param string $project - * @param string $location - * @param string $bucket - * @param string $link - * - * @return string The formatted link resource. - */ - public static function linkName(string $project, string $location, string $bucket, string $link): string - { - return self::getPathTemplate('link')->render([ - 'project' => $project, - 'location' => $location, - 'bucket' => $bucket, - 'link' => $link, - ]); - } - - /** - * 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 log_bucket - * resource. - * - * @param string $project - * @param string $location - * @param string $bucket - * - * @return string The formatted log_bucket resource. - */ - public static function logBucketName(string $project, string $location, string $bucket): string - { - return self::getPathTemplate('logBucket')->render([ - 'project' => $project, - 'location' => $location, - 'bucket' => $bucket, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * log_exclusion resource. - * - * @param string $project - * @param string $exclusion - * - * @return string The formatted log_exclusion resource. - */ - public static function logExclusionName(string $project, string $exclusion): string - { - return self::getPathTemplate('logExclusion')->render([ - 'project' => $project, - 'exclusion' => $exclusion, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a log_sink - * resource. - * - * @param string $project - * @param string $sink - * - * @return string The formatted log_sink resource. - */ - public static function logSinkName(string $project, string $sink): string - { - return self::getPathTemplate('logSink')->render([ - 'project' => $project, - 'sink' => $sink, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a log_view - * resource. - * - * @param string $project - * @param string $location - * @param string $bucket - * @param string $view - * - * @return string The formatted log_view resource. - */ - public static function logViewName(string $project, string $location, string $bucket, string $view): string - { - return self::getPathTemplate('logView')->render([ - 'project' => $project, - 'location' => $location, - 'bucket' => $bucket, - 'view' => $view, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - */ - public static function organizationName(string $organization): string - { - return self::getPathTemplate('organization')->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_cmekSettings resource. - * - * @param string $organization - * - * @return string The formatted organization_cmekSettings resource. - */ - public static function organizationCmekSettingsName(string $organization): string - { - return self::getPathTemplate('organizationCmekSettings')->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_exclusion resource. - * - * @param string $organization - * @param string $exclusion - * - * @return string The formatted organization_exclusion resource. - */ - public static function organizationExclusionName(string $organization, string $exclusion): string - { - return self::getPathTemplate('organizationExclusion')->render([ - 'organization' => $organization, - 'exclusion' => $exclusion, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location resource. - * - * @param string $organization - * @param string $location - * - * @return string The formatted organization_location resource. - */ - public static function organizationLocationName(string $organization, string $location): string - { - return self::getPathTemplate('organizationLocation')->render([ - 'organization' => $organization, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_bucket resource. - * - * @param string $organization - * @param string $location - * @param string $bucket - * - * @return string The formatted organization_location_bucket resource. - */ - public static function organizationLocationBucketName(string $organization, string $location, string $bucket): string - { - return self::getPathTemplate('organizationLocationBucket')->render([ - 'organization' => $organization, - 'location' => $location, - 'bucket' => $bucket, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_bucket_link resource. - * - * @param string $organization - * @param string $location - * @param string $bucket - * @param string $link - * - * @return string The formatted organization_location_bucket_link resource. - */ - public static function organizationLocationBucketLinkName(string $organization, string $location, string $bucket, string $link): string - { - return self::getPathTemplate('organizationLocationBucketLink')->render([ - 'organization' => $organization, - 'location' => $location, - 'bucket' => $bucket, - 'link' => $link, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_bucket_view resource. - * - * @param string $organization - * @param string $location - * @param string $bucket - * @param string $view - * - * @return string The formatted organization_location_bucket_view resource. - */ - public static function organizationLocationBucketViewName(string $organization, string $location, string $bucket, string $view): string - { - return self::getPathTemplate('organizationLocationBucketView')->render([ - 'organization' => $organization, - 'location' => $location, - 'bucket' => $bucket, - 'view' => $view, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_settings resource. - * - * @param string $organization - * - * @return string The formatted organization_settings resource. - */ - public static function organizationSettingsName(string $organization): string - { - return self::getPathTemplate('organizationSettings')->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_sink resource. - * - * @param string $organization - * @param string $sink - * - * @return string The formatted organization_sink resource. - */ - public static function organizationSinkName(string $organization, string $sink): string - { - return self::getPathTemplate('organizationSink')->render([ - 'organization' => $organization, - 'sink' => $sink, - ]); - } - - /** - * 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_cmekSettings resource. - * - * @param string $project - * - * @return string The formatted project_cmekSettings resource. - */ - public static function projectCmekSettingsName(string $project): string - { - return self::getPathTemplate('projectCmekSettings')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_exclusion resource. - * - * @param string $project - * @param string $exclusion - * - * @return string The formatted project_exclusion resource. - */ - public static function projectExclusionName(string $project, string $exclusion): string - { - return self::getPathTemplate('projectExclusion')->render([ - 'project' => $project, - 'exclusion' => $exclusion, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_bucket resource. - * - * @param string $project - * @param string $location - * @param string $bucket - * - * @return string The formatted project_location_bucket resource. - */ - public static function projectLocationBucketName(string $project, string $location, string $bucket): string - { - return self::getPathTemplate('projectLocationBucket')->render([ - 'project' => $project, - 'location' => $location, - 'bucket' => $bucket, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_bucket_link resource. - * - * @param string $project - * @param string $location - * @param string $bucket - * @param string $link - * - * @return string The formatted project_location_bucket_link resource. - */ - public static function projectLocationBucketLinkName(string $project, string $location, string $bucket, string $link): string - { - return self::getPathTemplate('projectLocationBucketLink')->render([ - 'project' => $project, - 'location' => $location, - 'bucket' => $bucket, - 'link' => $link, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_bucket_view resource. - * - * @param string $project - * @param string $location - * @param string $bucket - * @param string $view - * - * @return string The formatted project_location_bucket_view resource. - */ - public static function projectLocationBucketViewName(string $project, string $location, string $bucket, string $view): string - { - return self::getPathTemplate('projectLocationBucketView')->render([ - 'project' => $project, - 'location' => $location, - 'bucket' => $bucket, - 'view' => $view, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_settings resource. - * - * @param string $project - * - * @return string The formatted project_settings resource. - */ - public static function projectSettingsName(string $project): string - { - return self::getPathTemplate('projectSettings')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project_sink - * resource. - * - * @param string $project - * @param string $sink - * - * @return string The formatted project_sink resource. - */ - public static function projectSinkName(string $project, string $sink): string - { - return self::getPathTemplate('projectSink')->render([ - 'project' => $project, - 'sink' => $sink, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a settings - * resource. - * - * @param string $project - * - * @return string The formatted settings resource. - */ - public static function settingsName(string $project): string - { - return self::getPathTemplate('settings')->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 - * - billingAccount: billingAccounts/{billing_account} - * - billingAccountCmekSettings: billingAccounts/{billing_account}/cmekSettings - * - billingAccountExclusion: billingAccounts/{billing_account}/exclusions/{exclusion} - * - billingAccountLocation: billingAccounts/{billing_account}/locations/{location} - * - billingAccountLocationBucket: billingAccounts/{billing_account}/locations/{location}/buckets/{bucket} - * - billingAccountLocationBucketLink: billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link} - * - billingAccountLocationBucketView: billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view} - * - billingAccountSettings: billingAccounts/{billing_account}/settings - * - billingAccountSink: billingAccounts/{billing_account}/sinks/{sink} - * - cmekSettings: projects/{project}/cmekSettings - * - folder: folders/{folder} - * - folderCmekSettings: folders/{folder}/cmekSettings - * - folderExclusion: folders/{folder}/exclusions/{exclusion} - * - folderLocation: folders/{folder}/locations/{location} - * - folderLocationBucket: folders/{folder}/locations/{location}/buckets/{bucket} - * - folderLocationBucketLink: folders/{folder}/locations/{location}/buckets/{bucket}/links/{link} - * - folderLocationBucketView: folders/{folder}/locations/{location}/buckets/{bucket}/views/{view} - * - folderSettings: folders/{folder}/settings - * - folderSink: folders/{folder}/sinks/{sink} - * - link: projects/{project}/locations/{location}/buckets/{bucket}/links/{link} - * - location: projects/{project}/locations/{location} - * - logBucket: projects/{project}/locations/{location}/buckets/{bucket} - * - logExclusion: projects/{project}/exclusions/{exclusion} - * - logSink: projects/{project}/sinks/{sink} - * - logView: projects/{project}/locations/{location}/buckets/{bucket}/views/{view} - * - organization: organizations/{organization} - * - organizationCmekSettings: organizations/{organization}/cmekSettings - * - organizationExclusion: organizations/{organization}/exclusions/{exclusion} - * - organizationLocation: organizations/{organization}/locations/{location} - * - organizationLocationBucket: organizations/{organization}/locations/{location}/buckets/{bucket} - * - organizationLocationBucketLink: organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link} - * - organizationLocationBucketView: organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view} - * - organizationSettings: organizations/{organization}/settings - * - organizationSink: organizations/{organization}/sinks/{sink} - * - project: projects/{project} - * - projectCmekSettings: projects/{project}/cmekSettings - * - projectExclusion: projects/{project}/exclusions/{exclusion} - * - projectLocationBucket: projects/{project}/locations/{location}/buckets/{bucket} - * - projectLocationBucketLink: projects/{project}/locations/{location}/buckets/{bucket}/links/{link} - * - projectLocationBucketView: projects/{project}/locations/{location}/buckets/{bucket}/views/{view} - * - projectSettings: projects/{project}/settings - * - projectSink: projects/{project}/sinks/{sink} - * - settings: projects/{project}/settings - * - * 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 $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 'logging.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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); - } - - /** - * Copies a set of log entries from a log bucket to a Cloud Storage bucket. - * - * The async variant is {@see ConfigServiceV2Client::copyLogEntriesAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/copy_log_entries.php - * - * @param CopyLogEntriesRequest $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 copyLogEntries(CopyLogEntriesRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CopyLogEntries', $request, $callOptions)->wait(); - } - - /** - * Creates a log bucket that can be used to store log entries. After a bucket - * has been created, the bucket's location cannot be changed. - * - * The async variant is {@see ConfigServiceV2Client::createBucketAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/create_bucket.php - * - * @param CreateBucketRequest $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 LogBucket - * - * @throws ApiException Thrown if the API call fails. - */ - public function createBucket(CreateBucketRequest $request, array $callOptions = []): LogBucket - { - return $this->startApiCall('CreateBucket', $request, $callOptions)->wait(); - } - - /** - * Creates a log bucket asynchronously that can be used to store log entries. - * - * After a bucket has been created, the bucket's location cannot be changed. - * - * The async variant is {@see ConfigServiceV2Client::createBucketAsyncAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/create_bucket_async.php - * - * @param CreateBucketRequest $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 createBucketAsync(CreateBucketRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateBucketAsync', $request, $callOptions)->wait(); - } - - /** - * Creates a new exclusion in the _Default sink in a specified parent - * resource. Only log entries belonging to that resource can be excluded. You - * can have up to 10 exclusions in a resource. - * - * The async variant is {@see ConfigServiceV2Client::createExclusionAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/create_exclusion.php - * - * @param CreateExclusionRequest $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 LogExclusion - * - * @throws ApiException Thrown if the API call fails. - */ - public function createExclusion(CreateExclusionRequest $request, array $callOptions = []): LogExclusion - { - return $this->startApiCall('CreateExclusion', $request, $callOptions)->wait(); - } - - /** - * Asynchronously creates a linked dataset in BigQuery which makes it possible - * to use BigQuery to read the logs stored in the log bucket. A log bucket may - * currently only contain one link. - * - * The async variant is {@see ConfigServiceV2Client::createLinkAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/create_link.php - * - * @param CreateLinkRequest $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 createLink(CreateLinkRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateLink', $request, $callOptions)->wait(); - } - - /** - * Creates a sink that exports specified log entries to a destination. The - * export of newly-ingested log entries begins immediately, unless the sink's - * `writer_identity` is not permitted to write to the destination. A sink can - * export log entries only from the resource owning the sink. - * - * The async variant is {@see ConfigServiceV2Client::createSinkAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/create_sink.php - * - * @param CreateSinkRequest $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 LogSink - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSink(CreateSinkRequest $request, array $callOptions = []): LogSink - { - return $this->startApiCall('CreateSink', $request, $callOptions)->wait(); - } - - /** - * Creates a view over log entries in a log bucket. A bucket may contain a - * maximum of 30 views. - * - * The async variant is {@see ConfigServiceV2Client::createViewAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/create_view.php - * - * @param CreateViewRequest $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 LogView - * - * @throws ApiException Thrown if the API call fails. - */ - public function createView(CreateViewRequest $request, array $callOptions = []): LogView - { - return $this->startApiCall('CreateView', $request, $callOptions)->wait(); - } - - /** - * Deletes a log bucket. - * - * Changes the bucket's `lifecycle_state` to the `DELETE_REQUESTED` state. - * After 7 days, the bucket will be purged and all log entries in the bucket - * will be permanently deleted. - * - * The async variant is {@see ConfigServiceV2Client::deleteBucketAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/delete_bucket.php - * - * @param DeleteBucketRequest $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 deleteBucket(DeleteBucketRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteBucket', $request, $callOptions)->wait(); - } - - /** - * Deletes an exclusion in the _Default sink. - * - * The async variant is {@see ConfigServiceV2Client::deleteExclusionAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/delete_exclusion.php - * - * @param DeleteExclusionRequest $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 deleteExclusion(DeleteExclusionRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteExclusion', $request, $callOptions)->wait(); - } - - /** - * Deletes a link. This will also delete the corresponding BigQuery linked - * dataset. - * - * The async variant is {@see ConfigServiceV2Client::deleteLinkAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/delete_link.php - * - * @param DeleteLinkRequest $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 deleteLink(DeleteLinkRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteLink', $request, $callOptions)->wait(); - } - - /** - * Deletes a sink. If the sink has a unique `writer_identity`, then that - * service account is also deleted. - * - * The async variant is {@see ConfigServiceV2Client::deleteSinkAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/delete_sink.php - * - * @param DeleteSinkRequest $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 deleteSink(DeleteSinkRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteSink', $request, $callOptions)->wait(); - } - - /** - * Deletes a view on a log bucket. - * If an `UNAVAILABLE` error is returned, this indicates that system is not in - * a state where it can delete the view. If this occurs, please try again in a - * few minutes. - * - * The async variant is {@see ConfigServiceV2Client::deleteViewAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/delete_view.php - * - * @param DeleteViewRequest $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 deleteView(DeleteViewRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteView', $request, $callOptions)->wait(); - } - - /** - * Gets a log bucket. - * - * The async variant is {@see ConfigServiceV2Client::getBucketAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/get_bucket.php - * - * @param GetBucketRequest $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 LogBucket - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBucket(GetBucketRequest $request, array $callOptions = []): LogBucket - { - return $this->startApiCall('GetBucket', $request, $callOptions)->wait(); - } - - /** - * Gets the Logging CMEK settings for the given resource. - * - * Note: CMEK for the Log Router can be configured for Google Cloud projects, - * folders, organizations and billing accounts. Once configured for an - * organization, it applies to all projects and folders in the Google Cloud - * organization. - * - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * The async variant is {@see ConfigServiceV2Client::getCmekSettingsAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/get_cmek_settings.php - * - * @param GetCmekSettingsRequest $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 CmekSettings - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCmekSettings(GetCmekSettingsRequest $request, array $callOptions = []): CmekSettings - { - return $this->startApiCall('GetCmekSettings', $request, $callOptions)->wait(); - } - - /** - * Gets the description of an exclusion in the _Default sink. - * - * The async variant is {@see ConfigServiceV2Client::getExclusionAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/get_exclusion.php - * - * @param GetExclusionRequest $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 LogExclusion - * - * @throws ApiException Thrown if the API call fails. - */ - public function getExclusion(GetExclusionRequest $request, array $callOptions = []): LogExclusion - { - return $this->startApiCall('GetExclusion', $request, $callOptions)->wait(); - } - - /** - * Gets a link. - * - * The async variant is {@see ConfigServiceV2Client::getLinkAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/get_link.php - * - * @param GetLinkRequest $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 Link - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLink(GetLinkRequest $request, array $callOptions = []): Link - { - return $this->startApiCall('GetLink', $request, $callOptions)->wait(); - } - - /** - * Gets the Log Router settings for the given resource. - * - * Note: Settings for the Log Router can be get for Google Cloud projects, - * folders, organizations and billing accounts. Currently it can only be - * configured for organizations. Once configured for an organization, it - * applies to all projects and folders in the Google Cloud organization. - * - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * The async variant is {@see ConfigServiceV2Client::getSettingsAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/get_settings.php - * - * @param GetSettingsRequest $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 Settings - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSettings(GetSettingsRequest $request, array $callOptions = []): Settings - { - return $this->startApiCall('GetSettings', $request, $callOptions)->wait(); - } - - /** - * Gets a sink. - * - * The async variant is {@see ConfigServiceV2Client::getSinkAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/get_sink.php - * - * @param GetSinkRequest $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 LogSink - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSink(GetSinkRequest $request, array $callOptions = []): LogSink - { - return $this->startApiCall('GetSink', $request, $callOptions)->wait(); - } - - /** - * Gets a view on a log bucket.. - * - * The async variant is {@see ConfigServiceV2Client::getViewAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/get_view.php - * - * @param GetViewRequest $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 LogView - * - * @throws ApiException Thrown if the API call fails. - */ - public function getView(GetViewRequest $request, array $callOptions = []): LogView - { - return $this->startApiCall('GetView', $request, $callOptions)->wait(); - } - - /** - * Lists log buckets. - * - * The async variant is {@see ConfigServiceV2Client::listBucketsAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/list_buckets.php - * - * @param ListBucketsRequest $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 listBuckets(ListBucketsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListBuckets', $request, $callOptions); - } - - /** - * Lists all the exclusions on the _Default sink in a parent resource. - * - * The async variant is {@see ConfigServiceV2Client::listExclusionsAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/list_exclusions.php - * - * @param ListExclusionsRequest $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 listExclusions(ListExclusionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListExclusions', $request, $callOptions); - } - - /** - * Lists links. - * - * The async variant is {@see ConfigServiceV2Client::listLinksAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/list_links.php - * - * @param ListLinksRequest $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 listLinks(ListLinksRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLinks', $request, $callOptions); - } - - /** - * Lists sinks. - * - * The async variant is {@see ConfigServiceV2Client::listSinksAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/list_sinks.php - * - * @param ListSinksRequest $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 listSinks(ListSinksRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSinks', $request, $callOptions); - } - - /** - * Lists views on a log bucket. - * - * The async variant is {@see ConfigServiceV2Client::listViewsAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/list_views.php - * - * @param ListViewsRequest $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 listViews(ListViewsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListViews', $request, $callOptions); - } - - /** - * Undeletes a log bucket. A bucket that has been deleted can be undeleted - * within the grace period of 7 days. - * - * The async variant is {@see ConfigServiceV2Client::undeleteBucketAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/undelete_bucket.php - * - * @param UndeleteBucketRequest $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 undeleteBucket(UndeleteBucketRequest $request, array $callOptions = []): void - { - $this->startApiCall('UndeleteBucket', $request, $callOptions)->wait(); - } - - /** - * Updates a log bucket. - * - * If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then - * `FAILED_PRECONDITION` will be returned. - * - * After a bucket has been created, the bucket's location cannot be changed. - * - * The async variant is {@see ConfigServiceV2Client::updateBucketAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/update_bucket.php - * - * @param UpdateBucketRequest $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 LogBucket - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateBucket(UpdateBucketRequest $request, array $callOptions = []): LogBucket - { - return $this->startApiCall('UpdateBucket', $request, $callOptions)->wait(); - } - - /** - * Updates a log bucket asynchronously. - * - * If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then - * `FAILED_PRECONDITION` will be returned. - * - * After a bucket has been created, the bucket's location cannot be changed. - * - * The async variant is {@see ConfigServiceV2Client::updateBucketAsyncAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/update_bucket_async.php - * - * @param UpdateBucketRequest $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 updateBucketAsync(UpdateBucketRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateBucketAsync', $request, $callOptions)->wait(); - } - - /** - * Updates the Log Router CMEK settings for the given resource. - * - * Note: CMEK for the Log Router can currently only be configured for Google - * Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * - * [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] - * will fail if 1) `kms_key_name` is invalid, or 2) the associated service - * account does not have the required - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or - * 3) access to the key is disabled. - * - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * The async variant is {@see ConfigServiceV2Client::updateCmekSettingsAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/update_cmek_settings.php - * - * @param UpdateCmekSettingsRequest $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 CmekSettings - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateCmekSettings(UpdateCmekSettingsRequest $request, array $callOptions = []): CmekSettings - { - return $this->startApiCall('UpdateCmekSettings', $request, $callOptions)->wait(); - } - - /** - * Changes one or more properties of an existing exclusion in the _Default - * sink. - * - * The async variant is {@see ConfigServiceV2Client::updateExclusionAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/update_exclusion.php - * - * @param UpdateExclusionRequest $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 LogExclusion - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateExclusion(UpdateExclusionRequest $request, array $callOptions = []): LogExclusion - { - return $this->startApiCall('UpdateExclusion', $request, $callOptions)->wait(); - } - - /** - * Updates the Log Router settings for the given resource. - * - * Note: Settings for the Log Router can currently only be configured for - * Google Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * - * [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings] - * will fail if 1) `kms_key_name` is invalid, or 2) the associated service - * account does not have the required - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or - * 3) access to the key is disabled. 4) `location_id` is not supported by - * Logging. 5) `location_id` violate OrgPolicy. - * - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * The async variant is {@see ConfigServiceV2Client::updateSettingsAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/update_settings.php - * - * @param UpdateSettingsRequest $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 Settings - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSettings(UpdateSettingsRequest $request, array $callOptions = []): Settings - { - return $this->startApiCall('UpdateSettings', $request, $callOptions)->wait(); - } - - /** - * Updates a sink. This method replaces the following fields in the existing - * sink with values from the new sink: `destination`, and `filter`. - * - * The updated sink might also have a new `writer_identity`; see the - * `unique_writer_identity` field. - * - * The async variant is {@see ConfigServiceV2Client::updateSinkAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/update_sink.php - * - * @param UpdateSinkRequest $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 LogSink - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSink(UpdateSinkRequest $request, array $callOptions = []): LogSink - { - return $this->startApiCall('UpdateSink', $request, $callOptions)->wait(); - } - - /** - * Updates a view on a log bucket. This method replaces the following fields - * in the existing view with values from the new view: `filter`. - * If an `UNAVAILABLE` error is returned, this indicates that system is not in - * a state where it can update the view. If this occurs, please try again in a - * few minutes. - * - * The async variant is {@see ConfigServiceV2Client::updateViewAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/update_view.php - * - * @param UpdateViewRequest $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 LogView - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateView(UpdateViewRequest $request, array $callOptions = []): LogView - { - return $this->startApiCall('UpdateView', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Logging/v2/src/V2/Client/LoggingServiceV2Client.php b/owl-bot-staging/Logging/v2/src/V2/Client/LoggingServiceV2Client.php deleted file mode 100644 index f4e3920be68f..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/Client/LoggingServiceV2Client.php +++ /dev/null @@ -1,529 +0,0 @@ - deleteLogAsync(DeleteLogRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLogEntriesAsync(ListLogEntriesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLogsAsync(ListLogsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listMonitoredResourceDescriptorsAsync(ListMonitoredResourceDescriptorsRequest $request, array $optionalArgs = []) - * @method PromiseInterface writeLogEntriesAsync(WriteLogEntriesRequest $request, array $optionalArgs = []) - */ -final class LoggingServiceV2Client -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.logging.v2.LoggingServiceV2'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'logging.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'logging.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/cloud-platform.read-only', - 'https://www.googleapis.com/auth/logging.admin', - 'https://www.googleapis.com/auth/logging.read', - 'https://www.googleapis.com/auth/logging.write', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/logging_service_v2_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/logging_service_v2_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/logging_service_v2_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/logging_service_v2_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account resource. - * - * @param string $billingAccount - * - * @return string The formatted billing_account resource. - */ - public static function billingAccountName(string $billingAccount): string - { - return self::getPathTemplate('billingAccount')->render([ - 'billing_account' => $billingAccount, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_log resource. - * - * @param string $billingAccount - * @param string $log - * - * @return string The formatted billing_account_log resource. - */ - public static function billingAccountLogName(string $billingAccount, string $log): string - { - return self::getPathTemplate('billingAccountLog')->render([ - 'billing_account' => $billingAccount, - 'log' => $log, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a folder - * resource. - * - * @param string $folder - * - * @return string The formatted folder resource. - */ - public static function folderName(string $folder): string - { - return self::getPathTemplate('folder')->render([ - 'folder' => $folder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a folder_log - * resource. - * - * @param string $folder - * @param string $log - * - * @return string The formatted folder_log resource. - */ - public static function folderLogName(string $folder, string $log): string - { - return self::getPathTemplate('folderLog')->render([ - 'folder' => $folder, - 'log' => $log, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a log - * resource. - * - * @param string $project - * @param string $log - * - * @return string The formatted log resource. - */ - public static function logName(string $project, string $log): string - { - return self::getPathTemplate('log')->render([ - 'project' => $project, - 'log' => $log, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - */ - public static function organizationName(string $organization): string - { - return self::getPathTemplate('organization')->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_log resource. - * - * @param string $organization - * @param string $log - * - * @return string The formatted organization_log resource. - */ - public static function organizationLogName(string $organization, string $log): string - { - return self::getPathTemplate('organizationLog')->render([ - 'organization' => $organization, - 'log' => $log, - ]); - } - - /** - * 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_log - * resource. - * - * @param string $project - * @param string $log - * - * @return string The formatted project_log resource. - */ - public static function projectLogName(string $project, string $log): string - { - return self::getPathTemplate('projectLog')->render([ - 'project' => $project, - 'log' => $log, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - billingAccount: billingAccounts/{billing_account} - * - billingAccountLog: billingAccounts/{billing_account}/logs/{log} - * - folder: folders/{folder} - * - folderLog: folders/{folder}/logs/{log} - * - log: projects/{project}/logs/{log} - * - organization: organizations/{organization} - * - organizationLog: organizations/{organization}/logs/{log} - * - project: projects/{project} - * - projectLog: projects/{project}/logs/{log} - * - * 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 $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 'logging.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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); - } - - /** - * Deletes all the log entries in a log for the _Default Log Bucket. The log - * reappears if it receives new entries. Log entries written shortly before - * the delete operation might not be deleted. Entries received after the - * delete operation with a timestamp before the operation will be deleted. - * - * The async variant is {@see LoggingServiceV2Client::deleteLogAsync()} . - * - * @example samples/V2/LoggingServiceV2Client/delete_log.php - * - * @param DeleteLogRequest $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 deleteLog(DeleteLogRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteLog', $request, $callOptions)->wait(); - } - - /** - * Lists log entries. Use this method to retrieve log entries that originated - * from a project/folder/organization/billing account. For ways to export log - * entries, see [Exporting - * Logs](https://cloud.google.com/logging/docs/export). - * - * The async variant is {@see LoggingServiceV2Client::listLogEntriesAsync()} . - * - * @example samples/V2/LoggingServiceV2Client/list_log_entries.php - * - * @param ListLogEntriesRequest $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 listLogEntries(ListLogEntriesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLogEntries', $request, $callOptions); - } - - /** - * Lists the logs in projects, organizations, folders, or billing accounts. - * Only logs that have entries are listed. - * - * The async variant is {@see LoggingServiceV2Client::listLogsAsync()} . - * - * @example samples/V2/LoggingServiceV2Client/list_logs.php - * - * @param ListLogsRequest $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 listLogs(ListLogsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLogs', $request, $callOptions); - } - - /** - * Lists the descriptors for monitored resource types used by Logging. - * - * The async variant is - * {@see LoggingServiceV2Client::listMonitoredResourceDescriptorsAsync()} . - * - * @example samples/V2/LoggingServiceV2Client/list_monitored_resource_descriptors.php - * - * @param ListMonitoredResourceDescriptorsRequest $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 listMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListMonitoredResourceDescriptors', $request, $callOptions); - } - - /** - * Streaming read of log entries as they are ingested. Until the stream is - * terminated, it will continue reading logs. - * - * @example samples/V2/LoggingServiceV2Client/tail_log_entries.php - * - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return BidiStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function tailLogEntries(array $callOptions = []): BidiStream - { - return $this->startApiCall('TailLogEntries', null, $callOptions); - } - - /** - * Writes log entries to Logging. This API method is the - * only way to send log entries to Logging. This method - * is used, directly or indirectly, by the Logging agent - * (fluentd) and all logging libraries configured to use Logging. - * A single request may contain log entries for a maximum of 1000 - * different resources (projects, organizations, billing accounts or - * folders) - * - * The async variant is {@see LoggingServiceV2Client::writeLogEntriesAsync()} . - * - * @example samples/V2/LoggingServiceV2Client/write_log_entries.php - * - * @param WriteLogEntriesRequest $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 WriteLogEntriesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function writeLogEntries(WriteLogEntriesRequest $request, array $callOptions = []): WriteLogEntriesResponse - { - return $this->startApiCall('WriteLogEntries', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Logging/v2/src/V2/Client/MetricsServiceV2Client.php b/owl-bot-staging/Logging/v2/src/V2/Client/MetricsServiceV2Client.php deleted file mode 100644 index 2cea48220451..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/Client/MetricsServiceV2Client.php +++ /dev/null @@ -1,372 +0,0 @@ - createLogMetricAsync(CreateLogMetricRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteLogMetricAsync(DeleteLogMetricRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLogMetricAsync(GetLogMetricRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLogMetricsAsync(ListLogMetricsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateLogMetricAsync(UpdateLogMetricRequest $request, array $optionalArgs = []) - */ -final class MetricsServiceV2Client -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.logging.v2.MetricsServiceV2'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'logging.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'logging.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/cloud-platform.read-only', - 'https://www.googleapis.com/auth/logging.admin', - 'https://www.googleapis.com/auth/logging.read', - 'https://www.googleapis.com/auth/logging.write', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/metrics_service_v2_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/metrics_service_v2_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/metrics_service_v2_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/metrics_service_v2_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a log_metric - * resource. - * - * @param string $project - * @param string $metric - * - * @return string The formatted log_metric resource. - */ - public static function logMetricName(string $project, string $metric): string - { - return self::getPathTemplate('logMetric')->render([ - 'project' => $project, - 'metric' => $metric, - ]); - } - - /** - * 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, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - logMetric: projects/{project}/metrics/{metric} - * - project: projects/{project} - * - * 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 $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 'logging.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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 logs-based metric. - * - * The async variant is {@see MetricsServiceV2Client::createLogMetricAsync()} . - * - * @example samples/V2/MetricsServiceV2Client/create_log_metric.php - * - * @param CreateLogMetricRequest $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 LogMetric - * - * @throws ApiException Thrown if the API call fails. - */ - public function createLogMetric(CreateLogMetricRequest $request, array $callOptions = []): LogMetric - { - return $this->startApiCall('CreateLogMetric', $request, $callOptions)->wait(); - } - - /** - * Deletes a logs-based metric. - * - * The async variant is {@see MetricsServiceV2Client::deleteLogMetricAsync()} . - * - * @example samples/V2/MetricsServiceV2Client/delete_log_metric.php - * - * @param DeleteLogMetricRequest $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 deleteLogMetric(DeleteLogMetricRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteLogMetric', $request, $callOptions)->wait(); - } - - /** - * Gets a logs-based metric. - * - * The async variant is {@see MetricsServiceV2Client::getLogMetricAsync()} . - * - * @example samples/V2/MetricsServiceV2Client/get_log_metric.php - * - * @param GetLogMetricRequest $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 LogMetric - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLogMetric(GetLogMetricRequest $request, array $callOptions = []): LogMetric - { - return $this->startApiCall('GetLogMetric', $request, $callOptions)->wait(); - } - - /** - * Lists logs-based metrics. - * - * The async variant is {@see MetricsServiceV2Client::listLogMetricsAsync()} . - * - * @example samples/V2/MetricsServiceV2Client/list_log_metrics.php - * - * @param ListLogMetricsRequest $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 listLogMetrics(ListLogMetricsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLogMetrics', $request, $callOptions); - } - - /** - * Creates or updates a logs-based metric. - * - * The async variant is {@see MetricsServiceV2Client::updateLogMetricAsync()} . - * - * @example samples/V2/MetricsServiceV2Client/update_log_metric.php - * - * @param UpdateLogMetricRequest $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 LogMetric - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateLogMetric(UpdateLogMetricRequest $request, array $callOptions = []): LogMetric - { - return $this->startApiCall('UpdateLogMetric', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Logging/v2/src/V2/ConfigServiceV2Client.php b/owl-bot-staging/Logging/v2/src/V2/ConfigServiceV2Client.php deleted file mode 100644 index 3a9c13f686c7..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/ConfigServiceV2Client.php +++ /dev/null @@ -1,34 +0,0 @@ -copyLogEntries($name, $destination); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $configServiceV2Client->copyLogEntries($name, $destination); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $configServiceV2Client->resumeOperation($operationName, 'copyLogEntries'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\Logging\V2\Client\ConfigServiceV2Client}. - */ -class ConfigServiceV2GapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.logging.v2.ConfigServiceV2'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'logging.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'logging.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - 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/cloud-platform.read-only', - 'https://www.googleapis.com/auth/logging.admin', - 'https://www.googleapis.com/auth/logging.read', - ]; - - private static $billingAccountNameTemplate; - - private static $billingAccountCmekSettingsNameTemplate; - - private static $billingAccountExclusionNameTemplate; - - private static $billingAccountLocationNameTemplate; - - private static $billingAccountLocationBucketNameTemplate; - - private static $billingAccountLocationBucketLinkNameTemplate; - - private static $billingAccountLocationBucketViewNameTemplate; - - private static $billingAccountSettingsNameTemplate; - - private static $billingAccountSinkNameTemplate; - - private static $cmekSettingsNameTemplate; - - private static $folderNameTemplate; - - private static $folderCmekSettingsNameTemplate; - - private static $folderExclusionNameTemplate; - - private static $folderLocationNameTemplate; - - private static $folderLocationBucketNameTemplate; - - private static $folderLocationBucketLinkNameTemplate; - - private static $folderLocationBucketViewNameTemplate; - - private static $folderSettingsNameTemplate; - - private static $folderSinkNameTemplate; - - private static $linkNameTemplate; - - private static $locationNameTemplate; - - private static $logBucketNameTemplate; - - private static $logExclusionNameTemplate; - - private static $logSinkNameTemplate; - - private static $logViewNameTemplate; - - private static $organizationNameTemplate; - - private static $organizationCmekSettingsNameTemplate; - - private static $organizationExclusionNameTemplate; - - private static $organizationLocationNameTemplate; - - private static $organizationLocationBucketNameTemplate; - - private static $organizationLocationBucketLinkNameTemplate; - - private static $organizationLocationBucketViewNameTemplate; - - private static $organizationSettingsNameTemplate; - - private static $organizationSinkNameTemplate; - - private static $projectNameTemplate; - - private static $projectCmekSettingsNameTemplate; - - private static $projectExclusionNameTemplate; - - private static $projectLocationBucketNameTemplate; - - private static $projectLocationBucketLinkNameTemplate; - - private static $projectLocationBucketViewNameTemplate; - - private static $projectSettingsNameTemplate; - - private static $projectSinkNameTemplate; - - private static $settingsNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/config_service_v2_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/config_service_v2_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/config_service_v2_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/config_service_v2_rest_client_config.php', - ], - ], - ]; - } - - private static function getBillingAccountNameTemplate() - { - if (self::$billingAccountNameTemplate == null) { - self::$billingAccountNameTemplate = new PathTemplate('billingAccounts/{billing_account}'); - } - - return self::$billingAccountNameTemplate; - } - - private static function getBillingAccountCmekSettingsNameTemplate() - { - if (self::$billingAccountCmekSettingsNameTemplate == null) { - self::$billingAccountCmekSettingsNameTemplate = new PathTemplate('billingAccounts/{billing_account}/cmekSettings'); - } - - return self::$billingAccountCmekSettingsNameTemplate; - } - - private static function getBillingAccountExclusionNameTemplate() - { - if (self::$billingAccountExclusionNameTemplate == null) { - self::$billingAccountExclusionNameTemplate = new PathTemplate('billingAccounts/{billing_account}/exclusions/{exclusion}'); - } - - return self::$billingAccountExclusionNameTemplate; - } - - private static function getBillingAccountLocationNameTemplate() - { - if (self::$billingAccountLocationNameTemplate == null) { - self::$billingAccountLocationNameTemplate = new PathTemplate('billingAccounts/{billing_account}/locations/{location}'); - } - - return self::$billingAccountLocationNameTemplate; - } - - private static function getBillingAccountLocationBucketNameTemplate() - { - if (self::$billingAccountLocationBucketNameTemplate == null) { - self::$billingAccountLocationBucketNameTemplate = new PathTemplate('billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}'); - } - - return self::$billingAccountLocationBucketNameTemplate; - } - - private static function getBillingAccountLocationBucketLinkNameTemplate() - { - if (self::$billingAccountLocationBucketLinkNameTemplate == null) { - self::$billingAccountLocationBucketLinkNameTemplate = new PathTemplate('billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link}'); - } - - return self::$billingAccountLocationBucketLinkNameTemplate; - } - - private static function getBillingAccountLocationBucketViewNameTemplate() - { - if (self::$billingAccountLocationBucketViewNameTemplate == null) { - self::$billingAccountLocationBucketViewNameTemplate = new PathTemplate('billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}'); - } - - return self::$billingAccountLocationBucketViewNameTemplate; - } - - private static function getBillingAccountSettingsNameTemplate() - { - if (self::$billingAccountSettingsNameTemplate == null) { - self::$billingAccountSettingsNameTemplate = new PathTemplate('billingAccounts/{billing_account}/settings'); - } - - return self::$billingAccountSettingsNameTemplate; - } - - private static function getBillingAccountSinkNameTemplate() - { - if (self::$billingAccountSinkNameTemplate == null) { - self::$billingAccountSinkNameTemplate = new PathTemplate('billingAccounts/{billing_account}/sinks/{sink}'); - } - - return self::$billingAccountSinkNameTemplate; - } - - private static function getCmekSettingsNameTemplate() - { - if (self::$cmekSettingsNameTemplate == null) { - self::$cmekSettingsNameTemplate = new PathTemplate('projects/{project}/cmekSettings'); - } - - return self::$cmekSettingsNameTemplate; - } - - private static function getFolderNameTemplate() - { - if (self::$folderNameTemplate == null) { - self::$folderNameTemplate = new PathTemplate('folders/{folder}'); - } - - return self::$folderNameTemplate; - } - - private static function getFolderCmekSettingsNameTemplate() - { - if (self::$folderCmekSettingsNameTemplate == null) { - self::$folderCmekSettingsNameTemplate = new PathTemplate('folders/{folder}/cmekSettings'); - } - - return self::$folderCmekSettingsNameTemplate; - } - - private static function getFolderExclusionNameTemplate() - { - if (self::$folderExclusionNameTemplate == null) { - self::$folderExclusionNameTemplate = new PathTemplate('folders/{folder}/exclusions/{exclusion}'); - } - - return self::$folderExclusionNameTemplate; - } - - private static function getFolderLocationNameTemplate() - { - if (self::$folderLocationNameTemplate == null) { - self::$folderLocationNameTemplate = new PathTemplate('folders/{folder}/locations/{location}'); - } - - return self::$folderLocationNameTemplate; - } - - private static function getFolderLocationBucketNameTemplate() - { - if (self::$folderLocationBucketNameTemplate == null) { - self::$folderLocationBucketNameTemplate = new PathTemplate('folders/{folder}/locations/{location}/buckets/{bucket}'); - } - - return self::$folderLocationBucketNameTemplate; - } - - private static function getFolderLocationBucketLinkNameTemplate() - { - if (self::$folderLocationBucketLinkNameTemplate == null) { - self::$folderLocationBucketLinkNameTemplate = new PathTemplate('folders/{folder}/locations/{location}/buckets/{bucket}/links/{link}'); - } - - return self::$folderLocationBucketLinkNameTemplate; - } - - private static function getFolderLocationBucketViewNameTemplate() - { - if (self::$folderLocationBucketViewNameTemplate == null) { - self::$folderLocationBucketViewNameTemplate = new PathTemplate('folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}'); - } - - return self::$folderLocationBucketViewNameTemplate; - } - - private static function getFolderSettingsNameTemplate() - { - if (self::$folderSettingsNameTemplate == null) { - self::$folderSettingsNameTemplate = new PathTemplate('folders/{folder}/settings'); - } - - return self::$folderSettingsNameTemplate; - } - - private static function getFolderSinkNameTemplate() - { - if (self::$folderSinkNameTemplate == null) { - self::$folderSinkNameTemplate = new PathTemplate('folders/{folder}/sinks/{sink}'); - } - - return self::$folderSinkNameTemplate; - } - - private static function getLinkNameTemplate() - { - if (self::$linkNameTemplate == null) { - self::$linkNameTemplate = new PathTemplate('projects/{project}/locations/{location}/buckets/{bucket}/links/{link}'); - } - - return self::$linkNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getLogBucketNameTemplate() - { - if (self::$logBucketNameTemplate == null) { - self::$logBucketNameTemplate = new PathTemplate('projects/{project}/locations/{location}/buckets/{bucket}'); - } - - return self::$logBucketNameTemplate; - } - - private static function getLogExclusionNameTemplate() - { - if (self::$logExclusionNameTemplate == null) { - self::$logExclusionNameTemplate = new PathTemplate('projects/{project}/exclusions/{exclusion}'); - } - - return self::$logExclusionNameTemplate; - } - - private static function getLogSinkNameTemplate() - { - if (self::$logSinkNameTemplate == null) { - self::$logSinkNameTemplate = new PathTemplate('projects/{project}/sinks/{sink}'); - } - - return self::$logSinkNameTemplate; - } - - private static function getLogViewNameTemplate() - { - if (self::$logViewNameTemplate == null) { - self::$logViewNameTemplate = new PathTemplate('projects/{project}/locations/{location}/buckets/{bucket}/views/{view}'); - } - - return self::$logViewNameTemplate; - } - - private static function getOrganizationNameTemplate() - { - if (self::$organizationNameTemplate == null) { - self::$organizationNameTemplate = new PathTemplate('organizations/{organization}'); - } - - return self::$organizationNameTemplate; - } - - private static function getOrganizationCmekSettingsNameTemplate() - { - if (self::$organizationCmekSettingsNameTemplate == null) { - self::$organizationCmekSettingsNameTemplate = new PathTemplate('organizations/{organization}/cmekSettings'); - } - - return self::$organizationCmekSettingsNameTemplate; - } - - private static function getOrganizationExclusionNameTemplate() - { - if (self::$organizationExclusionNameTemplate == null) { - self::$organizationExclusionNameTemplate = new PathTemplate('organizations/{organization}/exclusions/{exclusion}'); - } - - return self::$organizationExclusionNameTemplate; - } - - private static function getOrganizationLocationNameTemplate() - { - if (self::$organizationLocationNameTemplate == null) { - self::$organizationLocationNameTemplate = new PathTemplate('organizations/{organization}/locations/{location}'); - } - - return self::$organizationLocationNameTemplate; - } - - private static function getOrganizationLocationBucketNameTemplate() - { - if (self::$organizationLocationBucketNameTemplate == null) { - self::$organizationLocationBucketNameTemplate = new PathTemplate('organizations/{organization}/locations/{location}/buckets/{bucket}'); - } - - return self::$organizationLocationBucketNameTemplate; - } - - private static function getOrganizationLocationBucketLinkNameTemplate() - { - if (self::$organizationLocationBucketLinkNameTemplate == null) { - self::$organizationLocationBucketLinkNameTemplate = new PathTemplate('organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link}'); - } - - return self::$organizationLocationBucketLinkNameTemplate; - } - - private static function getOrganizationLocationBucketViewNameTemplate() - { - if (self::$organizationLocationBucketViewNameTemplate == null) { - self::$organizationLocationBucketViewNameTemplate = new PathTemplate('organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}'); - } - - return self::$organizationLocationBucketViewNameTemplate; - } - - private static function getOrganizationSettingsNameTemplate() - { - if (self::$organizationSettingsNameTemplate == null) { - self::$organizationSettingsNameTemplate = new PathTemplate('organizations/{organization}/settings'); - } - - return self::$organizationSettingsNameTemplate; - } - - private static function getOrganizationSinkNameTemplate() - { - if (self::$organizationSinkNameTemplate == null) { - self::$organizationSinkNameTemplate = new PathTemplate('organizations/{organization}/sinks/{sink}'); - } - - return self::$organizationSinkNameTemplate; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getProjectCmekSettingsNameTemplate() - { - if (self::$projectCmekSettingsNameTemplate == null) { - self::$projectCmekSettingsNameTemplate = new PathTemplate('projects/{project}/cmekSettings'); - } - - return self::$projectCmekSettingsNameTemplate; - } - - private static function getProjectExclusionNameTemplate() - { - if (self::$projectExclusionNameTemplate == null) { - self::$projectExclusionNameTemplate = new PathTemplate('projects/{project}/exclusions/{exclusion}'); - } - - return self::$projectExclusionNameTemplate; - } - - private static function getProjectLocationBucketNameTemplate() - { - if (self::$projectLocationBucketNameTemplate == null) { - self::$projectLocationBucketNameTemplate = new PathTemplate('projects/{project}/locations/{location}/buckets/{bucket}'); - } - - return self::$projectLocationBucketNameTemplate; - } - - private static function getProjectLocationBucketLinkNameTemplate() - { - if (self::$projectLocationBucketLinkNameTemplate == null) { - self::$projectLocationBucketLinkNameTemplate = new PathTemplate('projects/{project}/locations/{location}/buckets/{bucket}/links/{link}'); - } - - return self::$projectLocationBucketLinkNameTemplate; - } - - private static function getProjectLocationBucketViewNameTemplate() - { - if (self::$projectLocationBucketViewNameTemplate == null) { - self::$projectLocationBucketViewNameTemplate = new PathTemplate('projects/{project}/locations/{location}/buckets/{bucket}/views/{view}'); - } - - return self::$projectLocationBucketViewNameTemplate; - } - - private static function getProjectSettingsNameTemplate() - { - if (self::$projectSettingsNameTemplate == null) { - self::$projectSettingsNameTemplate = new PathTemplate('projects/{project}/settings'); - } - - return self::$projectSettingsNameTemplate; - } - - private static function getProjectSinkNameTemplate() - { - if (self::$projectSinkNameTemplate == null) { - self::$projectSinkNameTemplate = new PathTemplate('projects/{project}/sinks/{sink}'); - } - - return self::$projectSinkNameTemplate; - } - - private static function getSettingsNameTemplate() - { - if (self::$settingsNameTemplate == null) { - self::$settingsNameTemplate = new PathTemplate('projects/{project}/settings'); - } - - return self::$settingsNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'billingAccount' => self::getBillingAccountNameTemplate(), - 'billingAccountCmekSettings' => self::getBillingAccountCmekSettingsNameTemplate(), - 'billingAccountExclusion' => self::getBillingAccountExclusionNameTemplate(), - 'billingAccountLocation' => self::getBillingAccountLocationNameTemplate(), - 'billingAccountLocationBucket' => self::getBillingAccountLocationBucketNameTemplate(), - 'billingAccountLocationBucketLink' => self::getBillingAccountLocationBucketLinkNameTemplate(), - 'billingAccountLocationBucketView' => self::getBillingAccountLocationBucketViewNameTemplate(), - 'billingAccountSettings' => self::getBillingAccountSettingsNameTemplate(), - 'billingAccountSink' => self::getBillingAccountSinkNameTemplate(), - 'cmekSettings' => self::getCmekSettingsNameTemplate(), - 'folder' => self::getFolderNameTemplate(), - 'folderCmekSettings' => self::getFolderCmekSettingsNameTemplate(), - 'folderExclusion' => self::getFolderExclusionNameTemplate(), - 'folderLocation' => self::getFolderLocationNameTemplate(), - 'folderLocationBucket' => self::getFolderLocationBucketNameTemplate(), - 'folderLocationBucketLink' => self::getFolderLocationBucketLinkNameTemplate(), - 'folderLocationBucketView' => self::getFolderLocationBucketViewNameTemplate(), - 'folderSettings' => self::getFolderSettingsNameTemplate(), - 'folderSink' => self::getFolderSinkNameTemplate(), - 'link' => self::getLinkNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'logBucket' => self::getLogBucketNameTemplate(), - 'logExclusion' => self::getLogExclusionNameTemplate(), - 'logSink' => self::getLogSinkNameTemplate(), - 'logView' => self::getLogViewNameTemplate(), - 'organization' => self::getOrganizationNameTemplate(), - 'organizationCmekSettings' => self::getOrganizationCmekSettingsNameTemplate(), - 'organizationExclusion' => self::getOrganizationExclusionNameTemplate(), - 'organizationLocation' => self::getOrganizationLocationNameTemplate(), - 'organizationLocationBucket' => self::getOrganizationLocationBucketNameTemplate(), - 'organizationLocationBucketLink' => self::getOrganizationLocationBucketLinkNameTemplate(), - 'organizationLocationBucketView' => self::getOrganizationLocationBucketViewNameTemplate(), - 'organizationSettings' => self::getOrganizationSettingsNameTemplate(), - 'organizationSink' => self::getOrganizationSinkNameTemplate(), - 'project' => self::getProjectNameTemplate(), - 'projectCmekSettings' => self::getProjectCmekSettingsNameTemplate(), - 'projectExclusion' => self::getProjectExclusionNameTemplate(), - 'projectLocationBucket' => self::getProjectLocationBucketNameTemplate(), - 'projectLocationBucketLink' => self::getProjectLocationBucketLinkNameTemplate(), - 'projectLocationBucketView' => self::getProjectLocationBucketViewNameTemplate(), - 'projectSettings' => self::getProjectSettingsNameTemplate(), - 'projectSink' => self::getProjectSinkNameTemplate(), - 'settings' => self::getSettingsNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account resource. - * - * @param string $billingAccount - * - * @return string The formatted billing_account resource. - */ - public static function billingAccountName($billingAccount) - { - return self::getBillingAccountNameTemplate()->render([ - 'billing_account' => $billingAccount, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_cmekSettings resource. - * - * @param string $billingAccount - * - * @return string The formatted billing_account_cmekSettings resource. - */ - public static function billingAccountCmekSettingsName($billingAccount) - { - return self::getBillingAccountCmekSettingsNameTemplate()->render([ - 'billing_account' => $billingAccount, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_exclusion resource. - * - * @param string $billingAccount - * @param string $exclusion - * - * @return string The formatted billing_account_exclusion resource. - */ - public static function billingAccountExclusionName($billingAccount, $exclusion) - { - return self::getBillingAccountExclusionNameTemplate()->render([ - 'billing_account' => $billingAccount, - 'exclusion' => $exclusion, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_location resource. - * - * @param string $billingAccount - * @param string $location - * - * @return string The formatted billing_account_location resource. - */ - public static function billingAccountLocationName($billingAccount, $location) - { - return self::getBillingAccountLocationNameTemplate()->render([ - 'billing_account' => $billingAccount, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_location_bucket resource. - * - * @param string $billingAccount - * @param string $location - * @param string $bucket - * - * @return string The formatted billing_account_location_bucket resource. - */ - public static function billingAccountLocationBucketName($billingAccount, $location, $bucket) - { - return self::getBillingAccountLocationBucketNameTemplate()->render([ - 'billing_account' => $billingAccount, - 'location' => $location, - 'bucket' => $bucket, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_location_bucket_link resource. - * - * @param string $billingAccount - * @param string $location - * @param string $bucket - * @param string $link - * - * @return string The formatted billing_account_location_bucket_link resource. - */ - public static function billingAccountLocationBucketLinkName($billingAccount, $location, $bucket, $link) - { - return self::getBillingAccountLocationBucketLinkNameTemplate()->render([ - 'billing_account' => $billingAccount, - 'location' => $location, - 'bucket' => $bucket, - 'link' => $link, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_location_bucket_view resource. - * - * @param string $billingAccount - * @param string $location - * @param string $bucket - * @param string $view - * - * @return string The formatted billing_account_location_bucket_view resource. - */ - public static function billingAccountLocationBucketViewName($billingAccount, $location, $bucket, $view) - { - return self::getBillingAccountLocationBucketViewNameTemplate()->render([ - 'billing_account' => $billingAccount, - 'location' => $location, - 'bucket' => $bucket, - 'view' => $view, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_settings resource. - * - * @param string $billingAccount - * - * @return string The formatted billing_account_settings resource. - */ - public static function billingAccountSettingsName($billingAccount) - { - return self::getBillingAccountSettingsNameTemplate()->render([ - 'billing_account' => $billingAccount, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_sink resource. - * - * @param string $billingAccount - * @param string $sink - * - * @return string The formatted billing_account_sink resource. - */ - public static function billingAccountSinkName($billingAccount, $sink) - { - return self::getBillingAccountSinkNameTemplate()->render([ - 'billing_account' => $billingAccount, - 'sink' => $sink, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * cmek_settings resource. - * - * @param string $project - * - * @return string The formatted cmek_settings resource. - */ - public static function cmekSettingsName($project) - { - return self::getCmekSettingsNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a folder - * resource. - * - * @param string $folder - * - * @return string The formatted folder resource. - */ - public static function folderName($folder) - { - return self::getFolderNameTemplate()->render([ - 'folder' => $folder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_cmekSettings resource. - * - * @param string $folder - * - * @return string The formatted folder_cmekSettings resource. - */ - public static function folderCmekSettingsName($folder) - { - return self::getFolderCmekSettingsNameTemplate()->render([ - 'folder' => $folder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_exclusion resource. - * - * @param string $folder - * @param string $exclusion - * - * @return string The formatted folder_exclusion resource. - */ - public static function folderExclusionName($folder, $exclusion) - { - return self::getFolderExclusionNameTemplate()->render([ - 'folder' => $folder, - 'exclusion' => $exclusion, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location resource. - * - * @param string $folder - * @param string $location - * - * @return string The formatted folder_location resource. - */ - public static function folderLocationName($folder, $location) - { - return self::getFolderLocationNameTemplate()->render([ - 'folder' => $folder, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_bucket resource. - * - * @param string $folder - * @param string $location - * @param string $bucket - * - * @return string The formatted folder_location_bucket resource. - */ - public static function folderLocationBucketName($folder, $location, $bucket) - { - return self::getFolderLocationBucketNameTemplate()->render([ - 'folder' => $folder, - 'location' => $location, - 'bucket' => $bucket, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_bucket_link resource. - * - * @param string $folder - * @param string $location - * @param string $bucket - * @param string $link - * - * @return string The formatted folder_location_bucket_link resource. - */ - public static function folderLocationBucketLinkName($folder, $location, $bucket, $link) - { - return self::getFolderLocationBucketLinkNameTemplate()->render([ - 'folder' => $folder, - 'location' => $location, - 'bucket' => $bucket, - 'link' => $link, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_bucket_view resource. - * - * @param string $folder - * @param string $location - * @param string $bucket - * @param string $view - * - * @return string The formatted folder_location_bucket_view resource. - */ - public static function folderLocationBucketViewName($folder, $location, $bucket, $view) - { - return self::getFolderLocationBucketViewNameTemplate()->render([ - 'folder' => $folder, - 'location' => $location, - 'bucket' => $bucket, - 'view' => $view, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_settings resource. - * - * @param string $folder - * - * @return string The formatted folder_settings resource. - */ - public static function folderSettingsName($folder) - { - return self::getFolderSettingsNameTemplate()->render([ - 'folder' => $folder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a folder_sink - * resource. - * - * @param string $folder - * @param string $sink - * - * @return string The formatted folder_sink resource. - */ - public static function folderSinkName($folder, $sink) - { - return self::getFolderSinkNameTemplate()->render([ - 'folder' => $folder, - 'sink' => $sink, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a link - * resource. - * - * @param string $project - * @param string $location - * @param string $bucket - * @param string $link - * - * @return string The formatted link resource. - */ - public static function linkName($project, $location, $bucket, $link) - { - return self::getLinkNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'bucket' => $bucket, - 'link' => $link, - ]); - } - - /** - * 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($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a log_bucket - * resource. - * - * @param string $project - * @param string $location - * @param string $bucket - * - * @return string The formatted log_bucket resource. - */ - public static function logBucketName($project, $location, $bucket) - { - return self::getLogBucketNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'bucket' => $bucket, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * log_exclusion resource. - * - * @param string $project - * @param string $exclusion - * - * @return string The formatted log_exclusion resource. - */ - public static function logExclusionName($project, $exclusion) - { - return self::getLogExclusionNameTemplate()->render([ - 'project' => $project, - 'exclusion' => $exclusion, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a log_sink - * resource. - * - * @param string $project - * @param string $sink - * - * @return string The formatted log_sink resource. - */ - public static function logSinkName($project, $sink) - { - return self::getLogSinkNameTemplate()->render([ - 'project' => $project, - 'sink' => $sink, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a log_view - * resource. - * - * @param string $project - * @param string $location - * @param string $bucket - * @param string $view - * - * @return string The formatted log_view resource. - */ - public static function logViewName($project, $location, $bucket, $view) - { - return self::getLogViewNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'bucket' => $bucket, - 'view' => $view, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - */ - public static function organizationName($organization) - { - return self::getOrganizationNameTemplate()->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_cmekSettings resource. - * - * @param string $organization - * - * @return string The formatted organization_cmekSettings resource. - */ - public static function organizationCmekSettingsName($organization) - { - return self::getOrganizationCmekSettingsNameTemplate()->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_exclusion resource. - * - * @param string $organization - * @param string $exclusion - * - * @return string The formatted organization_exclusion resource. - */ - public static function organizationExclusionName($organization, $exclusion) - { - return self::getOrganizationExclusionNameTemplate()->render([ - 'organization' => $organization, - 'exclusion' => $exclusion, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location resource. - * - * @param string $organization - * @param string $location - * - * @return string The formatted organization_location resource. - */ - public static function organizationLocationName($organization, $location) - { - return self::getOrganizationLocationNameTemplate()->render([ - 'organization' => $organization, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_bucket resource. - * - * @param string $organization - * @param string $location - * @param string $bucket - * - * @return string The formatted organization_location_bucket resource. - */ - public static function organizationLocationBucketName($organization, $location, $bucket) - { - return self::getOrganizationLocationBucketNameTemplate()->render([ - 'organization' => $organization, - 'location' => $location, - 'bucket' => $bucket, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_bucket_link resource. - * - * @param string $organization - * @param string $location - * @param string $bucket - * @param string $link - * - * @return string The formatted organization_location_bucket_link resource. - */ - public static function organizationLocationBucketLinkName($organization, $location, $bucket, $link) - { - return self::getOrganizationLocationBucketLinkNameTemplate()->render([ - 'organization' => $organization, - 'location' => $location, - 'bucket' => $bucket, - 'link' => $link, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_bucket_view resource. - * - * @param string $organization - * @param string $location - * @param string $bucket - * @param string $view - * - * @return string The formatted organization_location_bucket_view resource. - */ - public static function organizationLocationBucketViewName($organization, $location, $bucket, $view) - { - return self::getOrganizationLocationBucketViewNameTemplate()->render([ - 'organization' => $organization, - 'location' => $location, - 'bucket' => $bucket, - 'view' => $view, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_settings resource. - * - * @param string $organization - * - * @return string The formatted organization_settings resource. - */ - public static function organizationSettingsName($organization) - { - return self::getOrganizationSettingsNameTemplate()->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_sink resource. - * - * @param string $organization - * @param string $sink - * - * @return string The formatted organization_sink resource. - */ - public static function organizationSinkName($organization, $sink) - { - return self::getOrganizationSinkNameTemplate()->render([ - 'organization' => $organization, - 'sink' => $sink, - ]); - } - - /** - * 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($project) - { - return self::getProjectNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_cmekSettings resource. - * - * @param string $project - * - * @return string The formatted project_cmekSettings resource. - */ - public static function projectCmekSettingsName($project) - { - return self::getProjectCmekSettingsNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_exclusion resource. - * - * @param string $project - * @param string $exclusion - * - * @return string The formatted project_exclusion resource. - */ - public static function projectExclusionName($project, $exclusion) - { - return self::getProjectExclusionNameTemplate()->render([ - 'project' => $project, - 'exclusion' => $exclusion, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_bucket resource. - * - * @param string $project - * @param string $location - * @param string $bucket - * - * @return string The formatted project_location_bucket resource. - */ - public static function projectLocationBucketName($project, $location, $bucket) - { - return self::getProjectLocationBucketNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'bucket' => $bucket, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_bucket_link resource. - * - * @param string $project - * @param string $location - * @param string $bucket - * @param string $link - * - * @return string The formatted project_location_bucket_link resource. - */ - public static function projectLocationBucketLinkName($project, $location, $bucket, $link) - { - return self::getProjectLocationBucketLinkNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'bucket' => $bucket, - 'link' => $link, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_bucket_view resource. - * - * @param string $project - * @param string $location - * @param string $bucket - * @param string $view - * - * @return string The formatted project_location_bucket_view resource. - */ - public static function projectLocationBucketViewName($project, $location, $bucket, $view) - { - return self::getProjectLocationBucketViewNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'bucket' => $bucket, - 'view' => $view, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_settings resource. - * - * @param string $project - * - * @return string The formatted project_settings resource. - */ - public static function projectSettingsName($project) - { - return self::getProjectSettingsNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project_sink - * resource. - * - * @param string $project - * @param string $sink - * - * @return string The formatted project_sink resource. - */ - public static function projectSinkName($project, $sink) - { - return self::getProjectSinkNameTemplate()->render([ - 'project' => $project, - 'sink' => $sink, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a settings - * resource. - * - * @param string $project - * - * @return string The formatted settings resource. - */ - public static function settingsName($project) - { - return self::getSettingsNameTemplate()->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 - * - billingAccount: billingAccounts/{billing_account} - * - billingAccountCmekSettings: billingAccounts/{billing_account}/cmekSettings - * - billingAccountExclusion: billingAccounts/{billing_account}/exclusions/{exclusion} - * - billingAccountLocation: billingAccounts/{billing_account}/locations/{location} - * - billingAccountLocationBucket: billingAccounts/{billing_account}/locations/{location}/buckets/{bucket} - * - billingAccountLocationBucketLink: billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link} - * - billingAccountLocationBucketView: billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view} - * - billingAccountSettings: billingAccounts/{billing_account}/settings - * - billingAccountSink: billingAccounts/{billing_account}/sinks/{sink} - * - cmekSettings: projects/{project}/cmekSettings - * - folder: folders/{folder} - * - folderCmekSettings: folders/{folder}/cmekSettings - * - folderExclusion: folders/{folder}/exclusions/{exclusion} - * - folderLocation: folders/{folder}/locations/{location} - * - folderLocationBucket: folders/{folder}/locations/{location}/buckets/{bucket} - * - folderLocationBucketLink: folders/{folder}/locations/{location}/buckets/{bucket}/links/{link} - * - folderLocationBucketView: folders/{folder}/locations/{location}/buckets/{bucket}/views/{view} - * - folderSettings: folders/{folder}/settings - * - folderSink: folders/{folder}/sinks/{sink} - * - link: projects/{project}/locations/{location}/buckets/{bucket}/links/{link} - * - location: projects/{project}/locations/{location} - * - logBucket: projects/{project}/locations/{location}/buckets/{bucket} - * - logExclusion: projects/{project}/exclusions/{exclusion} - * - logSink: projects/{project}/sinks/{sink} - * - logView: projects/{project}/locations/{location}/buckets/{bucket}/views/{view} - * - organization: organizations/{organization} - * - organizationCmekSettings: organizations/{organization}/cmekSettings - * - organizationExclusion: organizations/{organization}/exclusions/{exclusion} - * - organizationLocation: organizations/{organization}/locations/{location} - * - organizationLocationBucket: organizations/{organization}/locations/{location}/buckets/{bucket} - * - organizationLocationBucketLink: organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link} - * - organizationLocationBucketView: organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view} - * - organizationSettings: organizations/{organization}/settings - * - organizationSink: organizations/{organization}/sinks/{sink} - * - project: projects/{project} - * - projectCmekSettings: projects/{project}/cmekSettings - * - projectExclusion: projects/{project}/exclusions/{exclusion} - * - projectLocationBucket: projects/{project}/locations/{location}/buckets/{bucket} - * - projectLocationBucketLink: projects/{project}/locations/{location}/buckets/{bucket}/links/{link} - * - projectLocationBucketView: projects/{project}/locations/{location}/buckets/{bucket}/views/{view} - * - projectSettings: projects/{project}/settings - * - projectSink: projects/{project}/sinks/{sink} - * - settings: projects/{project}/settings - * - * 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($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * 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 = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $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 'logging.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Copies a set of log entries from a log bucket to a Cloud Storage bucket. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $name = 'name'; - * $destination = 'destination'; - * $operationResponse = $configServiceV2Client->copyLogEntries($name, $destination); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $configServiceV2Client->copyLogEntries($name, $destination); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $configServiceV2Client->resumeOperation($operationName, 'copyLogEntries'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $name Required. Log bucket from which to copy log entries. - * - * For example: - * - * `"projects/my-project/locations/global/buckets/my-source-bucket"` - * @param string $destination Required. Destination to which to copy log entries. - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * Optional. A filter specifying which log entries to copy. The filter must be - * no more than 20k characters. An empty filter matches all log entries. - * @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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function copyLogEntries($name, $destination, array $optionalArgs = []) - { - $request = new CopyLogEntriesRequest(); - $request->setName($name); - $request->setDestination($destination); - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - return $this->startOperationsCall('CopyLogEntries', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a log bucket that can be used to store log entries. After a bucket - * has been created, the bucket's location cannot be changed. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedParent = $configServiceV2Client->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - * $bucketId = 'bucket_id'; - * $bucket = new LogBucket(); - * $response = $configServiceV2Client->createBucket($formattedParent, $bucketId, $bucket); - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $parent Required. The resource in which to create the log bucket: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * - * For example: - * - * `"projects/my-project/locations/global"` - * @param string $bucketId Required. A client-assigned identifier such as `"my-bucket"`. Identifiers - * are limited to 100 characters and can include only letters, digits, - * underscores, hyphens, and periods. - * @param LogBucket $bucket Required. The new bucket. The region specified in the new bucket must be - * compliant with any Location Restriction Org Policy. The name field in the - * bucket is ignored. - * @param array $optionalArgs { - * 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 \Google\Cloud\Logging\V2\LogBucket - * - * @throws ApiException if the remote call fails - */ - public function createBucket($parent, $bucketId, $bucket, array $optionalArgs = []) - { - $request = new CreateBucketRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setBucketId($bucketId); - $request->setBucket($bucket); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateBucket', LogBucket::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a log bucket asynchronously that can be used to store log entries. - * - * After a bucket has been created, the bucket's location cannot be changed. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedParent = $configServiceV2Client->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - * $bucketId = 'bucket_id'; - * $bucket = new LogBucket(); - * $operationResponse = $configServiceV2Client->createBucketAsync($formattedParent, $bucketId, $bucket); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $configServiceV2Client->createBucketAsync($formattedParent, $bucketId, $bucket); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $configServiceV2Client->resumeOperation($operationName, 'createBucketAsync'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $parent Required. The resource in which to create the log bucket: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * - * For example: - * - * `"projects/my-project/locations/global"` - * @param string $bucketId Required. A client-assigned identifier such as `"my-bucket"`. Identifiers - * are limited to 100 characters and can include only letters, digits, - * underscores, hyphens, and periods. - * @param LogBucket $bucket Required. The new bucket. The region specified in the new bucket must be - * compliant with any Location Restriction Org Policy. The name field in the - * bucket is ignored. - * @param array $optionalArgs { - * 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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createBucketAsync($parent, $bucketId, $bucket, array $optionalArgs = []) - { - $request = new CreateBucketRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setBucketId($bucketId); - $request->setBucket($bucket); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateBucketAsync', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a new exclusion in the _Default sink in a specified parent - * resource. Only log entries belonging to that resource can be excluded. You - * can have up to 10 exclusions in a resource. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedParent = $configServiceV2Client->projectName('[PROJECT]'); - * $exclusion = new LogExclusion(); - * $response = $configServiceV2Client->createExclusion($formattedParent, $exclusion); - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource in which to create the exclusion: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * For examples: - * - * `"projects/my-logging-project"` - * `"organizations/123456789"` - * @param LogExclusion $exclusion Required. The new exclusion, whose `name` parameter is an exclusion name - * that is not already used in the parent resource. - * @param array $optionalArgs { - * 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 \Google\Cloud\Logging\V2\LogExclusion - * - * @throws ApiException if the remote call fails - */ - public function createExclusion($parent, $exclusion, array $optionalArgs = []) - { - $request = new CreateExclusionRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setExclusion($exclusion); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateExclusion', LogExclusion::class, $optionalArgs, $request)->wait(); - } - - /** - * Asynchronously creates a linked dataset in BigQuery which makes it possible - * to use BigQuery to read the logs stored in the log bucket. A log bucket may - * currently only contain one link. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedParent = $configServiceV2Client->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - * $link = new Link(); - * $linkId = 'link_id'; - * $operationResponse = $configServiceV2Client->createLink($formattedParent, $link, $linkId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $configServiceV2Client->createLink($formattedParent, $link, $linkId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $configServiceV2Client->resumeOperation($operationName, 'createLink'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $parent Required. The full resource name of the bucket to create a link for. - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * @param Link $link Required. The new link. - * @param string $linkId Required. The ID to use for the link. The link_id can have up to 100 - * characters. A valid link_id must only have alphanumeric characters and - * underscores within it. - * @param array $optionalArgs { - * 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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createLink($parent, $link, $linkId, array $optionalArgs = []) - { - $request = new CreateLinkRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setLink($link); - $request->setLinkId($linkId); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateLink', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a sink that exports specified log entries to a destination. The - * export of newly-ingested log entries begins immediately, unless the sink's - * `writer_identity` is not permitted to write to the destination. A sink can - * export log entries only from the resource owning the sink. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedParent = $configServiceV2Client->projectName('[PROJECT]'); - * $sink = new LogSink(); - * $response = $configServiceV2Client->createSink($formattedParent, $sink); - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $parent Required. The resource in which to create the sink: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * For examples: - * - * `"projects/my-project"` - * `"organizations/123456789"` - * @param LogSink $sink Required. The new sink, whose `name` parameter is a sink identifier that - * is not already in use. - * @param array $optionalArgs { - * Optional. - * - * @type bool $uniqueWriterIdentity - * Optional. Determines the kind of IAM identity returned as `writer_identity` - * in the new sink. If this value is omitted or set to false, and if the - * sink's parent is a project, then the value returned as `writer_identity` is - * the same group or service account used by Cloud Logging before the addition - * of writer identities to this API. The sink's destination must be in the - * same project as the sink itself. - * - * If this field is set to true, or if the sink is owned by a non-project - * resource such as an organization, then the value of `writer_identity` will - * be a unique service account used only for exports from the new sink. For - * more information, see `writer_identity` in - * [LogSink][google.logging.v2.LogSink]. - * @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 \Google\Cloud\Logging\V2\LogSink - * - * @throws ApiException if the remote call fails - */ - public function createSink($parent, $sink, array $optionalArgs = []) - { - $request = new CreateSinkRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setSink($sink); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['uniqueWriterIdentity'])) { - $request->setUniqueWriterIdentity($optionalArgs['uniqueWriterIdentity']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateSink', LogSink::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a view over log entries in a log bucket. A bucket may contain a - * maximum of 30 views. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $parent = 'parent'; - * $viewId = 'view_id'; - * $view = new LogView(); - * $response = $configServiceV2Client->createView($parent, $viewId, $view); - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $parent Required. The bucket in which to create the view - * - * `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` - * - * For example: - * - * `"projects/my-project/locations/global/buckets/my-bucket"` - * @param string $viewId Required. A client-assigned identifier such as `"my-view"`. Identifiers are - * limited to 100 characters and can include only letters, digits, - * underscores, hyphens, and periods. - * @param LogView $view Required. The new view. - * @param array $optionalArgs { - * 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 \Google\Cloud\Logging\V2\LogView - * - * @throws ApiException if the remote call fails - */ - public function createView($parent, $viewId, $view, array $optionalArgs = []) - { - $request = new CreateViewRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setViewId($viewId); - $request->setView($view); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateView', LogView::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a log bucket. - * - * Changes the bucket's `lifecycle_state` to the `DELETE_REQUESTED` state. - * After 7 days, the bucket will be purged and all log entries in the bucket - * will be permanently deleted. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedName = $configServiceV2Client->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - * $configServiceV2Client->deleteBucket($formattedName); - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $name Required. The full resource name of the bucket to delete. - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * For example: - * - * `"projects/my-project/locations/global/buckets/my-bucket"` - * @param array $optionalArgs { - * 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 if the remote call fails - */ - public function deleteBucket($name, array $optionalArgs = []) - { - $request = new DeleteBucketRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteBucket', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes an exclusion in the _Default sink. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedName = $configServiceV2Client->logExclusionName('[PROJECT]', '[EXCLUSION]'); - * $configServiceV2Client->deleteExclusion($formattedName); - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $name Required. The resource name of an existing exclusion to delete: - * - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * - * For example: - * - * `"projects/my-project/exclusions/my-exclusion"` - * @param array $optionalArgs { - * 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 if the remote call fails - */ - public function deleteExclusion($name, array $optionalArgs = []) - { - $request = new DeleteExclusionRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteExclusion', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a link. This will also delete the corresponding BigQuery linked - * dataset. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedName = $configServiceV2Client->linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); - * $operationResponse = $configServiceV2Client->deleteLink($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $configServiceV2Client->deleteLink($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $configServiceV2Client->resumeOperation($operationName, 'deleteLink'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $name Required. The full resource name of the link to delete. - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * @param array $optionalArgs { - * 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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteLink($name, array $optionalArgs = []) - { - $request = new DeleteLinkRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteLink', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a sink. If the sink has a unique `writer_identity`, then that - * service account is also deleted. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedSinkName = $configServiceV2Client->logSinkName('[PROJECT]', '[SINK]'); - * $configServiceV2Client->deleteSink($formattedSinkName); - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $sinkName Required. The full resource name of the sink to delete, including the - * parent resource and the sink identifier: - * - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * - * For example: - * - * `"projects/my-project/sinks/my-sink"` - * @param array $optionalArgs { - * 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 if the remote call fails - */ - public function deleteSink($sinkName, array $optionalArgs = []) - { - $request = new DeleteSinkRequest(); - $requestParamHeaders = []; - $request->setSinkName($sinkName); - $requestParamHeaders['sink_name'] = $sinkName; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteSink', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a view on a log bucket. - * If an `UNAVAILABLE` error is returned, this indicates that system is not in - * a state where it can delete the view. If this occurs, please try again in a - * few minutes. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedName = $configServiceV2Client->logViewName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[VIEW]'); - * $configServiceV2Client->deleteView($formattedName); - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $name Required. The full resource name of the view to delete: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * - * For example: - * - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * @param array $optionalArgs { - * 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 if the remote call fails - */ - public function deleteView($name, array $optionalArgs = []) - { - $request = new DeleteViewRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteView', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a log bucket. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedName = $configServiceV2Client->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - * $response = $configServiceV2Client->getBucket($formattedName); - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the bucket: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * For example: - * - * `"projects/my-project/locations/global/buckets/my-bucket"` - * @param array $optionalArgs { - * 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 \Google\Cloud\Logging\V2\LogBucket - * - * @throws ApiException if the remote call fails - */ - public function getBucket($name, array $optionalArgs = []) - { - $request = new GetBucketRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetBucket', LogBucket::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the Logging CMEK settings for the given resource. - * - * Note: CMEK for the Log Router can be configured for Google Cloud projects, - * folders, organizations and billing accounts. Once configured for an - * organization, it applies to all projects and folders in the Google Cloud - * organization. - * - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $response = $configServiceV2Client->getCmekSettings(); - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Required. The resource for which to retrieve CMEK settings. - * - * "projects/[PROJECT_ID]/cmekSettings" - * "organizations/[ORGANIZATION_ID]/cmekSettings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - * "folders/[FOLDER_ID]/cmekSettings" - * - * For example: - * - * `"organizations/12345/cmekSettings"` - * - * Note: CMEK for the Log Router can be configured for Google Cloud projects, - * folders, organizations and billing accounts. Once configured for an - * organization, it applies to all projects and folders in the Google Cloud - * organization. - * @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 \Google\Cloud\Logging\V2\CmekSettings - * - * @throws ApiException if the remote call fails - */ - public function getCmekSettings(array $optionalArgs = []) - { - $request = new GetCmekSettingsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetCmekSettings', CmekSettings::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the description of an exclusion in the _Default sink. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedName = $configServiceV2Client->logExclusionName('[PROJECT]', '[EXCLUSION]'); - * $response = $configServiceV2Client->getExclusion($formattedName); - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $name Required. The resource name of an existing exclusion: - * - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * - * For example: - * - * `"projects/my-project/exclusions/my-exclusion"` - * @param array $optionalArgs { - * 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 \Google\Cloud\Logging\V2\LogExclusion - * - * @throws ApiException if the remote call fails - */ - public function getExclusion($name, array $optionalArgs = []) - { - $request = new GetExclusionRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetExclusion', LogExclusion::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a link. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedName = $configServiceV2Client->linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); - * $response = $configServiceV2Client->getLink($formattedName); - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the link: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID] - * @param array $optionalArgs { - * 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 \Google\Cloud\Logging\V2\Link - * - * @throws ApiException if the remote call fails - */ - public function getLink($name, array $optionalArgs = []) - { - $request = new GetLinkRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLink', Link::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the Log Router settings for the given resource. - * - * Note: Settings for the Log Router can be get for Google Cloud projects, - * folders, organizations and billing accounts. Currently it can only be - * configured for organizations. Once configured for an organization, it - * applies to all projects and folders in the Google Cloud organization. - * - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedName = $configServiceV2Client->settingsName('[PROJECT]'); - * $response = $configServiceV2Client->getSettings($formattedName); - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $name Required. The resource for which to retrieve settings. - * - * "projects/[PROJECT_ID]/settings" - * "organizations/[ORGANIZATION_ID]/settings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/settings" - * "folders/[FOLDER_ID]/settings" - * - * For example: - * - * `"organizations/12345/settings"` - * - * Note: Settings for the Log Router can be get for Google Cloud projects, - * folders, organizations and billing accounts. Currently it can only be - * configured for organizations. Once configured for an organization, it - * applies to all projects and folders in the Google Cloud organization. - * @param array $optionalArgs { - * 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 \Google\Cloud\Logging\V2\Settings - * - * @throws ApiException if the remote call fails - */ - public function getSettings($name, array $optionalArgs = []) - { - $request = new GetSettingsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetSettings', Settings::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a sink. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedSinkName = $configServiceV2Client->logSinkName('[PROJECT]', '[SINK]'); - * $response = $configServiceV2Client->getSink($formattedSinkName); - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $sinkName Required. The resource name of the sink: - * - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * - * For example: - * - * `"projects/my-project/sinks/my-sink"` - * @param array $optionalArgs { - * 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 \Google\Cloud\Logging\V2\LogSink - * - * @throws ApiException if the remote call fails - */ - public function getSink($sinkName, array $optionalArgs = []) - { - $request = new GetSinkRequest(); - $requestParamHeaders = []; - $request->setSinkName($sinkName); - $requestParamHeaders['sink_name'] = $sinkName; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetSink', LogSink::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a view on a log bucket.. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedName = $configServiceV2Client->logViewName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[VIEW]'); - * $response = $configServiceV2Client->getView($formattedName); - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the policy: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * - * For example: - * - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * @param array $optionalArgs { - * 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 \Google\Cloud\Logging\V2\LogView - * - * @throws ApiException if the remote call fails - */ - public function getView($name, array $optionalArgs = []) - { - $request = new GetViewRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetView', LogView::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists log buckets. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedParent = $configServiceV2Client->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $configServiceV2Client->listBuckets($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $configServiceV2Client->listBuckets($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource whose buckets are to be listed: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - * - * Note: The locations portion of the resource must be specified, but - * supplying the character `-` in place of [LOCATION_ID] will return all - * buckets. - * @param array $optionalArgs { - * Optional. - * - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listBuckets($parent, array $optionalArgs = []) - { - $request = new ListBucketsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListBuckets', $optionalArgs, ListBucketsResponse::class, $request); - } - - /** - * Lists all the exclusions on the _Default sink in a parent resource. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedParent = $configServiceV2Client->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $configServiceV2Client->listExclusions($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $configServiceV2Client->listExclusions($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource whose exclusions are to be listed. - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * @param array $optionalArgs { - * Optional. - * - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listExclusions($parent, array $optionalArgs = []) - { - $request = new ListExclusionsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListExclusions', $optionalArgs, ListExclusionsResponse::class, $request); - } - - /** - * Lists links. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedParent = $configServiceV2Client->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - * // Iterate over pages of elements - * $pagedResponse = $configServiceV2Client->listLinks($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $configServiceV2Client->listLinks($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource whose links are to be listed: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ - * @param array $optionalArgs { - * Optional. - * - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLinks($parent, array $optionalArgs = []) - { - $request = new ListLinksRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLinks', $optionalArgs, ListLinksResponse::class, $request); - } - - /** - * Lists sinks. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedParent = $configServiceV2Client->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $configServiceV2Client->listSinks($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $configServiceV2Client->listSinks($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource whose sinks are to be listed: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * @param array $optionalArgs { - * Optional. - * - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listSinks($parent, array $optionalArgs = []) - { - $request = new ListSinksRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListSinks', $optionalArgs, ListSinksResponse::class, $request); - } - - /** - * Lists views on a log bucket. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $parent = 'parent'; - * // Iterate over pages of elements - * $pagedResponse = $configServiceV2Client->listViews($parent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $configServiceV2Client->listViews($parent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $parent Required. The bucket whose views are to be listed: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * @param array $optionalArgs { - * Optional. - * - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listViews($parent, array $optionalArgs = []) - { - $request = new ListViewsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListViews', $optionalArgs, ListViewsResponse::class, $request); - } - - /** - * Undeletes a log bucket. A bucket that has been deleted can be undeleted - * within the grace period of 7 days. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedName = $configServiceV2Client->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - * $configServiceV2Client->undeleteBucket($formattedName); - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $name Required. The full resource name of the bucket to undelete. - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * For example: - * - * `"projects/my-project/locations/global/buckets/my-bucket"` - * @param array $optionalArgs { - * 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 if the remote call fails - */ - public function undeleteBucket($name, array $optionalArgs = []) - { - $request = new UndeleteBucketRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UndeleteBucket', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a log bucket. - * - * If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then - * `FAILED_PRECONDITION` will be returned. - * - * After a bucket has been created, the bucket's location cannot be changed. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedName = $configServiceV2Client->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - * $bucket = new LogBucket(); - * $updateMask = new FieldMask(); - * $response = $configServiceV2Client->updateBucket($formattedName, $bucket, $updateMask); - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $name Required. The full resource name of the bucket to update. - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * For example: - * - * `"projects/my-project/locations/global/buckets/my-bucket"` - * @param LogBucket $bucket Required. The updated bucket. - * @param FieldMask $updateMask Required. Field mask that specifies the fields in `bucket` that need an - * update. A bucket field will be overwritten if, and only if, it is in the - * update mask. `name` and output only fields cannot be updated. - * - * For a detailed `FieldMask` definition, see: - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * - * For example: `updateMask=retention_days` - * @param array $optionalArgs { - * 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 \Google\Cloud\Logging\V2\LogBucket - * - * @throws ApiException if the remote call fails - */ - public function updateBucket($name, $bucket, $updateMask, array $optionalArgs = []) - { - $request = new UpdateBucketRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setBucket($bucket); - $request->setUpdateMask($updateMask); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateBucket', LogBucket::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a log bucket asynchronously. - * - * If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then - * `FAILED_PRECONDITION` will be returned. - * - * After a bucket has been created, the bucket's location cannot be changed. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedName = $configServiceV2Client->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - * $bucket = new LogBucket(); - * $updateMask = new FieldMask(); - * $operationResponse = $configServiceV2Client->updateBucketAsync($formattedName, $bucket, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $configServiceV2Client->updateBucketAsync($formattedName, $bucket, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $configServiceV2Client->resumeOperation($operationName, 'updateBucketAsync'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $name Required. The full resource name of the bucket to update. - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * For example: - * - * `"projects/my-project/locations/global/buckets/my-bucket"` - * @param LogBucket $bucket Required. The updated bucket. - * @param FieldMask $updateMask Required. Field mask that specifies the fields in `bucket` that need an - * update. A bucket field will be overwritten if, and only if, it is in the - * update mask. `name` and output only fields cannot be updated. - * - * For a detailed `FieldMask` definition, see: - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * - * For example: `updateMask=retention_days` - * @param array $optionalArgs { - * 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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateBucketAsync($name, $bucket, $updateMask, array $optionalArgs = []) - { - $request = new UpdateBucketRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setBucket($bucket); - $request->setUpdateMask($updateMask); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateBucketAsync', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates the Log Router CMEK settings for the given resource. - * - * Note: CMEK for the Log Router can currently only be configured for Google - * Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * - * [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] - * will fail if 1) `kms_key_name` is invalid, or 2) the associated service - * account does not have the required - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or - * 3) access to the key is disabled. - * - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $response = $configServiceV2Client->updateCmekSettings(); - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Required. The resource name for the CMEK settings to update. - * - * "projects/[PROJECT_ID]/cmekSettings" - * "organizations/[ORGANIZATION_ID]/cmekSettings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - * "folders/[FOLDER_ID]/cmekSettings" - * - * For example: - * - * `"organizations/12345/cmekSettings"` - * - * Note: CMEK for the Log Router can currently only be configured for Google - * Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * @type CmekSettings $cmekSettings - * Required. The CMEK settings to update. - * - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * @type FieldMask $updateMask - * Optional. Field mask identifying which fields from `cmek_settings` should - * be updated. A field will be overwritten if and only if it is in the update - * mask. Output only fields cannot be updated. - * - * See [FieldMask][google.protobuf.FieldMask] for more information. - * - * For example: `"updateMask=kmsKeyName"` - * @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 \Google\Cloud\Logging\V2\CmekSettings - * - * @throws ApiException if the remote call fails - */ - public function updateCmekSettings(array $optionalArgs = []) - { - $request = new UpdateCmekSettingsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['cmekSettings'])) { - $request->setCmekSettings($optionalArgs['cmekSettings']); - } - - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateCmekSettings', CmekSettings::class, $optionalArgs, $request)->wait(); - } - - /** - * Changes one or more properties of an existing exclusion in the _Default - * sink. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedName = $configServiceV2Client->logExclusionName('[PROJECT]', '[EXCLUSION]'); - * $exclusion = new LogExclusion(); - * $updateMask = new FieldMask(); - * $response = $configServiceV2Client->updateExclusion($formattedName, $exclusion, $updateMask); - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the exclusion to update: - * - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * - * For example: - * - * `"projects/my-project/exclusions/my-exclusion"` - * @param LogExclusion $exclusion Required. New values for the existing exclusion. Only the fields specified - * in `update_mask` are relevant. - * @param FieldMask $updateMask Required. A non-empty list of fields to change in the existing exclusion. - * New values for the fields are taken from the corresponding fields in the - * [LogExclusion][google.logging.v2.LogExclusion] included in this request. - * Fields not mentioned in `update_mask` are not changed and are ignored in - * the request. - * - * For example, to change the filter and description of an exclusion, - * specify an `update_mask` of `"filter,description"`. - * @param array $optionalArgs { - * 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 \Google\Cloud\Logging\V2\LogExclusion - * - * @throws ApiException if the remote call fails - */ - public function updateExclusion($name, $exclusion, $updateMask, array $optionalArgs = []) - { - $request = new UpdateExclusionRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setExclusion($exclusion); - $request->setUpdateMask($updateMask); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateExclusion', LogExclusion::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates the Log Router settings for the given resource. - * - * Note: Settings for the Log Router can currently only be configured for - * Google Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * - * [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings] - * will fail if 1) `kms_key_name` is invalid, or 2) the associated service - * account does not have the required - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or - * 3) access to the key is disabled. 4) `location_id` is not supported by - * Logging. 5) `location_id` violate OrgPolicy. - * - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $name = 'name'; - * $settings = new Settings(); - * $response = $configServiceV2Client->updateSettings($name, $settings); - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $name Required. The resource name for the settings to update. - * - * "organizations/[ORGANIZATION_ID]/settings" - * - * For example: - * - * `"organizations/12345/settings"` - * - * Note: Settings for the Log Router can currently only be configured for - * Google Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * @param Settings $settings Required. The settings to update. - * - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Optional. Field mask identifying which fields from `settings` should - * be updated. A field will be overwritten if and only if it is in the update - * mask. Output only fields cannot be updated. - * - * See [FieldMask][google.protobuf.FieldMask] for more information. - * - * For example: `"updateMask=kmsKeyName"` - * @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 \Google\Cloud\Logging\V2\Settings - * - * @throws ApiException if the remote call fails - */ - public function updateSettings($name, $settings, array $optionalArgs = []) - { - $request = new UpdateSettingsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setSettings($settings); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateSettings', Settings::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a sink. This method replaces the following fields in the existing - * sink with values from the new sink: `destination`, and `filter`. - * - * The updated sink might also have a new `writer_identity`; see the - * `unique_writer_identity` field. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $formattedSinkName = $configServiceV2Client->logSinkName('[PROJECT]', '[SINK]'); - * $sink = new LogSink(); - * $response = $configServiceV2Client->updateSink($formattedSinkName, $sink); - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $sinkName Required. The full resource name of the sink to update, including the - * parent resource and the sink identifier: - * - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * - * For example: - * - * `"projects/my-project/sinks/my-sink"` - * @param LogSink $sink Required. The updated sink, whose name is the same identifier that appears - * as part of `sink_name`. - * @param array $optionalArgs { - * Optional. - * - * @type bool $uniqueWriterIdentity - * Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] - * for a description of this field. When updating a sink, the effect of this - * field on the value of `writer_identity` in the updated sink depends on both - * the old and new values of this field: - * - * + If the old and new values of this field are both false or both true, - * then there is no change to the sink's `writer_identity`. - * + If the old value is false and the new value is true, then - * `writer_identity` is changed to a unique service account. - * + It is an error if the old value is true and the new value is - * set to false or defaulted to false. - * @type FieldMask $updateMask - * Optional. Field mask that specifies the fields in `sink` that need - * an update. A sink field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. - * - * An empty `updateMask` is temporarily treated as using the following mask - * for backwards compatibility purposes: - * - * `destination,filter,includeChildren` - * - * At some point in the future, behavior will be removed and specifying an - * empty `updateMask` will be an error. - * - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * - * For example: `updateMask=filter` - * @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 \Google\Cloud\Logging\V2\LogSink - * - * @throws ApiException if the remote call fails - */ - public function updateSink($sinkName, $sink, array $optionalArgs = []) - { - $request = new UpdateSinkRequest(); - $requestParamHeaders = []; - $request->setSinkName($sinkName); - $request->setSink($sink); - $requestParamHeaders['sink_name'] = $sinkName; - if (isset($optionalArgs['uniqueWriterIdentity'])) { - $request->setUniqueWriterIdentity($optionalArgs['uniqueWriterIdentity']); - } - - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateSink', LogSink::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a view on a log bucket. This method replaces the following fields - * in the existing view with values from the new view: `filter`. - * If an `UNAVAILABLE` error is returned, this indicates that system is not in - * a state where it can update the view. If this occurs, please try again in a - * few minutes. - * - * Sample code: - * ``` - * $configServiceV2Client = new ConfigServiceV2Client(); - * try { - * $name = 'name'; - * $view = new LogView(); - * $response = $configServiceV2Client->updateView($name, $view); - * } finally { - * $configServiceV2Client->close(); - * } - * ``` - * - * @param string $name Required. The full resource name of the view to update - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * - * For example: - * - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * @param LogView $view Required. The updated view. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Optional. Field mask that specifies the fields in `view` that need - * an update. A field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. - * - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * - * For example: `updateMask=filter` - * @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 \Google\Cloud\Logging\V2\LogView - * - * @throws ApiException if the remote call fails - */ - public function updateView($name, $view, array $optionalArgs = []) - { - $request = new UpdateViewRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setView($view); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateView', LogView::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Logging/v2/src/V2/Gapic/LoggingServiceV2GapicClient.php b/owl-bot-staging/Logging/v2/src/V2/Gapic/LoggingServiceV2GapicClient.php deleted file mode 100644 index 3d53fa632bf8..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/Gapic/LoggingServiceV2GapicClient.php +++ /dev/null @@ -1,1002 +0,0 @@ -logName('[PROJECT]', '[LOG]'); - * $loggingServiceV2Client->deleteLog($formattedLogName); - * } finally { - * $loggingServiceV2Client->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\Logging\V2\Client\LoggingServiceV2Client}. - */ -class LoggingServiceV2GapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.logging.v2.LoggingServiceV2'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'logging.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'logging.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - 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/cloud-platform.read-only', - 'https://www.googleapis.com/auth/logging.admin', - 'https://www.googleapis.com/auth/logging.read', - 'https://www.googleapis.com/auth/logging.write', - ]; - - private static $billingAccountNameTemplate; - - private static $billingAccountLogNameTemplate; - - private static $folderNameTemplate; - - private static $folderLogNameTemplate; - - private static $logNameTemplate; - - private static $organizationNameTemplate; - - private static $organizationLogNameTemplate; - - private static $projectNameTemplate; - - private static $projectLogNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/logging_service_v2_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/logging_service_v2_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/logging_service_v2_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/logging_service_v2_rest_client_config.php', - ], - ], - ]; - } - - private static function getBillingAccountNameTemplate() - { - if (self::$billingAccountNameTemplate == null) { - self::$billingAccountNameTemplate = new PathTemplate('billingAccounts/{billing_account}'); - } - - return self::$billingAccountNameTemplate; - } - - private static function getBillingAccountLogNameTemplate() - { - if (self::$billingAccountLogNameTemplate == null) { - self::$billingAccountLogNameTemplate = new PathTemplate('billingAccounts/{billing_account}/logs/{log}'); - } - - return self::$billingAccountLogNameTemplate; - } - - private static function getFolderNameTemplate() - { - if (self::$folderNameTemplate == null) { - self::$folderNameTemplate = new PathTemplate('folders/{folder}'); - } - - return self::$folderNameTemplate; - } - - private static function getFolderLogNameTemplate() - { - if (self::$folderLogNameTemplate == null) { - self::$folderLogNameTemplate = new PathTemplate('folders/{folder}/logs/{log}'); - } - - return self::$folderLogNameTemplate; - } - - private static function getLogNameTemplate() - { - if (self::$logNameTemplate == null) { - self::$logNameTemplate = new PathTemplate('projects/{project}/logs/{log}'); - } - - return self::$logNameTemplate; - } - - private static function getOrganizationNameTemplate() - { - if (self::$organizationNameTemplate == null) { - self::$organizationNameTemplate = new PathTemplate('organizations/{organization}'); - } - - return self::$organizationNameTemplate; - } - - private static function getOrganizationLogNameTemplate() - { - if (self::$organizationLogNameTemplate == null) { - self::$organizationLogNameTemplate = new PathTemplate('organizations/{organization}/logs/{log}'); - } - - return self::$organizationLogNameTemplate; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getProjectLogNameTemplate() - { - if (self::$projectLogNameTemplate == null) { - self::$projectLogNameTemplate = new PathTemplate('projects/{project}/logs/{log}'); - } - - return self::$projectLogNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'billingAccount' => self::getBillingAccountNameTemplate(), - 'billingAccountLog' => self::getBillingAccountLogNameTemplate(), - 'folder' => self::getFolderNameTemplate(), - 'folderLog' => self::getFolderLogNameTemplate(), - 'log' => self::getLogNameTemplate(), - 'organization' => self::getOrganizationNameTemplate(), - 'organizationLog' => self::getOrganizationLogNameTemplate(), - 'project' => self::getProjectNameTemplate(), - 'projectLog' => self::getProjectLogNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account resource. - * - * @param string $billingAccount - * - * @return string The formatted billing_account resource. - */ - public static function billingAccountName($billingAccount) - { - return self::getBillingAccountNameTemplate()->render([ - 'billing_account' => $billingAccount, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_log resource. - * - * @param string $billingAccount - * @param string $log - * - * @return string The formatted billing_account_log resource. - */ - public static function billingAccountLogName($billingAccount, $log) - { - return self::getBillingAccountLogNameTemplate()->render([ - 'billing_account' => $billingAccount, - 'log' => $log, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a folder - * resource. - * - * @param string $folder - * - * @return string The formatted folder resource. - */ - public static function folderName($folder) - { - return self::getFolderNameTemplate()->render([ - 'folder' => $folder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a folder_log - * resource. - * - * @param string $folder - * @param string $log - * - * @return string The formatted folder_log resource. - */ - public static function folderLogName($folder, $log) - { - return self::getFolderLogNameTemplate()->render([ - 'folder' => $folder, - 'log' => $log, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a log - * resource. - * - * @param string $project - * @param string $log - * - * @return string The formatted log resource. - */ - public static function logName($project, $log) - { - return self::getLogNameTemplate()->render([ - 'project' => $project, - 'log' => $log, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - */ - public static function organizationName($organization) - { - return self::getOrganizationNameTemplate()->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_log resource. - * - * @param string $organization - * @param string $log - * - * @return string The formatted organization_log resource. - */ - public static function organizationLogName($organization, $log) - { - return self::getOrganizationLogNameTemplate()->render([ - 'organization' => $organization, - 'log' => $log, - ]); - } - - /** - * 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($project) - { - return self::getProjectNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project_log - * resource. - * - * @param string $project - * @param string $log - * - * @return string The formatted project_log resource. - */ - public static function projectLogName($project, $log) - { - return self::getProjectLogNameTemplate()->render([ - 'project' => $project, - 'log' => $log, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - billingAccount: billingAccounts/{billing_account} - * - billingAccountLog: billingAccounts/{billing_account}/logs/{log} - * - folder: folders/{folder} - * - folderLog: folders/{folder}/logs/{log} - * - log: projects/{project}/logs/{log} - * - organization: organizations/{organization} - * - organizationLog: organizations/{organization}/logs/{log} - * - project: projects/{project} - * - projectLog: projects/{project}/logs/{log} - * - * 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($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $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 'logging.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Deletes all the log entries in a log for the _Default Log Bucket. The log - * reappears if it receives new entries. Log entries written shortly before - * the delete operation might not be deleted. Entries received after the - * delete operation with a timestamp before the operation will be deleted. - * - * Sample code: - * ``` - * $loggingServiceV2Client = new LoggingServiceV2Client(); - * try { - * $formattedLogName = $loggingServiceV2Client->logName('[PROJECT]', '[LOG]'); - * $loggingServiceV2Client->deleteLog($formattedLogName); - * } finally { - * $loggingServiceV2Client->close(); - * } - * ``` - * - * @param string $logName Required. The resource name of the log to delete: - * - * * `projects/[PROJECT_ID]/logs/[LOG_ID]` - * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - * * `folders/[FOLDER_ID]/logs/[LOG_ID]` - * - * `[LOG_ID]` must be URL-encoded. For example, - * `"projects/my-project-id/logs/syslog"`, - * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. - * - * For more information about log names, see - * [LogEntry][google.logging.v2.LogEntry]. - * @param array $optionalArgs { - * 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 if the remote call fails - */ - public function deleteLog($logName, array $optionalArgs = []) - { - $request = new DeleteLogRequest(); - $requestParamHeaders = []; - $request->setLogName($logName); - $requestParamHeaders['log_name'] = $logName; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteLog', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists log entries. Use this method to retrieve log entries that originated - * from a project/folder/organization/billing account. For ways to export log - * entries, see [Exporting - * Logs](https://cloud.google.com/logging/docs/export). - * - * Sample code: - * ``` - * $loggingServiceV2Client = new LoggingServiceV2Client(); - * try { - * $formattedResourceNames = [ - * $loggingServiceV2Client->projectName('[PROJECT]'), - * ]; - * // Iterate over pages of elements - * $pagedResponse = $loggingServiceV2Client->listLogEntries($formattedResourceNames); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $loggingServiceV2Client->listLogEntries($formattedResourceNames); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $loggingServiceV2Client->close(); - * } - * ``` - * - * @param string[] $resourceNames Required. Names of one or more parent resources from which to - * retrieve log entries: - * - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * - * May alternatively be one or more views: - * - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * - * Projects listed in the `project_ids` field are added to this list. - * A maximum of 100 resources may be specified in a single request. - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * Optional. Only log entries that match the filter are returned. An empty - * filter matches all log entries in the resources listed in `resource_names`. - * Referencing a parent resource that is not listed in `resource_names` will - * cause the filter to return no results. The maximum length of a filter is - * 20,000 characters. - * @type string $orderBy - * Optional. How the results should be sorted. Presently, the only permitted - * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first - * option returns entries in order of increasing values of - * `LogEntry.timestamp` (oldest first), and the second option returns entries - * in order of decreasing timestamps (newest first). Entries with equal - * timestamps are returned in order of their `insert_id` values. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLogEntries($resourceNames, array $optionalArgs = []) - { - $request = new ListLogEntriesRequest(); - $request->setResourceNames($resourceNames); - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - return $this->getPagedListResponse('ListLogEntries', $optionalArgs, ListLogEntriesResponse::class, $request); - } - - /** - * Lists the logs in projects, organizations, folders, or billing accounts. - * Only logs that have entries are listed. - * - * Sample code: - * ``` - * $loggingServiceV2Client = new LoggingServiceV2Client(); - * try { - * $formattedParent = $loggingServiceV2Client->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $loggingServiceV2Client->listLogs($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $loggingServiceV2Client->listLogs($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $loggingServiceV2Client->close(); - * } - * ``` - * - * @param string $parent Required. The resource name to list logs for: - * - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * @param array $optionalArgs { - * Optional. - * - * @type string[] $resourceNames - * Optional. List of resource names to list logs for: - * - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * - * To support legacy queries, it could also be: - * - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * - * The resource name in the `parent` field is added to this list. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLogs($parent, array $optionalArgs = []) - { - $request = new ListLogsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['resourceNames'])) { - $request->setResourceNames($optionalArgs['resourceNames']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLogs', $optionalArgs, ListLogsResponse::class, $request); - } - - /** - * Lists the descriptors for monitored resource types used by Logging. - * - * Sample code: - * ``` - * $loggingServiceV2Client = new LoggingServiceV2Client(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $loggingServiceV2Client->listMonitoredResourceDescriptors(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $loggingServiceV2Client->listMonitoredResourceDescriptors(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $loggingServiceV2Client->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listMonitoredResourceDescriptors(array $optionalArgs = []) - { - $request = new ListMonitoredResourceDescriptorsRequest(); - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - return $this->getPagedListResponse('ListMonitoredResourceDescriptors', $optionalArgs, ListMonitoredResourceDescriptorsResponse::class, $request); - } - - /** - * Streaming read of log entries as they are ingested. Until the stream is - * terminated, it will continue reading logs. - * - * Sample code: - * ``` - * $loggingServiceV2Client = new LoggingServiceV2Client(); - * try { - * $resourceNames = []; - * $request = new TailLogEntriesRequest(); - * $request->setResourceNames($resourceNames); - * // Write all requests to the server, then read all responses until the - * // stream is complete - * $requests = [ - * $request, - * ]; - * $stream = $loggingServiceV2Client->tailLogEntries(); - * $stream->writeAll($requests); - * foreach ($stream->closeWriteAndReadAll() as $element) { - * // doSomethingWith($element); - * } - * // Alternatively: - * // Write requests individually, making read() calls if - * // required. Call closeWrite() once writes are complete, and read the - * // remaining responses from the server. - * $requests = [ - * $request, - * ]; - * $stream = $loggingServiceV2Client->tailLogEntries(); - * foreach ($requests as $request) { - * $stream->write($request); - * // if required, read a single response from the stream - * $element = $stream->read(); - * // doSomethingWith($element) - * } - * $stream->closeWrite(); - * $element = $stream->read(); - * while (!is_null($element)) { - * // doSomethingWith($element) - * $element = $stream->read(); - * } - * } finally { - * $loggingServiceV2Client->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return \Google\ApiCore\BidiStream - * - * @throws ApiException if the remote call fails - */ - public function tailLogEntries(array $optionalArgs = []) - { - return $this->startCall('TailLogEntries', TailLogEntriesResponse::class, $optionalArgs, null, Call::BIDI_STREAMING_CALL); - } - - /** - * Writes log entries to Logging. This API method is the - * only way to send log entries to Logging. This method - * is used, directly or indirectly, by the Logging agent - * (fluentd) and all logging libraries configured to use Logging. - * A single request may contain log entries for a maximum of 1000 - * different resources (projects, organizations, billing accounts or - * folders) - * - * Sample code: - * ``` - * $loggingServiceV2Client = new LoggingServiceV2Client(); - * try { - * $entries = []; - * $response = $loggingServiceV2Client->writeLogEntries($entries); - * } finally { - * $loggingServiceV2Client->close(); - * } - * ``` - * - * @param LogEntry[] $entries Required. The log entries to send to Logging. The order of log - * entries in this list does not matter. Values supplied in this method's - * `log_name`, `resource`, and `labels` fields are copied into those log - * entries in this list that do not include values for their corresponding - * fields. For more information, see the - * [LogEntry][google.logging.v2.LogEntry] type. - * - * If the `timestamp` or `insert_id` fields are missing in log entries, then - * this method supplies the current time or a unique identifier, respectively. - * The supplied values are chosen so that, among the log entries that did not - * supply their own values, the entries earlier in the list will sort before - * the entries later in the list. See the `entries.list` method. - * - * Log entries with timestamps that are more than the - * [logs retention period](https://cloud.google.com/logging/quotas) in - * the past or more than 24 hours in the future will not be available when - * calling `entries.list`. However, those log entries can still be [exported - * with - * LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * - * To improve throughput and to avoid exceeding the - * [quota limit](https://cloud.google.com/logging/quotas) for calls to - * `entries.write`, you should try to include several log entries in this - * list, rather than calling this method for each individual log entry. - * @param array $optionalArgs { - * Optional. - * - * @type string $logName - * Optional. A default log resource name that is assigned to all log entries - * in `entries` that do not specify a value for `log_name`: - * - * * `projects/[PROJECT_ID]/logs/[LOG_ID]` - * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - * * `folders/[FOLDER_ID]/logs/[LOG_ID]` - * - * `[LOG_ID]` must be URL-encoded. For example: - * - * "projects/my-project-id/logs/syslog" - * "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" - * - * The permission `logging.logEntries.create` is needed on each project, - * organization, billing account, or folder that is receiving new log - * entries, whether the resource is specified in `logName` or in an - * individual log entry. - * @type MonitoredResource $resource - * Optional. A default monitored resource object that is assigned to all log - * entries in `entries` that do not specify a value for `resource`. Example: - * - * { "type": "gce_instance", - * "labels": { - * "zone": "us-central1-a", "instance_id": "00000000000000000000" }} - * - * See [LogEntry][google.logging.v2.LogEntry]. - * @type array $labels - * Optional. Default labels that are added to the `labels` field of all log - * entries in `entries`. If a log entry already has a label with the same key - * as a label in this parameter, then the log entry's label is not changed. - * See [LogEntry][google.logging.v2.LogEntry]. - * @type bool $partialSuccess - * Optional. Whether a batch's valid entries should be written even if some - * other entry failed due to a permanent error such as INVALID_ARGUMENT or - * PERMISSION_DENIED. If any entry failed, then the response status is the - * response status of one of the failed entries. The response will include - * error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by - * the entries' zero-based index in the `entries`. Failed requests for which - * no entries are written will not include per-entry errors. - * @type bool $dryRun - * Optional. If true, the request should expect normal response, but the - * entries won't be persisted nor exported. Useful for checking whether the - * logging API endpoints are working properly before sending valuable data. - * @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 \Google\Cloud\Logging\V2\WriteLogEntriesResponse - * - * @throws ApiException if the remote call fails - */ - public function writeLogEntries($entries, array $optionalArgs = []) - { - $request = new WriteLogEntriesRequest(); - $request->setEntries($entries); - if (isset($optionalArgs['logName'])) { - $request->setLogName($optionalArgs['logName']); - } - - if (isset($optionalArgs['resource'])) { - $request->setResource($optionalArgs['resource']); - } - - if (isset($optionalArgs['labels'])) { - $request->setLabels($optionalArgs['labels']); - } - - if (isset($optionalArgs['partialSuccess'])) { - $request->setPartialSuccess($optionalArgs['partialSuccess']); - } - - if (isset($optionalArgs['dryRun'])) { - $request->setDryRun($optionalArgs['dryRun']); - } - - return $this->startCall('WriteLogEntries', WriteLogEntriesResponse::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Logging/v2/src/V2/Gapic/MetricsServiceV2GapicClient.php b/owl-bot-staging/Logging/v2/src/V2/Gapic/MetricsServiceV2GapicClient.php deleted file mode 100644 index 9cbc4444108b..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/Gapic/MetricsServiceV2GapicClient.php +++ /dev/null @@ -1,534 +0,0 @@ -projectName('[PROJECT]'); - * $metric = new LogMetric(); - * $response = $metricsServiceV2Client->createLogMetric($formattedParent, $metric); - * } finally { - * $metricsServiceV2Client->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\Logging\V2\Client\MetricsServiceV2Client}. - */ -class MetricsServiceV2GapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.logging.v2.MetricsServiceV2'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'logging.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'logging.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - 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/cloud-platform.read-only', - 'https://www.googleapis.com/auth/logging.admin', - 'https://www.googleapis.com/auth/logging.read', - 'https://www.googleapis.com/auth/logging.write', - ]; - - private static $logMetricNameTemplate; - - private static $projectNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/metrics_service_v2_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/metrics_service_v2_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/metrics_service_v2_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/metrics_service_v2_rest_client_config.php', - ], - ], - ]; - } - - private static function getLogMetricNameTemplate() - { - if (self::$logMetricNameTemplate == null) { - self::$logMetricNameTemplate = new PathTemplate('projects/{project}/metrics/{metric}'); - } - - return self::$logMetricNameTemplate; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'logMetric' => self::getLogMetricNameTemplate(), - 'project' => self::getProjectNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a log_metric - * resource. - * - * @param string $project - * @param string $metric - * - * @return string The formatted log_metric resource. - */ - public static function logMetricName($project, $metric) - { - return self::getLogMetricNameTemplate()->render([ - 'project' => $project, - 'metric' => $metric, - ]); - } - - /** - * 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($project) - { - return self::getProjectNameTemplate()->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 - * - logMetric: projects/{project}/metrics/{metric} - * - project: projects/{project} - * - * 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($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $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 'logging.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Creates a logs-based metric. - * - * Sample code: - * ``` - * $metricsServiceV2Client = new MetricsServiceV2Client(); - * try { - * $formattedParent = $metricsServiceV2Client->projectName('[PROJECT]'); - * $metric = new LogMetric(); - * $response = $metricsServiceV2Client->createLogMetric($formattedParent, $metric); - * } finally { - * $metricsServiceV2Client->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the project in which to create the metric: - * - * "projects/[PROJECT_ID]" - * - * The new metric must be provided in the request. - * @param LogMetric $metric Required. The new logs-based metric, which must not have an identifier that - * already exists. - * @param array $optionalArgs { - * 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 \Google\Cloud\Logging\V2\LogMetric - * - * @throws ApiException if the remote call fails - */ - public function createLogMetric($parent, $metric, array $optionalArgs = []) - { - $request = new CreateLogMetricRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setMetric($metric); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateLogMetric', LogMetric::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a logs-based metric. - * - * Sample code: - * ``` - * $metricsServiceV2Client = new MetricsServiceV2Client(); - * try { - * $formattedMetricName = $metricsServiceV2Client->logMetricName('[PROJECT]', '[METRIC]'); - * $metricsServiceV2Client->deleteLogMetric($formattedMetricName); - * } finally { - * $metricsServiceV2Client->close(); - * } - * ``` - * - * @param string $metricName Required. The resource name of the metric to delete: - * - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @param array $optionalArgs { - * 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 if the remote call fails - */ - public function deleteLogMetric($metricName, array $optionalArgs = []) - { - $request = new DeleteLogMetricRequest(); - $requestParamHeaders = []; - $request->setMetricName($metricName); - $requestParamHeaders['metric_name'] = $metricName; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteLogMetric', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a logs-based metric. - * - * Sample code: - * ``` - * $metricsServiceV2Client = new MetricsServiceV2Client(); - * try { - * $formattedMetricName = $metricsServiceV2Client->logMetricName('[PROJECT]', '[METRIC]'); - * $response = $metricsServiceV2Client->getLogMetric($formattedMetricName); - * } finally { - * $metricsServiceV2Client->close(); - * } - * ``` - * - * @param string $metricName Required. The resource name of the desired metric: - * - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * @param array $optionalArgs { - * 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 \Google\Cloud\Logging\V2\LogMetric - * - * @throws ApiException if the remote call fails - */ - public function getLogMetric($metricName, array $optionalArgs = []) - { - $request = new GetLogMetricRequest(); - $requestParamHeaders = []; - $request->setMetricName($metricName); - $requestParamHeaders['metric_name'] = $metricName; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLogMetric', LogMetric::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists logs-based metrics. - * - * Sample code: - * ``` - * $metricsServiceV2Client = new MetricsServiceV2Client(); - * try { - * $formattedParent = $metricsServiceV2Client->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $metricsServiceV2Client->listLogMetrics($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $metricsServiceV2Client->listLogMetrics($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $metricsServiceV2Client->close(); - * } - * ``` - * - * @param string $parent Required. The name of the project containing the metrics: - * - * "projects/[PROJECT_ID]" - * @param array $optionalArgs { - * Optional. - * - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLogMetrics($parent, array $optionalArgs = []) - { - $request = new ListLogMetricsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLogMetrics', $optionalArgs, ListLogMetricsResponse::class, $request); - } - - /** - * Creates or updates a logs-based metric. - * - * Sample code: - * ``` - * $metricsServiceV2Client = new MetricsServiceV2Client(); - * try { - * $formattedMetricName = $metricsServiceV2Client->logMetricName('[PROJECT]', '[METRIC]'); - * $metric = new LogMetric(); - * $response = $metricsServiceV2Client->updateLogMetric($formattedMetricName, $metric); - * } finally { - * $metricsServiceV2Client->close(); - * } - * ``` - * - * @param string $metricName Required. The resource name of the metric to update: - * - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * - * The updated metric must be provided in the request and it's - * `name` field must be the same as `[METRIC_ID]` If the metric - * does not exist in `[PROJECT_ID]`, then a new metric is created. - * @param LogMetric $metric Required. The updated metric. - * @param array $optionalArgs { - * 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 \Google\Cloud\Logging\V2\LogMetric - * - * @throws ApiException if the remote call fails - */ - public function updateLogMetric($metricName, $metric, array $optionalArgs = []) - { - $request = new UpdateLogMetricRequest(); - $requestParamHeaders = []; - $request->setMetricName($metricName); - $request->setMetric($metric); - $requestParamHeaders['metric_name'] = $metricName; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateLogMetric', LogMetric::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Logging/v2/src/V2/LoggingServiceV2Client.php b/owl-bot-staging/Logging/v2/src/V2/LoggingServiceV2Client.php deleted file mode 100644 index 8ccacf7786b3..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/LoggingServiceV2Client.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.logging.v2.ConfigServiceV2' => [ - 'CopyLogEntries' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Logging\V2\CopyLogEntriesResponse', - 'metadataReturnType' => '\Google\Cloud\Logging\V2\CopyLogEntriesMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - ], - 'CreateBucketAsync' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Logging\V2\LogBucket', - 'metadataReturnType' => '\Google\Cloud\Logging\V2\BucketMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateLink' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Logging\V2\Link', - 'metadataReturnType' => '\Google\Cloud\Logging\V2\LinkMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteLink' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Logging\V2\LinkMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateBucketAsync' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Logging\V2\LogBucket', - 'metadataReturnType' => '\Google\Cloud\Logging\V2\BucketMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateBucket' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogBucket', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateExclusion' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogExclusion', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSink' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogSink', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateView' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogView', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteBucket' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteExclusion' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSink' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'sink_name', - 'fieldAccessors' => [ - 'getSinkName', - ], - ], - ], - ], - 'DeleteView' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetBucket' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogBucket', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCmekSettings' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\CmekSettings', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetExclusion' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogExclusion', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLink' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\Link', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSettings' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\Settings', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSink' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogSink', - 'headerParams' => [ - [ - 'keyName' => 'sink_name', - 'fieldAccessors' => [ - 'getSinkName', - ], - ], - ], - ], - 'GetView' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogView', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListBuckets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBuckets', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\ListBucketsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListExclusions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getExclusions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\ListExclusionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListLinks' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLinks', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\ListLinksResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSinks' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSinks', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\ListSinksResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListViews' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getViews', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\ListViewsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UndeleteBucket' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateBucket' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogBucket', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateCmekSettings' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\CmekSettings', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateExclusion' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogExclusion', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateSettings' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\Settings', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateSink' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogSink', - 'headerParams' => [ - [ - 'keyName' => 'sink_name', - 'fieldAccessors' => [ - 'getSinkName', - ], - ], - ], - ], - 'UpdateView' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogView', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'billingAccount' => 'billingAccounts/{billing_account}', - 'billingAccountCmekSettings' => 'billingAccounts/{billing_account}/cmekSettings', - 'billingAccountExclusion' => 'billingAccounts/{billing_account}/exclusions/{exclusion}', - 'billingAccountLocation' => 'billingAccounts/{billing_account}/locations/{location}', - 'billingAccountLocationBucket' => 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}', - 'billingAccountLocationBucketLink' => 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link}', - 'billingAccountLocationBucketView' => 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}', - 'billingAccountSettings' => 'billingAccounts/{billing_account}/settings', - 'billingAccountSink' => 'billingAccounts/{billing_account}/sinks/{sink}', - 'cmekSettings' => 'projects/{project}/cmekSettings', - 'folder' => 'folders/{folder}', - 'folderCmekSettings' => 'folders/{folder}/cmekSettings', - 'folderExclusion' => 'folders/{folder}/exclusions/{exclusion}', - 'folderLocation' => 'folders/{folder}/locations/{location}', - 'folderLocationBucket' => 'folders/{folder}/locations/{location}/buckets/{bucket}', - 'folderLocationBucketLink' => 'folders/{folder}/locations/{location}/buckets/{bucket}/links/{link}', - 'folderLocationBucketView' => 'folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}', - 'folderSettings' => 'folders/{folder}/settings', - 'folderSink' => 'folders/{folder}/sinks/{sink}', - 'link' => 'projects/{project}/locations/{location}/buckets/{bucket}/links/{link}', - 'location' => 'projects/{project}/locations/{location}', - 'logBucket' => 'projects/{project}/locations/{location}/buckets/{bucket}', - 'logExclusion' => 'projects/{project}/exclusions/{exclusion}', - 'logSink' => 'projects/{project}/sinks/{sink}', - 'logView' => 'projects/{project}/locations/{location}/buckets/{bucket}/views/{view}', - 'organization' => 'organizations/{organization}', - 'organizationCmekSettings' => 'organizations/{organization}/cmekSettings', - 'organizationExclusion' => 'organizations/{organization}/exclusions/{exclusion}', - 'organizationLocation' => 'organizations/{organization}/locations/{location}', - 'organizationLocationBucket' => 'organizations/{organization}/locations/{location}/buckets/{bucket}', - 'organizationLocationBucketLink' => 'organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link}', - 'organizationLocationBucketView' => 'organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}', - 'organizationSettings' => 'organizations/{organization}/settings', - 'organizationSink' => 'organizations/{organization}/sinks/{sink}', - 'project' => 'projects/{project}', - 'projectCmekSettings' => 'projects/{project}/cmekSettings', - 'projectExclusion' => 'projects/{project}/exclusions/{exclusion}', - 'projectLocationBucket' => 'projects/{project}/locations/{location}/buckets/{bucket}', - 'projectLocationBucketLink' => 'projects/{project}/locations/{location}/buckets/{bucket}/links/{link}', - 'projectLocationBucketView' => 'projects/{project}/locations/{location}/buckets/{bucket}/views/{view}', - 'projectSettings' => 'projects/{project}/settings', - 'projectSink' => 'projects/{project}/sinks/{sink}', - 'settings' => 'projects/{project}/settings', - ], - ], - ], -]; diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_rest_client_config.php b/owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_rest_client_config.php deleted file mode 100644 index 9e22a4861b9a..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_rest_client_config.php +++ /dev/null @@ -1,1167 +0,0 @@ - [ - 'google.logging.v2.ConfigServiceV2' => [ - 'CopyLogEntries' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/entries:copy', - 'body' => '*', - ], - 'CreateBucket' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=*/*/locations/*}/buckets', - 'body' => 'bucket', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/buckets', - 'body' => 'bucket', - 'queryParams' => [ - 'bucket_id', - ], - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=organizations/*/locations/*}/buckets', - 'body' => 'bucket', - 'queryParams' => [ - 'bucket_id', - ], - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=folders/*/locations/*}/buckets', - 'body' => 'bucket', - 'queryParams' => [ - 'bucket_id', - ], - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*}/buckets', - 'body' => 'bucket', - 'queryParams' => [ - 'bucket_id', - ], - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'bucket_id', - ], - ], - 'CreateBucketAsync' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=*/*/locations/*}/buckets:createAsync', - 'body' => 'bucket', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/buckets:createAsync', - 'body' => 'bucket', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=organizations/*/locations/*}/buckets:createAsync', - 'body' => 'bucket', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=folders/*/locations/*}/buckets:createAsync', - 'body' => 'bucket', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*}/buckets:createAsync', - 'body' => 'bucket', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateExclusion' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=*/*}/exclusions', - 'body' => 'exclusion', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*}/exclusions', - 'body' => 'exclusion', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=organizations/*}/exclusions', - 'body' => 'exclusion', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=folders/*}/exclusions', - 'body' => 'exclusion', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=billingAccounts/*}/exclusions', - 'body' => 'exclusion', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateLink' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=*/*/locations/*/buckets/*}/links', - 'body' => 'link', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/buckets/*}/links', - 'body' => 'link', - 'queryParams' => [ - 'link_id', - ], - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=organizations/*/locations/*/buckets/*}/links', - 'body' => 'link', - 'queryParams' => [ - 'link_id', - ], - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=folders/*/locations/*/buckets/*}/links', - 'body' => 'link', - 'queryParams' => [ - 'link_id', - ], - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*/buckets/*}/links', - 'body' => 'link', - 'queryParams' => [ - 'link_id', - ], - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'link_id', - ], - ], - 'CreateSink' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=*/*}/sinks', - 'body' => 'sink', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*}/sinks', - 'body' => 'sink', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=organizations/*}/sinks', - 'body' => 'sink', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=folders/*}/sinks', - 'body' => 'sink', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=billingAccounts/*}/sinks', - 'body' => 'sink', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateView' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=*/*/locations/*/buckets/*}/views', - 'body' => 'view', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/buckets/*}/views', - 'body' => 'view', - 'queryParams' => [ - 'view_id', - ], - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=organizations/*/locations/*/buckets/*}/views', - 'body' => 'view', - 'queryParams' => [ - 'view_id', - ], - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=folders/*/locations/*/buckets/*}/views', - 'body' => 'view', - 'queryParams' => [ - 'view_id', - ], - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views', - 'body' => 'view', - 'queryParams' => [ - 'view_id', - ], - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'view_id', - ], - ], - 'DeleteBucket' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteExclusion' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=*/*/exclusions/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/exclusions/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=organizations/*/exclusions/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=folders/*/exclusions/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=billingAccounts/*/exclusions/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteLink' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*/links/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*/links/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*/links/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*/links/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*/links/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSink' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{sink_name=*/*/sinks/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{sink_name=projects/*/sinks/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{sink_name=organizations/*/sinks/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{sink_name=folders/*/sinks/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{sink_name=billingAccounts/*/sinks/*}', - ], - ], - 'placeholders' => [ - 'sink_name' => [ - 'getters' => [ - 'getSinkName', - ], - ], - ], - ], - 'DeleteView' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*/views/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*/views/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*/views/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*/views/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBucket' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCmekSettings' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*}/cmekSettings', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/cmekSettings', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*}/cmekSettings', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*}/cmekSettings', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*}/cmekSettings', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetExclusion' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/exclusions/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/exclusions/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/exclusions/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/exclusions/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*/exclusions/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetLink' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*/links/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*/links/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*/links/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*/links/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*/links/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSettings' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*}/settings', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/settings', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*}/settings', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*}/settings', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*}/settings', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSink' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{sink_name=*/*/sinks/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{sink_name=projects/*/sinks/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{sink_name=organizations/*/sinks/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{sink_name=folders/*/sinks/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{sink_name=billingAccounts/*/sinks/*}', - ], - ], - 'placeholders' => [ - 'sink_name' => [ - 'getters' => [ - 'getSinkName', - ], - ], - ], - ], - 'GetView' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*/views/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*/views/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*/views/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*/views/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListBuckets' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=*/*/locations/*}/buckets', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/buckets', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*/locations/*}/buckets', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=folders/*/locations/*}/buckets', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*}/buckets', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListExclusions' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=*/*}/exclusions', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/exclusions', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*}/exclusions', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=folders/*}/exclusions', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=billingAccounts/*}/exclusions', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListLinks' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=*/*/locations/*/buckets/*}/links', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/buckets/*}/links', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*/locations/*/buckets/*}/links', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=folders/*/locations/*/buckets/*}/links', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*/buckets/*}/links', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSinks' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=*/*}/sinks', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/sinks', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*}/sinks', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=folders/*}/sinks', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=billingAccounts/*}/sinks', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListViews' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=*/*/locations/*/buckets/*}/views', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/buckets/*}/views', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*/locations/*/buckets/*}/views', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=folders/*/locations/*/buckets/*}/views', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UndeleteBucket' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*}:undelete', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*}:undelete', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*}:undelete', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*}:undelete', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*}:undelete', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateBucket' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*}', - 'body' => 'bucket', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*}', - 'body' => 'bucket', - 'queryParams' => [ - 'update_mask', - ], - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*}', - 'body' => 'bucket', - 'queryParams' => [ - 'update_mask', - ], - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*}', - 'body' => 'bucket', - 'queryParams' => [ - 'update_mask', - ], - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*}', - 'body' => 'bucket', - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateBucketAsync' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*}:updateAsync', - 'body' => 'bucket', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*}:updateAsync', - 'body' => 'bucket', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*}:updateAsync', - 'body' => 'bucket', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*}:updateAsync', - 'body' => 'bucket', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*}:updateAsync', - 'body' => 'bucket', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateCmekSettings' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=*/*}/cmekSettings', - 'body' => 'cmek_settings', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=organizations/*}/cmekSettings', - 'body' => 'cmek_settings', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateExclusion' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=*/*/exclusions/*}', - 'body' => 'exclusion', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=projects/*/exclusions/*}', - 'body' => 'exclusion', - 'queryParams' => [ - 'update_mask', - ], - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=organizations/*/exclusions/*}', - 'body' => 'exclusion', - 'queryParams' => [ - 'update_mask', - ], - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=folders/*/exclusions/*}', - 'body' => 'exclusion', - 'queryParams' => [ - 'update_mask', - ], - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=billingAccounts/*/exclusions/*}', - 'body' => 'exclusion', - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateSettings' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=*/*}/settings', - 'body' => 'settings', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=organizations/*}/settings', - 'body' => 'settings', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=folders/*}/settings', - 'body' => 'settings', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateSink' => [ - 'method' => 'put', - 'uriTemplate' => '/v2/{sink_name=*/*/sinks/*}', - 'body' => 'sink', - 'additionalBindings' => [ - [ - 'method' => 'put', - 'uriTemplate' => '/v2/{sink_name=projects/*/sinks/*}', - 'body' => 'sink', - ], - [ - 'method' => 'put', - 'uriTemplate' => '/v2/{sink_name=organizations/*/sinks/*}', - 'body' => 'sink', - ], - [ - 'method' => 'put', - 'uriTemplate' => '/v2/{sink_name=folders/*/sinks/*}', - 'body' => 'sink', - ], - [ - 'method' => 'put', - 'uriTemplate' => '/v2/{sink_name=billingAccounts/*/sinks/*}', - 'body' => 'sink', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{sink_name=projects/*/sinks/*}', - 'body' => 'sink', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{sink_name=organizations/*/sinks/*}', - 'body' => 'sink', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{sink_name=folders/*/sinks/*}', - 'body' => 'sink', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{sink_name=billingAccounts/*/sinks/*}', - 'body' => 'sink', - ], - ], - 'placeholders' => [ - 'sink_name' => [ - 'getters' => [ - 'getSinkName', - ], - ], - ], - ], - 'UpdateView' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*/views/*}', - 'body' => 'view', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*/views/*}', - 'body' => 'view', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*/views/*}', - 'body' => 'view', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*/views/*}', - 'body' => 'view', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}', - 'body' => 'view', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=*/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/locations/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_client_config.json b/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_client_config.json deleted file mode 100644 index f5ac1a4d058e..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_client_config.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "interfaces": { - "google.logging.v2.LoggingServiceV2": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE" - ], - "retry_policy_2_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE" - ] - }, - "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 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 3600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 3600000, - "total_timeout_millis": 3600000 - } - }, - "methods": { - "DeleteLog": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLogEntries": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLogs": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListMonitoredResourceDescriptors": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "TailLogEntries": { - "timeout_millis": 3600000 - }, - "WriteLogEntries": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params", - "bundling": { - "delay_threshold_millis": 50, - "element_count_threshold": 1000, - "request_byte_threshold": 1048576 - } - } - } - } - } -} diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_descriptor_config.php b/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_descriptor_config.php deleted file mode 100644 index 3505083acc20..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_descriptor_config.php +++ /dev/null @@ -1,106 +0,0 @@ - [ - 'google.logging.v2.LoggingServiceV2' => [ - 'DeleteLog' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'log_name', - 'fieldAccessors' => [ - 'getLogName', - ], - ], - ], - ], - 'ListLogEntries' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEntries', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\ListLogEntriesResponse', - ], - 'ListLogs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLogNames', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\ListLogsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListMonitoredResourceDescriptors' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getResourceDescriptors', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\ListMonitoredResourceDescriptorsResponse', - ], - 'TailLogEntries' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'BidiStreaming', - ], - 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\TailLogEntriesResponse', - ], - 'WriteLogEntries' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\WriteLogEntriesResponse', - ], - 'templateMap' => [ - 'billingAccount' => 'billingAccounts/{billing_account}', - 'billingAccountLog' => 'billingAccounts/{billing_account}/logs/{log}', - 'folder' => 'folders/{folder}', - 'folderLog' => 'folders/{folder}/logs/{log}', - 'log' => 'projects/{project}/logs/{log}', - 'organization' => 'organizations/{organization}', - 'organizationLog' => 'organizations/{organization}/logs/{log}', - 'project' => 'projects/{project}', - 'projectLog' => 'projects/{project}/logs/{log}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_rest_client_config.php b/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_rest_client_config.php deleted file mode 100644 index 68c4b1500604..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_rest_client_config.php +++ /dev/null @@ -1,211 +0,0 @@ - [ - 'google.logging.v2.LoggingServiceV2' => [ - 'DeleteLog' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{log_name=projects/*/logs/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{log_name=*/*/logs/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{log_name=organizations/*/logs/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{log_name=folders/*/logs/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{log_name=billingAccounts/*/logs/*}', - ], - ], - 'placeholders' => [ - 'log_name' => [ - 'getters' => [ - 'getLogName', - ], - ], - ], - ], - 'ListLogEntries' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/entries:list', - 'body' => '*', - ], - 'ListLogs' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=*/*}/logs', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/logs', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*}/logs', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=folders/*}/logs', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=billingAccounts/*}/logs', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/buckets/*/views/*}/logs', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*/locations/*/buckets/*/views/*}/logs', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=folders/*/locations/*/buckets/*/views/*}/logs', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*/buckets/*/views/*}/logs', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListMonitoredResourceDescriptors' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/monitoredResourceDescriptors', - ], - 'WriteLogEntries' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/entries:write', - 'body' => '*', - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=*/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/locations/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_client_config.json b/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_client_config.json deleted file mode 100644 index 8d1153764e81..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_client_config.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "interfaces": { - "google.logging.v2.MetricsServiceV2": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [], - "retry_policy_4_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE" - ] - }, - "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_4_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": { - "CreateLogMetric": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteLogMetric": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "GetLogMetric": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "ListLogMetrics": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "UpdateLogMetric": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - } - } - } - } -} diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_descriptor_config.php b/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_descriptor_config.php deleted file mode 100644 index 8cb36fbdccff..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_descriptor_config.php +++ /dev/null @@ -1,100 +0,0 @@ - [ - 'google.logging.v2.MetricsServiceV2' => [ - 'CreateLogMetric' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogMetric', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteLogMetric' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'metric_name', - 'fieldAccessors' => [ - 'getMetricName', - ], - ], - ], - ], - 'GetLogMetric' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogMetric', - 'headerParams' => [ - [ - 'keyName' => 'metric_name', - 'fieldAccessors' => [ - 'getMetricName', - ], - ], - ], - ], - 'ListLogMetrics' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getMetrics', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\ListLogMetricsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateLogMetric' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogMetric', - 'headerParams' => [ - [ - 'keyName' => 'metric_name', - 'fieldAccessors' => [ - 'getMetricName', - ], - ], - ], - ], - 'templateMap' => [ - 'logMetric' => 'projects/{project}/metrics/{metric}', - 'project' => 'projects/{project}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_rest_client_config.php b/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_rest_client_config.php deleted file mode 100644 index 51a3c52919a0..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_rest_client_config.php +++ /dev/null @@ -1,180 +0,0 @@ - [ - 'google.logging.v2.MetricsServiceV2' => [ - 'CreateLogMetric' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*}/metrics', - 'body' => 'metric', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteLogMetric' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{metric_name=projects/*/metrics/*}', - 'placeholders' => [ - 'metric_name' => [ - 'getters' => [ - 'getMetricName', - ], - ], - ], - ], - 'GetLogMetric' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{metric_name=projects/*/metrics/*}', - 'placeholders' => [ - 'metric_name' => [ - 'getters' => [ - 'getMetricName', - ], - ], - ], - ], - 'ListLogMetrics' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/metrics', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateLogMetric' => [ - 'method' => 'put', - 'uriTemplate' => '/v2/{metric_name=projects/*/metrics/*}', - 'body' => 'metric', - 'placeholders' => [ - 'metric_name' => [ - 'getters' => [ - 'getMetricName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=*/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/locations/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/ConfigServiceV2ClientTest.php b/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/ConfigServiceV2ClientTest.php deleted file mode 100644 index 16e03c1a05b4..000000000000 --- a/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/ConfigServiceV2ClientTest.php +++ /dev/null @@ -1,2819 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ConfigServiceV2Client */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ConfigServiceV2Client($options); - } - - /** @test */ - public function copyLogEntriesTest() - { - $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/copyLogEntriesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $logEntriesCopiedCount = 2134326978; - $expectedResponse = new CopyLogEntriesResponse(); - $expectedResponse->setLogEntriesCopiedCount($logEntriesCopiedCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/copyLogEntriesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $destination = 'destination-1429847026'; - $request = (new CopyLogEntriesRequest()) - ->setName($name) - ->setDestination($destination); - $response = $gapicClient->copyLogEntries($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.logging.v2.ConfigServiceV2/CopyLogEntries', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualApiRequestObject->getDestination(); - $this->assertProtobufEquals($destination, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/copyLogEntriesTest'); - $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 copyLogEntriesExceptionTest() - { - $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/copyLogEntriesTest'); - $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 - $name = 'name3373707'; - $destination = 'destination-1429847026'; - $request = (new CopyLogEntriesRequest()) - ->setName($name) - ->setDestination($destination); - $response = $gapicClient->copyLogEntries($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/copyLogEntriesTest'); - 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 createBucketTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $retentionDays = 1544391896; - $locked = true; - $analyticsEnabled = true; - $expectedResponse = new LogBucket(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setRetentionDays($retentionDays); - $expectedResponse->setLocked($locked); - $expectedResponse->setAnalyticsEnabled($analyticsEnabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $bucketId = 'bucketId1837164432'; - $bucket = new LogBucket(); - $request = (new CreateBucketRequest()) - ->setParent($formattedParent) - ->setBucketId($bucketId) - ->setBucket($bucket); - $response = $gapicClient->createBucket($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/CreateBucket', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getBucketId(); - $this->assertProtobufEquals($bucketId, $actualValue); - $actualValue = $actualRequestObject->getBucket(); - $this->assertProtobufEquals($bucket, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createBucketExceptionTest() - { - $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $bucketId = 'bucketId1837164432'; - $bucket = new LogBucket(); - $request = (new CreateBucketRequest()) - ->setParent($formattedParent) - ->setBucketId($bucketId) - ->setBucket($bucket); - try { - $gapicClient->createBucket($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 createBucketAsyncTest() - { - $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/createBucketAsyncTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $retentionDays = 1544391896; - $locked = true; - $analyticsEnabled = true; - $expectedResponse = new LogBucket(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setRetentionDays($retentionDays); - $expectedResponse->setLocked($locked); - $expectedResponse->setAnalyticsEnabled($analyticsEnabled); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createBucketAsyncTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $bucketId = 'bucketId1837164432'; - $bucket = new LogBucket(); - $request = (new CreateBucketRequest()) - ->setParent($formattedParent) - ->setBucketId($bucketId) - ->setBucket($bucket); - $response = $gapicClient->createBucketAsync($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.logging.v2.ConfigServiceV2/CreateBucketAsync', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getBucketId(); - $this->assertProtobufEquals($bucketId, $actualValue); - $actualValue = $actualApiRequestObject->getBucket(); - $this->assertProtobufEquals($bucket, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBucketAsyncTest'); - $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 createBucketAsyncExceptionTest() - { - $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/createBucketAsyncTest'); - $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $bucketId = 'bucketId1837164432'; - $bucket = new LogBucket(); - $request = (new CreateBucketRequest()) - ->setParent($formattedParent) - ->setBucketId($bucketId) - ->setBucket($bucket); - $response = $gapicClient->createBucketAsync($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBucketAsyncTest'); - 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 createExclusionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $disabled = true; - $expectedResponse = new LogExclusion(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setDisabled($disabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $exclusion = new LogExclusion(); - $exclusionName = 'exclusionName1004344697'; - $exclusion->setName($exclusionName); - $exclusionFilter = 'exclusionFilter-1414044954'; - $exclusion->setFilter($exclusionFilter); - $request = (new CreateExclusionRequest()) - ->setParent($formattedParent) - ->setExclusion($exclusion); - $response = $gapicClient->createExclusion($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/CreateExclusion', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getExclusion(); - $this->assertProtobufEquals($exclusion, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createExclusionExceptionTest() - { - $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]'); - $exclusion = new LogExclusion(); - $exclusionName = 'exclusionName1004344697'; - $exclusion->setName($exclusionName); - $exclusionFilter = 'exclusionFilter-1414044954'; - $exclusion->setFilter($exclusionFilter); - $request = (new CreateExclusionRequest()) - ->setParent($formattedParent) - ->setExclusion($exclusion); - try { - $gapicClient->createExclusion($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 createLinkTest() - { - $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/createLinkTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new Link(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createLinkTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $link = new Link(); - $linkId = 'linkId177080192'; - $request = (new CreateLinkRequest()) - ->setParent($formattedParent) - ->setLink($link) - ->setLinkId($linkId); - $response = $gapicClient->createLink($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.logging.v2.ConfigServiceV2/CreateLink', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getLink(); - $this->assertProtobufEquals($link, $actualValue); - $actualValue = $actualApiRequestObject->getLinkId(); - $this->assertProtobufEquals($linkId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLinkTest'); - $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 createLinkExceptionTest() - { - $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/createLinkTest'); - $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $link = new Link(); - $linkId = 'linkId177080192'; - $request = (new CreateLinkRequest()) - ->setParent($formattedParent) - ->setLink($link) - ->setLinkId($linkId); - $response = $gapicClient->createLink($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLinkTest'); - 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 createSinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $destination = 'destination-1429847026'; - $filter = 'filter-1274492040'; - $description = 'description-1724546052'; - $disabled = true; - $writerIdentity = 'writerIdentity775638794'; - $includeChildren = true; - $expectedResponse = new LogSink(); - $expectedResponse->setName($name); - $expectedResponse->setDestination($destination); - $expectedResponse->setFilter($filter); - $expectedResponse->setDescription($description); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setWriterIdentity($writerIdentity); - $expectedResponse->setIncludeChildren($includeChildren); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $sink = new LogSink(); - $sinkName = 'sinkName508775358'; - $sink->setName($sinkName); - $sinkDestination = 'sinkDestination-1018870917'; - $sink->setDestination($sinkDestination); - $request = (new CreateSinkRequest()) - ->setParent($formattedParent) - ->setSink($sink); - $response = $gapicClient->createSink($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/CreateSink', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSink(); - $this->assertProtobufEquals($sink, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSinkExceptionTest() - { - $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]'); - $sink = new LogSink(); - $sinkName = 'sinkName508775358'; - $sink->setName($sinkName); - $sinkDestination = 'sinkDestination-1018870917'; - $sink->setDestination($sinkDestination); - $request = (new CreateSinkRequest()) - ->setParent($formattedParent) - ->setSink($sink); - try { - $gapicClient->createSink($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 createViewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $expectedResponse = new LogView(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $viewId = 'viewId454228213'; - $view = new LogView(); - $request = (new CreateViewRequest()) - ->setParent($parent) - ->setViewId($viewId) - ->setView($view); - $response = $gapicClient->createView($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/CreateView', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getViewId(); - $this->assertProtobufEquals($viewId, $actualValue); - $actualValue = $actualRequestObject->getView(); - $this->assertProtobufEquals($view, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createViewExceptionTest() - { - $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 - $parent = 'parent-995424086'; - $viewId = 'viewId454228213'; - $view = new LogView(); - $request = (new CreateViewRequest()) - ->setParent($parent) - ->setViewId($viewId) - ->setView($view); - try { - $gapicClient->createView($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 deleteBucketTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $request = (new DeleteBucketRequest()) - ->setName($formattedName); - $gapicClient->deleteBucket($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/DeleteBucket', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBucketExceptionTest() - { - $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $request = (new DeleteBucketRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteBucket($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 deleteExclusionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logExclusionName('[PROJECT]', '[EXCLUSION]'); - $request = (new DeleteExclusionRequest()) - ->setName($formattedName); - $gapicClient->deleteExclusion($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/DeleteExclusion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteExclusionExceptionTest() - { - $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->logExclusionName('[PROJECT]', '[EXCLUSION]'); - $request = (new DeleteExclusionRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteExclusion($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 deleteLinkTest() - { - $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/deleteLinkTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteLinkTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); - $request = (new DeleteLinkRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteLink($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.logging.v2.ConfigServiceV2/DeleteLink', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLinkTest'); - $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 deleteLinkExceptionTest() - { - $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/deleteLinkTest'); - $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->linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); - $request = (new DeleteLinkRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteLink($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLinkTest'); - 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 deleteSinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); - $request = (new DeleteSinkRequest()) - ->setSinkName($formattedSinkName); - $gapicClient->deleteSink($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/DeleteSink', $actualFuncCall); - $actualValue = $actualRequestObject->getSinkName(); - $this->assertProtobufEquals($formattedSinkName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSinkExceptionTest() - { - $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 - $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); - $request = (new DeleteSinkRequest()) - ->setSinkName($formattedSinkName); - try { - $gapicClient->deleteSink($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 deleteViewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logViewName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[VIEW]'); - $request = (new DeleteViewRequest()) - ->setName($formattedName); - $gapicClient->deleteView($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/DeleteView', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteViewExceptionTest() - { - $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->logViewName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[VIEW]'); - $request = (new DeleteViewRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteView($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 getBucketTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $retentionDays = 1544391896; - $locked = true; - $analyticsEnabled = true; - $expectedResponse = new LogBucket(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setRetentionDays($retentionDays); - $expectedResponse->setLocked($locked); - $expectedResponse->setAnalyticsEnabled($analyticsEnabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $request = (new GetBucketRequest()) - ->setName($formattedName); - $response = $gapicClient->getBucket($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/GetBucket', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBucketExceptionTest() - { - $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $request = (new GetBucketRequest()) - ->setName($formattedName); - try { - $gapicClient->getBucket($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 getCmekSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $kmsKeyName = 'kmsKeyName2094986649'; - $kmsKeyVersionName = 'kmsKeyVersionName-1734350176'; - $serviceAccountId = 'serviceAccountId-111486921'; - $expectedResponse = new CmekSettings(); - $expectedResponse->setName($name2); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName); - $expectedResponse->setServiceAccountId($serviceAccountId); - $transport->addResponse($expectedResponse); - $request = new GetCmekSettingsRequest(); - $response = $gapicClient->getCmekSettings($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/GetCmekSettings', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCmekSettingsExceptionTest() - { - $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 GetCmekSettingsRequest(); - try { - $gapicClient->getCmekSettings($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 getExclusionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $disabled = true; - $expectedResponse = new LogExclusion(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setDisabled($disabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logExclusionName('[PROJECT]', '[EXCLUSION]'); - $request = (new GetExclusionRequest()) - ->setName($formattedName); - $response = $gapicClient->getExclusion($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/GetExclusion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getExclusionExceptionTest() - { - $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->logExclusionName('[PROJECT]', '[EXCLUSION]'); - $request = (new GetExclusionRequest()) - ->setName($formattedName); - try { - $gapicClient->getExclusion($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 getLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new Link(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); - $request = (new GetLinkRequest()) - ->setName($formattedName); - $response = $gapicClient->getLink($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/GetLink', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLinkExceptionTest() - { - $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->linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); - $request = (new GetLinkRequest()) - ->setName($formattedName); - try { - $gapicClient->getLink($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 getSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $kmsKeyName = 'kmsKeyName2094986649'; - $kmsServiceAccountId = 'kmsServiceAccountId-263326747'; - $storageLocation = 'storageLocation-612882183'; - $disableDefaultSink = true; - $expectedResponse = new Settings(); - $expectedResponse->setName($name2); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setKmsServiceAccountId($kmsServiceAccountId); - $expectedResponse->setStorageLocation($storageLocation); - $expectedResponse->setDisableDefaultSink($disableDefaultSink); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->settingsName('[PROJECT]'); - $request = (new GetSettingsRequest()) - ->setName($formattedName); - $response = $gapicClient->getSettings($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/GetSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSettingsExceptionTest() - { - $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->settingsName('[PROJECT]'); - $request = (new GetSettingsRequest()) - ->setName($formattedName); - try { - $gapicClient->getSettings($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 getSinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $destination = 'destination-1429847026'; - $filter = 'filter-1274492040'; - $description = 'description-1724546052'; - $disabled = true; - $writerIdentity = 'writerIdentity775638794'; - $includeChildren = true; - $expectedResponse = new LogSink(); - $expectedResponse->setName($name); - $expectedResponse->setDestination($destination); - $expectedResponse->setFilter($filter); - $expectedResponse->setDescription($description); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setWriterIdentity($writerIdentity); - $expectedResponse->setIncludeChildren($includeChildren); - $transport->addResponse($expectedResponse); - // Mock request - $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); - $request = (new GetSinkRequest()) - ->setSinkName($formattedSinkName); - $response = $gapicClient->getSink($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/GetSink', $actualFuncCall); - $actualValue = $actualRequestObject->getSinkName(); - $this->assertProtobufEquals($formattedSinkName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSinkExceptionTest() - { - $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 - $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); - $request = (new GetSinkRequest()) - ->setSinkName($formattedSinkName); - try { - $gapicClient->getSink($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 getViewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $expectedResponse = new LogView(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logViewName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[VIEW]'); - $request = (new GetViewRequest()) - ->setName($formattedName); - $response = $gapicClient->getView($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/GetView', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getViewExceptionTest() - { - $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->logViewName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[VIEW]'); - $request = (new GetViewRequest()) - ->setName($formattedName); - try { - $gapicClient->getView($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 listBucketsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $bucketsElement = new LogBucket(); - $buckets = [ - $bucketsElement, - ]; - $expectedResponse = new ListBucketsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBuckets($buckets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListBucketsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBuckets($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBuckets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/ListBuckets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBucketsExceptionTest() - { - $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListBucketsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listBuckets($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 listExclusionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $exclusionsElement = new LogExclusion(); - $exclusions = [ - $exclusionsElement, - ]; - $expectedResponse = new ListExclusionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setExclusions($exclusions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListExclusionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listExclusions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getExclusions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/ListExclusions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExclusionsExceptionTest() - { - $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 ListExclusionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listExclusions($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 listLinksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $linksElement = new Link(); - $links = [ - $linksElement, - ]; - $expectedResponse = new ListLinksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLinks($links); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $request = (new ListLinksRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listLinks($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLinks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/ListLinks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLinksExceptionTest() - { - $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $request = (new ListLinksRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listLinks($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 listSinksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $sinksElement = new LogSink(); - $sinks = [ - $sinksElement, - ]; - $expectedResponse = new ListSinksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSinks($sinks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListSinksRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSinks($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSinks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/ListSinks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSinksExceptionTest() - { - $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 ListSinksRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSinks($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 listViewsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $viewsElement = new LogView(); - $views = [ - $viewsElement, - ]; - $expectedResponse = new ListViewsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setViews($views); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new ListViewsRequest()) - ->setParent($parent); - $response = $gapicClient->listViews($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getViews()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/ListViews', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listViewsExceptionTest() - { - $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 - $parent = 'parent-995424086'; - $request = (new ListViewsRequest()) - ->setParent($parent); - try { - $gapicClient->listViews($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 undeleteBucketTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $request = (new UndeleteBucketRequest()) - ->setName($formattedName); - $gapicClient->undeleteBucket($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/UndeleteBucket', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function undeleteBucketExceptionTest() - { - $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $request = (new UndeleteBucketRequest()) - ->setName($formattedName); - try { - $gapicClient->undeleteBucket($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 updateBucketTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $retentionDays = 1544391896; - $locked = true; - $analyticsEnabled = true; - $expectedResponse = new LogBucket(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setRetentionDays($retentionDays); - $expectedResponse->setLocked($locked); - $expectedResponse->setAnalyticsEnabled($analyticsEnabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $bucket = new LogBucket(); - $updateMask = new FieldMask(); - $request = (new UpdateBucketRequest()) - ->setName($formattedName) - ->setBucket($bucket) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateBucket($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateBucket', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getBucket(); - $this->assertProtobufEquals($bucket, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateBucketExceptionTest() - { - $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $bucket = new LogBucket(); - $updateMask = new FieldMask(); - $request = (new UpdateBucketRequest()) - ->setName($formattedName) - ->setBucket($bucket) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateBucket($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 updateBucketAsyncTest() - { - $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/updateBucketAsyncTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $retentionDays = 1544391896; - $locked = true; - $analyticsEnabled = true; - $expectedResponse = new LogBucket(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setRetentionDays($retentionDays); - $expectedResponse->setLocked($locked); - $expectedResponse->setAnalyticsEnabled($analyticsEnabled); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateBucketAsyncTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $bucket = new LogBucket(); - $updateMask = new FieldMask(); - $request = (new UpdateBucketRequest()) - ->setName($formattedName) - ->setBucket($bucket) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateBucketAsync($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.logging.v2.ConfigServiceV2/UpdateBucketAsync', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getBucket(); - $this->assertProtobufEquals($bucket, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBucketAsyncTest'); - $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 updateBucketAsyncExceptionTest() - { - $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/updateBucketAsyncTest'); - $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $bucket = new LogBucket(); - $updateMask = new FieldMask(); - $request = (new UpdateBucketRequest()) - ->setName($formattedName) - ->setBucket($bucket) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateBucketAsync($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBucketAsyncTest'); - 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 updateCmekSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $kmsKeyName = 'kmsKeyName2094986649'; - $kmsKeyVersionName = 'kmsKeyVersionName-1734350176'; - $serviceAccountId = 'serviceAccountId-111486921'; - $expectedResponse = new CmekSettings(); - $expectedResponse->setName($name2); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName); - $expectedResponse->setServiceAccountId($serviceAccountId); - $transport->addResponse($expectedResponse); - $request = new UpdateCmekSettingsRequest(); - $response = $gapicClient->updateCmekSettings($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateCmekSettings', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCmekSettingsExceptionTest() - { - $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 UpdateCmekSettingsRequest(); - try { - $gapicClient->updateCmekSettings($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 updateExclusionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $disabled = true; - $expectedResponse = new LogExclusion(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setDisabled($disabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logExclusionName('[PROJECT]', '[EXCLUSION]'); - $exclusion = new LogExclusion(); - $exclusionName = 'exclusionName1004344697'; - $exclusion->setName($exclusionName); - $exclusionFilter = 'exclusionFilter-1414044954'; - $exclusion->setFilter($exclusionFilter); - $updateMask = new FieldMask(); - $request = (new UpdateExclusionRequest()) - ->setName($formattedName) - ->setExclusion($exclusion) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateExclusion($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateExclusion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getExclusion(); - $this->assertProtobufEquals($exclusion, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateExclusionExceptionTest() - { - $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->logExclusionName('[PROJECT]', '[EXCLUSION]'); - $exclusion = new LogExclusion(); - $exclusionName = 'exclusionName1004344697'; - $exclusion->setName($exclusionName); - $exclusionFilter = 'exclusionFilter-1414044954'; - $exclusion->setFilter($exclusionFilter); - $updateMask = new FieldMask(); - $request = (new UpdateExclusionRequest()) - ->setName($formattedName) - ->setExclusion($exclusion) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateExclusion($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 updateSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $kmsKeyName = 'kmsKeyName2094986649'; - $kmsServiceAccountId = 'kmsServiceAccountId-263326747'; - $storageLocation = 'storageLocation-612882183'; - $disableDefaultSink = true; - $expectedResponse = new Settings(); - $expectedResponse->setName($name2); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setKmsServiceAccountId($kmsServiceAccountId); - $expectedResponse->setStorageLocation($storageLocation); - $expectedResponse->setDisableDefaultSink($disableDefaultSink); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $settings = new Settings(); - $request = (new UpdateSettingsRequest()) - ->setName($name) - ->setSettings($settings); - $response = $gapicClient->updateSettings($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getSettings(); - $this->assertProtobufEquals($settings, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSettingsExceptionTest() - { - $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'; - $settings = new Settings(); - $request = (new UpdateSettingsRequest()) - ->setName($name) - ->setSettings($settings); - try { - $gapicClient->updateSettings($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 updateSinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $destination = 'destination-1429847026'; - $filter = 'filter-1274492040'; - $description = 'description-1724546052'; - $disabled = true; - $writerIdentity = 'writerIdentity775638794'; - $includeChildren = true; - $expectedResponse = new LogSink(); - $expectedResponse->setName($name); - $expectedResponse->setDestination($destination); - $expectedResponse->setFilter($filter); - $expectedResponse->setDescription($description); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setWriterIdentity($writerIdentity); - $expectedResponse->setIncludeChildren($includeChildren); - $transport->addResponse($expectedResponse); - // Mock request - $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); - $sink = new LogSink(); - $sinkName = 'sinkName508775358'; - $sink->setName($sinkName); - $sinkDestination = 'sinkDestination-1018870917'; - $sink->setDestination($sinkDestination); - $request = (new UpdateSinkRequest()) - ->setSinkName($formattedSinkName) - ->setSink($sink); - $response = $gapicClient->updateSink($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateSink', $actualFuncCall); - $actualValue = $actualRequestObject->getSinkName(); - $this->assertProtobufEquals($formattedSinkName, $actualValue); - $actualValue = $actualRequestObject->getSink(); - $this->assertProtobufEquals($sink, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSinkExceptionTest() - { - $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 - $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); - $sink = new LogSink(); - $sinkName = 'sinkName508775358'; - $sink->setName($sinkName); - $sinkDestination = 'sinkDestination-1018870917'; - $sink->setDestination($sinkDestination); - $request = (new UpdateSinkRequest()) - ->setSinkName($formattedSinkName) - ->setSink($sink); - try { - $gapicClient->updateSink($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 updateViewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $expectedResponse = new LogView(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $view = new LogView(); - $request = (new UpdateViewRequest()) - ->setName($name) - ->setView($view); - $response = $gapicClient->updateView($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateView', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getView(); - $this->assertProtobufEquals($view, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateViewExceptionTest() - { - $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'; - $view = new LogView(); - $request = (new UpdateViewRequest()) - ->setName($name) - ->setView($view); - try { - $gapicClient->updateView($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 copyLogEntriesAsyncTest() - { - $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/copyLogEntriesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $logEntriesCopiedCount = 2134326978; - $expectedResponse = new CopyLogEntriesResponse(); - $expectedResponse->setLogEntriesCopiedCount($logEntriesCopiedCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/copyLogEntriesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $destination = 'destination-1429847026'; - $request = (new CopyLogEntriesRequest()) - ->setName($name) - ->setDestination($destination); - $response = $gapicClient->copyLogEntriesAsync($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.logging.v2.ConfigServiceV2/CopyLogEntries', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualApiRequestObject->getDestination(); - $this->assertProtobufEquals($destination, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/copyLogEntriesTest'); - $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/Logging/v2/tests/Unit/V2/Client/LoggingServiceV2ClientTest.php b/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/LoggingServiceV2ClientTest.php deleted file mode 100644 index 1e9b854a1c49..000000000000 --- a/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/LoggingServiceV2ClientTest.php +++ /dev/null @@ -1,530 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return LoggingServiceV2Client */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new LoggingServiceV2Client($options); - } - - /** @test */ - public function deleteLogTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedLogName = $gapicClient->logName('[PROJECT]', '[LOG]'); - $request = (new DeleteLogRequest()) - ->setLogName($formattedLogName); - $gapicClient->deleteLog($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.LoggingServiceV2/DeleteLog', $actualFuncCall); - $actualValue = $actualRequestObject->getLogName(); - $this->assertProtobufEquals($formattedLogName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteLogExceptionTest() - { - $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 - $formattedLogName = $gapicClient->logName('[PROJECT]', '[LOG]'); - $request = (new DeleteLogRequest()) - ->setLogName($formattedLogName); - try { - $gapicClient->deleteLog($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 listLogEntriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $entriesElement = new LogEntry(); - $entries = [ - $entriesElement, - ]; - $expectedResponse = new ListLogEntriesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEntries($entries); - $transport->addResponse($expectedResponse); - // Mock request - $formattedResourceNames = [ - $gapicClient->projectName('[PROJECT]'), - ]; - $request = (new ListLogEntriesRequest()) - ->setResourceNames($formattedResourceNames); - $response = $gapicClient->listLogEntries($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEntries()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.LoggingServiceV2/ListLogEntries', $actualFuncCall); - $actualValue = $actualRequestObject->getResourceNames(); - $this->assertProtobufEquals($formattedResourceNames, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLogEntriesExceptionTest() - { - $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 - $formattedResourceNames = [ - $gapicClient->projectName('[PROJECT]'), - ]; - $request = (new ListLogEntriesRequest()) - ->setResourceNames($formattedResourceNames); - try { - $gapicClient->listLogEntries($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 listLogsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $logNamesElement = 'logNamesElement-1079688374'; - $logNames = [ - $logNamesElement, - ]; - $expectedResponse = new ListLogsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLogNames($logNames); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListLogsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listLogs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLogNames()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.LoggingServiceV2/ListLogs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLogsExceptionTest() - { - $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 ListLogsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listLogs($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 listMonitoredResourceDescriptorsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $resourceDescriptorsElement = new MonitoredResourceDescriptor(); - $resourceDescriptors = [ - $resourceDescriptorsElement, - ]; - $expectedResponse = new ListMonitoredResourceDescriptorsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResourceDescriptors($resourceDescriptors); - $transport->addResponse($expectedResponse); - $request = new ListMonitoredResourceDescriptorsRequest(); - $response = $gapicClient->listMonitoredResourceDescriptors($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResourceDescriptors()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMonitoredResourceDescriptorsExceptionTest() - { - $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 ListMonitoredResourceDescriptorsRequest(); - try { - $gapicClient->listMonitoredResourceDescriptors($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 tailLogEntriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TailLogEntriesResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new TailLogEntriesResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new TailLogEntriesResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $resourceNames = []; - $request = new TailLogEntriesRequest(); - $request->setResourceNames($resourceNames); - $resourceNames2 = []; - $request2 = new TailLogEntriesRequest(); - $request2->setResourceNames($resourceNames2); - $resourceNames3 = []; - $request3 = new TailLogEntriesRequest(); - $request3->setResourceNames($resourceNames3); - $bidi = $gapicClient->tailLogEntries(); - $this->assertInstanceOf(BidiStream::class, $bidi); - $bidi->write($request); - $responses = []; - $responses[] = $bidi->read(); - $bidi->writeAll([ - $request2, - $request3, - ]); - foreach ($bidi->closeWriteAndReadAll() as $response) { - $responses[] = $response; - } - - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $createStreamRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($createStreamRequests)); - $streamFuncCall = $createStreamRequests[0]->getFuncCall(); - $streamRequestObject = $createStreamRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.LoggingServiceV2/TailLogEntries', $streamFuncCall); - $this->assertNull($streamRequestObject); - $callObjects = $transport->popCallObjects(); - $this->assertSame(1, count($callObjects)); - $bidiCall = $callObjects[0]; - $writeRequests = $bidiCall->popReceivedCalls(); - $expectedRequests = []; - $expectedRequests[] = $request; - $expectedRequests[] = $request2; - $expectedRequests[] = $request3; - $this->assertEquals($expectedRequests, $writeRequests); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function tailLogEntriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $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->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - $bidi = $gapicClient->tailLogEntries(); - $results = $bidi->closeWriteAndReadAll(); - try { - iterator_to_array($results); - // If the close stream 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 writeLogEntriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new WriteLogEntriesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $entries = []; - $request = (new WriteLogEntriesRequest()) - ->setEntries($entries); - $response = $gapicClient->writeLogEntries($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.LoggingServiceV2/WriteLogEntries', $actualFuncCall); - $actualValue = $actualRequestObject->getEntries(); - $this->assertProtobufEquals($entries, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function writeLogEntriesExceptionTest() - { - $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 - $entries = []; - $request = (new WriteLogEntriesRequest()) - ->setEntries($entries); - try { - $gapicClient->writeLogEntries($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 deleteLogAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedLogName = $gapicClient->logName('[PROJECT]', '[LOG]'); - $request = (new DeleteLogRequest()) - ->setLogName($formattedLogName); - $gapicClient->deleteLogAsync($request)->wait(); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.LoggingServiceV2/DeleteLog', $actualFuncCall); - $actualValue = $actualRequestObject->getLogName(); - $this->assertProtobufEquals($formattedLogName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/MetricsServiceV2ClientTest.php b/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/MetricsServiceV2ClientTest.php deleted file mode 100644 index c5076b65dfe9..000000000000 --- a/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/MetricsServiceV2ClientTest.php +++ /dev/null @@ -1,498 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return MetricsServiceV2Client */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new MetricsServiceV2Client($options); - } - - /** @test */ - public function createLogMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $bucketName = 'bucketName283610048'; - $disabled = true; - $valueExtractor = 'valueExtractor2047672534'; - $expectedResponse = new LogMetric(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setBucketName($bucketName); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setValueExtractor($valueExtractor); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $metric = new LogMetric(); - $metricName = 'metricName-610759589'; - $metric->setName($metricName); - $metricFilter = 'metricFilter1248897352'; - $metric->setFilter($metricFilter); - $request = (new CreateLogMetricRequest()) - ->setParent($formattedParent) - ->setMetric($metric); - $response = $gapicClient->createLogMetric($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.MetricsServiceV2/CreateLogMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getMetric(); - $this->assertProtobufEquals($metric, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createLogMetricExceptionTest() - { - $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]'); - $metric = new LogMetric(); - $metricName = 'metricName-610759589'; - $metric->setName($metricName); - $metricFilter = 'metricFilter1248897352'; - $metric->setFilter($metricFilter); - $request = (new CreateLogMetricRequest()) - ->setParent($formattedParent) - ->setMetric($metric); - try { - $gapicClient->createLogMetric($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 deleteLogMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); - $request = (new DeleteLogMetricRequest()) - ->setMetricName($formattedMetricName); - $gapicClient->deleteLogMetric($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.MetricsServiceV2/DeleteLogMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getMetricName(); - $this->assertProtobufEquals($formattedMetricName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteLogMetricExceptionTest() - { - $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 - $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); - $request = (new DeleteLogMetricRequest()) - ->setMetricName($formattedMetricName); - try { - $gapicClient->deleteLogMetric($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 getLogMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $bucketName = 'bucketName283610048'; - $disabled = true; - $valueExtractor = 'valueExtractor2047672534'; - $expectedResponse = new LogMetric(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setBucketName($bucketName); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setValueExtractor($valueExtractor); - $transport->addResponse($expectedResponse); - // Mock request - $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); - $request = (new GetLogMetricRequest()) - ->setMetricName($formattedMetricName); - $response = $gapicClient->getLogMetric($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.MetricsServiceV2/GetLogMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getMetricName(); - $this->assertProtobufEquals($formattedMetricName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLogMetricExceptionTest() - { - $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 - $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); - $request = (new GetLogMetricRequest()) - ->setMetricName($formattedMetricName); - try { - $gapicClient->getLogMetric($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 listLogMetricsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $metricsElement = new LogMetric(); - $metrics = [ - $metricsElement, - ]; - $expectedResponse = new ListLogMetricsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setMetrics($metrics); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListLogMetricsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listLogMetrics($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getMetrics()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.MetricsServiceV2/ListLogMetrics', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLogMetricsExceptionTest() - { - $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 ListLogMetricsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listLogMetrics($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 updateLogMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $bucketName = 'bucketName283610048'; - $disabled = true; - $valueExtractor = 'valueExtractor2047672534'; - $expectedResponse = new LogMetric(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setBucketName($bucketName); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setValueExtractor($valueExtractor); - $transport->addResponse($expectedResponse); - // Mock request - $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); - $metric = new LogMetric(); - $metricName = 'metricName-610759589'; - $metric->setName($metricName); - $metricFilter = 'metricFilter1248897352'; - $metric->setFilter($metricFilter); - $request = (new UpdateLogMetricRequest()) - ->setMetricName($formattedMetricName) - ->setMetric($metric); - $response = $gapicClient->updateLogMetric($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.MetricsServiceV2/UpdateLogMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getMetricName(); - $this->assertProtobufEquals($formattedMetricName, $actualValue); - $actualValue = $actualRequestObject->getMetric(); - $this->assertProtobufEquals($metric, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateLogMetricExceptionTest() - { - $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 - $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); - $metric = new LogMetric(); - $metricName = 'metricName-610759589'; - $metric->setName($metricName); - $metricFilter = 'metricFilter1248897352'; - $metric->setFilter($metricFilter); - $request = (new UpdateLogMetricRequest()) - ->setMetricName($formattedMetricName) - ->setMetric($metric); - try { - $gapicClient->updateLogMetric($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 createLogMetricAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $bucketName = 'bucketName283610048'; - $disabled = true; - $valueExtractor = 'valueExtractor2047672534'; - $expectedResponse = new LogMetric(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setBucketName($bucketName); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setValueExtractor($valueExtractor); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $metric = new LogMetric(); - $metricName = 'metricName-610759589'; - $metric->setName($metricName); - $metricFilter = 'metricFilter1248897352'; - $metric->setFilter($metricFilter); - $request = (new CreateLogMetricRequest()) - ->setParent($formattedParent) - ->setMetric($metric); - $response = $gapicClient->createLogMetricAsync($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.logging.v2.MetricsServiceV2/CreateLogMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getMetric(); - $this->assertProtobufEquals($metric, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Logging/v2/tests/Unit/V2/ConfigServiceV2ClientTest.php b/owl-bot-staging/Logging/v2/tests/Unit/V2/ConfigServiceV2ClientTest.php deleted file mode 100644 index 4e951b117f7b..000000000000 --- a/owl-bot-staging/Logging/v2/tests/Unit/V2/ConfigServiceV2ClientTest.php +++ /dev/null @@ -1,2555 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ConfigServiceV2Client */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ConfigServiceV2Client($options); - } - - /** @test */ - public function copyLogEntriesTest() - { - $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/copyLogEntriesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $logEntriesCopiedCount = 2134326978; - $expectedResponse = new CopyLogEntriesResponse(); - $expectedResponse->setLogEntriesCopiedCount($logEntriesCopiedCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/copyLogEntriesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $destination = 'destination-1429847026'; - $response = $gapicClient->copyLogEntries($name, $destination); - $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.logging.v2.ConfigServiceV2/CopyLogEntries', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualApiRequestObject->getDestination(); - $this->assertProtobufEquals($destination, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/copyLogEntriesTest'); - $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 copyLogEntriesExceptionTest() - { - $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/copyLogEntriesTest'); - $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 - $name = 'name3373707'; - $destination = 'destination-1429847026'; - $response = $gapicClient->copyLogEntries($name, $destination); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/copyLogEntriesTest'); - 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 createBucketTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $retentionDays = 1544391896; - $locked = true; - $analyticsEnabled = true; - $expectedResponse = new LogBucket(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setRetentionDays($retentionDays); - $expectedResponse->setLocked($locked); - $expectedResponse->setAnalyticsEnabled($analyticsEnabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $bucketId = 'bucketId1837164432'; - $bucket = new LogBucket(); - $response = $gapicClient->createBucket($formattedParent, $bucketId, $bucket); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/CreateBucket', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getBucketId(); - $this->assertProtobufEquals($bucketId, $actualValue); - $actualValue = $actualRequestObject->getBucket(); - $this->assertProtobufEquals($bucket, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createBucketExceptionTest() - { - $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $bucketId = 'bucketId1837164432'; - $bucket = new LogBucket(); - try { - $gapicClient->createBucket($formattedParent, $bucketId, $bucket); - // 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 createBucketAsyncTest() - { - $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/createBucketAsyncTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $retentionDays = 1544391896; - $locked = true; - $analyticsEnabled = true; - $expectedResponse = new LogBucket(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setRetentionDays($retentionDays); - $expectedResponse->setLocked($locked); - $expectedResponse->setAnalyticsEnabled($analyticsEnabled); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createBucketAsyncTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $bucketId = 'bucketId1837164432'; - $bucket = new LogBucket(); - $response = $gapicClient->createBucketAsync($formattedParent, $bucketId, $bucket); - $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.logging.v2.ConfigServiceV2/CreateBucketAsync', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getBucketId(); - $this->assertProtobufEquals($bucketId, $actualValue); - $actualValue = $actualApiRequestObject->getBucket(); - $this->assertProtobufEquals($bucket, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBucketAsyncTest'); - $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 createBucketAsyncExceptionTest() - { - $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/createBucketAsyncTest'); - $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $bucketId = 'bucketId1837164432'; - $bucket = new LogBucket(); - $response = $gapicClient->createBucketAsync($formattedParent, $bucketId, $bucket); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBucketAsyncTest'); - 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 createExclusionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $disabled = true; - $expectedResponse = new LogExclusion(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setDisabled($disabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $exclusion = new LogExclusion(); - $exclusionName = 'exclusionName1004344697'; - $exclusion->setName($exclusionName); - $exclusionFilter = 'exclusionFilter-1414044954'; - $exclusion->setFilter($exclusionFilter); - $response = $gapicClient->createExclusion($formattedParent, $exclusion); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/CreateExclusion', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getExclusion(); - $this->assertProtobufEquals($exclusion, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createExclusionExceptionTest() - { - $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]'); - $exclusion = new LogExclusion(); - $exclusionName = 'exclusionName1004344697'; - $exclusion->setName($exclusionName); - $exclusionFilter = 'exclusionFilter-1414044954'; - $exclusion->setFilter($exclusionFilter); - try { - $gapicClient->createExclusion($formattedParent, $exclusion); - // 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 createLinkTest() - { - $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/createLinkTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new Link(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createLinkTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $link = new Link(); - $linkId = 'linkId177080192'; - $response = $gapicClient->createLink($formattedParent, $link, $linkId); - $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.logging.v2.ConfigServiceV2/CreateLink', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getLink(); - $this->assertProtobufEquals($link, $actualValue); - $actualValue = $actualApiRequestObject->getLinkId(); - $this->assertProtobufEquals($linkId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLinkTest'); - $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 createLinkExceptionTest() - { - $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/createLinkTest'); - $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $link = new Link(); - $linkId = 'linkId177080192'; - $response = $gapicClient->createLink($formattedParent, $link, $linkId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLinkTest'); - 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 createSinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $destination = 'destination-1429847026'; - $filter = 'filter-1274492040'; - $description = 'description-1724546052'; - $disabled = true; - $writerIdentity = 'writerIdentity775638794'; - $includeChildren = true; - $expectedResponse = new LogSink(); - $expectedResponse->setName($name); - $expectedResponse->setDestination($destination); - $expectedResponse->setFilter($filter); - $expectedResponse->setDescription($description); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setWriterIdentity($writerIdentity); - $expectedResponse->setIncludeChildren($includeChildren); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $sink = new LogSink(); - $sinkName = 'sinkName508775358'; - $sink->setName($sinkName); - $sinkDestination = 'sinkDestination-1018870917'; - $sink->setDestination($sinkDestination); - $response = $gapicClient->createSink($formattedParent, $sink); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/CreateSink', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSink(); - $this->assertProtobufEquals($sink, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSinkExceptionTest() - { - $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]'); - $sink = new LogSink(); - $sinkName = 'sinkName508775358'; - $sink->setName($sinkName); - $sinkDestination = 'sinkDestination-1018870917'; - $sink->setDestination($sinkDestination); - try { - $gapicClient->createSink($formattedParent, $sink); - // 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 createViewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $expectedResponse = new LogView(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $viewId = 'viewId454228213'; - $view = new LogView(); - $response = $gapicClient->createView($parent, $viewId, $view); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/CreateView', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getViewId(); - $this->assertProtobufEquals($viewId, $actualValue); - $actualValue = $actualRequestObject->getView(); - $this->assertProtobufEquals($view, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createViewExceptionTest() - { - $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 - $parent = 'parent-995424086'; - $viewId = 'viewId454228213'; - $view = new LogView(); - try { - $gapicClient->createView($parent, $viewId, $view); - // 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 deleteBucketTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $gapicClient->deleteBucket($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/DeleteBucket', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBucketExceptionTest() - { - $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - try { - $gapicClient->deleteBucket($formattedName); - // 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 deleteExclusionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logExclusionName('[PROJECT]', '[EXCLUSION]'); - $gapicClient->deleteExclusion($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/DeleteExclusion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteExclusionExceptionTest() - { - $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->logExclusionName('[PROJECT]', '[EXCLUSION]'); - try { - $gapicClient->deleteExclusion($formattedName); - // 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 deleteLinkTest() - { - $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/deleteLinkTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteLinkTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); - $response = $gapicClient->deleteLink($formattedName); - $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.logging.v2.ConfigServiceV2/DeleteLink', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLinkTest'); - $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 deleteLinkExceptionTest() - { - $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/deleteLinkTest'); - $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->linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); - $response = $gapicClient->deleteLink($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLinkTest'); - 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 deleteSinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); - $gapicClient->deleteSink($formattedSinkName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/DeleteSink', $actualFuncCall); - $actualValue = $actualRequestObject->getSinkName(); - $this->assertProtobufEquals($formattedSinkName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSinkExceptionTest() - { - $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 - $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); - try { - $gapicClient->deleteSink($formattedSinkName); - // 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 deleteViewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logViewName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[VIEW]'); - $gapicClient->deleteView($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/DeleteView', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteViewExceptionTest() - { - $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->logViewName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[VIEW]'); - try { - $gapicClient->deleteView($formattedName); - // 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 getBucketTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $retentionDays = 1544391896; - $locked = true; - $analyticsEnabled = true; - $expectedResponse = new LogBucket(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setRetentionDays($retentionDays); - $expectedResponse->setLocked($locked); - $expectedResponse->setAnalyticsEnabled($analyticsEnabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $response = $gapicClient->getBucket($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/GetBucket', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBucketExceptionTest() - { - $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - try { - $gapicClient->getBucket($formattedName); - // 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 getCmekSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $kmsKeyName = 'kmsKeyName2094986649'; - $kmsKeyVersionName = 'kmsKeyVersionName-1734350176'; - $serviceAccountId = 'serviceAccountId-111486921'; - $expectedResponse = new CmekSettings(); - $expectedResponse->setName($name2); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName); - $expectedResponse->setServiceAccountId($serviceAccountId); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getCmekSettings(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/GetCmekSettings', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCmekSettingsExceptionTest() - { - $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); - try { - $gapicClient->getCmekSettings(); - // 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 getExclusionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $disabled = true; - $expectedResponse = new LogExclusion(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setDisabled($disabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logExclusionName('[PROJECT]', '[EXCLUSION]'); - $response = $gapicClient->getExclusion($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/GetExclusion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getExclusionExceptionTest() - { - $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->logExclusionName('[PROJECT]', '[EXCLUSION]'); - try { - $gapicClient->getExclusion($formattedName); - // 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 getLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new Link(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); - $response = $gapicClient->getLink($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/GetLink', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLinkExceptionTest() - { - $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->linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); - try { - $gapicClient->getLink($formattedName); - // 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 getSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $kmsKeyName = 'kmsKeyName2094986649'; - $kmsServiceAccountId = 'kmsServiceAccountId-263326747'; - $storageLocation = 'storageLocation-612882183'; - $disableDefaultSink = true; - $expectedResponse = new Settings(); - $expectedResponse->setName($name2); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setKmsServiceAccountId($kmsServiceAccountId); - $expectedResponse->setStorageLocation($storageLocation); - $expectedResponse->setDisableDefaultSink($disableDefaultSink); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->settingsName('[PROJECT]'); - $response = $gapicClient->getSettings($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/GetSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSettingsExceptionTest() - { - $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->settingsName('[PROJECT]'); - try { - $gapicClient->getSettings($formattedName); - // 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 getSinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $destination = 'destination-1429847026'; - $filter = 'filter-1274492040'; - $description = 'description-1724546052'; - $disabled = true; - $writerIdentity = 'writerIdentity775638794'; - $includeChildren = true; - $expectedResponse = new LogSink(); - $expectedResponse->setName($name); - $expectedResponse->setDestination($destination); - $expectedResponse->setFilter($filter); - $expectedResponse->setDescription($description); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setWriterIdentity($writerIdentity); - $expectedResponse->setIncludeChildren($includeChildren); - $transport->addResponse($expectedResponse); - // Mock request - $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); - $response = $gapicClient->getSink($formattedSinkName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/GetSink', $actualFuncCall); - $actualValue = $actualRequestObject->getSinkName(); - $this->assertProtobufEquals($formattedSinkName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSinkExceptionTest() - { - $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 - $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); - try { - $gapicClient->getSink($formattedSinkName); - // 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 getViewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $expectedResponse = new LogView(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logViewName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[VIEW]'); - $response = $gapicClient->getView($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/GetView', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getViewExceptionTest() - { - $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->logViewName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[VIEW]'); - try { - $gapicClient->getView($formattedName); - // 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 listBucketsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $bucketsElement = new LogBucket(); - $buckets = [ - $bucketsElement, - ]; - $expectedResponse = new ListBucketsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBuckets($buckets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $response = $gapicClient->listBuckets($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBuckets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/ListBuckets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBucketsExceptionTest() - { - $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - try { - $gapicClient->listBuckets($formattedParent); - // 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 listExclusionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $exclusionsElement = new LogExclusion(); - $exclusions = [ - $exclusionsElement, - ]; - $expectedResponse = new ListExclusionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setExclusions($exclusions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listExclusions($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getExclusions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/ListExclusions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExclusionsExceptionTest() - { - $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]'); - try { - $gapicClient->listExclusions($formattedParent); - // 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 listLinksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $linksElement = new Link(); - $links = [ - $linksElement, - ]; - $expectedResponse = new ListLinksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLinks($links); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $response = $gapicClient->listLinks($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLinks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/ListLinks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLinksExceptionTest() - { - $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - try { - $gapicClient->listLinks($formattedParent); - // 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 listSinksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $sinksElement = new LogSink(); - $sinks = [ - $sinksElement, - ]; - $expectedResponse = new ListSinksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSinks($sinks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listSinks($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSinks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/ListSinks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSinksExceptionTest() - { - $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]'); - try { - $gapicClient->listSinks($formattedParent); - // 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 listViewsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $viewsElement = new LogView(); - $views = [ - $viewsElement, - ]; - $expectedResponse = new ListViewsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setViews($views); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $response = $gapicClient->listViews($parent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getViews()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/ListViews', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listViewsExceptionTest() - { - $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 - $parent = 'parent-995424086'; - try { - $gapicClient->listViews($parent); - // 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 undeleteBucketTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $gapicClient->undeleteBucket($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/UndeleteBucket', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function undeleteBucketExceptionTest() - { - $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - try { - $gapicClient->undeleteBucket($formattedName); - // 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 updateBucketTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $retentionDays = 1544391896; - $locked = true; - $analyticsEnabled = true; - $expectedResponse = new LogBucket(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setRetentionDays($retentionDays); - $expectedResponse->setLocked($locked); - $expectedResponse->setAnalyticsEnabled($analyticsEnabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $bucket = new LogBucket(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateBucket($formattedName, $bucket, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateBucket', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getBucket(); - $this->assertProtobufEquals($bucket, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateBucketExceptionTest() - { - $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $bucket = new LogBucket(); - $updateMask = new FieldMask(); - try { - $gapicClient->updateBucket($formattedName, $bucket, $updateMask); - // 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 updateBucketAsyncTest() - { - $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/updateBucketAsyncTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $retentionDays = 1544391896; - $locked = true; - $analyticsEnabled = true; - $expectedResponse = new LogBucket(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setRetentionDays($retentionDays); - $expectedResponse->setLocked($locked); - $expectedResponse->setAnalyticsEnabled($analyticsEnabled); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateBucketAsyncTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $bucket = new LogBucket(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateBucketAsync($formattedName, $bucket, $updateMask); - $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.logging.v2.ConfigServiceV2/UpdateBucketAsync', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getBucket(); - $this->assertProtobufEquals($bucket, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBucketAsyncTest'); - $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 updateBucketAsyncExceptionTest() - { - $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/updateBucketAsyncTest'); - $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $bucket = new LogBucket(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateBucketAsync($formattedName, $bucket, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBucketAsyncTest'); - 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 updateCmekSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $kmsKeyName = 'kmsKeyName2094986649'; - $kmsKeyVersionName = 'kmsKeyVersionName-1734350176'; - $serviceAccountId = 'serviceAccountId-111486921'; - $expectedResponse = new CmekSettings(); - $expectedResponse->setName($name2); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName); - $expectedResponse->setServiceAccountId($serviceAccountId); - $transport->addResponse($expectedResponse); - $response = $gapicClient->updateCmekSettings(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateCmekSettings', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCmekSettingsExceptionTest() - { - $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); - try { - $gapicClient->updateCmekSettings(); - // 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 updateExclusionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $disabled = true; - $expectedResponse = new LogExclusion(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setDisabled($disabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logExclusionName('[PROJECT]', '[EXCLUSION]'); - $exclusion = new LogExclusion(); - $exclusionName = 'exclusionName1004344697'; - $exclusion->setName($exclusionName); - $exclusionFilter = 'exclusionFilter-1414044954'; - $exclusion->setFilter($exclusionFilter); - $updateMask = new FieldMask(); - $response = $gapicClient->updateExclusion($formattedName, $exclusion, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateExclusion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getExclusion(); - $this->assertProtobufEquals($exclusion, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateExclusionExceptionTest() - { - $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->logExclusionName('[PROJECT]', '[EXCLUSION]'); - $exclusion = new LogExclusion(); - $exclusionName = 'exclusionName1004344697'; - $exclusion->setName($exclusionName); - $exclusionFilter = 'exclusionFilter-1414044954'; - $exclusion->setFilter($exclusionFilter); - $updateMask = new FieldMask(); - try { - $gapicClient->updateExclusion($formattedName, $exclusion, $updateMask); - // 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 updateSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $kmsKeyName = 'kmsKeyName2094986649'; - $kmsServiceAccountId = 'kmsServiceAccountId-263326747'; - $storageLocation = 'storageLocation-612882183'; - $disableDefaultSink = true; - $expectedResponse = new Settings(); - $expectedResponse->setName($name2); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setKmsServiceAccountId($kmsServiceAccountId); - $expectedResponse->setStorageLocation($storageLocation); - $expectedResponse->setDisableDefaultSink($disableDefaultSink); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $settings = new Settings(); - $response = $gapicClient->updateSettings($name, $settings); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getSettings(); - $this->assertProtobufEquals($settings, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSettingsExceptionTest() - { - $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'; - $settings = new Settings(); - try { - $gapicClient->updateSettings($name, $settings); - // 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 updateSinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $destination = 'destination-1429847026'; - $filter = 'filter-1274492040'; - $description = 'description-1724546052'; - $disabled = true; - $writerIdentity = 'writerIdentity775638794'; - $includeChildren = true; - $expectedResponse = new LogSink(); - $expectedResponse->setName($name); - $expectedResponse->setDestination($destination); - $expectedResponse->setFilter($filter); - $expectedResponse->setDescription($description); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setWriterIdentity($writerIdentity); - $expectedResponse->setIncludeChildren($includeChildren); - $transport->addResponse($expectedResponse); - // Mock request - $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); - $sink = new LogSink(); - $sinkName = 'sinkName508775358'; - $sink->setName($sinkName); - $sinkDestination = 'sinkDestination-1018870917'; - $sink->setDestination($sinkDestination); - $response = $gapicClient->updateSink($formattedSinkName, $sink); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateSink', $actualFuncCall); - $actualValue = $actualRequestObject->getSinkName(); - $this->assertProtobufEquals($formattedSinkName, $actualValue); - $actualValue = $actualRequestObject->getSink(); - $this->assertProtobufEquals($sink, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSinkExceptionTest() - { - $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 - $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); - $sink = new LogSink(); - $sinkName = 'sinkName508775358'; - $sink->setName($sinkName); - $sinkDestination = 'sinkDestination-1018870917'; - $sink->setDestination($sinkDestination); - try { - $gapicClient->updateSink($formattedSinkName, $sink); - // 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 updateViewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $expectedResponse = new LogView(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $view = new LogView(); - $response = $gapicClient->updateView($name, $view); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateView', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getView(); - $this->assertProtobufEquals($view, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateViewExceptionTest() - { - $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'; - $view = new LogView(); - try { - $gapicClient->updateView($name, $view); - // 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()); - } -} diff --git a/owl-bot-staging/Logging/v2/tests/Unit/V2/LoggingServiceV2ClientTest.php b/owl-bot-staging/Logging/v2/tests/Unit/V2/LoggingServiceV2ClientTest.php deleted file mode 100644 index c50192cd7d01..000000000000 --- a/owl-bot-staging/Logging/v2/tests/Unit/V2/LoggingServiceV2ClientTest.php +++ /dev/null @@ -1,481 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return LoggingServiceV2Client */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new LoggingServiceV2Client($options); - } - - /** @test */ - public function deleteLogTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedLogName = $gapicClient->logName('[PROJECT]', '[LOG]'); - $gapicClient->deleteLog($formattedLogName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.LoggingServiceV2/DeleteLog', $actualFuncCall); - $actualValue = $actualRequestObject->getLogName(); - $this->assertProtobufEquals($formattedLogName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteLogExceptionTest() - { - $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 - $formattedLogName = $gapicClient->logName('[PROJECT]', '[LOG]'); - try { - $gapicClient->deleteLog($formattedLogName); - // 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 listLogEntriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $entriesElement = new LogEntry(); - $entries = [ - $entriesElement, - ]; - $expectedResponse = new ListLogEntriesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEntries($entries); - $transport->addResponse($expectedResponse); - // Mock request - $formattedResourceNames = [ - $gapicClient->projectName('[PROJECT]'), - ]; - $response = $gapicClient->listLogEntries($formattedResourceNames); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEntries()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.LoggingServiceV2/ListLogEntries', $actualFuncCall); - $actualValue = $actualRequestObject->getResourceNames(); - $this->assertProtobufEquals($formattedResourceNames, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLogEntriesExceptionTest() - { - $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 - $formattedResourceNames = [ - $gapicClient->projectName('[PROJECT]'), - ]; - try { - $gapicClient->listLogEntries($formattedResourceNames); - // 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 listLogsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $logNamesElement = 'logNamesElement-1079688374'; - $logNames = [ - $logNamesElement, - ]; - $expectedResponse = new ListLogsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLogNames($logNames); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listLogs($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLogNames()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.LoggingServiceV2/ListLogs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLogsExceptionTest() - { - $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]'); - try { - $gapicClient->listLogs($formattedParent); - // 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 listMonitoredResourceDescriptorsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $resourceDescriptorsElement = new MonitoredResourceDescriptor(); - $resourceDescriptors = [ - $resourceDescriptorsElement, - ]; - $expectedResponse = new ListMonitoredResourceDescriptorsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResourceDescriptors($resourceDescriptors); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listMonitoredResourceDescriptors(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResourceDescriptors()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMonitoredResourceDescriptorsExceptionTest() - { - $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); - try { - $gapicClient->listMonitoredResourceDescriptors(); - // 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 tailLogEntriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TailLogEntriesResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new TailLogEntriesResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new TailLogEntriesResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $resourceNames = []; - $request = new TailLogEntriesRequest(); - $request->setResourceNames($resourceNames); - $resourceNames2 = []; - $request2 = new TailLogEntriesRequest(); - $request2->setResourceNames($resourceNames2); - $resourceNames3 = []; - $request3 = new TailLogEntriesRequest(); - $request3->setResourceNames($resourceNames3); - $bidi = $gapicClient->tailLogEntries(); - $this->assertInstanceOf(BidiStream::class, $bidi); - $bidi->write($request); - $responses = []; - $responses[] = $bidi->read(); - $bidi->writeAll([ - $request2, - $request3, - ]); - foreach ($bidi->closeWriteAndReadAll() as $response) { - $responses[] = $response; - } - - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $createStreamRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($createStreamRequests)); - $streamFuncCall = $createStreamRequests[0]->getFuncCall(); - $streamRequestObject = $createStreamRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.LoggingServiceV2/TailLogEntries', $streamFuncCall); - $this->assertNull($streamRequestObject); - $callObjects = $transport->popCallObjects(); - $this->assertSame(1, count($callObjects)); - $bidiCall = $callObjects[0]; - $writeRequests = $bidiCall->popReceivedCalls(); - $expectedRequests = []; - $expectedRequests[] = $request; - $expectedRequests[] = $request2; - $expectedRequests[] = $request3; - $this->assertEquals($expectedRequests, $writeRequests); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function tailLogEntriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $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->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - $bidi = $gapicClient->tailLogEntries(); - $results = $bidi->closeWriteAndReadAll(); - try { - iterator_to_array($results); - // If the close stream 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 writeLogEntriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new WriteLogEntriesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $entries = []; - $response = $gapicClient->writeLogEntries($entries); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.LoggingServiceV2/WriteLogEntries', $actualFuncCall); - $actualValue = $actualRequestObject->getEntries(); - $this->assertProtobufEquals($entries, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function writeLogEntriesExceptionTest() - { - $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 - $entries = []; - try { - $gapicClient->writeLogEntries($entries); - // 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()); - } -} diff --git a/owl-bot-staging/Logging/v2/tests/Unit/V2/MetricsServiceV2ClientTest.php b/owl-bot-staging/Logging/v2/tests/Unit/V2/MetricsServiceV2ClientTest.php deleted file mode 100644 index 1b0328d56966..000000000000 --- a/owl-bot-staging/Logging/v2/tests/Unit/V2/MetricsServiceV2ClientTest.php +++ /dev/null @@ -1,422 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return MetricsServiceV2Client */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new MetricsServiceV2Client($options); - } - - /** @test */ - public function createLogMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $bucketName = 'bucketName283610048'; - $disabled = true; - $valueExtractor = 'valueExtractor2047672534'; - $expectedResponse = new LogMetric(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setBucketName($bucketName); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setValueExtractor($valueExtractor); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $metric = new LogMetric(); - $metricName = 'metricName-610759589'; - $metric->setName($metricName); - $metricFilter = 'metricFilter1248897352'; - $metric->setFilter($metricFilter); - $response = $gapicClient->createLogMetric($formattedParent, $metric); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.MetricsServiceV2/CreateLogMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getMetric(); - $this->assertProtobufEquals($metric, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createLogMetricExceptionTest() - { - $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]'); - $metric = new LogMetric(); - $metricName = 'metricName-610759589'; - $metric->setName($metricName); - $metricFilter = 'metricFilter1248897352'; - $metric->setFilter($metricFilter); - try { - $gapicClient->createLogMetric($formattedParent, $metric); - // 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 deleteLogMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); - $gapicClient->deleteLogMetric($formattedMetricName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.MetricsServiceV2/DeleteLogMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getMetricName(); - $this->assertProtobufEquals($formattedMetricName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteLogMetricExceptionTest() - { - $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 - $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); - try { - $gapicClient->deleteLogMetric($formattedMetricName); - // 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 getLogMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $bucketName = 'bucketName283610048'; - $disabled = true; - $valueExtractor = 'valueExtractor2047672534'; - $expectedResponse = new LogMetric(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setBucketName($bucketName); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setValueExtractor($valueExtractor); - $transport->addResponse($expectedResponse); - // Mock request - $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); - $response = $gapicClient->getLogMetric($formattedMetricName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.MetricsServiceV2/GetLogMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getMetricName(); - $this->assertProtobufEquals($formattedMetricName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLogMetricExceptionTest() - { - $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 - $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); - try { - $gapicClient->getLogMetric($formattedMetricName); - // 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 listLogMetricsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $metricsElement = new LogMetric(); - $metrics = [ - $metricsElement, - ]; - $expectedResponse = new ListLogMetricsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setMetrics($metrics); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listLogMetrics($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getMetrics()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.MetricsServiceV2/ListLogMetrics', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLogMetricsExceptionTest() - { - $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]'); - try { - $gapicClient->listLogMetrics($formattedParent); - // 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 updateLogMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $bucketName = 'bucketName283610048'; - $disabled = true; - $valueExtractor = 'valueExtractor2047672534'; - $expectedResponse = new LogMetric(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setBucketName($bucketName); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setValueExtractor($valueExtractor); - $transport->addResponse($expectedResponse); - // Mock request - $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); - $metric = new LogMetric(); - $metricName = 'metricName-610759589'; - $metric->setName($metricName); - $metricFilter = 'metricFilter1248897352'; - $metric->setFilter($metricFilter); - $response = $gapicClient->updateLogMetric($formattedMetricName, $metric); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.MetricsServiceV2/UpdateLogMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getMetricName(); - $this->assertProtobufEquals($formattedMetricName, $actualValue); - $actualValue = $actualRequestObject->getMetric(); - $this->assertProtobufEquals($metric, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateLogMetricExceptionTest() - { - $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 - $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); - $metric = new LogMetric(); - $metricName = 'metricName-610759589'; - $metric->setName($metricName); - $metricFilter = 'metricFilter1248897352'; - $metric->setFilter($metricFilter); - try { - $gapicClient->updateLogMetric($formattedMetricName, $metric); - // 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()); - } -} diff --git a/owl-bot-staging/LongRunning/proto/src/GPBMetadata/Google/Longrunning/Operations.php b/owl-bot-staging/LongRunning/proto/src/GPBMetadata/Google/Longrunning/Operations.php deleted file mode 100644 index 0dcf976e506f..000000000000 Binary files a/owl-bot-staging/LongRunning/proto/src/GPBMetadata/Google/Longrunning/Operations.php and /dev/null differ diff --git a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/CancelOperationRequest.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/CancelOperationRequest.php deleted file mode 100644 index feefc4229726..000000000000 --- a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/CancelOperationRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.longrunning.CancelOperationRequest - */ -class CancelOperationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the operation resource to be cancelled. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - - /** - * @param string $name The name of the operation resource to be cancelled. - * - * @return \Google\LongRunning\CancelOperationRequest - * - * @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 - * The name of the operation resource to be cancelled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Longrunning\Operations::initOnce(); - parent::__construct($data); - } - - /** - * The name of the operation resource to be cancelled. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the operation resource to be cancelled. - * - * 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; - } - -} - diff --git a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/DeleteOperationRequest.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/DeleteOperationRequest.php deleted file mode 100644 index 6ea1d6a3179c..000000000000 --- a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/DeleteOperationRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.longrunning.DeleteOperationRequest - */ -class DeleteOperationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the operation resource to be deleted. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - - /** - * @param string $name The name of the operation resource to be deleted. - * - * @return \Google\LongRunning\DeleteOperationRequest - * - * @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 - * The name of the operation resource to be deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Longrunning\Operations::initOnce(); - parent::__construct($data); - } - - /** - * The name of the operation resource to be deleted. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the operation resource to be deleted. - * - * 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; - } - -} - diff --git a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/GetOperationRequest.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/GetOperationRequest.php deleted file mode 100644 index 5d3188a05c0a..000000000000 --- a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/GetOperationRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.longrunning.GetOperationRequest - */ -class GetOperationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the operation resource. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - - /** - * @param string $name The name of the operation resource. - * - * @return \Google\LongRunning\GetOperationRequest - * - * @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 - * The name of the operation resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Longrunning\Operations::initOnce(); - parent::__construct($data); - } - - /** - * The name of the operation resource. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the operation resource. - * - * 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; - } - -} - diff --git a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/ListOperationsRequest.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/ListOperationsRequest.php deleted file mode 100644 index c2a2f929fd57..000000000000 --- a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/ListOperationsRequest.php +++ /dev/null @@ -1,185 +0,0 @@ -google.longrunning.ListOperationsRequest - */ -class ListOperationsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the operation's parent resource. - * - * Generated from protobuf field string name = 4; - */ - protected $name = ''; - /** - * The standard list filter. - * - * Generated from protobuf field string filter = 1; - */ - protected $filter = ''; - /** - * The standard list page size. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The standard list page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $name The name of the operation's parent resource. - * @param string $filter The standard list filter. - * - * @return \Google\LongRunning\ListOperationsRequest - * - * @experimental - */ - public static function build(string $name, string $filter): self - { - return (new self()) - ->setName($name) - ->setFilter($filter); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the operation's parent resource. - * @type string $filter - * The standard list filter. - * @type int $page_size - * The standard list page size. - * @type string $page_token - * The standard list page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Longrunning\Operations::initOnce(); - parent::__construct($data); - } - - /** - * The name of the operation's parent resource. - * - * Generated from protobuf field string name = 4; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the operation's parent resource. - * - * 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 standard list filter. - * - * Generated from protobuf field string filter = 1; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The standard list filter. - * - * Generated from protobuf field string filter = 1; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * The standard list page size. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The standard list page size. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The standard list page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The standard list page token. - * - * Generated from protobuf field string page_token = 3; - * @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/LongRunning/proto/src/Google/LongRunning/ListOperationsResponse.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/ListOperationsResponse.php deleted file mode 100644 index ef04c88b3e40..000000000000 --- a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/ListOperationsResponse.php +++ /dev/null @@ -1,102 +0,0 @@ -google.longrunning.ListOperationsResponse - */ -class ListOperationsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of operations that matches the specified filter in the request. - * - * Generated from protobuf field repeated .google.longrunning.Operation operations = 1; - */ - private $operations; - /** - * The standard List next-page token. - * - * 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\LongRunning\Operation>|\Google\Protobuf\Internal\RepeatedField $operations - * A list of operations that matches the specified filter in the request. - * @type string $next_page_token - * The standard List next-page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Longrunning\Operations::initOnce(); - parent::__construct($data); - } - - /** - * A list of operations that matches the specified filter in the request. - * - * Generated from protobuf field repeated .google.longrunning.Operation operations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOperations() - { - return $this->operations; - } - - /** - * A list of operations that matches the specified filter in the request. - * - * Generated from protobuf field repeated .google.longrunning.Operation operations = 1; - * @param array<\Google\LongRunning\Operation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOperations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\LongRunning\Operation::class); - $this->operations = $arr; - - return $this; - } - - /** - * The standard List next-page token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The standard List next-page token. - * - * 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/LongRunning/proto/src/Google/LongRunning/Operation.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/Operation.php deleted file mode 100644 index a66be225f856..000000000000 --- a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/Operation.php +++ /dev/null @@ -1,270 +0,0 @@ -google.longrunning.Operation - */ -class Operation extends \Google\Protobuf\Internal\Message -{ - /** - * The server-assigned name, which is only unique within the same service that - * originally returns it. If you use the default HTTP mapping, the - * `name` should be a resource name ending with `operations/{unique_id}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Service-specific metadata associated with the operation. It typically - * contains progress information and common metadata such as create time. - * Some services might not provide such metadata. Any method that returns a - * long-running operation should document the metadata type, if any. - * - * Generated from protobuf field .google.protobuf.Any metadata = 2; - */ - protected $metadata = null; - /** - * If the value is `false`, it means the operation is still in progress. - * If `true`, the operation is completed, and either `error` or `response` is - * available. - * - * Generated from protobuf field bool done = 3; - */ - protected $done = false; - protected $result; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The server-assigned name, which is only unique within the same service that - * originally returns it. If you use the default HTTP mapping, the - * `name` should be a resource name ending with `operations/{unique_id}`. - * @type \Google\Protobuf\Any $metadata - * Service-specific metadata associated with the operation. It typically - * contains progress information and common metadata such as create time. - * Some services might not provide such metadata. Any method that returns a - * long-running operation should document the metadata type, if any. - * @type bool $done - * If the value is `false`, it means the operation is still in progress. - * If `true`, the operation is completed, and either `error` or `response` is - * available. - * @type \Google\Rpc\Status $error - * The error result of the operation in case of failure or cancellation. - * @type \Google\Protobuf\Any $response - * The normal, successful response of the operation. If the original - * method returns no data on success, such as `Delete`, the response is - * `google.protobuf.Empty`. If the original method is standard - * `Get`/`Create`/`Update`, the response should be the resource. For other - * methods, the response should have the type `XxxResponse`, where `Xxx` - * is the original method name. For example, if the original method name - * is `TakeSnapshot()`, the inferred response type is - * `TakeSnapshotResponse`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Longrunning\Operations::initOnce(); - parent::__construct($data); - } - - /** - * The server-assigned name, which is only unique within the same service that - * originally returns it. If you use the default HTTP mapping, the - * `name` should be a resource name ending with `operations/{unique_id}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The server-assigned name, which is only unique within the same service that - * originally returns it. If you use the default HTTP mapping, the - * `name` should be a resource name ending with `operations/{unique_id}`. - * - * 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; - } - - /** - * Service-specific metadata associated with the operation. It typically - * contains progress information and common metadata such as create time. - * Some services might not provide such metadata. Any method that returns a - * long-running operation should document the metadata type, if any. - * - * Generated from protobuf field .google.protobuf.Any metadata = 2; - * @return \Google\Protobuf\Any|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * Service-specific metadata associated with the operation. It typically - * contains progress information and common metadata such as create time. - * Some services might not provide such metadata. Any method that returns a - * long-running operation should document the metadata type, if any. - * - * Generated from protobuf field .google.protobuf.Any metadata = 2; - * @param \Google\Protobuf\Any $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); - $this->metadata = $var; - - return $this; - } - - /** - * If the value is `false`, it means the operation is still in progress. - * If `true`, the operation is completed, and either `error` or `response` is - * available. - * - * Generated from protobuf field bool done = 3; - * @return bool - */ - public function getDone() - { - return $this->done; - } - - /** - * If the value is `false`, it means the operation is still in progress. - * If `true`, the operation is completed, and either `error` or `response` is - * available. - * - * Generated from protobuf field bool done = 3; - * @param bool $var - * @return $this - */ - public function setDone($var) - { - GPBUtil::checkBool($var); - $this->done = $var; - - return $this; - } - - /** - * The error result of the operation in case of failure or cancellation. - * - * Generated from protobuf field .google.rpc.Status error = 4; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->readOneof(4); - } - - public function hasError() - { - return $this->hasOneof(4); - } - - /** - * The error result of the operation in case of failure or cancellation. - * - * Generated from protobuf field .google.rpc.Status error = 4; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * The normal, successful response of the operation. If the original - * method returns no data on success, such as `Delete`, the response is - * `google.protobuf.Empty`. If the original method is standard - * `Get`/`Create`/`Update`, the response should be the resource. For other - * methods, the response should have the type `XxxResponse`, where `Xxx` - * is the original method name. For example, if the original method name - * is `TakeSnapshot()`, the inferred response type is - * `TakeSnapshotResponse`. - * - * Generated from protobuf field .google.protobuf.Any response = 5; - * @return \Google\Protobuf\Any|null - */ - public function getResponse() - { - return $this->readOneof(5); - } - - public function hasResponse() - { - return $this->hasOneof(5); - } - - /** - * The normal, successful response of the operation. If the original - * method returns no data on success, such as `Delete`, the response is - * `google.protobuf.Empty`. If the original method is standard - * `Get`/`Create`/`Update`, the response should be the resource. For other - * methods, the response should have the type `XxxResponse`, where `Xxx` - * is the original method name. For example, if the original method name - * is `TakeSnapshot()`, the inferred response type is - * `TakeSnapshotResponse`. - * - * Generated from protobuf field .google.protobuf.Any response = 5; - * @param \Google\Protobuf\Any $var - * @return $this - */ - public function setResponse($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getResult() - { - return $this->whichOneof("result"); - } - -} - diff --git a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/OperationInfo.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/OperationInfo.php deleted file mode 100644 index 9c3f952120af..000000000000 --- a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/OperationInfo.php +++ /dev/null @@ -1,144 +0,0 @@ -google.longrunning.OperationInfo - */ -class OperationInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The message name of the primary return type for this - * long-running operation. - * This type will be used to deserialize the LRO's response. - * If the response is in a different package from the rpc, a fully-qualified - * message name must be used (e.g. `google.protobuf.Struct`). - * Note: Altering this value constitutes a breaking change. - * - * Generated from protobuf field string response_type = 1; - */ - protected $response_type = ''; - /** - * Required. The message name of the metadata type for this long-running - * operation. - * If the response is in a different package from the rpc, a fully-qualified - * message name must be used (e.g. `google.protobuf.Struct`). - * Note: Altering this value constitutes a breaking change. - * - * Generated from protobuf field string metadata_type = 2; - */ - protected $metadata_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $response_type - * Required. The message name of the primary return type for this - * long-running operation. - * This type will be used to deserialize the LRO's response. - * If the response is in a different package from the rpc, a fully-qualified - * message name must be used (e.g. `google.protobuf.Struct`). - * Note: Altering this value constitutes a breaking change. - * @type string $metadata_type - * Required. The message name of the metadata type for this long-running - * operation. - * If the response is in a different package from the rpc, a fully-qualified - * message name must be used (e.g. `google.protobuf.Struct`). - * Note: Altering this value constitutes a breaking change. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Longrunning\Operations::initOnce(); - parent::__construct($data); - } - - /** - * Required. The message name of the primary return type for this - * long-running operation. - * This type will be used to deserialize the LRO's response. - * If the response is in a different package from the rpc, a fully-qualified - * message name must be used (e.g. `google.protobuf.Struct`). - * Note: Altering this value constitutes a breaking change. - * - * Generated from protobuf field string response_type = 1; - * @return string - */ - public function getResponseType() - { - return $this->response_type; - } - - /** - * Required. The message name of the primary return type for this - * long-running operation. - * This type will be used to deserialize the LRO's response. - * If the response is in a different package from the rpc, a fully-qualified - * message name must be used (e.g. `google.protobuf.Struct`). - * Note: Altering this value constitutes a breaking change. - * - * Generated from protobuf field string response_type = 1; - * @param string $var - * @return $this - */ - public function setResponseType($var) - { - GPBUtil::checkString($var, True); - $this->response_type = $var; - - return $this; - } - - /** - * Required. The message name of the metadata type for this long-running - * operation. - * If the response is in a different package from the rpc, a fully-qualified - * message name must be used (e.g. `google.protobuf.Struct`). - * Note: Altering this value constitutes a breaking change. - * - * Generated from protobuf field string metadata_type = 2; - * @return string - */ - public function getMetadataType() - { - return $this->metadata_type; - } - - /** - * Required. The message name of the metadata type for this long-running - * operation. - * If the response is in a different package from the rpc, a fully-qualified - * message name must be used (e.g. `google.protobuf.Struct`). - * Note: Altering this value constitutes a breaking change. - * - * Generated from protobuf field string metadata_type = 2; - * @param string $var - * @return $this - */ - public function setMetadataType($var) - { - GPBUtil::checkString($var, True); - $this->metadata_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/WaitOperationRequest.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/WaitOperationRequest.php deleted file mode 100644 index 435cd323b1aa..000000000000 --- a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/WaitOperationRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.longrunning.WaitOperationRequest - */ -class WaitOperationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the operation resource to wait on. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The maximum duration to wait before timing out. If left blank, the wait - * will be at most the time permitted by the underlying HTTP/RPC protocol. - * If RPC context deadline is also specified, the shorter one will be used. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 2; - */ - protected $timeout = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the operation resource to wait on. - * @type \Google\Protobuf\Duration $timeout - * The maximum duration to wait before timing out. If left blank, the wait - * will be at most the time permitted by the underlying HTTP/RPC protocol. - * If RPC context deadline is also specified, the shorter one will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Longrunning\Operations::initOnce(); - parent::__construct($data); - } - - /** - * The name of the operation resource to wait on. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the operation resource to wait on. - * - * 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 maximum duration to wait before timing out. If left blank, the wait - * will be at most the time permitted by the underlying HTTP/RPC protocol. - * If RPC context deadline is also specified, the shorter one will be used. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeout() - { - return $this->timeout; - } - - public function hasTimeout() - { - return isset($this->timeout); - } - - public function clearTimeout() - { - unset($this->timeout); - } - - /** - * The maximum duration to wait before timing out. If left blank, the wait - * will be at most the time permitted by the underlying HTTP/RPC protocol. - * If RPC context deadline is also specified, the shorter one will be used. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timeout = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LongRunning/src/LongRunning/Client/OperationsClient.php b/owl-bot-staging/LongRunning/src/LongRunning/Client/OperationsClient.php deleted file mode 100644 index eefed198f56c..000000000000 --- a/owl-bot-staging/LongRunning/src/LongRunning/Client/OperationsClient.php +++ /dev/null @@ -1,332 +0,0 @@ - cancelOperationAsync(CancelOperationRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteOperationAsync(DeleteOperationRequest $request, array $optionalArgs = []) - * @method PromiseInterface getOperationAsync(GetOperationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listOperationsAsync(ListOperationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface waitOperationAsync(WaitOperationRequest $request, array $optionalArgs = []) - */ -final class OperationsClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.longrunning.Operations'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'longrunning.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'longrunning.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 = []; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/operations_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/operations_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/operations_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/operations_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $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 'longrunning.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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 - * } - * - * @throws ValidationException - */ - public function __construct(array $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); - } - - /** - * Starts asynchronous cancellation on a long-running operation. The server - * makes a best effort to cancel the operation, but success is not - * guaranteed. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. Clients can use - * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or - * other methods to check whether the cancellation succeeded or whether the - * operation completed despite cancellation. On successful cancellation, - * the operation is not deleted; instead, it becomes an operation with - * an [Operation.error][google.longrunning.Operation.error] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of `1`, corresponding to - * `Code.CANCELLED`. - * - * The async variant is {@see OperationsClient::cancelOperationAsync()} . - * - * @example samples/OperationsClient/cancel_operation.php - * - * @param CancelOperationRequest $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 cancelOperation(CancelOperationRequest $request, array $callOptions = []): void - { - $this->startApiCall('CancelOperation', $request, $callOptions)->wait(); - } - - /** - * Deletes a long-running operation. This method indicates that the client is - * no longer interested in the operation result. It does not cancel the - * operation. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. - * - * The async variant is {@see OperationsClient::deleteOperationAsync()} . - * - * @example samples/OperationsClient/delete_operation.php - * - * @param DeleteOperationRequest $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 deleteOperation(DeleteOperationRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteOperation', $request, $callOptions)->wait(); - } - - /** - * Gets the latest state of a long-running operation. Clients can use this - * method to poll the operation result at intervals as recommended by the API - * service. - * - * The async variant is {@see OperationsClient::getOperationAsync()} . - * - * @example samples/OperationsClient/get_operation.php - * - * @param GetOperationRequest $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 Operation - * - * @throws ApiException Thrown if the API call fails. - */ - public function getOperation(GetOperationRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('GetOperation', $request, $callOptions)->wait(); - } - - /** - * Lists operations that match the specified filter in the request. If the - * server doesn't support this method, it returns `UNIMPLEMENTED`. - * - * The async variant is {@see OperationsClient::listOperationsAsync()} . - * - * @example samples/OperationsClient/list_operations.php - * - * @param ListOperationsRequest $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 listOperations(ListOperationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListOperations', $request, $callOptions); - } - - /** - * Waits until the specified long-running operation is done or reaches at most - * a specified timeout, returning the latest state. If the operation is - * already done, the latest state is immediately returned. If the timeout - * specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - * timeout is used. If the server does not support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. - * Note that this method is on a best-effort basis. It may return the latest - * state before the specified timeout (including immediately), meaning even an - * immediate response is no guarantee that the operation is done. - * - * The async variant is {@see OperationsClient::waitOperationAsync()} . - * - * @example samples/OperationsClient/wait_operation.php - * - * @param WaitOperationRequest $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 Operation - * - * @throws ApiException Thrown if the API call fails. - */ - public function waitOperation(WaitOperationRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('WaitOperation', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/LongRunning/src/LongRunning/Gapic/OperationsGapicClient.php b/owl-bot-staging/LongRunning/src/LongRunning/Gapic/OperationsGapicClient.php deleted file mode 100644 index aad418300587..000000000000 --- a/owl-bot-staging/LongRunning/src/LongRunning/Gapic/OperationsGapicClient.php +++ /dev/null @@ -1,429 +0,0 @@ -cancelOperation($name); - * } finally { - * $operationsClient->close(); - * } - * ``` - * - * @deprecated Please use the new service client {@see \Google\LongRunning\Client\OperationsClient}. - */ -class OperationsGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.longrunning.Operations'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'longrunning.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'longrunning.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = []; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/operations_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/operations_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/operations_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/operations_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $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 'longrunning.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Starts asynchronous cancellation on a long-running operation. The server - * makes a best effort to cancel the operation, but success is not - * guaranteed. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. Clients can use - * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or - * other methods to check whether the cancellation succeeded or whether the - * operation completed despite cancellation. On successful cancellation, - * the operation is not deleted; instead, it becomes an operation with - * an [Operation.error][google.longrunning.Operation.error] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of `1`, corresponding to - * `Code.CANCELLED`. - * - * Sample code: - * ``` - * $operationsClient = new OperationsClient(); - * try { - * $name = 'name'; - * $operationsClient->cancelOperation($name); - * } finally { - * $operationsClient->close(); - * } - * ``` - * - * @param string $name The name of the operation resource to be cancelled. - * @param array $optionalArgs { - * 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 if the remote call fails - */ - public function cancelOperation($name, array $optionalArgs = []) - { - $request = new CancelOperationRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CancelOperation', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a long-running operation. This method indicates that the client is - * no longer interested in the operation result. It does not cancel the - * operation. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. - * - * Sample code: - * ``` - * $operationsClient = new OperationsClient(); - * try { - * $name = 'name'; - * $operationsClient->deleteOperation($name); - * } finally { - * $operationsClient->close(); - * } - * ``` - * - * @param string $name The name of the operation resource to be deleted. - * @param array $optionalArgs { - * 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 if the remote call fails - */ - public function deleteOperation($name, array $optionalArgs = []) - { - $request = new DeleteOperationRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteOperation', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the latest state of a long-running operation. Clients can use this - * method to poll the operation result at intervals as recommended by the API - * service. - * - * Sample code: - * ``` - * $operationsClient = new OperationsClient(); - * try { - * $name = 'name'; - * $response = $operationsClient->getOperation($name); - * } finally { - * $operationsClient->close(); - * } - * ``` - * - * @param string $name The name of the operation resource. - * @param array $optionalArgs { - * 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 \Google\LongRunning\Operation - * - * @throws ApiException if the remote call fails - */ - public function getOperation($name, array $optionalArgs = []) - { - $request = new GetOperationRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetOperation', Operation::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists operations that match the specified filter in the request. If the - * server doesn't support this method, it returns `UNIMPLEMENTED`. - * - * Sample code: - * ``` - * $operationsClient = new OperationsClient(); - * try { - * $name = 'name'; - * $filter = 'filter'; - * // Iterate over pages of elements - * $pagedResponse = $operationsClient->listOperations($name, $filter); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $operationsClient->listOperations($name, $filter); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $operationsClient->close(); - * } - * ``` - * - * @param string $name The name of the operation's parent resource. - * @param string $filter The standard list filter. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listOperations($name, $filter, array $optionalArgs = []) - { - $request = new ListOperationsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setFilter($filter); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListOperations', $optionalArgs, ListOperationsResponse::class, $request); - } - - /** - * Waits until the specified long-running operation is done or reaches at most - * a specified timeout, returning the latest state. If the operation is - * already done, the latest state is immediately returned. If the timeout - * specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - * timeout is used. If the server does not support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. - * Note that this method is on a best-effort basis. It may return the latest - * state before the specified timeout (including immediately), meaning even an - * immediate response is no guarantee that the operation is done. - * - * Sample code: - * ``` - * $operationsClient = new OperationsClient(); - * try { - * $response = $operationsClient->waitOperation(); - * } finally { - * $operationsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The name of the operation resource to wait on. - * @type Duration $timeout - * The maximum duration to wait before timing out. If left blank, the wait - * will be at most the time permitted by the underlying HTTP/RPC protocol. - * If RPC context deadline is also specified, the shorter one will be used. - * @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 \Google\LongRunning\Operation - * - * @throws ApiException if the remote call fails - */ - public function waitOperation(array $optionalArgs = []) - { - $request = new WaitOperationRequest(); - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - } - - if (isset($optionalArgs['timeout'])) { - $request->setTimeout($optionalArgs['timeout']); - } - - return $this->startCall('WaitOperation', Operation::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/LongRunning/src/LongRunning/OperationsClient.php b/owl-bot-staging/LongRunning/src/LongRunning/OperationsClient.php deleted file mode 100644 index c67e0a4721ef..000000000000 --- a/owl-bot-staging/LongRunning/src/LongRunning/OperationsClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\LongRunning\Operation', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getOperations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\LongRunning\ListOperationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'WaitOperation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\LongRunning\Operation', - ], - ], - ], -]; diff --git a/owl-bot-staging/LongRunning/src/LongRunning/resources/operations_rest_client_config.php b/owl-bot-staging/LongRunning/src/LongRunning/resources/operations_rest_client_config.php deleted file mode 100644 index dfdf3c103851..000000000000 --- a/owl-bot-staging/LongRunning/src/LongRunning/resources/operations_rest_client_config.php +++ /dev/null @@ -1,76 +0,0 @@ - [ - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=operations/**}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=operations/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=operations/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=operations}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - 'queryParams' => [ - 'filter', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/LongRunning/tests/Unit/Client/OperationsClientTest.php b/owl-bot-staging/LongRunning/tests/Unit/Client/OperationsClientTest.php deleted file mode 100644 index 9bfb9671abca..000000000000 --- a/owl-bot-staging/LongRunning/tests/Unit/Client/OperationsClientTest.php +++ /dev/null @@ -1,417 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return \Google\LongRunning\Client\OperationsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new \Google\LongRunning\Client\OperationsClient($options); - } - - /** @test */ - public function cancelOperationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new CancelOperationRequest()) - ->setName($name); - $gapicClient->cancelOperation($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/CancelOperation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cancelOperationExceptionTest() - { - $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'; - $request = (new CancelOperationRequest()) - ->setName($name); - try { - $gapicClient->cancelOperation($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 deleteOperationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new DeleteOperationRequest()) - ->setName($name); - $gapicClient->deleteOperation($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/DeleteOperation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteOperationExceptionTest() - { - $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'; - $request = (new DeleteOperationRequest()) - ->setName($name); - try { - $gapicClient->deleteOperation($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 getOperationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $done = true; - $expectedResponse = new Operation(); - $expectedResponse->setName($name2); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new GetOperationRequest()) - ->setName($name); - $response = $gapicClient->getOperation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getOperationExceptionTest() - { - $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'; - $request = (new GetOperationRequest()) - ->setName($name); - try { - $gapicClient->getOperation($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 listOperationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $operationsElement = new Operation(); - $operations = [ - $operationsElement, - ]; - $expectedResponse = new ListOperationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setOperations($operations); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $filter = 'filter-1274492040'; - $request = (new ListOperationsRequest()) - ->setName($name) - ->setFilter($filter); - $response = $gapicClient->listOperations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getOperations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/ListOperations', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getFilter(); - $this->assertProtobufEquals($filter, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOperationsExceptionTest() - { - $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'; - $filter = 'filter-1274492040'; - $request = (new ListOperationsRequest()) - ->setName($name) - ->setFilter($filter); - try { - $gapicClient->listOperations($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 waitOperationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $done = true; - $expectedResponse = new Operation(); - $expectedResponse->setName($name2); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); - $request = new WaitOperationRequest(); - $response = $gapicClient->waitOperation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/WaitOperation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function waitOperationExceptionTest() - { - $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 WaitOperationRequest(); - try { - $gapicClient->waitOperation($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 cancelOperationAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new CancelOperationRequest()) - ->setName($name); - $gapicClient->cancelOperationAsync($request)->wait(); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/CancelOperation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/LongRunning/tests/Unit/OperationsClientTest.php b/owl-bot-staging/LongRunning/tests/Unit/OperationsClientTest.php deleted file mode 100644 index 03a917c357e7..000000000000 --- a/owl-bot-staging/LongRunning/tests/Unit/OperationsClientTest.php +++ /dev/null @@ -1,366 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return \Google\LongRunning\OperationsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new \Google\LongRunning\OperationsClient($options); - } - - /** @test */ - public function cancelOperationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $gapicClient->cancelOperation($name); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/CancelOperation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cancelOperationExceptionTest() - { - $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'; - try { - $gapicClient->cancelOperation($name); - // 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 deleteOperationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $gapicClient->deleteOperation($name); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/DeleteOperation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteOperationExceptionTest() - { - $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'; - try { - $gapicClient->deleteOperation($name); - // 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 getOperationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $done = true; - $expectedResponse = new Operation(); - $expectedResponse->setName($name2); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->getOperation($name); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getOperationExceptionTest() - { - $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'; - try { - $gapicClient->getOperation($name); - // 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 listOperationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $operationsElement = new Operation(); - $operations = [ - $operationsElement, - ]; - $expectedResponse = new ListOperationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setOperations($operations); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $filter = 'filter-1274492040'; - $response = $gapicClient->listOperations($name, $filter); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getOperations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/ListOperations', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getFilter(); - $this->assertProtobufEquals($filter, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOperationsExceptionTest() - { - $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'; - $filter = 'filter-1274492040'; - try { - $gapicClient->listOperations($name, $filter); - // 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 waitOperationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $done = true; - $expectedResponse = new Operation(); - $expectedResponse->setName($name2); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); - $response = $gapicClient->waitOperation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/WaitOperation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function waitOperationExceptionTest() - { - $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); - try { - $gapicClient->waitOperation(); - // 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()); - } -}