diff --git a/Config/metadata/V1/Config.php b/Config/metadata/V1/Config.php index 87d54d274f6e..76c04959bbec 100644 Binary files a/Config/metadata/V1/Config.php and b/Config/metadata/V1/Config.php differ diff --git a/Config/samples/V1/ConfigClient/create_deployment.php b/Config/samples/V1/ConfigClient/create_deployment.php index 0a8cbb394f7e..14eab74de58b 100644 --- a/Config/samples/V1/ConfigClient/create_deployment.php +++ b/Config/samples/V1/ConfigClient/create_deployment.php @@ -33,18 +33,26 @@ /** * Creates a [Deployment][google.cloud.config.v1.Deployment]. * - * @param string $formattedParent The parent in whose context the Deployment is created. The parent - * value is in the format: 'projects/{project_id}/locations/{location}'. Please see - * {@see ConfigClient::locationName()} for help formatting this field. - * @param string $deploymentId The Deployment ID. + * @param string $formattedParent The parent in whose context the Deployment is created. The parent + * value is in the format: 'projects/{project_id}/locations/{location}'. Please see + * {@see ConfigClient::locationName()} for help formatting this field. + * @param string $deploymentId The Deployment ID. + * @param string $formattedDeploymentServiceAccount User-specified Service Account (SA) credentials to be used when + * actuating resources. + * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` + * Please see {@see ConfigClient::serviceAccountName()} for help formatting this field. */ -function create_deployment_sample(string $formattedParent, string $deploymentId): void -{ +function create_deployment_sample( + string $formattedParent, + string $deploymentId, + string $formattedDeploymentServiceAccount +): void { // Create a client. $configClient = new ConfigClient(); // Prepare the request message. - $deployment = new Deployment(); + $deployment = (new Deployment()) + ->setServiceAccount($formattedDeploymentServiceAccount); $request = (new CreateDeploymentRequest()) ->setParent($formattedParent) ->setDeploymentId($deploymentId) @@ -83,7 +91,11 @@ function callSample(): void { $formattedParent = ConfigClient::locationName('[PROJECT]', '[LOCATION]'); $deploymentId = '[DEPLOYMENT_ID]'; + $formattedDeploymentServiceAccount = ConfigClient::serviceAccountName( + '[PROJECT]', + '[SERVICE_ACCOUNT]' + ); - create_deployment_sample($formattedParent, $deploymentId); + create_deployment_sample($formattedParent, $deploymentId, $formattedDeploymentServiceAccount); } // [END config_v1_generated_Config_CreateDeployment_sync] diff --git a/Config/samples/V1/ConfigClient/create_preview.php b/Config/samples/V1/ConfigClient/create_preview.php index 463618bedd10..69c8a2b7c34a 100644 --- a/Config/samples/V1/ConfigClient/create_preview.php +++ b/Config/samples/V1/ConfigClient/create_preview.php @@ -33,17 +33,24 @@ /** * Creates a [Preview][google.cloud.config.v1.Preview]. * - * @param string $formattedParent The parent in whose context the Preview is created. The parent - * value is in the format: 'projects/{project_id}/locations/{location}'. Please see - * {@see ConfigClient::locationName()} for help formatting this field. + * @param string $formattedParent The parent in whose context the Preview is created. The parent + * value is in the format: 'projects/{project_id}/locations/{location}'. Please see + * {@see ConfigClient::locationName()} for help formatting this field. + * @param string $formattedPreviewServiceAccount User-specified Service Account (SA) credentials to be used when + * previewing resources. + * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` + * Please see {@see ConfigClient::serviceAccountName()} for help formatting this field. */ -function create_preview_sample(string $formattedParent): void -{ +function create_preview_sample( + string $formattedParent, + string $formattedPreviewServiceAccount +): void { // Create a client. $configClient = new ConfigClient(); // Prepare the request message. - $preview = new Preview(); + $preview = (new Preview()) + ->setServiceAccount($formattedPreviewServiceAccount); $request = (new CreatePreviewRequest()) ->setParent($formattedParent) ->setPreview($preview); @@ -80,7 +87,11 @@ function create_preview_sample(string $formattedParent): void function callSample(): void { $formattedParent = ConfigClient::locationName('[PROJECT]', '[LOCATION]'); + $formattedPreviewServiceAccount = ConfigClient::serviceAccountName( + '[PROJECT]', + '[SERVICE_ACCOUNT]' + ); - create_preview_sample($formattedParent); + create_preview_sample($formattedParent, $formattedPreviewServiceAccount); } // [END config_v1_generated_Config_CreatePreview_sync] diff --git a/Config/samples/V1/ConfigClient/list_resources.php b/Config/samples/V1/ConfigClient/list_resources.php index f267bfd99408..7be8bab944a0 100644 --- a/Config/samples/V1/ConfigClient/list_resources.php +++ b/Config/samples/V1/ConfigClient/list_resources.php @@ -30,7 +30,7 @@ use Google\Cloud\Config\V1\Resource; /** - * Lists [Resource][google.cloud.config.v1.Resource]s in a given revision. + * Lists [Resources][google.cloud.config.v1.Resource] in a given revision. * * @param string $formattedParent The parent in whose context the Resources are listed. The parent * value is in the format: diff --git a/Config/samples/V1/ConfigClient/update_deployment.php b/Config/samples/V1/ConfigClient/update_deployment.php index 5c0bbd975897..cae5980e6ada 100644 --- a/Config/samples/V1/ConfigClient/update_deployment.php +++ b/Config/samples/V1/ConfigClient/update_deployment.php @@ -33,19 +33,19 @@ /** * Updates a [Deployment][google.cloud.config.v1.Deployment]. * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. + * @param string $formattedDeploymentServiceAccount User-specified Service Account (SA) credentials to be used when + * actuating resources. + * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` + * Please see {@see ConfigClient::serviceAccountName()} for help formatting this field. */ -function update_deployment_sample(): void +function update_deployment_sample(string $formattedDeploymentServiceAccount): void { // Create a client. $configClient = new ConfigClient(); // Prepare the request message. - $deployment = new Deployment(); + $deployment = (new Deployment()) + ->setServiceAccount($formattedDeploymentServiceAccount); $request = (new UpdateDeploymentRequest()) ->setDeployment($deployment); @@ -68,4 +68,23 @@ function update_deployment_sample(): void printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); } } + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedDeploymentServiceAccount = ConfigClient::serviceAccountName( + '[PROJECT]', + '[SERVICE_ACCOUNT]' + ); + + update_deployment_sample($formattedDeploymentServiceAccount); +} // [END config_v1_generated_Config_UpdateDeployment_sync] diff --git a/Config/src/V1/Client/ConfigClient.php b/Config/src/V1/Client/ConfigClient.php index d7ab01e98add..f911f0dcfcff 100644 --- a/Config/src/V1/Client/ConfigClient.php +++ b/Config/src/V1/Client/ConfigClient.php @@ -932,7 +932,7 @@ public function listPreviews(ListPreviewsRequest $request, array $callOptions = } /** - * Lists [Resource][google.cloud.config.v1.Resource]s in a given revision. + * Lists [Resources][google.cloud.config.v1.Resource] in a given revision. * * The async variant is {@see ConfigClient::listResourcesAsync()} . * diff --git a/Config/src/V1/Deployment.php b/Config/src/V1/Deployment.php index fab01d82f4b0..48f291aaaa5a 100644 --- a/Config/src/V1/Deployment.php +++ b/Config/src/V1/Deployment.php @@ -116,11 +116,11 @@ class Deployment extends \Google\Protobuf\Internal\Message */ protected $artifacts_gcs_bucket = null; /** - * Optional. User-specified Service Account (SA) credentials to be used when + * Required. User-specified Service Account (SA) credentials to be used when * actuating resources. * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` * - * Generated from protobuf field optional string service_account = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * Generated from protobuf field optional string service_account = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ protected $service_account = null; /** @@ -236,7 +236,7 @@ class Deployment extends \Google\Protobuf\Internal\Message * - The path cannot be within the path of `gcs_source` * - The field cannot be updated, including changing its presence * @type string $service_account - * Optional. User-specified Service Account (SA) credentials to be used when + * Required. User-specified Service Account (SA) credentials to be used when * actuating resources. * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` * @type bool $import_existing_resources @@ -744,11 +744,11 @@ public function setArtifactsGcsBucket($var) } /** - * Optional. User-specified Service Account (SA) credentials to be used when + * Required. User-specified Service Account (SA) credentials to be used when * actuating resources. * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` * - * Generated from protobuf field optional string service_account = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * Generated from protobuf field optional string service_account = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string */ public function getServiceAccount() @@ -767,11 +767,11 @@ public function clearServiceAccount() } /** - * Optional. User-specified Service Account (SA) credentials to be used when + * Required. User-specified Service Account (SA) credentials to be used when * actuating resources. * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` * - * Generated from protobuf field optional string service_account = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * Generated from protobuf field optional string service_account = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var * @return $this */ diff --git a/Config/src/V1/ListPreviewsResponse.php b/Config/src/V1/ListPreviewsResponse.php index f4532c3073de..e7c4f730627f 100644 --- a/Config/src/V1/ListPreviewsResponse.php +++ b/Config/src/V1/ListPreviewsResponse.php @@ -16,7 +16,7 @@ class ListPreviewsResponse extends \Google\Protobuf\Internal\Message { /** - * List of [Previews][]s. + * List of [Previews][google.cloud.config.v1.Preview]. * * Generated from protobuf field repeated .google.cloud.config.v1.Preview previews = 1; */ @@ -42,7 +42,7 @@ class ListPreviewsResponse extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type array<\Google\Cloud\Config\V1\Preview>|\Google\Protobuf\Internal\RepeatedField $previews - * List of [Previews][]s. + * List of [Previews][google.cloud.config.v1.Preview]. * @type string $next_page_token * Token to be supplied to the next ListPreviews request via `page_token` * to obtain the next set of results. @@ -56,7 +56,7 @@ public function __construct($data = NULL) { } /** - * List of [Previews][]s. + * List of [Previews][google.cloud.config.v1.Preview]. * * Generated from protobuf field repeated .google.cloud.config.v1.Preview previews = 1; * @return \Google\Protobuf\Internal\RepeatedField @@ -67,7 +67,7 @@ public function getPreviews() } /** - * List of [Previews][]s. + * List of [Previews][google.cloud.config.v1.Preview]. * * Generated from protobuf field repeated .google.cloud.config.v1.Preview previews = 1; * @param array<\Google\Cloud\Config\V1\Preview>|\Google\Protobuf\Internal\RepeatedField $var diff --git a/Config/src/V1/ListResourcesResponse.php b/Config/src/V1/ListResourcesResponse.php index 8818e638ae51..9fbb5d698634 100644 --- a/Config/src/V1/ListResourcesResponse.php +++ b/Config/src/V1/ListResourcesResponse.php @@ -16,7 +16,7 @@ class ListResourcesResponse extends \Google\Protobuf\Internal\Message { /** - * List of [Resources][]s. + * List of [Resources][google.cloud.config.v1.Resource]. * * Generated from protobuf field repeated .google.cloud.config.v1.Resource resources = 1; */ @@ -43,7 +43,7 @@ class ListResourcesResponse extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type array<\Google\Cloud\Config\V1\Resource>|\Google\Protobuf\Internal\RepeatedField $resources - * List of [Resources][]s. + * List of [Resources][google.cloud.config.v1.Resource]. * @type string $next_page_token * A token to request the next page of resources from the 'ListResources' * method. The value of an empty string means that there are no more resources @@ -58,7 +58,7 @@ public function __construct($data = NULL) { } /** - * List of [Resources][]s. + * List of [Resources][google.cloud.config.v1.Resource]. * * Generated from protobuf field repeated .google.cloud.config.v1.Resource resources = 1; * @return \Google\Protobuf\Internal\RepeatedField @@ -69,7 +69,7 @@ public function getResources() } /** - * List of [Resources][]s. + * List of [Resources][google.cloud.config.v1.Resource]. * * Generated from protobuf field repeated .google.cloud.config.v1.Resource resources = 1; * @param array<\Google\Cloud\Config\V1\Resource>|\Google\Protobuf\Internal\RepeatedField $var diff --git a/Config/src/V1/OperationMetadata.php b/Config/src/V1/OperationMetadata.php index 901be5abadb3..9a5c179c676a 100644 --- a/Config/src/V1/OperationMetadata.php +++ b/Config/src/V1/OperationMetadata.php @@ -48,9 +48,9 @@ class OperationMetadata extends \Google\Protobuf\Internal\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`. + * [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 requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -86,9 +86,9 @@ class OperationMetadata extends \Google\Protobuf\Internal\Message * @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`. + * [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 * Output only. API version used to start the operation. * } @@ -313,9 +313,9 @@ public function setStatusMessage($var) /** * 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`. + * [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 requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return bool @@ -328,9 +328,9 @@ public function getRequestedCancellation() /** * 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`. + * [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 requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param bool $var diff --git a/Config/src/V1/Preview.php b/Config/src/V1/Preview.php index 4ad58204222f..85c609dc8971 100644 --- a/Config/src/V1/Preview.php +++ b/Config/src/V1/Preview.php @@ -59,11 +59,11 @@ class Preview extends \Google\Protobuf\Internal\Message */ protected $preview_mode = 0; /** - * Optional. User-specified Service Account (SA) credentials to be used when + * Required. User-specified Service Account (SA) credentials to be used when * previewing resources. * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` * - * Generated from protobuf field string service_account = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * Generated from protobuf field string service_account = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ protected $service_account = ''; /** @@ -151,6 +151,15 @@ class Preview extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional string tf_version_constraint = 19 [(.google.api.field_behavior) = OPTIONAL]; */ protected $tf_version_constraint = null; + /** + * Optional. Arbitrary key-value metadata storage e.g. to help client tools + * identifiy preview during automation. See + * https://google.aip.dev/148#annotations for details on format and size + * limitations. + * + * Generated from protobuf field map annotations = 20 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $annotations; protected $blueprint; /** @@ -179,7 +188,7 @@ class Preview extends \Google\Protobuf\Internal\Message * @type int $preview_mode * Optional. Current mode of preview. * @type string $service_account - * Optional. User-specified Service Account (SA) credentials to be used when + * Required. User-specified Service Account (SA) credentials to be used when * previewing resources. * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` * @type string $artifacts_gcs_bucket @@ -223,6 +232,11 @@ class Preview extends \Google\Protobuf\Internal\Message * @type string $tf_version_constraint * Optional. The user-specified Terraform version constraint. * Example: "=1.3.10". + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Optional. Arbitrary key-value metadata storage e.g. to help client tools + * identifiy preview during automation. See + * https://google.aip.dev/148#annotations for details on format and size + * limitations. * } */ public function __construct($data = NULL) { @@ -438,11 +452,11 @@ public function setPreviewMode($var) } /** - * Optional. User-specified Service Account (SA) credentials to be used when + * Required. User-specified Service Account (SA) credentials to be used when * previewing resources. * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` * - * Generated from protobuf field string service_account = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * Generated from protobuf field string service_account = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string */ public function getServiceAccount() @@ -451,11 +465,11 @@ public function getServiceAccount() } /** - * Optional. User-specified Service Account (SA) credentials to be used when + * Required. User-specified Service Account (SA) credentials to be used when * previewing resources. * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` * - * Generated from protobuf field string service_account = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * Generated from protobuf field string service_account = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var * @return $this */ @@ -841,6 +855,38 @@ public function setTfVersionConstraint($var) return $this; } + /** + * Optional. Arbitrary key-value metadata storage e.g. to help client tools + * identifiy preview during automation. See + * https://google.aip.dev/148#annotations for details on format and size + * limitations. + * + * Generated from protobuf field map annotations = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Optional. Arbitrary key-value metadata storage e.g. to help client tools + * identifiy preview during automation. See + * https://google.aip.dev/148#annotations for details on format and size + * limitations. + * + * Generated from protobuf field map annotations = 20 [(.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; + } + /** * @return string */ diff --git a/Config/src/V1/TerraformBlueprint.php b/Config/src/V1/TerraformBlueprint.php index ff8aa54b5acd..aacdd4a0e7f2 100644 --- a/Config/src/V1/TerraformBlueprint.php +++ b/Config/src/V1/TerraformBlueprint.php @@ -31,12 +31,12 @@ class TerraformBlueprint extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $gcs_source - * Required. URI of an object in Google Cloud Storage. + * URI of an object in Google Cloud Storage. * Format: `gs://{bucket}/{object}` * URI may also specify an object version for zipped objects. * Format: `gs://{bucket}/{object}#{version}` * @type \Google\Cloud\Config\V1\GitSource $git_source - * Required. URI of a public Git repo. + * URI of a public Git repo. * @type array|\Google\Protobuf\Internal\MapField $input_values * Input variable values for the Terraform blueprint. * } @@ -47,12 +47,12 @@ public function __construct($data = NULL) { } /** - * Required. URI of an object in Google Cloud Storage. + * URI of an object in Google Cloud Storage. * Format: `gs://{bucket}/{object}` * URI may also specify an object version for zipped objects. * Format: `gs://{bucket}/{object}#{version}` * - * Generated from protobuf field string gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string gcs_source = 1; * @return string */ public function getGcsSource() @@ -66,12 +66,12 @@ public function hasGcsSource() } /** - * Required. URI of an object in Google Cloud Storage. + * URI of an object in Google Cloud Storage. * Format: `gs://{bucket}/{object}` * URI may also specify an object version for zipped objects. * Format: `gs://{bucket}/{object}#{version}` * - * Generated from protobuf field string gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string gcs_source = 1; * @param string $var * @return $this */ @@ -84,9 +84,9 @@ public function setGcsSource($var) } /** - * Required. URI of a public Git repo. + * URI of a public Git repo. * - * Generated from protobuf field .google.cloud.config.v1.GitSource git_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field .google.cloud.config.v1.GitSource git_source = 2; * @return \Google\Cloud\Config\V1\GitSource|null */ public function getGitSource() @@ -100,9 +100,9 @@ public function hasGitSource() } /** - * Required. URI of a public Git repo. + * URI of a public Git repo. * - * Generated from protobuf field .google.cloud.config.v1.GitSource git_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field .google.cloud.config.v1.GitSource git_source = 2; * @param \Google\Cloud\Config\V1\GitSource $var * @return $this */ diff --git a/Config/tests/Unit/V1/Client/ConfigClientTest.php b/Config/tests/Unit/V1/Client/ConfigClientTest.php index 7792e970b36a..5b4ee12326a5 100644 --- a/Config/tests/Unit/V1/Client/ConfigClientTest.php +++ b/Config/tests/Unit/V1/Client/ConfigClientTest.php @@ -167,6 +167,8 @@ public function createDeploymentTest() $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); $deploymentId = 'deploymentId51250389'; $deployment = new Deployment(); + $deploymentServiceAccount = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + $deployment->setServiceAccount($deploymentServiceAccount); $request = (new CreateDeploymentRequest()) ->setParent($formattedParent) ->setDeploymentId($deploymentId) @@ -244,6 +246,8 @@ public function createDeploymentExceptionTest() $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); $deploymentId = 'deploymentId51250389'; $deployment = new Deployment(); + $deploymentServiceAccount = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + $deployment->setServiceAccount($deploymentServiceAccount); $request = (new CreateDeploymentRequest()) ->setParent($formattedParent) ->setDeploymentId($deploymentId) @@ -322,6 +326,8 @@ public function createPreviewTest() // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); $preview = new Preview(); + $previewServiceAccount = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + $preview->setServiceAccount($previewServiceAccount); $request = (new CreatePreviewRequest())->setParent($formattedParent)->setPreview($preview); $response = $gapicClient->createPreview($request); $this->assertFalse($response->isDone()); @@ -393,6 +399,8 @@ public function createPreviewExceptionTest() // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); $preview = new Preview(); + $previewServiceAccount = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + $preview->setServiceAccount($previewServiceAccount); $request = (new CreatePreviewRequest())->setParent($formattedParent)->setPreview($preview); $response = $gapicClient->createPreview($request); $this->assertFalse($response->isDone()); @@ -2208,6 +2216,8 @@ public function updateDeploymentTest() $operationsTransport->addResponse($completeOperation); // Mock request $deployment = new Deployment(); + $deploymentServiceAccount = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + $deployment->setServiceAccount($deploymentServiceAccount); $request = (new UpdateDeploymentRequest())->setDeployment($deployment); $response = $gapicClient->updateDeployment($request); $this->assertFalse($response->isDone()); @@ -2276,6 +2286,8 @@ public function updateDeploymentExceptionTest() $operationsTransport->addResponse(null, $status); // Mock request $deployment = new Deployment(); + $deploymentServiceAccount = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + $deployment->setServiceAccount($deploymentServiceAccount); $request = (new UpdateDeploymentRequest())->setDeployment($deployment); $response = $gapicClient->updateDeployment($request); $this->assertFalse($response->isDone()); @@ -2689,6 +2701,8 @@ public function createDeploymentAsyncTest() $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); $deploymentId = 'deploymentId51250389'; $deployment = new Deployment(); + $deploymentServiceAccount = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + $deployment->setServiceAccount($deploymentServiceAccount); $request = (new CreateDeploymentRequest()) ->setParent($formattedParent) ->setDeploymentId($deploymentId) diff --git a/owl-bot-staging/Config/v1/proto/src/GPBMetadata/Google/Cloud/Config/V1/Config.php b/owl-bot-staging/Config/v1/proto/src/GPBMetadata/Google/Cloud/Config/V1/Config.php deleted file mode 100644 index 76c04959bbec..000000000000 Binary files a/owl-bot-staging/Config/v1/proto/src/GPBMetadata/Google/Cloud/Config/V1/Config.php and /dev/null differ diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ApplyResults.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ApplyResults.php deleted file mode 100644 index 5b1392ea4ba4..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ApplyResults.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.config.v1.ApplyResults - */ -class ApplyResults extends \Google\Protobuf\Internal\Message -{ - /** - * Location of a blueprint copy and other manifests in Google Cloud Storage. - * Format: `gs://{bucket}/{object}` - * - * Generated from protobuf field string content = 1; - */ - protected $content = ''; - /** - * Location of artifacts (e.g. logs) in Google Cloud Storage. - * Format: `gs://{bucket}/{object}` - * - * Generated from protobuf field string artifacts = 2; - */ - protected $artifacts = ''; - /** - * Map of output name to output info. - * - * Generated from protobuf field map outputs = 3; - */ - private $outputs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $content - * Location of a blueprint copy and other manifests in Google Cloud Storage. - * Format: `gs://{bucket}/{object}` - * @type string $artifacts - * Location of artifacts (e.g. logs) in Google Cloud Storage. - * Format: `gs://{bucket}/{object}` - * @type array|\Google\Protobuf\Internal\MapField $outputs - * Map of output name to output info. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Location of a blueprint copy and other manifests in Google Cloud Storage. - * Format: `gs://{bucket}/{object}` - * - * Generated from protobuf field string content = 1; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * Location of a blueprint copy and other manifests in Google Cloud Storage. - * Format: `gs://{bucket}/{object}` - * - * 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; - } - - /** - * Location of artifacts (e.g. logs) in Google Cloud Storage. - * Format: `gs://{bucket}/{object}` - * - * Generated from protobuf field string artifacts = 2; - * @return string - */ - public function getArtifacts() - { - return $this->artifacts; - } - - /** - * Location of artifacts (e.g. logs) in Google Cloud Storage. - * Format: `gs://{bucket}/{object}` - * - * Generated from protobuf field string artifacts = 2; - * @param string $var - * @return $this - */ - public function setArtifacts($var) - { - GPBUtil::checkString($var, True); - $this->artifacts = $var; - - return $this; - } - - /** - * Map of output name to output info. - * - * Generated from protobuf field map outputs = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getOutputs() - { - return $this->outputs; - } - - /** - * Map of output name to output info. - * - * Generated from protobuf field map outputs = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setOutputs($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Config\V1\TerraformOutput::class); - $this->outputs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/CreateDeploymentRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/CreateDeploymentRequest.php deleted file mode 100644 index 26f39b50ff6c..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/CreateDeploymentRequest.php +++ /dev/null @@ -1,245 +0,0 @@ -google.cloud.config.v1.CreateDeploymentRequest - */ -class CreateDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent in whose context the Deployment is created. The parent - * value is in the format: 'projects/{project_id}/locations/{location}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The Deployment ID. - * - * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $deployment_id = ''; - /** - * Required. [Deployment][google.cloud.config.v1.Deployment] resource to be - * created. - * - * Generated from protobuf field .google.cloud.config.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $deployment = null; - /** - * Optional. 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 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 in whose context the Deployment is created. The parent - * value is in the format: 'projects/{project_id}/locations/{location}'. Please see - * {@see ConfigClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Config\V1\Deployment $deployment Required. [Deployment][google.cloud.config.v1.Deployment] resource to be - * created. - * @param string $deploymentId Required. The Deployment ID. - * - * @return \Google\Cloud\Config\V1\CreateDeploymentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Config\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. The parent in whose context the Deployment is created. The parent - * value is in the format: 'projects/{project_id}/locations/{location}'. - * @type string $deployment_id - * Required. The Deployment ID. - * @type \Google\Cloud\Config\V1\Deployment $deployment - * Required. [Deployment][google.cloud.config.v1.Deployment] resource to be - * created. - * @type string $request_id - * Optional. 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 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\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent in whose context the Deployment is created. The parent - * value is in the format: '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. The parent in whose context the Deployment is created. The parent - * value is in the format: '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; - } - - /** - * Required. The Deployment ID. - * - * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDeploymentId() - { - return $this->deployment_id; - } - - /** - * Required. The Deployment ID. - * - * 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. [Deployment][google.cloud.config.v1.Deployment] resource to be - * created. - * - * Generated from protobuf field .google.cloud.config.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Config\V1\Deployment|null - */ - public function getDeployment() - { - return $this->deployment; - } - - public function hasDeployment() - { - return isset($this->deployment); - } - - public function clearDeployment() - { - unset($this->deployment); - } - - /** - * Required. [Deployment][google.cloud.config.v1.Deployment] resource to be - * created. - * - * Generated from protobuf field .google.cloud.config.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Config\V1\Deployment $var - * @return $this - */ - public function setDeployment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Config\V1\Deployment::class); - $this->deployment = $var; - - return $this; - } - - /** - * Optional. 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 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. 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 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/Config/v1/proto/src/Google/Cloud/Config/V1/CreatePreviewRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/CreatePreviewRequest.php deleted file mode 100644 index a6e4f2c09257..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/CreatePreviewRequest.php +++ /dev/null @@ -1,240 +0,0 @@ -google.cloud.config.v1.CreatePreviewRequest - */ -class CreatePreviewRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent in whose context the Preview is created. The parent - * value is in the format: 'projects/{project_id}/locations/{location}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The preview ID. - * - * Generated from protobuf field string preview_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $preview_id = ''; - /** - * Required. [Preview][google.cloud.config.v1.Preview] resource to be created. - * - * Generated from protobuf field .google.cloud.config.v1.Preview preview = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $preview = null; - /** - * Optional. 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 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, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent in whose context the Preview is created. The parent - * value is in the format: 'projects/{project_id}/locations/{location}'. Please see - * {@see ConfigClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Config\V1\Preview $preview Required. [Preview][google.cloud.config.v1.Preview] resource to be created. - * - * @return \Google\Cloud\Config\V1\CreatePreviewRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Config\V1\Preview $preview): self - { - return (new self()) - ->setParent($parent) - ->setPreview($preview); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent in whose context the Preview is created. The parent - * value is in the format: 'projects/{project_id}/locations/{location}'. - * @type string $preview_id - * Optional. The preview ID. - * @type \Google\Cloud\Config\V1\Preview $preview - * Required. [Preview][google.cloud.config.v1.Preview] resource to be created. - * @type string $request_id - * Optional. 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 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\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent in whose context the Preview is created. The parent - * value is in the format: '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. The parent in whose context the Preview is created. The parent - * value is in the format: '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. The preview ID. - * - * Generated from protobuf field string preview_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPreviewId() - { - return $this->preview_id; - } - - /** - * Optional. The preview ID. - * - * Generated from protobuf field string preview_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPreviewId($var) - { - GPBUtil::checkString($var, True); - $this->preview_id = $var; - - return $this; - } - - /** - * Required. [Preview][google.cloud.config.v1.Preview] resource to be created. - * - * Generated from protobuf field .google.cloud.config.v1.Preview preview = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Config\V1\Preview|null - */ - public function getPreview() - { - return $this->preview; - } - - public function hasPreview() - { - return isset($this->preview); - } - - public function clearPreview() - { - unset($this->preview); - } - - /** - * Required. [Preview][google.cloud.config.v1.Preview] resource to be created. - * - * Generated from protobuf field .google.cloud.config.v1.Preview preview = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Config\V1\Preview $var - * @return $this - */ - public function setPreview($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Config\V1\Preview::class); - $this->preview = $var; - - return $this; - } - - /** - * Optional. 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 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, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. 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 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, (.google.api.field_info) = { - * @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/Config/v1/proto/src/Google/Cloud/Config/V1/DeleteDeploymentRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/DeleteDeploymentRequest.php deleted file mode 100644 index 2b57206662be..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/DeleteDeploymentRequest.php +++ /dev/null @@ -1,242 +0,0 @@ -google.cloud.config.v1.DeleteDeploymentRequest - */ -class DeleteDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. 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 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 revisions for this deployment will also be - * deleted. (Otherwise, the request will only work if the deployment has no - * revisions.) - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - /** - * Optional. Policy on how resources actuated by the deployment should be - * deleted. If unspecified, the default behavior is to delete the underlying - * resources. - * - * Generated from protobuf field .google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy delete_policy = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $delete_policy = 0; - - /** - * @param string $name Required. The name of the Deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. Please see - * {@see ConfigClient::deploymentName()} for help formatting this field. - * - * @return \Google\Cloud\Config\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 name of the Deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * @type string $request_id - * Optional. 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 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 revisions for this deployment will also be - * deleted. (Otherwise, the request will only work if the deployment has no - * revisions.) - * @type int $delete_policy - * Optional. Policy on how resources actuated by the deployment should be - * deleted. If unspecified, the default behavior is to delete the underlying - * resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{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 name of the Deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{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; - } - - /** - * Optional. 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 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. 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 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 revisions for this deployment will also be - * deleted. (Otherwise, the request will only work if the deployment has no - * revisions.) - * - * 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 revisions for this deployment will also be - * deleted. (Otherwise, the request will only work if the deployment has no - * revisions.) - * - * 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; - } - - /** - * Optional. Policy on how resources actuated by the deployment should be - * deleted. If unspecified, the default behavior is to delete the underlying - * resources. - * - * Generated from protobuf field .google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy delete_policy = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDeletePolicy() - { - return $this->delete_policy; - } - - /** - * Optional. Policy on how resources actuated by the deployment should be - * deleted. If unspecified, the default behavior is to delete the underlying - * resources. - * - * Generated from protobuf field .google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy delete_policy = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDeletePolicy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Config\V1\DeleteDeploymentRequest\DeletePolicy::class); - $this->delete_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/DeleteDeploymentRequest/DeletePolicy.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/DeleteDeploymentRequest/DeletePolicy.php deleted file mode 100644 index 601ade3212c8..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/DeleteDeploymentRequest/DeletePolicy.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy - */ -class DeletePolicy -{ - /** - * Unspecified policy, resources will be deleted. - * - * Generated from protobuf enum DELETE_POLICY_UNSPECIFIED = 0; - */ - const DELETE_POLICY_UNSPECIFIED = 0; - /** - * Deletes resources actuated by the deployment. - * - * Generated from protobuf enum DELETE = 1; - */ - const DELETE = 1; - /** - * Abandons resources and only deletes the deployment and its metadata. - * - * Generated from protobuf enum ABANDON = 2; - */ - const ABANDON = 2; - - private static $valueToName = [ - self::DELETE_POLICY_UNSPECIFIED => 'DELETE_POLICY_UNSPECIFIED', - self::DELETE => 'DELETE', - self::ABANDON => 'ABANDON', - ]; - - 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(DeletePolicy::class, \Google\Cloud\Config\V1\DeleteDeploymentRequest_DeletePolicy::class); - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/DeletePreviewRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/DeletePreviewRequest.php deleted file mode 100644 index c6cabdba176c..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/DeletePreviewRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.config.v1.DeletePreviewRequest - */ -class DeletePreviewRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Preview in the format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. 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 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, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the Preview in the format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. Please see - * {@see ConfigClient::previewName()} for help formatting this field. - * - * @return \Google\Cloud\Config\V1\DeletePreviewRequest - * - * @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 Preview in the format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - * @type string $request_id - * Optional. 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 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\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Preview in the format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - * - * 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 Preview in the format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - * - * 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. 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 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, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. 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 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, (.google.api.field_info) = { - * @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/Config/v1/proto/src/Google/Cloud/Config/V1/DeleteStatefileRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/DeleteStatefileRequest.php deleted file mode 100644 index 71649ebd15c4..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/DeleteStatefileRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.config.v1.DeleteStatefileRequest - */ -class DeleteStatefileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. Lock ID of the lock file to verify that the user who is deleting - * the state file previously locked the Deployment. - * - * Generated from protobuf field int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $lock_id = 0; - - /** - * @param string $name Required. The name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. Please see - * {@see ConfigClient::deploymentName()} for help formatting this field. - * - * @return \Google\Cloud\Config\V1\DeleteStatefileRequest - * - * @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 deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * @type int|string $lock_id - * Required. Lock ID of the lock file to verify that the user who is deleting - * the state file previously locked the Deployment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{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 name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{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; - } - - /** - * Required. Lock ID of the lock file to verify that the user who is deleting - * the state file previously locked the Deployment. - * - * Generated from protobuf field int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int|string - */ - public function getLockId() - { - return $this->lock_id; - } - - /** - * Required. Lock ID of the lock file to verify that the user who is deleting - * the state file previously locked the Deployment. - * - * Generated from protobuf field int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int|string $var - * @return $this - */ - public function setLockId($var) - { - GPBUtil::checkInt64($var); - $this->lock_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Deployment.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Deployment.php deleted file mode 100644 index 48f291aaaa5a..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Deployment.php +++ /dev/null @@ -1,1039 +0,0 @@ -google.cloud.config.v1.Deployment - */ -class Deployment extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of the deployment. - * Format: `projects/{project}/locations/{location}/deployments/{deployment}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. Time when the deployment was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Time when the deployment was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User-defined metadata for the deployment. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Output only. Current state of the deployment. - * - * Generated from protobuf field .google.cloud.config.v1.Deployment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Revision name that was most recently applied. - * Format: `projects/{project}/locations/{location}/deployments/{deployment}/ - * revisions/{revision}` - * - * Generated from protobuf field string latest_revision = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $latest_revision = ''; - /** - * Output only. Additional information regarding the current state. - * - * Generated from protobuf field string state_detail = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_detail = ''; - /** - * Output only. Error code describing errors that may have occurred. - * - * Generated from protobuf field .google.cloud.config.v1.Deployment.ErrorCode error_code = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error_code = 0; - /** - * Output only. Location of artifacts from a DeleteDeployment operation. - * - * Generated from protobuf field .google.cloud.config.v1.ApplyResults delete_results = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_results = null; - /** - * Output only. Cloud Build instance UUID associated with deleting this - * deployment. - * - * Generated from protobuf field string delete_build = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_build = ''; - /** - * Output only. Location of Cloud Build logs in Google Cloud Storage, - * populated when deleting this deployment. Format: `gs://{bucket}/{object}`. - * - * Generated from protobuf field string delete_logs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_logs = ''; - /** - * Output only. Errors encountered when deleting this deployment. - * Errors are truncated to 10 entries, see `delete_results` and `error_logs` - * for full details. - * - * Generated from protobuf field repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $tf_errors; - /** - * Output only. Location of Terraform error logs in Google Cloud Storage. - * Format: `gs://{bucket}/{object}`. - * - * Generated from protobuf field string error_logs = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error_logs = ''; - /** - * Optional. User-defined location of Cloud Build logs and artifacts in Google - * Cloud Storage. Format: `gs://{bucket}/{folder}` - * A default bucket will be bootstrapped if the field is not set or empty. - * Default bucket format: `gs://--blueprint-config` - * Constraints: - * - The bucket needs to be in the same project as the deployment - * - The path cannot be within the path of `gcs_source` - * - The field cannot be updated, including changing its presence - * - * Generated from protobuf field optional string artifacts_gcs_bucket = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $artifacts_gcs_bucket = null; - /** - * Required. User-specified Service Account (SA) credentials to be used when - * actuating resources. - * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` - * - * Generated from protobuf field optional string service_account = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $service_account = null; - /** - * By default, Infra Manager will return a failure when - * Terraform encounters a 409 code (resource conflict error) during actuation. - * If this flag is set to true, Infra Manager will instead - * attempt to automatically import the resource into the Terraform state (for - * supported resource types) and continue actuation. - * Not all resource types are supported, refer to documentation. - * - * Generated from protobuf field optional bool import_existing_resources = 17; - */ - protected $import_existing_resources = null; - /** - * Optional. The user-specified Cloud Build worker pool resource in which the - * Cloud Build job will execute. Format: - * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. - * If this field is unspecified, the default Cloud Build worker pool will be - * used. - * - * Generated from protobuf field optional string worker_pool = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $worker_pool = null; - /** - * Output only. Current lock state of the deployment. - * - * Generated from protobuf field .google.cloud.config.v1.Deployment.LockState lock_state = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $lock_state = 0; - /** - * Optional. The user-specified Terraform version constraint. - * Example: "=1.3.10". - * - * Generated from protobuf field optional string tf_version_constraint = 21 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $tf_version_constraint = null; - /** - * Output only. The current Terraform version set on the deployment. - * It is in the format of "Major.Minor.Patch", for example, "1.3.10". - * - * Generated from protobuf field string tf_version = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $tf_version = ''; - /** - * Optional. Input to control quota checks for resources in terraform - * configuration files. There are limited resources on which quota validation - * applies. - * - * Generated from protobuf field .google.cloud.config.v1.QuotaValidation quota_validation = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $quota_validation = 0; - /** - * Optional. Arbitrary key-value metadata storage e.g. to help client tools - * identify deployments during automation. See - * https://google.aip.dev/148#annotations for details on format and size - * limitations. - * - * Generated from protobuf field map annotations = 24 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $annotations; - protected $blueprint; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Config\V1\TerraformBlueprint $terraform_blueprint - * A blueprint described using Terraform's HashiCorp Configuration Language - * as a root module. - * @type string $name - * Resource name of the deployment. - * Format: `projects/{project}/locations/{location}/deployments/{deployment}` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Time when the deployment was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Time when the deployment was last modified. - * @type array|\Google\Protobuf\Internal\MapField $labels - * User-defined metadata for the deployment. - * @type int $state - * Output only. Current state of the deployment. - * @type string $latest_revision - * Output only. Revision name that was most recently applied. - * Format: `projects/{project}/locations/{location}/deployments/{deployment}/ - * revisions/{revision}` - * @type string $state_detail - * Output only. Additional information regarding the current state. - * @type int $error_code - * Output only. Error code describing errors that may have occurred. - * @type \Google\Cloud\Config\V1\ApplyResults $delete_results - * Output only. Location of artifacts from a DeleteDeployment operation. - * @type string $delete_build - * Output only. Cloud Build instance UUID associated with deleting this - * deployment. - * @type string $delete_logs - * Output only. Location of Cloud Build logs in Google Cloud Storage, - * populated when deleting this deployment. Format: `gs://{bucket}/{object}`. - * @type array<\Google\Cloud\Config\V1\TerraformError>|\Google\Protobuf\Internal\RepeatedField $tf_errors - * Output only. Errors encountered when deleting this deployment. - * Errors are truncated to 10 entries, see `delete_results` and `error_logs` - * for full details. - * @type string $error_logs - * Output only. Location of Terraform error logs in Google Cloud Storage. - * Format: `gs://{bucket}/{object}`. - * @type string $artifacts_gcs_bucket - * Optional. User-defined location of Cloud Build logs and artifacts in Google - * Cloud Storage. Format: `gs://{bucket}/{folder}` - * A default bucket will be bootstrapped if the field is not set or empty. - * Default bucket format: `gs://--blueprint-config` - * Constraints: - * - The bucket needs to be in the same project as the deployment - * - The path cannot be within the path of `gcs_source` - * - The field cannot be updated, including changing its presence - * @type string $service_account - * Required. User-specified Service Account (SA) credentials to be used when - * actuating resources. - * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` - * @type bool $import_existing_resources - * By default, Infra Manager will return a failure when - * Terraform encounters a 409 code (resource conflict error) during actuation. - * If this flag is set to true, Infra Manager will instead - * attempt to automatically import the resource into the Terraform state (for - * supported resource types) and continue actuation. - * Not all resource types are supported, refer to documentation. - * @type string $worker_pool - * Optional. The user-specified Cloud Build worker pool resource in which the - * Cloud Build job will execute. Format: - * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. - * If this field is unspecified, the default Cloud Build worker pool will be - * used. - * @type int $lock_state - * Output only. Current lock state of the deployment. - * @type string $tf_version_constraint - * Optional. The user-specified Terraform version constraint. - * Example: "=1.3.10". - * @type string $tf_version - * Output only. The current Terraform version set on the deployment. - * It is in the format of "Major.Minor.Patch", for example, "1.3.10". - * @type int $quota_validation - * Optional. Input to control quota checks for resources in terraform - * configuration files. There are limited resources on which quota validation - * applies. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Optional. Arbitrary key-value metadata storage e.g. to help client tools - * identify deployments during automation. See - * https://google.aip.dev/148#annotations for details on format and size - * limitations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * A blueprint described using Terraform's HashiCorp Configuration Language - * as a root module. - * - * Generated from protobuf field .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6; - * @return \Google\Cloud\Config\V1\TerraformBlueprint|null - */ - public function getTerraformBlueprint() - { - return $this->readOneof(6); - } - - public function hasTerraformBlueprint() - { - return $this->hasOneof(6); - } - - /** - * A blueprint described using Terraform's HashiCorp Configuration Language - * as a root module. - * - * Generated from protobuf field .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6; - * @param \Google\Cloud\Config\V1\TerraformBlueprint $var - * @return $this - */ - public function setTerraformBlueprint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Config\V1\TerraformBlueprint::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Resource name of the deployment. - * Format: `projects/{project}/locations/{location}/deployments/{deployment}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Resource name of the deployment. - * Format: `projects/{project}/locations/{location}/deployments/{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; - } - - /** - * Output only. Time when the deployment 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. Time when the deployment was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Time when the deployment was last modified. - * - * 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. Time when the deployment was last modified. - * - * 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; - } - - /** - * User-defined metadata for the deployment. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * User-defined metadata for the deployment. - * - * 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; - } - - /** - * Output only. Current state of the deployment. - * - * Generated from protobuf field .google.cloud.config.v1.Deployment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the deployment. - * - * Generated from protobuf field .google.cloud.config.v1.Deployment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Config\V1\Deployment\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Revision name that was most recently applied. - * Format: `projects/{project}/locations/{location}/deployments/{deployment}/ - * revisions/{revision}` - * - * Generated from protobuf field string latest_revision = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLatestRevision() - { - return $this->latest_revision; - } - - /** - * Output only. Revision name that was most recently applied. - * Format: `projects/{project}/locations/{location}/deployments/{deployment}/ - * revisions/{revision}` - * - * Generated from protobuf field string latest_revision = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLatestRevision($var) - { - GPBUtil::checkString($var, True); - $this->latest_revision = $var; - - return $this; - } - - /** - * Output only. Additional information regarding the current state. - * - * Generated from protobuf field string state_detail = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateDetail() - { - return $this->state_detail; - } - - /** - * Output only. Additional information regarding the current state. - * - * Generated from protobuf field string state_detail = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateDetail($var) - { - GPBUtil::checkString($var, True); - $this->state_detail = $var; - - return $this; - } - - /** - * Output only. Error code describing errors that may have occurred. - * - * Generated from protobuf field .google.cloud.config.v1.Deployment.ErrorCode error_code = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getErrorCode() - { - return $this->error_code; - } - - /** - * Output only. Error code describing errors that may have occurred. - * - * Generated from protobuf field .google.cloud.config.v1.Deployment.ErrorCode error_code = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setErrorCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Config\V1\Deployment\ErrorCode::class); - $this->error_code = $var; - - return $this; - } - - /** - * Output only. Location of artifacts from a DeleteDeployment operation. - * - * Generated from protobuf field .google.cloud.config.v1.ApplyResults delete_results = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Config\V1\ApplyResults|null - */ - public function getDeleteResults() - { - return $this->delete_results; - } - - public function hasDeleteResults() - { - return isset($this->delete_results); - } - - public function clearDeleteResults() - { - unset($this->delete_results); - } - - /** - * Output only. Location of artifacts from a DeleteDeployment operation. - * - * Generated from protobuf field .google.cloud.config.v1.ApplyResults delete_results = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Config\V1\ApplyResults $var - * @return $this - */ - public function setDeleteResults($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Config\V1\ApplyResults::class); - $this->delete_results = $var; - - return $this; - } - - /** - * Output only. Cloud Build instance UUID associated with deleting this - * deployment. - * - * Generated from protobuf field string delete_build = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDeleteBuild() - { - return $this->delete_build; - } - - /** - * Output only. Cloud Build instance UUID associated with deleting this - * deployment. - * - * Generated from protobuf field string delete_build = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDeleteBuild($var) - { - GPBUtil::checkString($var, True); - $this->delete_build = $var; - - return $this; - } - - /** - * Output only. Location of Cloud Build logs in Google Cloud Storage, - * populated when deleting this deployment. Format: `gs://{bucket}/{object}`. - * - * Generated from protobuf field string delete_logs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDeleteLogs() - { - return $this->delete_logs; - } - - /** - * Output only. Location of Cloud Build logs in Google Cloud Storage, - * populated when deleting this deployment. Format: `gs://{bucket}/{object}`. - * - * Generated from protobuf field string delete_logs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDeleteLogs($var) - { - GPBUtil::checkString($var, True); - $this->delete_logs = $var; - - return $this; - } - - /** - * Output only. Errors encountered when deleting this deployment. - * Errors are truncated to 10 entries, see `delete_results` and `error_logs` - * for full details. - * - * Generated from protobuf field repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTfErrors() - { - return $this->tf_errors; - } - - /** - * Output only. Errors encountered when deleting this deployment. - * Errors are truncated to 10 entries, see `delete_results` and `error_logs` - * for full details. - * - * Generated from protobuf field repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Config\V1\TerraformError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTfErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Config\V1\TerraformError::class); - $this->tf_errors = $arr; - - return $this; - } - - /** - * Output only. Location of Terraform error logs in Google Cloud Storage. - * Format: `gs://{bucket}/{object}`. - * - * Generated from protobuf field string error_logs = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getErrorLogs() - { - return $this->error_logs; - } - - /** - * Output only. Location of Terraform error logs in Google Cloud Storage. - * Format: `gs://{bucket}/{object}`. - * - * Generated from protobuf field string error_logs = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setErrorLogs($var) - { - GPBUtil::checkString($var, True); - $this->error_logs = $var; - - return $this; - } - - /** - * Optional. User-defined location of Cloud Build logs and artifacts in Google - * Cloud Storage. Format: `gs://{bucket}/{folder}` - * A default bucket will be bootstrapped if the field is not set or empty. - * Default bucket format: `gs://--blueprint-config` - * Constraints: - * - The bucket needs to be in the same project as the deployment - * - The path cannot be within the path of `gcs_source` - * - The field cannot be updated, including changing its presence - * - * Generated from protobuf field optional string artifacts_gcs_bucket = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getArtifactsGcsBucket() - { - return isset($this->artifacts_gcs_bucket) ? $this->artifacts_gcs_bucket : ''; - } - - public function hasArtifactsGcsBucket() - { - return isset($this->artifacts_gcs_bucket); - } - - public function clearArtifactsGcsBucket() - { - unset($this->artifacts_gcs_bucket); - } - - /** - * Optional. User-defined location of Cloud Build logs and artifacts in Google - * Cloud Storage. Format: `gs://{bucket}/{folder}` - * A default bucket will be bootstrapped if the field is not set or empty. - * Default bucket format: `gs://--blueprint-config` - * Constraints: - * - The bucket needs to be in the same project as the deployment - * - The path cannot be within the path of `gcs_source` - * - The field cannot be updated, including changing its presence - * - * Generated from protobuf field optional string artifacts_gcs_bucket = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setArtifactsGcsBucket($var) - { - GPBUtil::checkString($var, True); - $this->artifacts_gcs_bucket = $var; - - return $this; - } - - /** - * Required. User-specified Service Account (SA) credentials to be used when - * actuating resources. - * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` - * - * Generated from protobuf field optional string service_account = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getServiceAccount() - { - return isset($this->service_account) ? $this->service_account : ''; - } - - public function hasServiceAccount() - { - return isset($this->service_account); - } - - public function clearServiceAccount() - { - unset($this->service_account); - } - - /** - * Required. User-specified Service Account (SA) credentials to be used when - * actuating resources. - * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` - * - * Generated from protobuf field optional string service_account = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * By default, Infra Manager will return a failure when - * Terraform encounters a 409 code (resource conflict error) during actuation. - * If this flag is set to true, Infra Manager will instead - * attempt to automatically import the resource into the Terraform state (for - * supported resource types) and continue actuation. - * Not all resource types are supported, refer to documentation. - * - * Generated from protobuf field optional bool import_existing_resources = 17; - * @return bool - */ - public function getImportExistingResources() - { - return isset($this->import_existing_resources) ? $this->import_existing_resources : false; - } - - public function hasImportExistingResources() - { - return isset($this->import_existing_resources); - } - - public function clearImportExistingResources() - { - unset($this->import_existing_resources); - } - - /** - * By default, Infra Manager will return a failure when - * Terraform encounters a 409 code (resource conflict error) during actuation. - * If this flag is set to true, Infra Manager will instead - * attempt to automatically import the resource into the Terraform state (for - * supported resource types) and continue actuation. - * Not all resource types are supported, refer to documentation. - * - * Generated from protobuf field optional bool import_existing_resources = 17; - * @param bool $var - * @return $this - */ - public function setImportExistingResources($var) - { - GPBUtil::checkBool($var); - $this->import_existing_resources = $var; - - return $this; - } - - /** - * Optional. The user-specified Cloud Build worker pool resource in which the - * Cloud Build job will execute. Format: - * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. - * If this field is unspecified, the default Cloud Build worker pool will be - * used. - * - * Generated from protobuf field optional string worker_pool = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getWorkerPool() - { - return isset($this->worker_pool) ? $this->worker_pool : ''; - } - - public function hasWorkerPool() - { - return isset($this->worker_pool); - } - - public function clearWorkerPool() - { - unset($this->worker_pool); - } - - /** - * Optional. The user-specified Cloud Build worker pool resource in which the - * Cloud Build job will execute. Format: - * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. - * If this field is unspecified, the default Cloud Build worker pool will be - * used. - * - * Generated from protobuf field optional string worker_pool = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setWorkerPool($var) - { - GPBUtil::checkString($var, True); - $this->worker_pool = $var; - - return $this; - } - - /** - * Output only. Current lock state of the deployment. - * - * Generated from protobuf field .google.cloud.config.v1.Deployment.LockState lock_state = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getLockState() - { - return $this->lock_state; - } - - /** - * Output only. Current lock state of the deployment. - * - * Generated from protobuf field .google.cloud.config.v1.Deployment.LockState lock_state = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setLockState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Config\V1\Deployment\LockState::class); - $this->lock_state = $var; - - return $this; - } - - /** - * Optional. The user-specified Terraform version constraint. - * Example: "=1.3.10". - * - * Generated from protobuf field optional string tf_version_constraint = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTfVersionConstraint() - { - return isset($this->tf_version_constraint) ? $this->tf_version_constraint : ''; - } - - public function hasTfVersionConstraint() - { - return isset($this->tf_version_constraint); - } - - public function clearTfVersionConstraint() - { - unset($this->tf_version_constraint); - } - - /** - * Optional. The user-specified Terraform version constraint. - * Example: "=1.3.10". - * - * Generated from protobuf field optional string tf_version_constraint = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTfVersionConstraint($var) - { - GPBUtil::checkString($var, True); - $this->tf_version_constraint = $var; - - return $this; - } - - /** - * Output only. The current Terraform version set on the deployment. - * It is in the format of "Major.Minor.Patch", for example, "1.3.10". - * - * Generated from protobuf field string tf_version = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTfVersion() - { - return $this->tf_version; - } - - /** - * Output only. The current Terraform version set on the deployment. - * It is in the format of "Major.Minor.Patch", for example, "1.3.10". - * - * Generated from protobuf field string tf_version = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTfVersion($var) - { - GPBUtil::checkString($var, True); - $this->tf_version = $var; - - return $this; - } - - /** - * Optional. Input to control quota checks for resources in terraform - * configuration files. There are limited resources on which quota validation - * applies. - * - * Generated from protobuf field .google.cloud.config.v1.QuotaValidation quota_validation = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getQuotaValidation() - { - return $this->quota_validation; - } - - /** - * Optional. Input to control quota checks for resources in terraform - * configuration files. There are limited resources on which quota validation - * applies. - * - * Generated from protobuf field .google.cloud.config.v1.QuotaValidation quota_validation = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setQuotaValidation($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Config\V1\QuotaValidation::class); - $this->quota_validation = $var; - - return $this; - } - - /** - * Optional. Arbitrary key-value metadata storage e.g. to help client tools - * identify deployments during automation. See - * https://google.aip.dev/148#annotations for details on format and size - * limitations. - * - * Generated from protobuf field map annotations = 24 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Optional. Arbitrary key-value metadata storage e.g. to help client tools - * identify deployments during automation. See - * https://google.aip.dev/148#annotations for details on format and size - * limitations. - * - * Generated from protobuf field map annotations = 24 [(.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; - } - - /** - * @return string - */ - public function getBlueprint() - { - return $this->whichOneof("blueprint"); - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Deployment/ErrorCode.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Deployment/ErrorCode.php deleted file mode 100644 index 956e273d0fa6..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Deployment/ErrorCode.php +++ /dev/null @@ -1,95 +0,0 @@ -google.cloud.config.v1.Deployment.ErrorCode - */ -class ErrorCode -{ - /** - * No error code was specified. - * - * Generated from protobuf enum ERROR_CODE_UNSPECIFIED = 0; - */ - const ERROR_CODE_UNSPECIFIED = 0; - /** - * The revision failed. See Revision for more details. - * - * Generated from protobuf enum REVISION_FAILED = 1; - */ - const REVISION_FAILED = 1; - /** - * Cloud Build failed due to a permission issue. - * - * Generated from protobuf enum CLOUD_BUILD_PERMISSION_DENIED = 3; - */ - const CLOUD_BUILD_PERMISSION_DENIED = 3; - /** - * Cloud Build job associated with a deployment deletion could not be - * started. - * - * Generated from protobuf enum DELETE_BUILD_API_FAILED = 5; - */ - const DELETE_BUILD_API_FAILED = 5; - /** - * Cloud Build job associated with a deployment deletion was started but - * failed. - * - * Generated from protobuf enum DELETE_BUILD_RUN_FAILED = 6; - */ - const DELETE_BUILD_RUN_FAILED = 6; - /** - * Cloud Storage bucket creation failed due to a permission issue. - * - * Generated from protobuf enum BUCKET_CREATION_PERMISSION_DENIED = 7; - */ - const BUCKET_CREATION_PERMISSION_DENIED = 7; - /** - * Cloud Storage bucket creation failed due to an issue unrelated to - * permissions. - * - * Generated from protobuf enum BUCKET_CREATION_FAILED = 8; - */ - const BUCKET_CREATION_FAILED = 8; - - private static $valueToName = [ - self::ERROR_CODE_UNSPECIFIED => 'ERROR_CODE_UNSPECIFIED', - self::REVISION_FAILED => 'REVISION_FAILED', - self::CLOUD_BUILD_PERMISSION_DENIED => 'CLOUD_BUILD_PERMISSION_DENIED', - self::DELETE_BUILD_API_FAILED => 'DELETE_BUILD_API_FAILED', - self::DELETE_BUILD_RUN_FAILED => 'DELETE_BUILD_RUN_FAILED', - self::BUCKET_CREATION_PERMISSION_DENIED => 'BUCKET_CREATION_PERMISSION_DENIED', - self::BUCKET_CREATION_FAILED => 'BUCKET_CREATION_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(ErrorCode::class, \Google\Cloud\Config\V1\Deployment_ErrorCode::class); - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Deployment/LockState.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Deployment/LockState.php deleted file mode 100644 index 40fbf6a2edd0..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Deployment/LockState.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.config.v1.Deployment.LockState - */ -class LockState -{ - /** - * The default value. This value is used if the lock state is omitted. - * - * Generated from protobuf enum LOCK_STATE_UNSPECIFIED = 0; - */ - const LOCK_STATE_UNSPECIFIED = 0; - /** - * The deployment is locked. - * - * Generated from protobuf enum LOCKED = 1; - */ - const LOCKED = 1; - /** - * The deployment is unlocked. - * - * Generated from protobuf enum UNLOCKED = 2; - */ - const UNLOCKED = 2; - /** - * The deployment is being locked. - * - * Generated from protobuf enum LOCKING = 3; - */ - const LOCKING = 3; - /** - * The deployment is being unlocked. - * - * Generated from protobuf enum UNLOCKING = 4; - */ - const UNLOCKING = 4; - /** - * The deployment has failed to lock. - * - * Generated from protobuf enum LOCK_FAILED = 5; - */ - const LOCK_FAILED = 5; - /** - * The deployment has failed to unlock. - * - * Generated from protobuf enum UNLOCK_FAILED = 6; - */ - const UNLOCK_FAILED = 6; - - private static $valueToName = [ - self::LOCK_STATE_UNSPECIFIED => 'LOCK_STATE_UNSPECIFIED', - self::LOCKED => 'LOCKED', - self::UNLOCKED => 'UNLOCKED', - self::LOCKING => 'LOCKING', - self::UNLOCKING => 'UNLOCKING', - self::LOCK_FAILED => 'LOCK_FAILED', - self::UNLOCK_FAILED => 'UNLOCK_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(LockState::class, \Google\Cloud\Config\V1\Deployment_LockState::class); - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Deployment/State.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Deployment/State.php deleted file mode 100644 index d7614899fe8c..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Deployment/State.php +++ /dev/null @@ -1,100 +0,0 @@ -google.cloud.config.v1.Deployment.State - */ -class State -{ - /** - * The default value. This value is used if the state is omitted. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The deployment is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The deployment is healthy. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The deployment is being updated. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * The deployment is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - /** - * The deployment has encountered an unexpected error. - * - * Generated from protobuf enum FAILED = 5; - */ - const FAILED = 5; - /** - * The deployment is no longer being actively reconciled. - * This may be the result of recovering the project after deletion. - * - * Generated from protobuf enum SUSPENDED = 6; - */ - const SUSPENDED = 6; - /** - * The deployment has been deleted. - * - * Generated from protobuf enum DELETED = 7; - */ - const DELETED = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::ACTIVE => 'ACTIVE', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - self::FAILED => 'FAILED', - self::SUSPENDED => 'SUSPENDED', - self::DELETED => 'DELETED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Config\V1\Deployment_State::class); - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/DeploymentOperationMetadata.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/DeploymentOperationMetadata.php deleted file mode 100644 index 7552319424f3..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/DeploymentOperationMetadata.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.config.v1.DeploymentOperationMetadata - */ -class DeploymentOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The current step the deployment operation is running. - * - * Generated from protobuf field .google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep step = 1; - */ - protected $step = 0; - /** - * Outputs and artifacts from applying a deployment. - * - * Generated from protobuf field .google.cloud.config.v1.ApplyResults apply_results = 2; - */ - protected $apply_results = null; - /** - * Output only. Cloud Build instance UUID associated with this operation. - * - * Generated from protobuf field string build = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $build = ''; - /** - * Output only. Location of Deployment operations logs in - * `gs://{bucket}/{object}` format. - * - * Generated from protobuf field string logs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $logs = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $step - * The current step the deployment operation is running. - * @type \Google\Cloud\Config\V1\ApplyResults $apply_results - * Outputs and artifacts from applying a deployment. - * @type string $build - * Output only. Cloud Build instance UUID associated with this operation. - * @type string $logs - * Output only. Location of Deployment operations logs in - * `gs://{bucket}/{object}` format. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * The current step the deployment operation is running. - * - * Generated from protobuf field .google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep step = 1; - * @return int - */ - public function getStep() - { - return $this->step; - } - - /** - * The current step the deployment operation is running. - * - * Generated from protobuf field .google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep step = 1; - * @param int $var - * @return $this - */ - public function setStep($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Config\V1\DeploymentOperationMetadata\DeploymentStep::class); - $this->step = $var; - - return $this; - } - - /** - * Outputs and artifacts from applying a deployment. - * - * Generated from protobuf field .google.cloud.config.v1.ApplyResults apply_results = 2; - * @return \Google\Cloud\Config\V1\ApplyResults|null - */ - public function getApplyResults() - { - return $this->apply_results; - } - - public function hasApplyResults() - { - return isset($this->apply_results); - } - - public function clearApplyResults() - { - unset($this->apply_results); - } - - /** - * Outputs and artifacts from applying a deployment. - * - * Generated from protobuf field .google.cloud.config.v1.ApplyResults apply_results = 2; - * @param \Google\Cloud\Config\V1\ApplyResults $var - * @return $this - */ - public function setApplyResults($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Config\V1\ApplyResults::class); - $this->apply_results = $var; - - return $this; - } - - /** - * Output only. Cloud Build instance UUID associated with this operation. - * - * Generated from protobuf field string build = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getBuild() - { - return $this->build; - } - - /** - * Output only. Cloud Build instance UUID associated with this operation. - * - * Generated from protobuf field string build = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setBuild($var) - { - GPBUtil::checkString($var, True); - $this->build = $var; - - return $this; - } - - /** - * Output only. Location of Deployment operations logs in - * `gs://{bucket}/{object}` format. - * - * Generated from protobuf field string logs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLogs() - { - return $this->logs; - } - - /** - * Output only. Location of Deployment operations logs in - * `gs://{bucket}/{object}` format. - * - * Generated from protobuf field string logs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLogs($var) - { - GPBUtil::checkString($var, True); - $this->logs = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/DeploymentOperationMetadata/DeploymentStep.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/DeploymentOperationMetadata/DeploymentStep.php deleted file mode 100644 index ee19e323e236..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/DeploymentOperationMetadata/DeploymentStep.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep - */ -class DeploymentStep -{ - /** - * Unspecified deployment step - * - * Generated from protobuf enum DEPLOYMENT_STEP_UNSPECIFIED = 0; - */ - const DEPLOYMENT_STEP_UNSPECIFIED = 0; - /** - * Infra Manager is creating a Google Cloud Storage bucket to store - * artifacts and metadata about the deployment and revision - * - * Generated from protobuf enum PREPARING_STORAGE_BUCKET = 1; - */ - const PREPARING_STORAGE_BUCKET = 1; - /** - * Downloading the blueprint onto the Google Cloud Storage bucket - * - * Generated from protobuf enum DOWNLOADING_BLUEPRINT = 2; - */ - const DOWNLOADING_BLUEPRINT = 2; - /** - * Initializing Terraform using `terraform init` - * - * Generated from protobuf enum RUNNING_TF_INIT = 3; - */ - const RUNNING_TF_INIT = 3; - /** - * Running `terraform plan` - * - * Generated from protobuf enum RUNNING_TF_PLAN = 4; - */ - const RUNNING_TF_PLAN = 4; - /** - * Actuating resources using Terraform using `terraform apply` - * - * Generated from protobuf enum RUNNING_TF_APPLY = 5; - */ - const RUNNING_TF_APPLY = 5; - /** - * Destroying resources using Terraform using `terraform destroy` - * - * Generated from protobuf enum RUNNING_TF_DESTROY = 6; - */ - const RUNNING_TF_DESTROY = 6; - /** - * Validating the uploaded TF state file when unlocking a deployment - * - * Generated from protobuf enum RUNNING_TF_VALIDATE = 7; - */ - const RUNNING_TF_VALIDATE = 7; - /** - * Unlocking a deployment - * - * Generated from protobuf enum UNLOCKING_DEPLOYMENT = 8; - */ - const UNLOCKING_DEPLOYMENT = 8; - /** - * Operation was successful - * - * Generated from protobuf enum SUCCEEDED = 9; - */ - const SUCCEEDED = 9; - /** - * Operation failed - * - * Generated from protobuf enum FAILED = 10; - */ - const FAILED = 10; - /** - * Validating the provided repository. - * - * Generated from protobuf enum VALIDATING_REPOSITORY = 11; - */ - const VALIDATING_REPOSITORY = 11; - /** - * Running quota validation - * - * Generated from protobuf enum RUNNING_QUOTA_VALIDATION = 12; - */ - const RUNNING_QUOTA_VALIDATION = 12; - - private static $valueToName = [ - self::DEPLOYMENT_STEP_UNSPECIFIED => 'DEPLOYMENT_STEP_UNSPECIFIED', - self::PREPARING_STORAGE_BUCKET => 'PREPARING_STORAGE_BUCKET', - self::DOWNLOADING_BLUEPRINT => 'DOWNLOADING_BLUEPRINT', - self::RUNNING_TF_INIT => 'RUNNING_TF_INIT', - self::RUNNING_TF_PLAN => 'RUNNING_TF_PLAN', - self::RUNNING_TF_APPLY => 'RUNNING_TF_APPLY', - self::RUNNING_TF_DESTROY => 'RUNNING_TF_DESTROY', - self::RUNNING_TF_VALIDATE => 'RUNNING_TF_VALIDATE', - self::UNLOCKING_DEPLOYMENT => 'UNLOCKING_DEPLOYMENT', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::VALIDATING_REPOSITORY => 'VALIDATING_REPOSITORY', - self::RUNNING_QUOTA_VALIDATION => 'RUNNING_QUOTA_VALIDATION', - ]; - - 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(DeploymentStep::class, \Google\Cloud\Config\V1\DeploymentOperationMetadata_DeploymentStep::class); - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ExportDeploymentStatefileRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ExportDeploymentStatefileRequest.php deleted file mode 100644 index 8bf09469d3de..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ExportDeploymentStatefileRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.config.v1.ExportDeploymentStatefileRequest - */ -class ExportDeploymentStatefileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent in whose context the statefile is listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. If this flag is set to true, the exported deployment state file - * will be the draft state. This will enable the draft file to be validated - * before copying it over to the working state on unlock. - * - * Generated from protobuf field bool draft = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $draft = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent in whose context the statefile is listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * @type bool $draft - * Optional. If this flag is set to true, the exported deployment state file - * will be the draft state. This will enable the draft file to be validated - * before copying it over to the working state on unlock. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent in whose context the statefile is listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * - * 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 in whose context the statefile is listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * - * 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 this flag is set to true, the exported deployment state file - * will be the draft state. This will enable the draft file to be validated - * before copying it over to the working state on unlock. - * - * Generated from protobuf field bool draft = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDraft() - { - return $this->draft; - } - - /** - * Optional. If this flag is set to true, the exported deployment state file - * will be the draft state. This will enable the draft file to be validated - * before copying it over to the working state on unlock. - * - * Generated from protobuf field bool draft = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDraft($var) - { - GPBUtil::checkBool($var); - $this->draft = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ExportLockInfoRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ExportLockInfoRequest.php deleted file mode 100644 index ef195f0e38e0..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ExportLockInfoRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.config.v1.ExportLockInfoRequest - */ -class ExportLockInfoRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * - * 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 deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. Please see - * {@see ConfigClient::deploymentName()} for help formatting this field. - * - * @return \Google\Cloud\Config\V1\ExportLockInfoRequest - * - * @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 deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{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 name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{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/Config/v1/proto/src/Google/Cloud/Config/V1/ExportPreviewResultRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ExportPreviewResultRequest.php deleted file mode 100644 index b00ee3ad96cc..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ExportPreviewResultRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.config.v1.ExportPreviewResultRequest - */ -class ExportPreviewResultRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The preview whose results should be exported. The preview value - * is in the format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The preview whose results should be exported. The preview value - * is in the format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Required. The preview whose results should be exported. The preview value - * is in the format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - * - * 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 preview whose results should be exported. The preview value - * is in the format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - * - * 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/Config/v1/proto/src/Google/Cloud/Config/V1/ExportPreviewResultResponse.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ExportPreviewResultResponse.php deleted file mode 100644 index 562f5b801d7f..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ExportPreviewResultResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.config.v1.ExportPreviewResultResponse - */ -class ExportPreviewResultResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Signed URLs for accessing the plan files. - * - * Generated from protobuf field .google.cloud.config.v1.PreviewResult result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $result = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Config\V1\PreviewResult $result - * Output only. Signed URLs for accessing the plan files. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Signed URLs for accessing the plan files. - * - * Generated from protobuf field .google.cloud.config.v1.PreviewResult result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Config\V1\PreviewResult|null - */ - public function getResult() - { - return $this->result; - } - - public function hasResult() - { - return isset($this->result); - } - - public function clearResult() - { - unset($this->result); - } - - /** - * Output only. Signed URLs for accessing the plan files. - * - * Generated from protobuf field .google.cloud.config.v1.PreviewResult result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Config\V1\PreviewResult $var - * @return $this - */ - public function setResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Config\V1\PreviewResult::class); - $this->result = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ExportRevisionStatefileRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ExportRevisionStatefileRequest.php deleted file mode 100644 index 579d506a9e94..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ExportRevisionStatefileRequest.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.config.v1.ExportRevisionStatefileRequest - */ -class ExportRevisionStatefileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent in whose context the statefile is listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent in whose context the statefile is listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent in whose context the statefile is listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - * - * 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 in whose context the statefile is listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - * - * 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/Config/v1/proto/src/Google/Cloud/Config/V1/GetDeploymentRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/GetDeploymentRequest.php deleted file mode 100644 index 59a272183d84..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/GetDeploymentRequest.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.config.v1.GetDeploymentRequest - */ -class GetDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the deployment. Format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * - * 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 deployment. Format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. Please see - * {@see ConfigClient::deploymentName()} for help formatting this field. - * - * @return \Google\Cloud\Config\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 name of the deployment. Format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the deployment. Format: - * 'projects/{project_id}/locations/{location}/deployments/{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 name of the deployment. Format: - * 'projects/{project_id}/locations/{location}/deployments/{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/Config/v1/proto/src/Google/Cloud/Config/V1/GetPreviewRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/GetPreviewRequest.php deleted file mode 100644 index ea775d2d2a84..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/GetPreviewRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.config.v1.GetPreviewRequest - */ -class GetPreviewRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the preview. Format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - * - * 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 preview. Format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. Please see - * {@see ConfigClient::previewName()} for help formatting this field. - * - * @return \Google\Cloud\Config\V1\GetPreviewRequest - * - * @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 preview. Format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the preview. Format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - * - * 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 preview. Format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - * - * 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/Config/v1/proto/src/Google/Cloud/Config/V1/GetResourceRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/GetResourceRequest.php deleted file mode 100644 index be4a56002c9d..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/GetResourceRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.config.v1.GetResourceRequest - */ -class GetResourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Resource in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'. - * - * 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 Resource in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'. Please see - * {@see ConfigClient::resourceName()} for help formatting this field. - * - * @return \Google\Cloud\Config\V1\GetResourceRequest - * - * @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 Resource in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Resource in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'. - * - * 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 Resource in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'. - * - * 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/Config/v1/proto/src/Google/Cloud/Config/V1/GetRevisionRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/GetRevisionRequest.php deleted file mode 100644 index a551f41c7a7b..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/GetRevisionRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.config.v1.GetRevisionRequest - */ -class GetRevisionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Revision in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - * - * 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 Revision in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. Please see - * {@see ConfigClient::revisionName()} for help formatting this field. - * - * @return \Google\Cloud\Config\V1\GetRevisionRequest - * - * @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 Revision in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Revision in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - * - * 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 Revision in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - * - * 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/Config/v1/proto/src/Google/Cloud/Config/V1/GetTerraformVersionRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/GetTerraformVersionRequest.php deleted file mode 100644 index 3808e68209da..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/GetTerraformVersionRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.config.v1.GetTerraformVersionRequest - */ -class GetTerraformVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the TerraformVersion. Format: - * 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}' - * - * 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 TerraformVersion. Format: - * 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}' - * Please see {@see ConfigClient::terraformVersionName()} for help formatting this field. - * - * @return \Google\Cloud\Config\V1\GetTerraformVersionRequest - * - * @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 TerraformVersion. Format: - * 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}' - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the TerraformVersion. Format: - * 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_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 name of the TerraformVersion. Format: - * 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_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; - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/GitSource.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/GitSource.php deleted file mode 100644 index 9c54f4f7ec1c..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/GitSource.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.config.v1.GitSource - */ -class GitSource extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Repository URL. - * Example: 'https://github.com/kubernetes/examples.git' - * - * Generated from protobuf field optional string repo = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $repo = null; - /** - * Optional. Subdirectory inside the repository. - * Example: 'staging/my-package' - * - * Generated from protobuf field optional string directory = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $directory = null; - /** - * Optional. Git reference (e.g. branch or tag). - * - * Generated from protobuf field optional string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ref = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $repo - * Optional. Repository URL. - * Example: 'https://github.com/kubernetes/examples.git' - * @type string $directory - * Optional. Subdirectory inside the repository. - * Example: 'staging/my-package' - * @type string $ref - * Optional. Git reference (e.g. branch or tag). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Repository URL. - * Example: 'https://github.com/kubernetes/examples.git' - * - * Generated from protobuf field optional string repo = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRepo() - { - return isset($this->repo) ? $this->repo : ''; - } - - public function hasRepo() - { - return isset($this->repo); - } - - public function clearRepo() - { - unset($this->repo); - } - - /** - * Optional. Repository URL. - * Example: 'https://github.com/kubernetes/examples.git' - * - * Generated from protobuf field optional string repo = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRepo($var) - { - GPBUtil::checkString($var, True); - $this->repo = $var; - - return $this; - } - - /** - * Optional. Subdirectory inside the repository. - * Example: 'staging/my-package' - * - * Generated from protobuf field optional string directory = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDirectory() - { - return isset($this->directory) ? $this->directory : ''; - } - - public function hasDirectory() - { - return isset($this->directory); - } - - public function clearDirectory() - { - unset($this->directory); - } - - /** - * Optional. Subdirectory inside the repository. - * Example: 'staging/my-package' - * - * Generated from protobuf field optional string directory = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDirectory($var) - { - GPBUtil::checkString($var, True); - $this->directory = $var; - - return $this; - } - - /** - * Optional. Git reference (e.g. branch or tag). - * - * Generated from protobuf field optional string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRef() - { - return isset($this->ref) ? $this->ref : ''; - } - - public function hasRef() - { - return isset($this->ref); - } - - public function clearRef() - { - unset($this->ref); - } - - /** - * Optional. Git reference (e.g. branch or tag). - * - * Generated from protobuf field optional string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRef($var) - { - GPBUtil::checkString($var, True); - $this->ref = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ImportStatefileRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ImportStatefileRequest.php deleted file mode 100644 index a70d7cbb9eba..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ImportStatefileRequest.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.config.v1.ImportStatefileRequest - */ -class ImportStatefileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent in whose context the statefile is listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Lock ID of the lock file to verify that the user who is importing - * the state file previously locked the Deployment. - * - * Generated from protobuf field int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $lock_id = 0; - /** - * Optional. - * - * Generated from protobuf field bool skip_draft = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $skip_draft = false; - - /** - * @param string $parent Required. The parent in whose context the statefile is listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. Please see - * {@see ConfigClient::deploymentName()} for help formatting this field. - * @param int $lockId Required. Lock ID of the lock file to verify that the user who is importing - * the state file previously locked the Deployment. - * - * @return \Google\Cloud\Config\V1\ImportStatefileRequest - * - * @experimental - */ - public static function build(string $parent, int $lockId): self - { - return (new self()) - ->setParent($parent) - ->setLockId($lockId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent in whose context the statefile is listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * @type int|string $lock_id - * Required. Lock ID of the lock file to verify that the user who is importing - * the state file previously locked the Deployment. - * @type bool $skip_draft - * Optional. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent in whose context the statefile is listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * - * 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 in whose context the statefile is listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * - * 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. Lock ID of the lock file to verify that the user who is importing - * the state file previously locked the Deployment. - * - * Generated from protobuf field int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int|string - */ - public function getLockId() - { - return $this->lock_id; - } - - /** - * Required. Lock ID of the lock file to verify that the user who is importing - * the state file previously locked the Deployment. - * - * Generated from protobuf field int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int|string $var - * @return $this - */ - public function setLockId($var) - { - GPBUtil::checkInt64($var); - $this->lock_id = $var; - - return $this; - } - - /** - * Optional. - * - * Generated from protobuf field bool skip_draft = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getSkipDraft() - { - return $this->skip_draft; - } - - /** - * Optional. - * - * Generated from protobuf field bool skip_draft = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setSkipDraft($var) - { - GPBUtil::checkBool($var); - $this->skip_draft = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ListDeploymentsRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ListDeploymentsRequest.php deleted file mode 100644 index b5aca6b46201..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ListDeploymentsRequest.php +++ /dev/null @@ -1,305 +0,0 @@ -google.cloud.config.v1.ListDeploymentsRequest - */ -class ListDeploymentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent in whose context the Deployments are listed. The - * parent value is in the format: - * 'projects/{project_id}/locations/{location}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * When requesting a page of resources, 'page_size' specifies number of - * resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Token returned by previous call to 'ListDeployments' 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 the Deployments that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/bar - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - Filter by state: - * - Deployments in CREATING state. - * state=CREATING - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Field to use to sort the list. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent in whose context the Deployments are listed. The - * parent value is in the format: - * 'projects/{project_id}/locations/{location}'. Please see - * {@see ConfigClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Config\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. The parent in whose context the Deployments are listed. The - * parent value is in the format: - * 'projects/{project_id}/locations/{location}'. - * @type int $page_size - * When requesting a page of resources, 'page_size' specifies number of - * resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * @type string $page_token - * Token returned by previous call to 'ListDeployments' which specifies the - * position in the list from where to continue listing the resources. - * @type string $filter - * Lists the Deployments that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/bar - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - Filter by state: - * - Deployments in CREATING state. - * state=CREATING - * @type string $order_by - * Field to use to sort the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent in whose context the Deployments are listed. The - * parent value is in the format: - * '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. The parent in whose context the Deployments are listed. The - * parent value is in the format: - * '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; - } - - /** - * When requesting a page of resources, 'page_size' specifies number of - * resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * - * 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, at most 500 will be returned. The - * maximum value is 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; - } - - /** - * Token returned by previous call to 'ListDeployments' 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 'ListDeployments' 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 the Deployments that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/bar - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - Filter by state: - * - Deployments in CREATING state. - * state=CREATING - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Lists the Deployments that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/bar - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - Filter by state: - * - Deployments in CREATING state. - * state=CREATING - * - * 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; - } - - /** - * Field to use to sort the list. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Field to use to sort the list. - * - * 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/Config/v1/proto/src/Google/Cloud/Config/V1/ListDeploymentsResponse.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ListDeploymentsResponse.php deleted file mode 100644 index 9f1b6da072d6..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ListDeploymentsResponse.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.config.v1.ListDeploymentsResponse - */ -class ListDeploymentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of [Deployment][google.cloud.config.v1.Deployment]s. - * - * Generated from protobuf field repeated .google.cloud.config.v1.Deployment deployments = 1; - */ - private $deployments; - /** - * Token to be supplied to the next ListDeployments request via `page_token` - * to obtain the next set of results. - * - * 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\Config\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $deployments - * List of [Deployment][google.cloud.config.v1.Deployment]s. - * @type string $next_page_token - * Token to be supplied to the next ListDeployments request via `page_token` - * to obtain the next set of results. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * List of [Deployment][google.cloud.config.v1.Deployment]s. - * - * Generated from protobuf field repeated .google.cloud.config.v1.Deployment deployments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeployments() - { - return $this->deployments; - } - - /** - * List of [Deployment][google.cloud.config.v1.Deployment]s. - * - * Generated from protobuf field repeated .google.cloud.config.v1.Deployment deployments = 1; - * @param array<\Google\Cloud\Config\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeployments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Config\V1\Deployment::class); - $this->deployments = $arr; - - return $this; - } - - /** - * Token to be supplied to the next ListDeployments request via `page_token` - * to obtain the next set of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to be supplied to the next ListDeployments request via `page_token` - * to obtain the next set 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; - } - - /** - * 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/Config/v1/proto/src/Google/Cloud/Config/V1/ListPreviewsRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ListPreviewsRequest.php deleted file mode 100644 index a1f19e2cae2d..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ListPreviewsRequest.php +++ /dev/null @@ -1,306 +0,0 @@ -google.cloud.config.v1.ListPreviewsRequest - */ -class ListPreviewsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent in whose context the Previews are listed. The parent - * value is in the format: 'projects/{project_id}/locations/{location}'. - * - * 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, at most 500 will be returned. The - * maximum value is 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Token returned by previous call to 'ListDeployments' 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 the Deployments that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/bar - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - Filter by state: - * - Deployments in CREATING state. - * state=CREATING - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Field to use to sort the list. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent in whose context the Previews are listed. The parent - * value is in the format: 'projects/{project_id}/locations/{location}'. Please see - * {@see ConfigClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Config\V1\ListPreviewsRequest - * - * @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 in whose context the Previews are listed. The parent - * value is in the format: 'projects/{project_id}/locations/{location}'. - * @type int $page_size - * Optional. When requesting a page of resources, 'page_size' specifies number - * of resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * @type string $page_token - * Optional. Token returned by previous call to 'ListDeployments' which - * specifies the position in the list from where to continue listing the - * resources. - * @type string $filter - * Optional. Lists the Deployments that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/bar - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - Filter by state: - * - Deployments in CREATING state. - * state=CREATING - * @type string $order_by - * Optional. Field to use to sort the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent in whose context the Previews are listed. The parent - * value is in the format: '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. The parent in whose context the Previews are listed. The parent - * value is in the format: '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. When requesting a page of resources, 'page_size' specifies number - * of resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * - * 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, at most 500 will be returned. The - * maximum value is 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. Token returned by previous call to 'ListDeployments' 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 'ListDeployments' 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 the Deployments that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/bar - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - Filter by state: - * - Deployments in 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 the Deployments that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/bar - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - Filter by state: - * - Deployments in 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. Field to use to sort the list. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Field to use to sort the list. - * - * 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/Config/v1/proto/src/Google/Cloud/Config/V1/ListPreviewsResponse.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ListPreviewsResponse.php deleted file mode 100644 index e7c4f730627f..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ListPreviewsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.config.v1.ListPreviewsResponse - */ -class ListPreviewsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of [Previews][google.cloud.config.v1.Preview]. - * - * Generated from protobuf field repeated .google.cloud.config.v1.Preview previews = 1; - */ - private $previews; - /** - * Token to be supplied to the next ListPreviews request via `page_token` - * to obtain the next set of results. - * - * 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\Config\V1\Preview>|\Google\Protobuf\Internal\RepeatedField $previews - * List of [Previews][google.cloud.config.v1.Preview]. - * @type string $next_page_token - * Token to be supplied to the next ListPreviews request via `page_token` - * to obtain the next set of results. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * List of [Previews][google.cloud.config.v1.Preview]. - * - * Generated from protobuf field repeated .google.cloud.config.v1.Preview previews = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPreviews() - { - return $this->previews; - } - - /** - * List of [Previews][google.cloud.config.v1.Preview]. - * - * Generated from protobuf field repeated .google.cloud.config.v1.Preview previews = 1; - * @param array<\Google\Cloud\Config\V1\Preview>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPreviews($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Config\V1\Preview::class); - $this->previews = $arr; - - return $this; - } - - /** - * Token to be supplied to the next ListPreviews request via `page_token` - * to obtain the next set of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to be supplied to the next ListPreviews request via `page_token` - * to obtain the next set 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; - } - - /** - * 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/Config/v1/proto/src/Google/Cloud/Config/V1/ListResourcesRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ListResourcesRequest.php deleted file mode 100644 index a85db19b3c23..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ListResourcesRequest.php +++ /dev/null @@ -1,283 +0,0 @@ -google.cloud.config.v1.ListResourcesRequest - */ -class ListResourcesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent in whose context the Resources are listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * When requesting a page of resources, 'page_size' specifies number of - * resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Token returned by previous call to 'ListResources' 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 the Resources that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', - * '>=', - * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is - * roughly synonymous with equality). {field} can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * Examples: - * - Filter by name: - * name = - * "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Field to use to sort the list. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent in whose context the Resources are listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. Please see - * {@see ConfigClient::revisionName()} for help formatting this field. - * - * @return \Google\Cloud\Config\V1\ListResourcesRequest - * - * @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 in whose context the Resources are listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - * @type int $page_size - * When requesting a page of resources, 'page_size' specifies number of - * resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * @type string $page_token - * Token returned by previous call to 'ListResources' which specifies the - * position in the list from where to continue listing the resources. - * @type string $filter - * Lists the Resources that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', - * '>=', - * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is - * roughly synonymous with equality). {field} can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * Examples: - * - Filter by name: - * name = - * "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz - * @type string $order_by - * Field to use to sort the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent in whose context the Resources are listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - * - * 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 in whose context the Resources are listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - * - * 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; - } - - /** - * When requesting a page of resources, 'page_size' specifies number of - * resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * - * 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, at most 500 will be returned. The - * maximum value is 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; - } - - /** - * Token returned by previous call to 'ListResources' 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 'ListResources' 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 the Resources that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', - * '>=', - * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is - * roughly synonymous with equality). {field} can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * Examples: - * - Filter by name: - * name = - * "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Lists the Resources that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', - * '>=', - * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is - * roughly synonymous with equality). {field} can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * Examples: - * - Filter by name: - * name = - * "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz - * - * 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; - } - - /** - * Field to use to sort the list. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Field to use to sort the list. - * - * 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/Config/v1/proto/src/Google/Cloud/Config/V1/ListResourcesResponse.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ListResourcesResponse.php deleted file mode 100644 index 9fbb5d698634..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ListResourcesResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.config.v1.ListResourcesResponse - */ -class ListResourcesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of [Resources][google.cloud.config.v1.Resource]. - * - * Generated from protobuf field repeated .google.cloud.config.v1.Resource resources = 1; - */ - private $resources; - /** - * A token to request the next page of resources from the 'ListResources' - * 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 = ''; - /** - * 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\Config\V1\Resource>|\Google\Protobuf\Internal\RepeatedField $resources - * List of [Resources][google.cloud.config.v1.Resource]. - * @type string $next_page_token - * A token to request the next page of resources from the 'ListResources' - * method. The value of an empty string means that there are no more resources - * to return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * List of [Resources][google.cloud.config.v1.Resource]. - * - * Generated from protobuf field repeated .google.cloud.config.v1.Resource resources = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResources() - { - return $this->resources; - } - - /** - * List of [Resources][google.cloud.config.v1.Resource]. - * - * Generated from protobuf field repeated .google.cloud.config.v1.Resource resources = 1; - * @param array<\Google\Cloud\Config\V1\Resource>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Config\V1\Resource::class); - $this->resources = $arr; - - return $this; - } - - /** - * A token to request the next page of resources from the 'ListResources' - * 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 'ListResources' - * 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; - } - - /** - * 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/Config/v1/proto/src/Google/Cloud/Config/V1/ListRevisionsRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ListRevisionsRequest.php deleted file mode 100644 index 017b31cc9b52..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ListRevisionsRequest.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.config.v1.ListRevisionsRequest - */ -class ListRevisionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent in whose context the Revisions are listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * When requesting a page of resources, `page_size` specifies number of - * resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Token returned by previous call to 'ListRevisions' 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 the Revisions that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - Filter by state: - * - Revisions in CREATING state. - * state=CREATING - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Field to use to sort the list. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent in whose context the Revisions are listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. Please see - * {@see ConfigClient::deploymentName()} for help formatting this field. - * - * @return \Google\Cloud\Config\V1\ListRevisionsRequest - * - * @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 in whose context the Revisions are listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * @type int $page_size - * When requesting a page of resources, `page_size` specifies number of - * resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * @type string $page_token - * Token returned by previous call to 'ListRevisions' which specifies the - * position in the list from where to continue listing the resources. - * @type string $filter - * Lists the Revisions that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - Filter by state: - * - Revisions in CREATING state. - * state=CREATING - * @type string $order_by - * Field to use to sort the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent in whose context the Revisions are listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * - * 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 in whose context the Revisions are listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * - * 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; - } - - /** - * When requesting a page of resources, `page_size` specifies number of - * resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * - * 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, at most 500 will be returned. The - * maximum value is 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; - } - - /** - * Token returned by previous call to 'ListRevisions' 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 'ListRevisions' 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 the Revisions that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - Filter by state: - * - Revisions in CREATING state. - * state=CREATING - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Lists the Revisions that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - Filter by state: - * - Revisions in CREATING state. - * state=CREATING - * - * 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; - } - - /** - * Field to use to sort the list. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Field to use to sort the list. - * - * 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/Config/v1/proto/src/Google/Cloud/Config/V1/ListRevisionsResponse.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ListRevisionsResponse.php deleted file mode 100644 index 77a270da4f81..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ListRevisionsResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.config.v1.ListRevisionsResponse - */ -class ListRevisionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of [Revision][google.cloud.config.v1.Revision]s. - * - * Generated from protobuf field repeated .google.cloud.config.v1.Revision revisions = 1; - */ - private $revisions; - /** - * A token to request the next page of resources from the 'ListRevisions' - * 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 = ''; - /** - * 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\Config\V1\Revision>|\Google\Protobuf\Internal\RepeatedField $revisions - * List of [Revision][google.cloud.config.v1.Revision]s. - * @type string $next_page_token - * A token to request the next page of resources from the 'ListRevisions' - * method. The value of an empty string means that there are no more resources - * to return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * List of [Revision][google.cloud.config.v1.Revision]s. - * - * Generated from protobuf field repeated .google.cloud.config.v1.Revision revisions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRevisions() - { - return $this->revisions; - } - - /** - * List of [Revision][google.cloud.config.v1.Revision]s. - * - * Generated from protobuf field repeated .google.cloud.config.v1.Revision revisions = 1; - * @param array<\Google\Cloud\Config\V1\Revision>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRevisions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Config\V1\Revision::class); - $this->revisions = $arr; - - return $this; - } - - /** - * A token to request the next page of resources from the 'ListRevisions' - * 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 'ListRevisions' - * 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; - } - - /** - * 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/Config/v1/proto/src/Google/Cloud/Config/V1/ListTerraformVersionsRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ListTerraformVersionsRequest.php deleted file mode 100644 index d396c7211a6e..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ListTerraformVersionsRequest.php +++ /dev/null @@ -1,271 +0,0 @@ -google.cloud.config.v1.ListTerraformVersionsRequest - */ -class ListTerraformVersionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent in whose context the TerraformVersions are listed. The - * parent value is in the format: - * 'projects/{project_id}/locations/{location}'. - * - * 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, at most 500 will be returned. The - * maximum value is 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Token returned by previous call to 'ListTerraformVersions' 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 the TerraformVersions that match the filter expression. A - * filter expression filters the resources listed in the response. The - * expression must be of the form '{field} {operator} {value}' where - * operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Field to use to sort the list. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent in whose context the TerraformVersions are listed. The - * parent value is in the format: - * 'projects/{project_id}/locations/{location}'. Please see - * {@see ConfigClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Config\V1\ListTerraformVersionsRequest - * - * @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 in whose context the TerraformVersions are listed. The - * parent value is in the format: - * 'projects/{project_id}/locations/{location}'. - * @type int $page_size - * Optional. When requesting a page of resources, 'page_size' specifies number - * of resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * @type string $page_token - * Optional. Token returned by previous call to 'ListTerraformVersions' which - * specifies the position in the list from where to continue listing the - * resources. - * @type string $filter - * Optional. Lists the TerraformVersions that match the filter expression. A - * filter expression filters the resources listed in the response. The - * expression must be of the form '{field} {operator} {value}' where - * operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * @type string $order_by - * Optional. Field to use to sort the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent in whose context the TerraformVersions are listed. The - * parent value is in the format: - * '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. The parent in whose context the TerraformVersions are listed. The - * parent value is in the format: - * '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. When requesting a page of resources, 'page_size' specifies number - * of resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * - * 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, at most 500 will be returned. The - * maximum value is 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. Token returned by previous call to 'ListTerraformVersions' 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 'ListTerraformVersions' 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 the TerraformVersions that match the filter expression. A - * filter expression filters the resources listed in the response. The - * expression must be of the form '{field} {operator} {value}' where - * operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Lists the TerraformVersions that match the filter expression. A - * filter expression filters the resources listed in the response. The - * expression must be of the form '{field} {operator} {value}' where - * operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * - * 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 to use to sort the list. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Field to use to sort the list. - * - * 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/Config/v1/proto/src/Google/Cloud/Config/V1/ListTerraformVersionsResponse.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ListTerraformVersionsResponse.php deleted file mode 100644 index db79ce1618bf..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ListTerraformVersionsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.config.v1.ListTerraformVersionsResponse - */ -class ListTerraformVersionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of [TerraformVersion][google.cloud.config.v1.TerraformVersion]s. - * - * Generated from protobuf field repeated .google.cloud.config.v1.TerraformVersion terraform_versions = 1; - */ - private $terraform_versions; - /** - * Token to be supplied to the next ListTerraformVersions request via - * `page_token` to obtain the next set of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Unreachable resources, if any. - * - * 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\Config\V1\TerraformVersion>|\Google\Protobuf\Internal\RepeatedField $terraform_versions - * List of [TerraformVersion][google.cloud.config.v1.TerraformVersion]s. - * @type string $next_page_token - * Token to be supplied to the next ListTerraformVersions request via - * `page_token` to obtain the next set of results. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Unreachable resources, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * List of [TerraformVersion][google.cloud.config.v1.TerraformVersion]s. - * - * Generated from protobuf field repeated .google.cloud.config.v1.TerraformVersion terraform_versions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTerraformVersions() - { - return $this->terraform_versions; - } - - /** - * List of [TerraformVersion][google.cloud.config.v1.TerraformVersion]s. - * - * Generated from protobuf field repeated .google.cloud.config.v1.TerraformVersion terraform_versions = 1; - * @param array<\Google\Cloud\Config\V1\TerraformVersion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTerraformVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Config\V1\TerraformVersion::class); - $this->terraform_versions = $arr; - - return $this; - } - - /** - * Token to be supplied to the next ListTerraformVersions request via - * `page_token` to obtain the next set of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to be supplied to the next ListTerraformVersions request via - * `page_token` to obtain the next set 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; - } - - /** - * Unreachable resources, if any. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Unreachable resources, if any. - * - * 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/Config/v1/proto/src/Google/Cloud/Config/V1/LockDeploymentRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/LockDeploymentRequest.php deleted file mode 100644 index 892e219ddd4e..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/LockDeploymentRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.config.v1.LockDeploymentRequest - */ -class LockDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * - * 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 deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. Please see - * {@see ConfigClient::deploymentName()} for help formatting this field. - * - * @return \Google\Cloud\Config\V1\LockDeploymentRequest - * - * @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 deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{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 name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{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/Config/v1/proto/src/Google/Cloud/Config/V1/LockInfo.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/LockInfo.php deleted file mode 100644 index e2c17995883b..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/LockInfo.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.config.v1.LockInfo - */ -class LockInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Unique ID for the lock to be overridden with generation ID in the backend. - * - * Generated from protobuf field int64 lock_id = 1; - */ - protected $lock_id = 0; - /** - * Terraform operation, provided by the caller. - * - * Generated from protobuf field string operation = 2; - */ - protected $operation = ''; - /** - * Extra information to store with the lock, provided by the caller. - * - * Generated from protobuf field string info = 3; - */ - protected $info = ''; - /** - * user@hostname when available - * - * Generated from protobuf field string who = 4; - */ - protected $who = ''; - /** - * Terraform version - * - * Generated from protobuf field string version = 5; - */ - protected $version = ''; - /** - * Time that the lock was taken. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; - */ - protected $create_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $lock_id - * Unique ID for the lock to be overridden with generation ID in the backend. - * @type string $operation - * Terraform operation, provided by the caller. - * @type string $info - * Extra information to store with the lock, provided by the caller. - * @type string $who - * user@hostname when available - * @type string $version - * Terraform version - * @type \Google\Protobuf\Timestamp $create_time - * Time that the lock was taken. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Unique ID for the lock to be overridden with generation ID in the backend. - * - * Generated from protobuf field int64 lock_id = 1; - * @return int|string - */ - public function getLockId() - { - return $this->lock_id; - } - - /** - * Unique ID for the lock to be overridden with generation ID in the backend. - * - * Generated from protobuf field int64 lock_id = 1; - * @param int|string $var - * @return $this - */ - public function setLockId($var) - { - GPBUtil::checkInt64($var); - $this->lock_id = $var; - - return $this; - } - - /** - * Terraform operation, provided by the caller. - * - * Generated from protobuf field string operation = 2; - * @return string - */ - public function getOperation() - { - return $this->operation; - } - - /** - * Terraform operation, provided by the caller. - * - * Generated from protobuf field string operation = 2; - * @param string $var - * @return $this - */ - public function setOperation($var) - { - GPBUtil::checkString($var, True); - $this->operation = $var; - - return $this; - } - - /** - * Extra information to store with the lock, provided by the caller. - * - * Generated from protobuf field string info = 3; - * @return string - */ - public function getInfo() - { - return $this->info; - } - - /** - * Extra information to store with the lock, provided by the caller. - * - * Generated from protobuf field string info = 3; - * @param string $var - * @return $this - */ - public function setInfo($var) - { - GPBUtil::checkString($var, True); - $this->info = $var; - - return $this; - } - - /** - * user@hostname when available - * - * Generated from protobuf field string who = 4; - * @return string - */ - public function getWho() - { - return $this->who; - } - - /** - * user@hostname when available - * - * Generated from protobuf field string who = 4; - * @param string $var - * @return $this - */ - public function setWho($var) - { - GPBUtil::checkString($var, True); - $this->who = $var; - - return $this; - } - - /** - * Terraform version - * - * Generated from protobuf field string version = 5; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Terraform version - * - * Generated from protobuf field string version = 5; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Time that the lock was taken. - * - * 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); - } - - /** - * Time that the lock was taken. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/OperationMetadata.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/OperationMetadata.php deleted file mode 100644 index 9a5c179c676a..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/OperationMetadata.php +++ /dev/null @@ -1,382 +0,0 @@ -google.cloud.config.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Time when 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. Time when 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 - * [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 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 = ''; - protected $resource_metadata; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Config\V1\DeploymentOperationMetadata $deployment_metadata - * Output only. Metadata about the deployment operation state. - * @type \Google\Cloud\Config\V1\PreviewOperationMetadata $preview_metadata - * Output only. Metadata about the preview operation state. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Time when the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. Time when 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 - * [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 - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Metadata about the deployment operation state. - * - * Generated from protobuf field .google.cloud.config.v1.DeploymentOperationMetadata deployment_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Config\V1\DeploymentOperationMetadata|null - */ - public function getDeploymentMetadata() - { - return $this->readOneof(8); - } - - public function hasDeploymentMetadata() - { - return $this->hasOneof(8); - } - - /** - * Output only. Metadata about the deployment operation state. - * - * Generated from protobuf field .google.cloud.config.v1.DeploymentOperationMetadata deployment_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Config\V1\DeploymentOperationMetadata $var - * @return $this - */ - public function setDeploymentMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Config\V1\DeploymentOperationMetadata::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Output only. Metadata about the preview operation state. - * - * Generated from protobuf field .google.cloud.config.v1.PreviewOperationMetadata preview_metadata = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Config\V1\PreviewOperationMetadata|null - */ - public function getPreviewMetadata() - { - return $this->readOneof(9); - } - - public function hasPreviewMetadata() - { - return $this->hasOneof(9); - } - - /** - * Output only. Metadata about the preview operation state. - * - * Generated from protobuf field .google.cloud.config.v1.PreviewOperationMetadata preview_metadata = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Config\V1\PreviewOperationMetadata $var - * @return $this - */ - public function setPreviewMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Config\V1\PreviewOperationMetadata::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Output only. Time when 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. Time when 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. Time when 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. Time when 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 - * [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 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 - * [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 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; - } - - /** - * @return string - */ - public function getResourceMetadata() - { - return $this->whichOneof("resource_metadata"); - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Preview.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Preview.php deleted file mode 100644 index 85c609dc8971..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Preview.php +++ /dev/null @@ -1,899 +0,0 @@ -google.cloud.config.v1.Preview - */ -class Preview extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Resource name of the preview. Resource name can be user - * provided or server generated ID if unspecified. Format: - * `projects/{project}/locations/{location}/previews/{preview}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. Time the preview was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Optional. User-defined labels for the preview. - * - * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Output only. Current state of the preview. - * - * Generated from protobuf field .google.cloud.config.v1.Preview.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Optional. Optional deployment reference. If specified, the preview will be - * performed using the provided deployment's current state and use any - * relevant fields from the deployment unless explicitly specified in the - * preview create request. - * - * Generated from protobuf field string deployment = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $deployment = ''; - /** - * Optional. Current mode of preview. - * - * Generated from protobuf field .google.cloud.config.v1.Preview.PreviewMode preview_mode = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $preview_mode = 0; - /** - * Required. User-specified Service Account (SA) credentials to be used when - * previewing resources. - * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` - * - * Generated from protobuf field string service_account = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $service_account = ''; - /** - * Optional. User-defined location of Cloud Build logs, artifacts, and - * in Google Cloud Storage. - * Format: `gs://{bucket}/{folder}` - * A default bucket will be bootstrapped if the field is not set or empty - * Default Bucket Format: `gs://--blueprint-config` - * Constraints: - * - The bucket needs to be in the same project as the deployment - * - The path cannot be within the path of `gcs_source` - * If omitted and deployment resource ref provided has artifacts_gcs_bucket - * defined, that artifact bucket is used. - * - * Generated from protobuf field optional string artifacts_gcs_bucket = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $artifacts_gcs_bucket = null; - /** - * Optional. The user-specified Worker Pool resource in which the Cloud Build - * job will execute. Format - * projects/{project}/locations/{location}/workerPools/{workerPoolId} If this - * field is unspecified, the default Cloud Build worker pool will be used. If - * omitted and deployment resource ref provided has worker_pool defined, that - * worker pool is used. - * - * Generated from protobuf field optional string worker_pool = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $worker_pool = null; - /** - * Output only. Code describing any errors that may have occurred. - * - * Generated from protobuf field .google.cloud.config.v1.Preview.ErrorCode error_code = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error_code = 0; - /** - * Output only. Additional information regarding the current state. - * - * Generated from protobuf field .google.rpc.Status error_status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error_status = null; - /** - * Output only. Cloud Build instance UUID associated with this preview. - * - * Generated from protobuf field string build = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $build = ''; - /** - * Output only. Summary of errors encountered during Terraform preview. - * It has a size limit of 10, i.e. only top 10 errors will be summarized here. - * - * Generated from protobuf field repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $tf_errors; - /** - * Output only. Link to tf-error.ndjson file, which contains the full list of - * the errors encountered during a Terraform preview. - * Format: `gs://{bucket}/{object}`. - * - * Generated from protobuf field string error_logs = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error_logs = ''; - /** - * Output only. Artifacts from preview. - * - * Generated from protobuf field .google.cloud.config.v1.PreviewArtifacts preview_artifacts = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $preview_artifacts = null; - /** - * Output only. Location of preview logs in `gs://{bucket}/{object}` format. - * - * Generated from protobuf field string logs = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $logs = ''; - /** - * Output only. The current Terraform version set on the preview. - * It is in the format of "Major.Minor.Patch", for example, "1.3.10". - * - * Generated from protobuf field string tf_version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $tf_version = ''; - /** - * Optional. The user-specified Terraform version constraint. - * Example: "=1.3.10". - * - * Generated from protobuf field optional string tf_version_constraint = 19 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $tf_version_constraint = null; - /** - * Optional. Arbitrary key-value metadata storage e.g. to help client tools - * identifiy preview during automation. See - * https://google.aip.dev/148#annotations for details on format and size - * limitations. - * - * Generated from protobuf field map annotations = 20 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $annotations; - protected $blueprint; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Config\V1\TerraformBlueprint $terraform_blueprint - * The terraform blueprint to preview. - * @type string $name - * Identifier. Resource name of the preview. Resource name can be user - * provided or server generated ID if unspecified. Format: - * `projects/{project}/locations/{location}/previews/{preview}` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Time the preview was created. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User-defined labels for the preview. - * @type int $state - * Output only. Current state of the preview. - * @type string $deployment - * Optional. Optional deployment reference. If specified, the preview will be - * performed using the provided deployment's current state and use any - * relevant fields from the deployment unless explicitly specified in the - * preview create request. - * @type int $preview_mode - * Optional. Current mode of preview. - * @type string $service_account - * Required. User-specified Service Account (SA) credentials to be used when - * previewing resources. - * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` - * @type string $artifacts_gcs_bucket - * Optional. User-defined location of Cloud Build logs, artifacts, and - * in Google Cloud Storage. - * Format: `gs://{bucket}/{folder}` - * A default bucket will be bootstrapped if the field is not set or empty - * Default Bucket Format: `gs://--blueprint-config` - * Constraints: - * - The bucket needs to be in the same project as the deployment - * - The path cannot be within the path of `gcs_source` - * If omitted and deployment resource ref provided has artifacts_gcs_bucket - * defined, that artifact bucket is used. - * @type string $worker_pool - * Optional. The user-specified Worker Pool resource in which the Cloud Build - * job will execute. Format - * projects/{project}/locations/{location}/workerPools/{workerPoolId} If this - * field is unspecified, the default Cloud Build worker pool will be used. If - * omitted and deployment resource ref provided has worker_pool defined, that - * worker pool is used. - * @type int $error_code - * Output only. Code describing any errors that may have occurred. - * @type \Google\Rpc\Status $error_status - * Output only. Additional information regarding the current state. - * @type string $build - * Output only. Cloud Build instance UUID associated with this preview. - * @type array<\Google\Cloud\Config\V1\TerraformError>|\Google\Protobuf\Internal\RepeatedField $tf_errors - * Output only. Summary of errors encountered during Terraform preview. - * It has a size limit of 10, i.e. only top 10 errors will be summarized here. - * @type string $error_logs - * Output only. Link to tf-error.ndjson file, which contains the full list of - * the errors encountered during a Terraform preview. - * Format: `gs://{bucket}/{object}`. - * @type \Google\Cloud\Config\V1\PreviewArtifacts $preview_artifacts - * Output only. Artifacts from preview. - * @type string $logs - * Output only. Location of preview logs in `gs://{bucket}/{object}` format. - * @type string $tf_version - * Output only. The current Terraform version set on the preview. - * It is in the format of "Major.Minor.Patch", for example, "1.3.10". - * @type string $tf_version_constraint - * Optional. The user-specified Terraform version constraint. - * Example: "=1.3.10". - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Optional. Arbitrary key-value metadata storage e.g. to help client tools - * identifiy preview during automation. See - * https://google.aip.dev/148#annotations for details on format and size - * limitations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * The terraform blueprint to preview. - * - * Generated from protobuf field .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6; - * @return \Google\Cloud\Config\V1\TerraformBlueprint|null - */ - public function getTerraformBlueprint() - { - return $this->readOneof(6); - } - - public function hasTerraformBlueprint() - { - return $this->hasOneof(6); - } - - /** - * The terraform blueprint to preview. - * - * Generated from protobuf field .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6; - * @param \Google\Cloud\Config\V1\TerraformBlueprint $var - * @return $this - */ - public function setTerraformBlueprint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Config\V1\TerraformBlueprint::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Identifier. Resource name of the preview. Resource name can be user - * provided or server generated ID if unspecified. Format: - * `projects/{project}/locations/{location}/previews/{preview}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Resource name of the preview. Resource name can be user - * provided or server generated ID if unspecified. Format: - * `projects/{project}/locations/{location}/previews/{preview}` - * - * 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. Time the preview 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. Time the preview 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. User-defined labels for the preview. - * - * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User-defined labels for the preview. - * - * 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; - } - - /** - * Output only. Current state of the preview. - * - * Generated from protobuf field .google.cloud.config.v1.Preview.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the preview. - * - * Generated from protobuf field .google.cloud.config.v1.Preview.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Config\V1\Preview\State::class); - $this->state = $var; - - return $this; - } - - /** - * Optional. Optional deployment reference. If specified, the preview will be - * performed using the provided deployment's current state and use any - * relevant fields from the deployment unless explicitly specified in the - * preview create request. - * - * Generated from protobuf field string deployment = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getDeployment() - { - return $this->deployment; - } - - /** - * Optional. Optional deployment reference. If specified, the preview will be - * performed using the provided deployment's current state and use any - * relevant fields from the deployment unless explicitly specified in the - * preview create request. - * - * Generated from protobuf field string deployment = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDeployment($var) - { - GPBUtil::checkString($var, True); - $this->deployment = $var; - - return $this; - } - - /** - * Optional. Current mode of preview. - * - * Generated from protobuf field .google.cloud.config.v1.Preview.PreviewMode preview_mode = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPreviewMode() - { - return $this->preview_mode; - } - - /** - * Optional. Current mode of preview. - * - * Generated from protobuf field .google.cloud.config.v1.Preview.PreviewMode preview_mode = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPreviewMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Config\V1\Preview\PreviewMode::class); - $this->preview_mode = $var; - - return $this; - } - - /** - * Required. User-specified Service Account (SA) credentials to be used when - * previewing resources. - * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` - * - * Generated from protobuf field string service_account = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Required. User-specified Service Account (SA) credentials to be used when - * previewing resources. - * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` - * - * Generated from protobuf field string service_account = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * Optional. User-defined location of Cloud Build logs, artifacts, and - * in Google Cloud Storage. - * Format: `gs://{bucket}/{folder}` - * A default bucket will be bootstrapped if the field is not set or empty - * Default Bucket Format: `gs://--blueprint-config` - * Constraints: - * - The bucket needs to be in the same project as the deployment - * - The path cannot be within the path of `gcs_source` - * If omitted and deployment resource ref provided has artifacts_gcs_bucket - * defined, that artifact bucket is used. - * - * Generated from protobuf field optional string artifacts_gcs_bucket = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getArtifactsGcsBucket() - { - return isset($this->artifacts_gcs_bucket) ? $this->artifacts_gcs_bucket : ''; - } - - public function hasArtifactsGcsBucket() - { - return isset($this->artifacts_gcs_bucket); - } - - public function clearArtifactsGcsBucket() - { - unset($this->artifacts_gcs_bucket); - } - - /** - * Optional. User-defined location of Cloud Build logs, artifacts, and - * in Google Cloud Storage. - * Format: `gs://{bucket}/{folder}` - * A default bucket will be bootstrapped if the field is not set or empty - * Default Bucket Format: `gs://--blueprint-config` - * Constraints: - * - The bucket needs to be in the same project as the deployment - * - The path cannot be within the path of `gcs_source` - * If omitted and deployment resource ref provided has artifacts_gcs_bucket - * defined, that artifact bucket is used. - * - * Generated from protobuf field optional string artifacts_gcs_bucket = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setArtifactsGcsBucket($var) - { - GPBUtil::checkString($var, True); - $this->artifacts_gcs_bucket = $var; - - return $this; - } - - /** - * Optional. The user-specified Worker Pool resource in which the Cloud Build - * job will execute. Format - * projects/{project}/locations/{location}/workerPools/{workerPoolId} If this - * field is unspecified, the default Cloud Build worker pool will be used. If - * omitted and deployment resource ref provided has worker_pool defined, that - * worker pool is used. - * - * Generated from protobuf field optional string worker_pool = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getWorkerPool() - { - return isset($this->worker_pool) ? $this->worker_pool : ''; - } - - public function hasWorkerPool() - { - return isset($this->worker_pool); - } - - public function clearWorkerPool() - { - unset($this->worker_pool); - } - - /** - * Optional. The user-specified Worker Pool resource in which the Cloud Build - * job will execute. Format - * projects/{project}/locations/{location}/workerPools/{workerPoolId} If this - * field is unspecified, the default Cloud Build worker pool will be used. If - * omitted and deployment resource ref provided has worker_pool defined, that - * worker pool is used. - * - * Generated from protobuf field optional string worker_pool = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setWorkerPool($var) - { - GPBUtil::checkString($var, True); - $this->worker_pool = $var; - - return $this; - } - - /** - * Output only. Code describing any errors that may have occurred. - * - * Generated from protobuf field .google.cloud.config.v1.Preview.ErrorCode error_code = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getErrorCode() - { - return $this->error_code; - } - - /** - * Output only. Code describing any errors that may have occurred. - * - * Generated from protobuf field .google.cloud.config.v1.Preview.ErrorCode error_code = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setErrorCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Config\V1\Preview\ErrorCode::class); - $this->error_code = $var; - - return $this; - } - - /** - * Output only. Additional information regarding the current state. - * - * Generated from protobuf field .google.rpc.Status error_status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getErrorStatus() - { - return $this->error_status; - } - - public function hasErrorStatus() - { - return isset($this->error_status); - } - - public function clearErrorStatus() - { - unset($this->error_status); - } - - /** - * Output only. Additional information regarding the current state. - * - * Generated from protobuf field .google.rpc.Status error_status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setErrorStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error_status = $var; - - return $this; - } - - /** - * Output only. Cloud Build instance UUID associated with this preview. - * - * Generated from protobuf field string build = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getBuild() - { - return $this->build; - } - - /** - * Output only. Cloud Build instance UUID associated with this preview. - * - * Generated from protobuf field string build = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setBuild($var) - { - GPBUtil::checkString($var, True); - $this->build = $var; - - return $this; - } - - /** - * Output only. Summary of errors encountered during Terraform preview. - * It has a size limit of 10, i.e. only top 10 errors will be summarized here. - * - * Generated from protobuf field repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTfErrors() - { - return $this->tf_errors; - } - - /** - * Output only. Summary of errors encountered during Terraform preview. - * It has a size limit of 10, i.e. only top 10 errors will be summarized here. - * - * Generated from protobuf field repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Config\V1\TerraformError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTfErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Config\V1\TerraformError::class); - $this->tf_errors = $arr; - - return $this; - } - - /** - * Output only. Link to tf-error.ndjson file, which contains the full list of - * the errors encountered during a Terraform preview. - * Format: `gs://{bucket}/{object}`. - * - * Generated from protobuf field string error_logs = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getErrorLogs() - { - return $this->error_logs; - } - - /** - * Output only. Link to tf-error.ndjson file, which contains the full list of - * the errors encountered during a Terraform preview. - * Format: `gs://{bucket}/{object}`. - * - * Generated from protobuf field string error_logs = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setErrorLogs($var) - { - GPBUtil::checkString($var, True); - $this->error_logs = $var; - - return $this; - } - - /** - * Output only. Artifacts from preview. - * - * Generated from protobuf field .google.cloud.config.v1.PreviewArtifacts preview_artifacts = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Config\V1\PreviewArtifacts|null - */ - public function getPreviewArtifacts() - { - return $this->preview_artifacts; - } - - public function hasPreviewArtifacts() - { - return isset($this->preview_artifacts); - } - - public function clearPreviewArtifacts() - { - unset($this->preview_artifacts); - } - - /** - * Output only. Artifacts from preview. - * - * Generated from protobuf field .google.cloud.config.v1.PreviewArtifacts preview_artifacts = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Config\V1\PreviewArtifacts $var - * @return $this - */ - public function setPreviewArtifacts($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Config\V1\PreviewArtifacts::class); - $this->preview_artifacts = $var; - - return $this; - } - - /** - * Output only. Location of preview logs in `gs://{bucket}/{object}` format. - * - * Generated from protobuf field string logs = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLogs() - { - return $this->logs; - } - - /** - * Output only. Location of preview logs in `gs://{bucket}/{object}` format. - * - * Generated from protobuf field string logs = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLogs($var) - { - GPBUtil::checkString($var, True); - $this->logs = $var; - - return $this; - } - - /** - * Output only. The current Terraform version set on the preview. - * It is in the format of "Major.Minor.Patch", for example, "1.3.10". - * - * Generated from protobuf field string tf_version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTfVersion() - { - return $this->tf_version; - } - - /** - * Output only. The current Terraform version set on the preview. - * It is in the format of "Major.Minor.Patch", for example, "1.3.10". - * - * Generated from protobuf field string tf_version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTfVersion($var) - { - GPBUtil::checkString($var, True); - $this->tf_version = $var; - - return $this; - } - - /** - * Optional. The user-specified Terraform version constraint. - * Example: "=1.3.10". - * - * Generated from protobuf field optional string tf_version_constraint = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTfVersionConstraint() - { - return isset($this->tf_version_constraint) ? $this->tf_version_constraint : ''; - } - - public function hasTfVersionConstraint() - { - return isset($this->tf_version_constraint); - } - - public function clearTfVersionConstraint() - { - unset($this->tf_version_constraint); - } - - /** - * Optional. The user-specified Terraform version constraint. - * Example: "=1.3.10". - * - * Generated from protobuf field optional string tf_version_constraint = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTfVersionConstraint($var) - { - GPBUtil::checkString($var, True); - $this->tf_version_constraint = $var; - - return $this; - } - - /** - * Optional. Arbitrary key-value metadata storage e.g. to help client tools - * identifiy preview during automation. See - * https://google.aip.dev/148#annotations for details on format and size - * limitations. - * - * Generated from protobuf field map annotations = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Optional. Arbitrary key-value metadata storage e.g. to help client tools - * identifiy preview during automation. See - * https://google.aip.dev/148#annotations for details on format and size - * limitations. - * - * Generated from protobuf field map annotations = 20 [(.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; - } - - /** - * @return string - */ - public function getBlueprint() - { - return $this->whichOneof("blueprint"); - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Preview/ErrorCode.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Preview/ErrorCode.php deleted file mode 100644 index c515ac058752..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Preview/ErrorCode.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.config.v1.Preview.ErrorCode - */ -class ErrorCode -{ - /** - * No error code was specified. - * - * Generated from protobuf enum ERROR_CODE_UNSPECIFIED = 0; - */ - const ERROR_CODE_UNSPECIFIED = 0; - /** - * Cloud Build failed due to a permissions issue. - * - * Generated from protobuf enum CLOUD_BUILD_PERMISSION_DENIED = 1; - */ - const CLOUD_BUILD_PERMISSION_DENIED = 1; - /** - * Cloud Storage bucket failed to create due to a permissions issue. - * - * Generated from protobuf enum BUCKET_CREATION_PERMISSION_DENIED = 2; - */ - const BUCKET_CREATION_PERMISSION_DENIED = 2; - /** - * Cloud Storage bucket failed for a non-permissions-related issue. - * - * Generated from protobuf enum BUCKET_CREATION_FAILED = 3; - */ - const BUCKET_CREATION_FAILED = 3; - /** - * Acquiring lock on provided deployment reference failed. - * - * Generated from protobuf enum DEPLOYMENT_LOCK_ACQUIRE_FAILED = 4; - */ - const DEPLOYMENT_LOCK_ACQUIRE_FAILED = 4; - /** - * Preview encountered an error when trying to access Cloud Build API. - * - * Generated from protobuf enum PREVIEW_BUILD_API_FAILED = 5; - */ - const PREVIEW_BUILD_API_FAILED = 5; - /** - * Preview created a build but build failed and logs were generated. - * - * Generated from protobuf enum PREVIEW_BUILD_RUN_FAILED = 6; - */ - const PREVIEW_BUILD_RUN_FAILED = 6; - - private static $valueToName = [ - self::ERROR_CODE_UNSPECIFIED => 'ERROR_CODE_UNSPECIFIED', - self::CLOUD_BUILD_PERMISSION_DENIED => 'CLOUD_BUILD_PERMISSION_DENIED', - self::BUCKET_CREATION_PERMISSION_DENIED => 'BUCKET_CREATION_PERMISSION_DENIED', - self::BUCKET_CREATION_FAILED => 'BUCKET_CREATION_FAILED', - self::DEPLOYMENT_LOCK_ACQUIRE_FAILED => 'DEPLOYMENT_LOCK_ACQUIRE_FAILED', - self::PREVIEW_BUILD_API_FAILED => 'PREVIEW_BUILD_API_FAILED', - self::PREVIEW_BUILD_RUN_FAILED => 'PREVIEW_BUILD_RUN_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(ErrorCode::class, \Google\Cloud\Config\V1\Preview_ErrorCode::class); - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Preview/PreviewMode.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Preview/PreviewMode.php deleted file mode 100644 index fe378ae89090..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Preview/PreviewMode.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.config.v1.Preview.PreviewMode - */ -class PreviewMode -{ - /** - * Unspecified policy, default mode will be used. - * - * Generated from protobuf enum PREVIEW_MODE_UNSPECIFIED = 0; - */ - const PREVIEW_MODE_UNSPECIFIED = 0; - /** - * DEFAULT mode generates an execution plan for reconciling current resource - * state into expected resource state. - * - * Generated from protobuf enum DEFAULT = 1; - */ - const PBDEFAULT = 1; - /** - * DELETE mode generates as execution plan for destroying current resources. - * - * Generated from protobuf enum DELETE = 2; - */ - const DELETE = 2; - - private static $valueToName = [ - self::PREVIEW_MODE_UNSPECIFIED => 'PREVIEW_MODE_UNSPECIFIED', - self::PBDEFAULT => 'DEFAULT', - self::DELETE => 'DELETE', - ]; - - 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(PreviewMode::class, \Google\Cloud\Config\V1\Preview_PreviewMode::class); - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Preview/State.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Preview/State.php deleted file mode 100644 index bf1f38437126..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Preview/State.php +++ /dev/null @@ -1,100 +0,0 @@ -google.cloud.config.v1.Preview.State - */ -class State -{ - /** - * The default value. This value is used if the state is unknown. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The preview is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The preview has succeeded. - * - * Generated from protobuf enum SUCCEEDED = 2; - */ - const SUCCEEDED = 2; - /** - * The preview is being applied. - * - * Generated from protobuf enum APPLYING = 3; - */ - const APPLYING = 3; - /** - * The preview is stale. A preview can become stale if a revision has been - * applied after this preview was created. - * - * Generated from protobuf enum STALE = 4; - */ - const STALE = 4; - /** - * The preview is being deleted. - * - * Generated from protobuf enum DELETING = 5; - */ - const DELETING = 5; - /** - * The preview has encountered an unexpected error. - * - * Generated from protobuf enum FAILED = 6; - */ - const FAILED = 6; - /** - * The preview has been deleted. - * - * Generated from protobuf enum DELETED = 7; - */ - const DELETED = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::SUCCEEDED => 'SUCCEEDED', - self::APPLYING => 'APPLYING', - self::STALE => 'STALE', - self::DELETING => 'DELETING', - self::FAILED => 'FAILED', - self::DELETED => 'DELETED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Config\V1\Preview_State::class); - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/PreviewArtifacts.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/PreviewArtifacts.php deleted file mode 100644 index 91e8247154f2..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/PreviewArtifacts.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.config.v1.PreviewArtifacts - */ -class PreviewArtifacts extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Location of a blueprint copy and other content in Google Cloud - * Storage. Format: `gs://{bucket}/{object}` - * - * Generated from protobuf field string content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $content = ''; - /** - * Output only. Location of artifacts in Google Cloud Storage. - * Format: `gs://{bucket}/{object}` - * - * Generated from protobuf field string artifacts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $artifacts = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $content - * Output only. Location of a blueprint copy and other content in Google Cloud - * Storage. Format: `gs://{bucket}/{object}` - * @type string $artifacts - * Output only. Location of artifacts in Google Cloud Storage. - * Format: `gs://{bucket}/{object}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Location of a blueprint copy and other content in Google Cloud - * Storage. Format: `gs://{bucket}/{object}` - * - * Generated from protobuf field string content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * Output only. Location of a blueprint copy and other content in Google Cloud - * Storage. Format: `gs://{bucket}/{object}` - * - * Generated from protobuf field string content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, True); - $this->content = $var; - - return $this; - } - - /** - * Output only. Location of artifacts in Google Cloud Storage. - * Format: `gs://{bucket}/{object}` - * - * Generated from protobuf field string artifacts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getArtifacts() - { - return $this->artifacts; - } - - /** - * Output only. Location of artifacts in Google Cloud Storage. - * Format: `gs://{bucket}/{object}` - * - * Generated from protobuf field string artifacts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setArtifacts($var) - { - GPBUtil::checkString($var, True); - $this->artifacts = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/PreviewOperationMetadata.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/PreviewOperationMetadata.php deleted file mode 100644 index 0aefd3e3567d..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/PreviewOperationMetadata.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.config.v1.PreviewOperationMetadata - */ -class PreviewOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The current step the preview operation is running. - * - * Generated from protobuf field .google.cloud.config.v1.PreviewOperationMetadata.PreviewStep step = 1; - */ - protected $step = 0; - /** - * Artifacts from preview. - * - * Generated from protobuf field .google.cloud.config.v1.PreviewArtifacts preview_artifacts = 2; - */ - protected $preview_artifacts = null; - /** - * Output only. Location of preview logs in `gs://{bucket}/{object}` format. - * - * Generated from protobuf field string logs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $logs = ''; - /** - * Output only. Cloud Build instance UUID associated with this preview. - * - * Generated from protobuf field string build = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $build = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $step - * The current step the preview operation is running. - * @type \Google\Cloud\Config\V1\PreviewArtifacts $preview_artifacts - * Artifacts from preview. - * @type string $logs - * Output only. Location of preview logs in `gs://{bucket}/{object}` format. - * @type string $build - * Output only. Cloud Build instance UUID associated with this preview. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * The current step the preview operation is running. - * - * Generated from protobuf field .google.cloud.config.v1.PreviewOperationMetadata.PreviewStep step = 1; - * @return int - */ - public function getStep() - { - return $this->step; - } - - /** - * The current step the preview operation is running. - * - * Generated from protobuf field .google.cloud.config.v1.PreviewOperationMetadata.PreviewStep step = 1; - * @param int $var - * @return $this - */ - public function setStep($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Config\V1\PreviewOperationMetadata\PreviewStep::class); - $this->step = $var; - - return $this; - } - - /** - * Artifacts from preview. - * - * Generated from protobuf field .google.cloud.config.v1.PreviewArtifacts preview_artifacts = 2; - * @return \Google\Cloud\Config\V1\PreviewArtifacts|null - */ - public function getPreviewArtifacts() - { - return $this->preview_artifacts; - } - - public function hasPreviewArtifacts() - { - return isset($this->preview_artifacts); - } - - public function clearPreviewArtifacts() - { - unset($this->preview_artifacts); - } - - /** - * Artifacts from preview. - * - * Generated from protobuf field .google.cloud.config.v1.PreviewArtifacts preview_artifacts = 2; - * @param \Google\Cloud\Config\V1\PreviewArtifacts $var - * @return $this - */ - public function setPreviewArtifacts($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Config\V1\PreviewArtifacts::class); - $this->preview_artifacts = $var; - - return $this; - } - - /** - * Output only. Location of preview logs in `gs://{bucket}/{object}` format. - * - * Generated from protobuf field string logs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLogs() - { - return $this->logs; - } - - /** - * Output only. Location of preview logs in `gs://{bucket}/{object}` format. - * - * Generated from protobuf field string logs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLogs($var) - { - GPBUtil::checkString($var, True); - $this->logs = $var; - - return $this; - } - - /** - * Output only. Cloud Build instance UUID associated with this preview. - * - * Generated from protobuf field string build = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getBuild() - { - return $this->build; - } - - /** - * Output only. Cloud Build instance UUID associated with this preview. - * - * Generated from protobuf field string build = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setBuild($var) - { - GPBUtil::checkString($var, True); - $this->build = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/PreviewOperationMetadata/PreviewStep.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/PreviewOperationMetadata/PreviewStep.php deleted file mode 100644 index 7b7c8565167b..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/PreviewOperationMetadata/PreviewStep.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.config.v1.PreviewOperationMetadata.PreviewStep - */ -class PreviewStep -{ - /** - * Unspecified preview step. - * - * Generated from protobuf enum PREVIEW_STEP_UNSPECIFIED = 0; - */ - const PREVIEW_STEP_UNSPECIFIED = 0; - /** - * Infra Manager is creating a Google Cloud Storage bucket to store - * artifacts and metadata about the preview. - * - * Generated from protobuf enum PREPARING_STORAGE_BUCKET = 1; - */ - const PREPARING_STORAGE_BUCKET = 1; - /** - * Downloading the blueprint onto the Google Cloud Storage bucket. - * - * Generated from protobuf enum DOWNLOADING_BLUEPRINT = 2; - */ - const DOWNLOADING_BLUEPRINT = 2; - /** - * Initializing Terraform using `terraform init`. - * - * Generated from protobuf enum RUNNING_TF_INIT = 3; - */ - const RUNNING_TF_INIT = 3; - /** - * Running `terraform plan`. - * - * Generated from protobuf enum RUNNING_TF_PLAN = 4; - */ - const RUNNING_TF_PLAN = 4; - /** - * Fetching a deployment. - * - * Generated from protobuf enum FETCHING_DEPLOYMENT = 5; - */ - const FETCHING_DEPLOYMENT = 5; - /** - * Locking a deployment. - * - * Generated from protobuf enum LOCKING_DEPLOYMENT = 6; - */ - const LOCKING_DEPLOYMENT = 6; - /** - * Unlocking a deployment. - * - * Generated from protobuf enum UNLOCKING_DEPLOYMENT = 7; - */ - const UNLOCKING_DEPLOYMENT = 7; - /** - * Operation was successful. - * - * Generated from protobuf enum SUCCEEDED = 8; - */ - const SUCCEEDED = 8; - /** - * Operation failed. - * - * Generated from protobuf enum FAILED = 9; - */ - const FAILED = 9; - /** - * Validating the provided repository. - * - * Generated from protobuf enum VALIDATING_REPOSITORY = 10; - */ - const VALIDATING_REPOSITORY = 10; - - private static $valueToName = [ - self::PREVIEW_STEP_UNSPECIFIED => 'PREVIEW_STEP_UNSPECIFIED', - self::PREPARING_STORAGE_BUCKET => 'PREPARING_STORAGE_BUCKET', - self::DOWNLOADING_BLUEPRINT => 'DOWNLOADING_BLUEPRINT', - self::RUNNING_TF_INIT => 'RUNNING_TF_INIT', - self::RUNNING_TF_PLAN => 'RUNNING_TF_PLAN', - self::FETCHING_DEPLOYMENT => 'FETCHING_DEPLOYMENT', - self::LOCKING_DEPLOYMENT => 'LOCKING_DEPLOYMENT', - self::UNLOCKING_DEPLOYMENT => 'UNLOCKING_DEPLOYMENT', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::VALIDATING_REPOSITORY => 'VALIDATING_REPOSITORY', - ]; - - 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(PreviewStep::class, \Google\Cloud\Config\V1\PreviewOperationMetadata_PreviewStep::class); - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/PreviewResult.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/PreviewResult.php deleted file mode 100644 index 0359b1700f4a..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/PreviewResult.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.config.v1.PreviewResult - */ -class PreviewResult extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Plan binary signed URL - * - * Generated from protobuf field string binary_signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $binary_signed_uri = ''; - /** - * Output only. Plan JSON signed URL - * - * Generated from protobuf field string json_signed_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $json_signed_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $binary_signed_uri - * Output only. Plan binary signed URL - * @type string $json_signed_uri - * Output only. Plan JSON signed URL - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Plan binary signed URL - * - * Generated from protobuf field string binary_signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getBinarySignedUri() - { - return $this->binary_signed_uri; - } - - /** - * Output only. Plan binary signed URL - * - * Generated from protobuf field string binary_signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setBinarySignedUri($var) - { - GPBUtil::checkString($var, True); - $this->binary_signed_uri = $var; - - return $this; - } - - /** - * Output only. Plan JSON signed URL - * - * Generated from protobuf field string json_signed_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getJsonSignedUri() - { - return $this->json_signed_uri; - } - - /** - * Output only. Plan JSON signed URL - * - * Generated from protobuf field string json_signed_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setJsonSignedUri($var) - { - GPBUtil::checkString($var, True); - $this->json_signed_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/QuotaValidation.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/QuotaValidation.php deleted file mode 100644 index 60210b30d50c..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/QuotaValidation.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.config.v1.QuotaValidation - */ -class QuotaValidation -{ - /** - * The default value. - * QuotaValidation on terraform configuration files will be disabled in - * this case. - * - * Generated from protobuf enum QUOTA_VALIDATION_UNSPECIFIED = 0; - */ - const QUOTA_VALIDATION_UNSPECIFIED = 0; - /** - * Enable computing quotas for resources in terraform configuration files to - * get visibility on resources with insufficient quotas. - * - * Generated from protobuf enum ENABLED = 1; - */ - const ENABLED = 1; - /** - * Enforce quota checks so deployment fails if there isn't sufficient quotas - * available to deploy resources in terraform configuration files. - * - * Generated from protobuf enum ENFORCED = 2; - */ - const ENFORCED = 2; - - private static $valueToName = [ - self::QUOTA_VALIDATION_UNSPECIFIED => 'QUOTA_VALIDATION_UNSPECIFIED', - self::ENABLED => 'ENABLED', - self::ENFORCED => 'ENFORCED', - ]; - - 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/Config/v1/proto/src/Google/Cloud/Config/V1/Resource.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Resource.php deleted file mode 100644 index 7332bd595556..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Resource.php +++ /dev/null @@ -1,234 +0,0 @@ -google.cloud.config.v1.Resource - */ -class Resource extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Resource name. - * Format: - * `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Terraform-specific info if this resource was created using - * Terraform. - * - * Generated from protobuf field .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $terraform_info = null; - /** - * Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI - * ID). CAI type format follows - * https://cloud.google.com/asset-inventory/docs/supported-asset-types - * - * Generated from protobuf field map cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $cai_assets; - /** - * Output only. Intent of the resource. - * - * Generated from protobuf field .google.cloud.config.v1.Resource.Intent intent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $intent = 0; - /** - * Output only. Current state of the resource. - * - * Generated from protobuf field .google.cloud.config.v1.Resource.State state = 5 [(.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. Resource name. - * Format: - * `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}` - * @type \Google\Cloud\Config\V1\ResourceTerraformInfo $terraform_info - * Output only. Terraform-specific info if this resource was created using - * Terraform. - * @type array|\Google\Protobuf\Internal\MapField $cai_assets - * Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI - * ID). CAI type format follows - * https://cloud.google.com/asset-inventory/docs/supported-asset-types - * @type int $intent - * Output only. Intent of the resource. - * @type int $state - * Output only. Current state of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Resource name. - * Format: - * `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Resource name. - * Format: - * `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}` - * - * 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. Terraform-specific info if this resource was created using - * Terraform. - * - * Generated from protobuf field .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Config\V1\ResourceTerraformInfo|null - */ - public function getTerraformInfo() - { - return $this->terraform_info; - } - - public function hasTerraformInfo() - { - return isset($this->terraform_info); - } - - public function clearTerraformInfo() - { - unset($this->terraform_info); - } - - /** - * Output only. Terraform-specific info if this resource was created using - * Terraform. - * - * Generated from protobuf field .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Config\V1\ResourceTerraformInfo $var - * @return $this - */ - public function setTerraformInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Config\V1\ResourceTerraformInfo::class); - $this->terraform_info = $var; - - return $this; - } - - /** - * Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI - * ID). CAI type format follows - * https://cloud.google.com/asset-inventory/docs/supported-asset-types - * - * Generated from protobuf field map cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getCaiAssets() - { - return $this->cai_assets; - } - - /** - * Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI - * ID). CAI type format follows - * https://cloud.google.com/asset-inventory/docs/supported-asset-types - * - * Generated from protobuf field map cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setCaiAssets($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Config\V1\ResourceCAIInfo::class); - $this->cai_assets = $arr; - - return $this; - } - - /** - * Output only. Intent of the resource. - * - * Generated from protobuf field .google.cloud.config.v1.Resource.Intent intent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getIntent() - { - return $this->intent; - } - - /** - * Output only. Intent of the resource. - * - * Generated from protobuf field .google.cloud.config.v1.Resource.Intent intent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setIntent($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Config\V1\Resource\Intent::class); - $this->intent = $var; - - return $this; - } - - /** - * Output only. Current state of the resource. - * - * Generated from protobuf field .google.cloud.config.v1.Resource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the resource. - * - * Generated from protobuf field .google.cloud.config.v1.Resource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Config\V1\Resource\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Resource/Intent.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Resource/Intent.php deleted file mode 100644 index 07ce2df7cdc6..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Resource/Intent.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.config.v1.Resource.Intent - */ -class Intent -{ - /** - * The default value. This value is used if the intent is omitted. - * - * Generated from protobuf enum INTENT_UNSPECIFIED = 0; - */ - const INTENT_UNSPECIFIED = 0; - /** - * Infra Manager will create this Resource. - * - * Generated from protobuf enum CREATE = 1; - */ - const CREATE = 1; - /** - * Infra Manager will update this Resource. - * - * Generated from protobuf enum UPDATE = 2; - */ - const UPDATE = 2; - /** - * Infra Manager will delete this Resource. - * - * Generated from protobuf enum DELETE = 3; - */ - const DELETE = 3; - /** - * Infra Manager will destroy and recreate this Resource. - * - * Generated from protobuf enum RECREATE = 4; - */ - const RECREATE = 4; - /** - * Infra Manager will leave this Resource untouched. - * - * Generated from protobuf enum UNCHANGED = 5; - */ - const UNCHANGED = 5; - - private static $valueToName = [ - self::INTENT_UNSPECIFIED => 'INTENT_UNSPECIFIED', - self::CREATE => 'CREATE', - self::UPDATE => 'UPDATE', - self::DELETE => 'DELETE', - self::RECREATE => 'RECREATE', - self::UNCHANGED => 'UNCHANGED', - ]; - - 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(Intent::class, \Google\Cloud\Config\V1\Resource_Intent::class); - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Resource/State.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Resource/State.php deleted file mode 100644 index d27fedd48aa4..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Resource/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.config.v1.Resource.State - */ -class State -{ - /** - * The default value. This value is used if the state is omitted. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Resource has been planned for reconcile. - * - * Generated from protobuf enum PLANNED = 1; - */ - const PLANNED = 1; - /** - * Resource is actively reconciling into the intended state. - * - * Generated from protobuf enum IN_PROGRESS = 2; - */ - const IN_PROGRESS = 2; - /** - * Resource has reconciled to intended state. - * - * Generated from protobuf enum RECONCILED = 3; - */ - const RECONCILED = 3; - /** - * Resource failed to reconcile. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PLANNED => 'PLANNED', - self::IN_PROGRESS => 'IN_PROGRESS', - self::RECONCILED => 'RECONCILED', - self::FAILED => 'FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Config\V1\Resource_State::class); - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ResourceCAIInfo.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ResourceCAIInfo.php deleted file mode 100644 index 2f64a7ffb66c..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ResourceCAIInfo.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.config.v1.ResourceCAIInfo - */ -class ResourceCAIInfo extends \Google\Protobuf\Internal\Message -{ - /** - * CAI resource name in the format following - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string full_resource_name = 1; - */ - protected $full_resource_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $full_resource_name - * CAI resource name in the format following - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * CAI resource name in the format following - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string full_resource_name = 1; - * @return string - */ - public function getFullResourceName() - { - return $this->full_resource_name; - } - - /** - * CAI resource name in the format following - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string full_resource_name = 1; - * @param string $var - * @return $this - */ - public function setFullResourceName($var) - { - GPBUtil::checkString($var, True); - $this->full_resource_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ResourceTerraformInfo.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ResourceTerraformInfo.php deleted file mode 100644 index 452e1b4fcaf4..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/ResourceTerraformInfo.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.config.v1.ResourceTerraformInfo - */ -class ResourceTerraformInfo extends \Google\Protobuf\Internal\Message -{ - /** - * TF resource address that uniquely identifies this resource within this - * deployment. - * - * Generated from protobuf field string address = 1; - */ - protected $address = ''; - /** - * TF resource type - * - * Generated from protobuf field string type = 2; - */ - protected $type = ''; - /** - * ID attribute of the TF resource - * - * Generated from protobuf field string id = 3; - */ - protected $id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $address - * TF resource address that uniquely identifies this resource within this - * deployment. - * @type string $type - * TF resource type - * @type string $id - * ID attribute of the TF resource - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * TF resource address that uniquely identifies this resource within this - * deployment. - * - * Generated from protobuf field string address = 1; - * @return string - */ - public function getAddress() - { - return $this->address; - } - - /** - * TF resource address that uniquely identifies this resource within this - * deployment. - * - * Generated from protobuf field string address = 1; - * @param string $var - * @return $this - */ - public function setAddress($var) - { - GPBUtil::checkString($var, True); - $this->address = $var; - - return $this; - } - - /** - * TF resource type - * - * Generated from protobuf field string type = 2; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * TF resource type - * - * 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; - } - - /** - * ID attribute of the TF resource - * - * Generated from protobuf field string id = 3; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * ID attribute of the TF resource - * - * Generated from protobuf field string id = 3; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Revision.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Revision.php deleted file mode 100644 index d59d20bacce5..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Revision.php +++ /dev/null @@ -1,848 +0,0 @@ -google.cloud.config.v1.Revision - */ -class Revision extends \Google\Protobuf\Internal\Message -{ - /** - * Revision name. Format: - * `projects/{project}/locations/{location}/deployments/{deployment}/ - * revisions/{revision}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. Time when the revision was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Time when the revision was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The action which created this revision - * - * Generated from protobuf field .google.cloud.config.v1.Revision.Action action = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $action = 0; - /** - * Output only. Current state of the revision. - * - * Generated from protobuf field .google.cloud.config.v1.Revision.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Outputs and artifacts from applying a deployment. - * - * Generated from protobuf field .google.cloud.config.v1.ApplyResults apply_results = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $apply_results = null; - /** - * Output only. Additional info regarding the current state. - * - * Generated from protobuf field string state_detail = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_detail = ''; - /** - * Output only. Code describing any errors that may have occurred. - * - * Generated from protobuf field .google.cloud.config.v1.Revision.ErrorCode error_code = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error_code = 0; - /** - * Output only. Cloud Build instance UUID associated with this revision. - * - * Generated from protobuf field string build = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $build = ''; - /** - * Output only. Location of Revision operation logs in - * `gs://{bucket}/{object}` format. - * - * Generated from protobuf field string logs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $logs = ''; - /** - * Output only. Errors encountered when creating or updating this deployment. - * Errors are truncated to 10 entries, see `delete_results` and `error_logs` - * for full details. - * - * Generated from protobuf field repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $tf_errors; - /** - * Output only. Location of Terraform error logs in Google Cloud Storage. - * Format: `gs://{bucket}/{object}`. - * - * Generated from protobuf field string error_logs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error_logs = ''; - /** - * Output only. User-specified Service Account (SA) to be used as credential - * to manage resources. Format: - * `projects/{projectID}/serviceAccounts/{serviceAccount}` - * - * Generated from protobuf field string service_account = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $service_account = ''; - /** - * Output only. By default, Infra Manager will return a failure when - * Terraform encounters a 409 code (resource conflict error) during actuation. - * If this flag is set to true, Infra Manager will instead - * attempt to automatically import the resource into the Terraform state (for - * supported resource types) and continue actuation. - * Not all resource types are supported, refer to documentation. - * - * Generated from protobuf field bool import_existing_resources = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $import_existing_resources = false; - /** - * Output only. The user-specified Cloud Build worker pool resource in which - * the Cloud Build job will execute. Format: - * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. - * If this field is unspecified, the default Cloud Build worker pool will be - * used. - * - * Generated from protobuf field string worker_pool = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $worker_pool = ''; - /** - * Output only. The user-specified Terraform version constraint. - * Example: "=1.3.10". - * - * Generated from protobuf field string tf_version_constraint = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $tf_version_constraint = ''; - /** - * Output only. The version of Terraform used to create the Revision. - * It is in the format of "Major.Minor.Patch", for example, "1.3.10". - * - * Generated from protobuf field string tf_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $tf_version = ''; - /** - * Output only. Cloud Storage path containing quota validation results. This - * field is set when a user sets Deployment.quota_validation field to ENABLED - * or ENFORCED. Format: `gs://{bucket}/{object}`. - * - * Generated from protobuf field string quota_validation_results = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $quota_validation_results = ''; - /** - * Optional. Input to control quota checks for resources in terraform - * configuration files. There are limited resources on which quota validation - * applies. - * - * Generated from protobuf field .google.cloud.config.v1.QuotaValidation quota_validation = 20 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $quota_validation = 0; - protected $blueprint; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Config\V1\TerraformBlueprint $terraform_blueprint - * Output only. A blueprint described using Terraform's HashiCorp - * Configuration Language as a root module. - * @type string $name - * Revision name. Format: - * `projects/{project}/locations/{location}/deployments/{deployment}/ - * revisions/{revision}` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Time when the revision was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Time when the revision was last modified. - * @type int $action - * Output only. The action which created this revision - * @type int $state - * Output only. Current state of the revision. - * @type \Google\Cloud\Config\V1\ApplyResults $apply_results - * Output only. Outputs and artifacts from applying a deployment. - * @type string $state_detail - * Output only. Additional info regarding the current state. - * @type int $error_code - * Output only. Code describing any errors that may have occurred. - * @type string $build - * Output only. Cloud Build instance UUID associated with this revision. - * @type string $logs - * Output only. Location of Revision operation logs in - * `gs://{bucket}/{object}` format. - * @type array<\Google\Cloud\Config\V1\TerraformError>|\Google\Protobuf\Internal\RepeatedField $tf_errors - * Output only. Errors encountered when creating or updating this deployment. - * Errors are truncated to 10 entries, see `delete_results` and `error_logs` - * for full details. - * @type string $error_logs - * Output only. Location of Terraform error logs in Google Cloud Storage. - * Format: `gs://{bucket}/{object}`. - * @type string $service_account - * Output only. User-specified Service Account (SA) to be used as credential - * to manage resources. Format: - * `projects/{projectID}/serviceAccounts/{serviceAccount}` - * @type bool $import_existing_resources - * Output only. By default, Infra Manager will return a failure when - * Terraform encounters a 409 code (resource conflict error) during actuation. - * If this flag is set to true, Infra Manager will instead - * attempt to automatically import the resource into the Terraform state (for - * supported resource types) and continue actuation. - * Not all resource types are supported, refer to documentation. - * @type string $worker_pool - * Output only. The user-specified Cloud Build worker pool resource in which - * the Cloud Build job will execute. Format: - * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. - * If this field is unspecified, the default Cloud Build worker pool will be - * used. - * @type string $tf_version_constraint - * Output only. The user-specified Terraform version constraint. - * Example: "=1.3.10". - * @type string $tf_version - * Output only. The version of Terraform used to create the Revision. - * It is in the format of "Major.Minor.Patch", for example, "1.3.10". - * @type string $quota_validation_results - * Output only. Cloud Storage path containing quota validation results. This - * field is set when a user sets Deployment.quota_validation field to ENABLED - * or ENFORCED. Format: `gs://{bucket}/{object}`. - * @type int $quota_validation - * Optional. Input to control quota checks for resources in terraform - * configuration files. There are limited resources on which quota validation - * applies. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Output only. A blueprint described using Terraform's HashiCorp - * Configuration Language as a root module. - * - * Generated from protobuf field .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Config\V1\TerraformBlueprint|null - */ - public function getTerraformBlueprint() - { - return $this->readOneof(6); - } - - public function hasTerraformBlueprint() - { - return $this->hasOneof(6); - } - - /** - * Output only. A blueprint described using Terraform's HashiCorp - * Configuration Language as a root module. - * - * Generated from protobuf field .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Config\V1\TerraformBlueprint $var - * @return $this - */ - public function setTerraformBlueprint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Config\V1\TerraformBlueprint::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Revision name. Format: - * `projects/{project}/locations/{location}/deployments/{deployment}/ - * revisions/{revision}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Revision name. Format: - * `projects/{project}/locations/{location}/deployments/{deployment}/ - * revisions/{revision}` - * - * 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. Time when the revision 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. Time when the revision was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Time when the revision was last modified. - * - * 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. Time when the revision was last modified. - * - * 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; - } - - /** - * Output only. The action which created this revision - * - * Generated from protobuf field .google.cloud.config.v1.Revision.Action action = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getAction() - { - return $this->action; - } - - /** - * Output only. The action which created this revision - * - * Generated from protobuf field .google.cloud.config.v1.Revision.Action action = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Config\V1\Revision\Action::class); - $this->action = $var; - - return $this; - } - - /** - * Output only. Current state of the revision. - * - * Generated from protobuf field .google.cloud.config.v1.Revision.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the revision. - * - * Generated from protobuf field .google.cloud.config.v1.Revision.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Config\V1\Revision\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Outputs and artifacts from applying a deployment. - * - * Generated from protobuf field .google.cloud.config.v1.ApplyResults apply_results = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Config\V1\ApplyResults|null - */ - public function getApplyResults() - { - return $this->apply_results; - } - - public function hasApplyResults() - { - return isset($this->apply_results); - } - - public function clearApplyResults() - { - unset($this->apply_results); - } - - /** - * Output only. Outputs and artifacts from applying a deployment. - * - * Generated from protobuf field .google.cloud.config.v1.ApplyResults apply_results = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Config\V1\ApplyResults $var - * @return $this - */ - public function setApplyResults($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Config\V1\ApplyResults::class); - $this->apply_results = $var; - - return $this; - } - - /** - * Output only. Additional info regarding the current state. - * - * Generated from protobuf field string state_detail = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateDetail() - { - return $this->state_detail; - } - - /** - * Output only. Additional info regarding the current state. - * - * Generated from protobuf field string state_detail = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateDetail($var) - { - GPBUtil::checkString($var, True); - $this->state_detail = $var; - - return $this; - } - - /** - * Output only. Code describing any errors that may have occurred. - * - * Generated from protobuf field .google.cloud.config.v1.Revision.ErrorCode error_code = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getErrorCode() - { - return $this->error_code; - } - - /** - * Output only. Code describing any errors that may have occurred. - * - * Generated from protobuf field .google.cloud.config.v1.Revision.ErrorCode error_code = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setErrorCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Config\V1\Revision\ErrorCode::class); - $this->error_code = $var; - - return $this; - } - - /** - * Output only. Cloud Build instance UUID associated with this revision. - * - * Generated from protobuf field string build = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getBuild() - { - return $this->build; - } - - /** - * Output only. Cloud Build instance UUID associated with this revision. - * - * Generated from protobuf field string build = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setBuild($var) - { - GPBUtil::checkString($var, True); - $this->build = $var; - - return $this; - } - - /** - * Output only. Location of Revision operation logs in - * `gs://{bucket}/{object}` format. - * - * Generated from protobuf field string logs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLogs() - { - return $this->logs; - } - - /** - * Output only. Location of Revision operation logs in - * `gs://{bucket}/{object}` format. - * - * Generated from protobuf field string logs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLogs($var) - { - GPBUtil::checkString($var, True); - $this->logs = $var; - - return $this; - } - - /** - * Output only. Errors encountered when creating or updating this deployment. - * Errors are truncated to 10 entries, see `delete_results` and `error_logs` - * for full details. - * - * Generated from protobuf field repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTfErrors() - { - return $this->tf_errors; - } - - /** - * Output only. Errors encountered when creating or updating this deployment. - * Errors are truncated to 10 entries, see `delete_results` and `error_logs` - * for full details. - * - * Generated from protobuf field repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Config\V1\TerraformError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTfErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Config\V1\TerraformError::class); - $this->tf_errors = $arr; - - return $this; - } - - /** - * Output only. Location of Terraform error logs in Google Cloud Storage. - * Format: `gs://{bucket}/{object}`. - * - * Generated from protobuf field string error_logs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getErrorLogs() - { - return $this->error_logs; - } - - /** - * Output only. Location of Terraform error logs in Google Cloud Storage. - * Format: `gs://{bucket}/{object}`. - * - * Generated from protobuf field string error_logs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setErrorLogs($var) - { - GPBUtil::checkString($var, True); - $this->error_logs = $var; - - return $this; - } - - /** - * Output only. User-specified Service Account (SA) to be used as credential - * to manage resources. Format: - * `projects/{projectID}/serviceAccounts/{serviceAccount}` - * - * Generated from protobuf field string service_account = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Output only. User-specified Service Account (SA) to be used as credential - * to manage resources. Format: - * `projects/{projectID}/serviceAccounts/{serviceAccount}` - * - * Generated from protobuf field string service_account = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * Output only. By default, Infra Manager will return a failure when - * Terraform encounters a 409 code (resource conflict error) during actuation. - * If this flag is set to true, Infra Manager will instead - * attempt to automatically import the resource into the Terraform state (for - * supported resource types) and continue actuation. - * Not all resource types are supported, refer to documentation. - * - * Generated from protobuf field bool import_existing_resources = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getImportExistingResources() - { - return $this->import_existing_resources; - } - - /** - * Output only. By default, Infra Manager will return a failure when - * Terraform encounters a 409 code (resource conflict error) during actuation. - * If this flag is set to true, Infra Manager will instead - * attempt to automatically import the resource into the Terraform state (for - * supported resource types) and continue actuation. - * Not all resource types are supported, refer to documentation. - * - * Generated from protobuf field bool import_existing_resources = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setImportExistingResources($var) - { - GPBUtil::checkBool($var); - $this->import_existing_resources = $var; - - return $this; - } - - /** - * Output only. The user-specified Cloud Build worker pool resource in which - * the Cloud Build job will execute. Format: - * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. - * If this field is unspecified, the default Cloud Build worker pool will be - * used. - * - * Generated from protobuf field string worker_pool = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getWorkerPool() - { - return $this->worker_pool; - } - - /** - * Output only. The user-specified Cloud Build worker pool resource in which - * the Cloud Build job will execute. Format: - * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. - * If this field is unspecified, the default Cloud Build worker pool will be - * used. - * - * Generated from protobuf field string worker_pool = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setWorkerPool($var) - { - GPBUtil::checkString($var, True); - $this->worker_pool = $var; - - return $this; - } - - /** - * Output only. The user-specified Terraform version constraint. - * Example: "=1.3.10". - * - * Generated from protobuf field string tf_version_constraint = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTfVersionConstraint() - { - return $this->tf_version_constraint; - } - - /** - * Output only. The user-specified Terraform version constraint. - * Example: "=1.3.10". - * - * Generated from protobuf field string tf_version_constraint = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTfVersionConstraint($var) - { - GPBUtil::checkString($var, True); - $this->tf_version_constraint = $var; - - return $this; - } - - /** - * Output only. The version of Terraform used to create the Revision. - * It is in the format of "Major.Minor.Patch", for example, "1.3.10". - * - * Generated from protobuf field string tf_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTfVersion() - { - return $this->tf_version; - } - - /** - * Output only. The version of Terraform used to create the Revision. - * It is in the format of "Major.Minor.Patch", for example, "1.3.10". - * - * Generated from protobuf field string tf_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTfVersion($var) - { - GPBUtil::checkString($var, True); - $this->tf_version = $var; - - return $this; - } - - /** - * Output only. Cloud Storage path containing quota validation results. This - * field is set when a user sets Deployment.quota_validation field to ENABLED - * or ENFORCED. Format: `gs://{bucket}/{object}`. - * - * Generated from protobuf field string quota_validation_results = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getQuotaValidationResults() - { - return $this->quota_validation_results; - } - - /** - * Output only. Cloud Storage path containing quota validation results. This - * field is set when a user sets Deployment.quota_validation field to ENABLED - * or ENFORCED. Format: `gs://{bucket}/{object}`. - * - * Generated from protobuf field string quota_validation_results = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setQuotaValidationResults($var) - { - GPBUtil::checkString($var, True); - $this->quota_validation_results = $var; - - return $this; - } - - /** - * Optional. Input to control quota checks for resources in terraform - * configuration files. There are limited resources on which quota validation - * applies. - * - * Generated from protobuf field .google.cloud.config.v1.QuotaValidation quota_validation = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getQuotaValidation() - { - return $this->quota_validation; - } - - /** - * Optional. Input to control quota checks for resources in terraform - * configuration files. There are limited resources on which quota validation - * applies. - * - * Generated from protobuf field .google.cloud.config.v1.QuotaValidation quota_validation = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setQuotaValidation($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Config\V1\QuotaValidation::class); - $this->quota_validation = $var; - - return $this; - } - - /** - * @return string - */ - public function getBlueprint() - { - return $this->whichOneof("blueprint"); - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Revision/Action.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Revision/Action.php deleted file mode 100644 index c534a168ff30..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Revision/Action.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.config.v1.Revision.Action - */ -class Action -{ - /** - * The default value. This value is used if the action is omitted. - * - * Generated from protobuf enum ACTION_UNSPECIFIED = 0; - */ - const ACTION_UNSPECIFIED = 0; - /** - * The revision was generated by creating a deployment. - * - * Generated from protobuf enum CREATE = 1; - */ - const CREATE = 1; - /** - * The revision was generated by updating a deployment. - * - * Generated from protobuf enum UPDATE = 2; - */ - const UPDATE = 2; - /** - * The revision was deleted. - * - * Generated from protobuf enum DELETE = 3; - */ - const DELETE = 3; - - private static $valueToName = [ - self::ACTION_UNSPECIFIED => 'ACTION_UNSPECIFIED', - self::CREATE => 'CREATE', - self::UPDATE => 'UPDATE', - self::DELETE => 'DELETE', - ]; - - 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(Action::class, \Google\Cloud\Config\V1\Revision_Action::class); - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Revision/ErrorCode.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Revision/ErrorCode.php deleted file mode 100644 index 53697151dbe4..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Revision/ErrorCode.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.config.v1.Revision.ErrorCode - */ -class ErrorCode -{ - /** - * No error code was specified. - * - * Generated from protobuf enum ERROR_CODE_UNSPECIFIED = 0; - */ - const ERROR_CODE_UNSPECIFIED = 0; - /** - * Cloud Build failed due to a permission issue. - * - * Generated from protobuf enum CLOUD_BUILD_PERMISSION_DENIED = 1; - */ - const CLOUD_BUILD_PERMISSION_DENIED = 1; - /** - * Cloud Build job associated with creating or updating a deployment could - * not be started. - * - * Generated from protobuf enum APPLY_BUILD_API_FAILED = 4; - */ - const APPLY_BUILD_API_FAILED = 4; - /** - * Cloud Build job associated with creating or updating a deployment was - * started but failed. - * - * Generated from protobuf enum APPLY_BUILD_RUN_FAILED = 5; - */ - const APPLY_BUILD_RUN_FAILED = 5; - /** - * quota validation failed for one or more resources in terraform - * configuration files. - * - * Generated from protobuf enum QUOTA_VALIDATION_FAILED = 7; - */ - const QUOTA_VALIDATION_FAILED = 7; - - private static $valueToName = [ - self::ERROR_CODE_UNSPECIFIED => 'ERROR_CODE_UNSPECIFIED', - self::CLOUD_BUILD_PERMISSION_DENIED => 'CLOUD_BUILD_PERMISSION_DENIED', - self::APPLY_BUILD_API_FAILED => 'APPLY_BUILD_API_FAILED', - self::APPLY_BUILD_RUN_FAILED => 'APPLY_BUILD_RUN_FAILED', - self::QUOTA_VALIDATION_FAILED => 'QUOTA_VALIDATION_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(ErrorCode::class, \Google\Cloud\Config\V1\Revision_ErrorCode::class); - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Revision/State.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Revision/State.php deleted file mode 100644 index 131fd200bd82..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Revision/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.config.v1.Revision.State - */ -class State -{ - /** - * The default value. This value is used if the state is omitted. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The revision is being applied. - * - * Generated from protobuf enum APPLYING = 1; - */ - const APPLYING = 1; - /** - * The revision was applied successfully. - * - * Generated from protobuf enum APPLIED = 2; - */ - const APPLIED = 2; - /** - * The revision could not be applied successfully. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::APPLYING => 'APPLYING', - self::APPLIED => 'APPLIED', - self::FAILED => 'FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Config\V1\Revision_State::class); - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Statefile.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Statefile.php deleted file mode 100644 index 5ed3c47ac7c1..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/Statefile.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.config.v1.Statefile - */ -class Statefile extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Cloud Storage signed URI used for downloading or uploading the - * state file. - * - * Generated from protobuf field string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $signed_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $signed_uri - * Output only. Cloud Storage signed URI used for downloading or uploading the - * state file. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Cloud Storage signed URI used for downloading or uploading the - * state file. - * - * Generated from protobuf field string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSignedUri() - { - return $this->signed_uri; - } - - /** - * Output only. Cloud Storage signed URI used for downloading or uploading the - * state file. - * - * Generated from protobuf field string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSignedUri($var) - { - GPBUtil::checkString($var, True); - $this->signed_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/TerraformBlueprint.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/TerraformBlueprint.php deleted file mode 100644 index aacdd4a0e7f2..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/TerraformBlueprint.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.config.v1.TerraformBlueprint - */ -class TerraformBlueprint extends \Google\Protobuf\Internal\Message -{ - /** - * Input variable values for the Terraform blueprint. - * - * Generated from protobuf field map input_values = 4; - */ - private $input_values; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_source - * URI of an object in Google Cloud Storage. - * Format: `gs://{bucket}/{object}` - * URI may also specify an object version for zipped objects. - * Format: `gs://{bucket}/{object}#{version}` - * @type \Google\Cloud\Config\V1\GitSource $git_source - * URI of a public Git repo. - * @type array|\Google\Protobuf\Internal\MapField $input_values - * Input variable values for the Terraform blueprint. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * URI of an object in Google Cloud Storage. - * Format: `gs://{bucket}/{object}` - * URI may also specify an object version for zipped objects. - * Format: `gs://{bucket}/{object}#{version}` - * - * Generated from protobuf field string gcs_source = 1; - * @return string - */ - public function getGcsSource() - { - return $this->readOneof(1); - } - - public function hasGcsSource() - { - return $this->hasOneof(1); - } - - /** - * URI of an object in Google Cloud Storage. - * Format: `gs://{bucket}/{object}` - * URI may also specify an object version for zipped objects. - * Format: `gs://{bucket}/{object}#{version}` - * - * Generated from protobuf field string gcs_source = 1; - * @param string $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * URI of a public Git repo. - * - * Generated from protobuf field .google.cloud.config.v1.GitSource git_source = 2; - * @return \Google\Cloud\Config\V1\GitSource|null - */ - public function getGitSource() - { - return $this->readOneof(2); - } - - public function hasGitSource() - { - return $this->hasOneof(2); - } - - /** - * URI of a public Git repo. - * - * Generated from protobuf field .google.cloud.config.v1.GitSource git_source = 2; - * @param \Google\Cloud\Config\V1\GitSource $var - * @return $this - */ - public function setGitSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Config\V1\GitSource::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Input variable values for the Terraform blueprint. - * - * Generated from protobuf field map input_values = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getInputValues() - { - return $this->input_values; - } - - /** - * Input variable values for the Terraform blueprint. - * - * Generated from protobuf field map input_values = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setInputValues($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Config\V1\TerraformVariable::class); - $this->input_values = $arr; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/TerraformError.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/TerraformError.php deleted file mode 100644 index 10ea73b1bb8a..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/TerraformError.php +++ /dev/null @@ -1,191 +0,0 @@ -google.cloud.config.v1.TerraformError - */ -class TerraformError extends \Google\Protobuf\Internal\Message -{ - /** - * Address of the resource associated with the error, - * e.g. `google_compute_network.vpc_network`. - * - * Generated from protobuf field string resource_address = 1; - */ - protected $resource_address = ''; - /** - * HTTP response code returned from Google Cloud Platform APIs when Terraform - * fails to provision the resource. If unset or 0, no HTTP response code was - * returned by Terraform. - * - * Generated from protobuf field int32 http_response_code = 2; - */ - protected $http_response_code = 0; - /** - * A human-readable error description. - * - * Generated from protobuf field string error_description = 3; - */ - protected $error_description = ''; - /** - * Original error response from underlying Google API, if available. - * - * Generated from protobuf field .google.rpc.Status error = 4; - */ - protected $error = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource_address - * Address of the resource associated with the error, - * e.g. `google_compute_network.vpc_network`. - * @type int $http_response_code - * HTTP response code returned from Google Cloud Platform APIs when Terraform - * fails to provision the resource. If unset or 0, no HTTP response code was - * returned by Terraform. - * @type string $error_description - * A human-readable error description. - * @type \Google\Rpc\Status $error - * Original error response from underlying Google API, if available. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Address of the resource associated with the error, - * e.g. `google_compute_network.vpc_network`. - * - * Generated from protobuf field string resource_address = 1; - * @return string - */ - public function getResourceAddress() - { - return $this->resource_address; - } - - /** - * Address of the resource associated with the error, - * e.g. `google_compute_network.vpc_network`. - * - * Generated from protobuf field string resource_address = 1; - * @param string $var - * @return $this - */ - public function setResourceAddress($var) - { - GPBUtil::checkString($var, True); - $this->resource_address = $var; - - return $this; - } - - /** - * HTTP response code returned from Google Cloud Platform APIs when Terraform - * fails to provision the resource. If unset or 0, no HTTP response code was - * returned by Terraform. - * - * Generated from protobuf field int32 http_response_code = 2; - * @return int - */ - public function getHttpResponseCode() - { - return $this->http_response_code; - } - - /** - * HTTP response code returned from Google Cloud Platform APIs when Terraform - * fails to provision the resource. If unset or 0, no HTTP response code was - * returned by Terraform. - * - * Generated from protobuf field int32 http_response_code = 2; - * @param int $var - * @return $this - */ - public function setHttpResponseCode($var) - { - GPBUtil::checkInt32($var); - $this->http_response_code = $var; - - return $this; - } - - /** - * A human-readable error description. - * - * Generated from protobuf field string error_description = 3; - * @return string - */ - public function getErrorDescription() - { - return $this->error_description; - } - - /** - * A human-readable error description. - * - * Generated from protobuf field string error_description = 3; - * @param string $var - * @return $this - */ - public function setErrorDescription($var) - { - GPBUtil::checkString($var, True); - $this->error_description = $var; - - return $this; - } - - /** - * Original error response from underlying Google API, if available. - * - * Generated from protobuf field .google.rpc.Status error = 4; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Original error response from underlying Google API, if available. - * - * 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->error = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/TerraformOutput.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/TerraformOutput.php deleted file mode 100644 index 274b90dccea7..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/TerraformOutput.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.config.v1.TerraformOutput - */ -class TerraformOutput extends \Google\Protobuf\Internal\Message -{ - /** - * Identifies whether Terraform has set this output as a potential - * sensitive value. - * - * Generated from protobuf field bool sensitive = 1; - */ - protected $sensitive = false; - /** - * Value of output. - * - * Generated from protobuf field .google.protobuf.Value value = 2; - */ - protected $value = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $sensitive - * Identifies whether Terraform has set this output as a potential - * sensitive value. - * @type \Google\Protobuf\Value $value - * Value of output. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Identifies whether Terraform has set this output as a potential - * sensitive value. - * - * Generated from protobuf field bool sensitive = 1; - * @return bool - */ - public function getSensitive() - { - return $this->sensitive; - } - - /** - * Identifies whether Terraform has set this output as a potential - * sensitive value. - * - * Generated from protobuf field bool sensitive = 1; - * @param bool $var - * @return $this - */ - public function setSensitive($var) - { - GPBUtil::checkBool($var); - $this->sensitive = $var; - - return $this; - } - - /** - * Value of output. - * - * Generated from protobuf field .google.protobuf.Value value = 2; - * @return \Google\Protobuf\Value|null - */ - public function getValue() - { - return $this->value; - } - - public function hasValue() - { - return isset($this->value); - } - - public function clearValue() - { - unset($this->value); - } - - /** - * Value of output. - * - * Generated from protobuf field .google.protobuf.Value value = 2; - * @param \Google\Protobuf\Value $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Value::class); - $this->value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/TerraformVariable.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/TerraformVariable.php deleted file mode 100644 index 6e15fac30434..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/TerraformVariable.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.config.v1.TerraformVariable - */ -class TerraformVariable extends \Google\Protobuf\Internal\Message -{ - /** - * Input variable value. - * - * Generated from protobuf field .google.protobuf.Value input_value = 5; - */ - protected $input_value = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Value $input_value - * Input variable value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Input variable value. - * - * Generated from protobuf field .google.protobuf.Value input_value = 5; - * @return \Google\Protobuf\Value|null - */ - public function getInputValue() - { - return $this->input_value; - } - - public function hasInputValue() - { - return isset($this->input_value); - } - - public function clearInputValue() - { - unset($this->input_value); - } - - /** - * Input variable value. - * - * Generated from protobuf field .google.protobuf.Value input_value = 5; - * @param \Google\Protobuf\Value $var - * @return $this - */ - public function setInputValue($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Value::class); - $this->input_value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/TerraformVersion.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/TerraformVersion.php deleted file mode 100644 index 15be7f36d1d1..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/TerraformVersion.php +++ /dev/null @@ -1,238 +0,0 @@ -google.cloud.config.v1.TerraformVersion - */ -class TerraformVersion extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The version name is in the format: - * 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The state of the version, ACTIVE, DEPRECATED or OBSOLETE. - * - * Generated from protobuf field .google.cloud.config.v1.TerraformVersion.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. When the version is supported. - * - * Generated from protobuf field .google.protobuf.Timestamp support_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $support_time = null; - /** - * Output only. When the version is deprecated. - * - * Generated from protobuf field optional .google.protobuf.Timestamp deprecate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $deprecate_time = null; - /** - * Output only. When the version is obsolete. - * - * Generated from protobuf field optional .google.protobuf.Timestamp obsolete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $obsolete_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The version name is in the format: - * 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}'. - * @type int $state - * Output only. The state of the version, ACTIVE, DEPRECATED or OBSOLETE. - * @type \Google\Protobuf\Timestamp $support_time - * Output only. When the version is supported. - * @type \Google\Protobuf\Timestamp $deprecate_time - * Output only. When the version is deprecated. - * @type \Google\Protobuf\Timestamp $obsolete_time - * Output only. When the version is obsolete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The version name is in the format: - * 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The version name is in the format: - * 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The state of the version, ACTIVE, DEPRECATED or OBSOLETE. - * - * Generated from protobuf field .google.cloud.config.v1.TerraformVersion.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the version, ACTIVE, DEPRECATED or OBSOLETE. - * - * Generated from protobuf field .google.cloud.config.v1.TerraformVersion.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Config\V1\TerraformVersion\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. When the version is supported. - * - * Generated from protobuf field .google.protobuf.Timestamp support_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSupportTime() - { - return $this->support_time; - } - - public function hasSupportTime() - { - return isset($this->support_time); - } - - public function clearSupportTime() - { - unset($this->support_time); - } - - /** - * Output only. When the version is supported. - * - * Generated from protobuf field .google.protobuf.Timestamp support_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSupportTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->support_time = $var; - - return $this; - } - - /** - * Output only. When the version is deprecated. - * - * Generated from protobuf field optional .google.protobuf.Timestamp deprecate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeprecateTime() - { - return $this->deprecate_time; - } - - public function hasDeprecateTime() - { - return isset($this->deprecate_time); - } - - public function clearDeprecateTime() - { - unset($this->deprecate_time); - } - - /** - * Output only. When the version is deprecated. - * - * Generated from protobuf field optional .google.protobuf.Timestamp deprecate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeprecateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->deprecate_time = $var; - - return $this; - } - - /** - * Output only. When the version is obsolete. - * - * Generated from protobuf field optional .google.protobuf.Timestamp obsolete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getObsoleteTime() - { - return $this->obsolete_time; - } - - public function hasObsoleteTime() - { - return isset($this->obsolete_time); - } - - public function clearObsoleteTime() - { - unset($this->obsolete_time); - } - - /** - * Output only. When the version is obsolete. - * - * Generated from protobuf field optional .google.protobuf.Timestamp obsolete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setObsoleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->obsolete_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/TerraformVersion/State.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/TerraformVersion/State.php deleted file mode 100644 index de07b8523f35..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/TerraformVersion/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.config.v1.TerraformVersion.State - */ -class State -{ - /** - * The default value. This value is used if the state is omitted. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The version is actively supported. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The version is deprecated. - * - * Generated from protobuf enum DEPRECATED = 2; - */ - const DEPRECATED = 2; - /** - * The version is obsolete. - * - * Generated from protobuf enum OBSOLETE = 3; - */ - const OBSOLETE = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::DEPRECATED => 'DEPRECATED', - self::OBSOLETE => 'OBSOLETE', - ]; - - 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\Config\V1\TerraformVersion_State::class); - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/UnlockDeploymentRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/UnlockDeploymentRequest.php deleted file mode 100644 index b37045f8c520..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/UnlockDeploymentRequest.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.config.v1.UnlockDeploymentRequest - */ -class UnlockDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. Lock ID of the lock file to be unlocked. - * - * Generated from protobuf field int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $lock_id = 0; - - /** - * @param string $name Required. The name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. Please see - * {@see ConfigClient::deploymentName()} for help formatting this field. - * @param int $lockId Required. Lock ID of the lock file to be unlocked. - * - * @return \Google\Cloud\Config\V1\UnlockDeploymentRequest - * - * @experimental - */ - public static function build(string $name, int $lockId): self - { - return (new self()) - ->setName($name) - ->setLockId($lockId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * @type int|string $lock_id - * Required. Lock ID of the lock file to be unlocked. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{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 name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{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; - } - - /** - * Required. Lock ID of the lock file to be unlocked. - * - * Generated from protobuf field int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int|string - */ - public function getLockId() - { - return $this->lock_id; - } - - /** - * Required. Lock ID of the lock file to be unlocked. - * - * Generated from protobuf field int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int|string $var - * @return $this - */ - public function setLockId($var) - { - GPBUtil::checkInt64($var); - $this->lock_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/UpdateDeploymentRequest.php b/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/UpdateDeploymentRequest.php deleted file mode 100644 index 99451b86cde0..000000000000 --- a/owl-bot-staging/Config/v1/proto/src/Google/Cloud/Config/V1/UpdateDeploymentRequest.php +++ /dev/null @@ -1,245 +0,0 @@ -google.cloud.config.v1.UpdateDeploymentRequest - */ -class UpdateDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Field mask used to specify the fields to be overwritten in the - * Deployment resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. [Deployment][google.cloud.config.v1.Deployment] to update. - * The deployment's `name` field is used to identify the resource to be - * updated. Format: - * `projects/{project}/locations/{location}/deployments/{deployment}` - * - * Generated from protobuf field .google.cloud.config.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $deployment = null; - /** - * Optional. 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 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 \Google\Cloud\Config\V1\Deployment $deployment Required. [Deployment][google.cloud.config.v1.Deployment] to update. - * - * The deployment's `name` field is used to identify the resource to be - * updated. Format: - * `projects/{project}/locations/{location}/deployments/{deployment}` - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask used to specify the fields to be overwritten in the - * Deployment resource by the update. - * - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\Config\V1\UpdateDeploymentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Config\V1\Deployment $deployment, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDeployment($deployment) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask used to specify the fields to be overwritten in the - * Deployment resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\Config\V1\Deployment $deployment - * Required. [Deployment][google.cloud.config.v1.Deployment] to update. - * The deployment's `name` field is used to identify the resource to be - * updated. Format: - * `projects/{project}/locations/{location}/deployments/{deployment}` - * @type string $request_id - * Optional. 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 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\Config\V1\Config::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Field mask used to specify the fields to be overwritten in the - * Deployment resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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 used to specify the fields to be overwritten in the - * Deployment resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; - } - - /** - * Required. [Deployment][google.cloud.config.v1.Deployment] to update. - * The deployment's `name` field is used to identify the resource to be - * updated. Format: - * `projects/{project}/locations/{location}/deployments/{deployment}` - * - * Generated from protobuf field .google.cloud.config.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Config\V1\Deployment|null - */ - public function getDeployment() - { - return $this->deployment; - } - - public function hasDeployment() - { - return isset($this->deployment); - } - - public function clearDeployment() - { - unset($this->deployment); - } - - /** - * Required. [Deployment][google.cloud.config.v1.Deployment] to update. - * The deployment's `name` field is used to identify the resource to be - * updated. Format: - * `projects/{project}/locations/{location}/deployments/{deployment}` - * - * Generated from protobuf field .google.cloud.config.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Config\V1\Deployment $var - * @return $this - */ - public function setDeployment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Config\V1\Deployment::class); - $this->deployment = $var; - - return $this; - } - - /** - * Optional. 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 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. 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 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/Config/v1/samples/V1/ConfigClient/create_deployment.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/create_deployment.php deleted file mode 100644 index e8abf26f6a93..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/create_deployment.php +++ /dev/null @@ -1,101 +0,0 @@ -setServiceAccount($formattedDeploymentServiceAccount); - $request = (new CreateDeploymentRequest()) - ->setParent($formattedParent) - ->setDeploymentId($deploymentId) - ->setDeployment($deployment); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $configClient->createDeployment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Deployment $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 = ConfigClient::locationName('[PROJECT]', '[LOCATION]'); - $deploymentId = '[DEPLOYMENT_ID]'; - $formattedDeploymentServiceAccount = ConfigClient::serviceAccountName( - '[PROJECT]', - '[SERVICE_ACCOUNT]' - ); - - create_deployment_sample($formattedParent, $deploymentId, $formattedDeploymentServiceAccount); -} -// [END config_v1_generated_Config_CreateDeployment_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/create_preview.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/create_preview.php deleted file mode 100644 index 69c8a2b7c34a..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/create_preview.php +++ /dev/null @@ -1,97 +0,0 @@ -setServiceAccount($formattedPreviewServiceAccount); - $request = (new CreatePreviewRequest()) - ->setParent($formattedParent) - ->setPreview($preview); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $configClient->createPreview($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Preview $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 = ConfigClient::locationName('[PROJECT]', '[LOCATION]'); - $formattedPreviewServiceAccount = ConfigClient::serviceAccountName( - '[PROJECT]', - '[SERVICE_ACCOUNT]' - ); - - create_preview_sample($formattedParent, $formattedPreviewServiceAccount); -} -// [END config_v1_generated_Config_CreatePreview_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/delete_deployment.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/delete_deployment.php deleted file mode 100644 index 827bc3366c4b..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/delete_deployment.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $configClient->deleteDeployment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Deployment $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 = ConfigClient::deploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - - delete_deployment_sample($formattedName); -} -// [END config_v1_generated_Config_DeleteDeployment_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/delete_preview.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/delete_preview.php deleted file mode 100644 index e88cf0708420..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/delete_preview.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $configClient->deletePreview($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Preview $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 = ConfigClient::previewName('[PROJECT]', '[LOCATION]', '[PREVIEW]'); - - delete_preview_sample($formattedName); -} -// [END config_v1_generated_Config_DeletePreview_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/delete_statefile.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/delete_statefile.php deleted file mode 100644 index 4b2435ab7b41..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/delete_statefile.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName) - ->setLockId($lockId); - - // Call the API and handle any network failures. - try { - $configClient->deleteStatefile($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 = ConfigClient::deploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $lockId = 0; - - delete_statefile_sample($formattedName, $lockId); -} -// [END config_v1_generated_Config_DeleteStatefile_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/export_deployment_statefile.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/export_deployment_statefile.php deleted file mode 100644 index 8853db69fe54..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/export_deployment_statefile.php +++ /dev/null @@ -1,73 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var Statefile $response */ - $response = $configClient->exportDeploymentStatefile($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 = ConfigClient::deploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - - export_deployment_statefile_sample($formattedParent); -} -// [END config_v1_generated_Config_ExportDeploymentStatefile_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/export_lock_info.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/export_lock_info.php deleted file mode 100644 index 4985c5130c62..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/export_lock_info.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var LockInfo $response */ - $response = $configClient->exportLockInfo($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 = ConfigClient::deploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - - export_lock_info_sample($formattedName); -} -// [END config_v1_generated_Config_ExportLockInfo_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/export_preview_result.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/export_preview_result.php deleted file mode 100644 index 7d0d2070840c..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/export_preview_result.php +++ /dev/null @@ -1,73 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var ExportPreviewResultResponse $response */ - $response = $configClient->exportPreviewResult($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 = ConfigClient::previewName('[PROJECT]', '[LOCATION]', '[PREVIEW]'); - - export_preview_result_sample($formattedParent); -} -// [END config_v1_generated_Config_ExportPreviewResult_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/export_revision_statefile.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/export_revision_statefile.php deleted file mode 100644 index 8f6b784c1b50..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/export_revision_statefile.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var Statefile $response */ - $response = $configClient->exportRevisionStatefile($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 = ConfigClient::revisionName( - '[PROJECT]', - '[LOCATION]', - '[DEPLOYMENT]', - '[REVISION]' - ); - - export_revision_statefile_sample($formattedParent); -} -// [END config_v1_generated_Config_ExportRevisionStatefile_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/get_deployment.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/get_deployment.php deleted file mode 100644 index e6308e87f630..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/get_deployment.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Deployment $response */ - $response = $configClient->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 = ConfigClient::deploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - - get_deployment_sample($formattedName); -} -// [END config_v1_generated_Config_GetDeployment_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/get_iam_policy.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/get_iam_policy.php deleted file mode 100644 index 8cb5f81a3d62..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/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 = $configClient->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 config_v1_generated_Config_GetIamPolicy_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/get_location.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/get_location.php deleted file mode 100644 index 627717550000..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/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 config_v1_generated_Config_GetLocation_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/get_preview.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/get_preview.php deleted file mode 100644 index 4a0d5e75a321..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/get_preview.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Preview $response */ - $response = $configClient->getPreview($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 = ConfigClient::previewName('[PROJECT]', '[LOCATION]', '[PREVIEW]'); - - get_preview_sample($formattedName); -} -// [END config_v1_generated_Config_GetPreview_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/get_resource.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/get_resource.php deleted file mode 100644 index 0a522239cac5..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/get_resource.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Resource $response */ - $response = $configClient->getResource($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 = ConfigClient::resourceName( - '[PROJECT]', - '[LOCATION]', - '[DEPLOYMENT]', - '[REVISION]', - '[RESOURCE]' - ); - - get_resource_sample($formattedName); -} -// [END config_v1_generated_Config_GetResource_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/get_revision.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/get_revision.php deleted file mode 100644 index 46a04228942e..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/get_revision.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Revision $response */ - $response = $configClient->getRevision($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 = ConfigClient::revisionName( - '[PROJECT]', - '[LOCATION]', - '[DEPLOYMENT]', - '[REVISION]' - ); - - get_revision_sample($formattedName); -} -// [END config_v1_generated_Config_GetRevision_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/get_terraform_version.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/get_terraform_version.php deleted file mode 100644 index 1985808c019a..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/get_terraform_version.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var TerraformVersion $response */ - $response = $configClient->getTerraformVersion($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 = ConfigClient::terraformVersionName( - '[PROJECT]', - '[LOCATION]', - '[TERRAFORM_VERSION]' - ); - - get_terraform_version_sample($formattedName); -} -// [END config_v1_generated_Config_GetTerraformVersion_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/import_statefile.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/import_statefile.php deleted file mode 100644 index 7a009142cd58..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/import_statefile.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent) - ->setLockId($lockId); - - // Call the API and handle any network failures. - try { - /** @var Statefile $response */ - $response = $configClient->importStatefile($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 = ConfigClient::deploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $lockId = 0; - - import_statefile_sample($formattedParent, $lockId); -} -// [END config_v1_generated_Config_ImportStatefile_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/list_deployments.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/list_deployments.php deleted file mode 100644 index a03c0cbbdf98..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/list_deployments.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $configClient->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 = ConfigClient::locationName('[PROJECT]', '[LOCATION]'); - - list_deployments_sample($formattedParent); -} -// [END config_v1_generated_Config_ListDeployments_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/list_locations.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/list_locations.php deleted file mode 100644 index 200a01247c2d..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/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 config_v1_generated_Config_ListLocations_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/list_previews.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/list_previews.php deleted file mode 100644 index 75d044f88d12..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/list_previews.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $configClient->listPreviews($request); - - /** @var Preview $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 = ConfigClient::locationName('[PROJECT]', '[LOCATION]'); - - list_previews_sample($formattedParent); -} -// [END config_v1_generated_Config_ListPreviews_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/list_resources.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/list_resources.php deleted file mode 100644 index 68d7714dadd6..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/list_resources.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $configClient->listResources($request); - - /** @var Resource $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 = ConfigClient::revisionName( - '[PROJECT]', - '[LOCATION]', - '[DEPLOYMENT]', - '[REVISION]' - ); - - list_resources_sample($formattedParent); -} -// [END config_v1_generated_Config_ListResources_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/list_revisions.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/list_revisions.php deleted file mode 100644 index ce791f7f79f6..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/list_revisions.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $configClient->listRevisions($request); - - /** @var Revision $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 = ConfigClient::deploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - - list_revisions_sample($formattedParent); -} -// [END config_v1_generated_Config_ListRevisions_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/list_terraform_versions.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/list_terraform_versions.php deleted file mode 100644 index 5dfc2095ef22..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/list_terraform_versions.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $configClient->listTerraformVersions($request); - - /** @var TerraformVersion $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 = ConfigClient::locationName('[PROJECT]', '[LOCATION]'); - - list_terraform_versions_sample($formattedParent); -} -// [END config_v1_generated_Config_ListTerraformVersions_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/lock_deployment.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/lock_deployment.php deleted file mode 100644 index 3cb371c746b2..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/lock_deployment.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $configClient->lockDeployment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Deployment $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 = ConfigClient::deploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - - lock_deployment_sample($formattedName); -} -// [END config_v1_generated_Config_LockDeployment_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/set_iam_policy.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/set_iam_policy.php deleted file mode 100644 index 88bf5c0324bb..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/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 = $configClient->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 config_v1_generated_Config_SetIamPolicy_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/test_iam_permissions.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/test_iam_permissions.php deleted file mode 100644 index 29f93422e4d7..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/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 = $configClient->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 config_v1_generated_Config_TestIamPermissions_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/unlock_deployment.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/unlock_deployment.php deleted file mode 100644 index 41afcaaacacd..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/unlock_deployment.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($formattedName) - ->setLockId($lockId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $configClient->unlockDeployment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Deployment $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 = ConfigClient::deploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $lockId = 0; - - unlock_deployment_sample($formattedName, $lockId); -} -// [END config_v1_generated_Config_UnlockDeployment_sync] diff --git a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/update_deployment.php b/owl-bot-staging/Config/v1/samples/V1/ConfigClient/update_deployment.php deleted file mode 100644 index 2c138c474490..000000000000 --- a/owl-bot-staging/Config/v1/samples/V1/ConfigClient/update_deployment.php +++ /dev/null @@ -1,90 +0,0 @@ -setServiceAccount($formattedDeploymentServiceAccount); - $request = (new UpdateDeploymentRequest()) - ->setDeployment($deployment); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $configClient->updateDeployment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Deployment $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 -{ - $formattedDeploymentServiceAccount = ConfigClient::serviceAccountName( - '[PROJECT]', - '[SERVICE_ACCOUNT]' - ); - - update_deployment_sample($formattedDeploymentServiceAccount); -} -// [END config_v1_generated_Config_UpdateDeployment_sync] diff --git a/owl-bot-staging/Config/v1/src/V1/Client/ConfigClient.php b/owl-bot-staging/Config/v1/src/V1/Client/ConfigClient.php deleted file mode 100644 index f05a18b4c03b..000000000000 --- a/owl-bot-staging/Config/v1/src/V1/Client/ConfigClient.php +++ /dev/null @@ -1,1222 +0,0 @@ - createDeploymentAsync(CreateDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface createPreviewAsync(CreatePreviewRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDeploymentAsync(DeleteDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface deletePreviewAsync(DeletePreviewRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteStatefileAsync(DeleteStatefileRequest $request, array $optionalArgs = []) - * @method PromiseInterface exportDeploymentStatefileAsync(ExportDeploymentStatefileRequest $request, array $optionalArgs = []) - * @method PromiseInterface exportLockInfoAsync(ExportLockInfoRequest $request, array $optionalArgs = []) - * @method PromiseInterface exportPreviewResultAsync(ExportPreviewResultRequest $request, array $optionalArgs = []) - * @method PromiseInterface exportRevisionStatefileAsync(ExportRevisionStatefileRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDeploymentAsync(GetDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getPreviewAsync(GetPreviewRequest $request, array $optionalArgs = []) - * @method PromiseInterface getResourceAsync(GetResourceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getRevisionAsync(GetRevisionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTerraformVersionAsync(GetTerraformVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface importStatefileAsync(ImportStatefileRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDeploymentsAsync(ListDeploymentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPreviewsAsync(ListPreviewsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listResourcesAsync(ListResourcesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listRevisionsAsync(ListRevisionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTerraformVersionsAsync(ListTerraformVersionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface lockDeploymentAsync(LockDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface unlockDeploymentAsync(UnlockDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDeploymentAsync(UpdateDeploymentRequest $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 ConfigClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.config.v1.Config'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'config.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'config.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/config_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/config_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/config_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/config_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 deployment - * resource. - * - * @param string $project - * @param string $location - * @param string $deployment - * - * @return string The formatted deployment resource. - */ - public static function deploymentName(string $project, string $location, string $deployment): string - { - return self::getPathTemplate('deployment')->render([ - 'project' => $project, - 'location' => $location, - 'deployment' => $deployment, - ]); - } - - /** - * 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 preview - * resource. - * - * @param string $project - * @param string $location - * @param string $preview - * - * @return string The formatted preview resource. - */ - public static function previewName(string $project, string $location, string $preview): string - { - return self::getPathTemplate('preview')->render([ - 'project' => $project, - 'location' => $location, - 'preview' => $preview, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a resource - * resource. - * - * @param string $project - * @param string $location - * @param string $deployment - * @param string $revision - * @param string $resource - * - * @return string The formatted resource resource. - */ - public static function resourceName(string $project, string $location, string $deployment, string $revision, string $resource): string - { - return self::getPathTemplate('resource')->render([ - 'project' => $project, - 'location' => $location, - 'deployment' => $deployment, - 'revision' => $revision, - 'resource' => $resource, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a revision - * resource. - * - * @param string $project - * @param string $location - * @param string $deployment - * @param string $revision - * - * @return string The formatted revision resource. - */ - public static function revisionName(string $project, string $location, string $deployment, string $revision): string - { - return self::getPathTemplate('revision')->render([ - 'project' => $project, - 'location' => $location, - 'deployment' => $deployment, - 'revision' => $revision, - ]); - } - - /** - * 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, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * terraform_version resource. - * - * @param string $project - * @param string $location - * @param string $terraformVersion - * - * @return string The formatted terraform_version resource. - */ - public static function terraformVersionName(string $project, string $location, string $terraformVersion): string - { - return self::getPathTemplate('terraformVersion')->render([ - 'project' => $project, - 'location' => $location, - 'terraform_version' => $terraformVersion, - ]); - } - - /** - * 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 - * - deployment: projects/{project}/locations/{location}/deployments/{deployment} - * - location: projects/{project}/locations/{location} - * - preview: projects/{project}/locations/{location}/previews/{preview} - * - resource: projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource} - * - revision: projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision} - * - serviceAccount: projects/{project}/serviceAccounts/{service_account} - * - terraformVersion: projects/{project}/locations/{location}/terraformVersions/{terraform_version} - * - 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 'config.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 [Deployment][google.cloud.config.v1.Deployment]. - * - * The async variant is {@see ConfigClient::createDeploymentAsync()} . - * - * @example samples/V1/ConfigClient/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 OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createDeployment(CreateDeploymentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateDeployment', $request, $callOptions)->wait(); - } - - /** - * Creates a [Preview][google.cloud.config.v1.Preview]. - * - * The async variant is {@see ConfigClient::createPreviewAsync()} . - * - * @example samples/V1/ConfigClient/create_preview.php - * - * @param CreatePreviewRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createPreview(CreatePreviewRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreatePreview', $request, $callOptions)->wait(); - } - - /** - * Deletes a [Deployment][google.cloud.config.v1.Deployment]. - * - * The async variant is {@see ConfigClient::deleteDeploymentAsync()} . - * - * @example samples/V1/ConfigClient/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. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteDeployment(DeleteDeploymentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteDeployment', $request, $callOptions)->wait(); - } - - /** - * Deletes a [Preview][google.cloud.config.v1.Preview]. - * - * The async variant is {@see ConfigClient::deletePreviewAsync()} . - * - * @example samples/V1/ConfigClient/delete_preview.php - * - * @param DeletePreviewRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deletePreview(DeletePreviewRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeletePreview', $request, $callOptions)->wait(); - } - - /** - * Deletes Terraform state file in a given deployment. - * - * The async variant is {@see ConfigClient::deleteStatefileAsync()} . - * - * @example samples/V1/ConfigClient/delete_statefile.php - * - * @param DeleteStatefileRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteStatefile(DeleteStatefileRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteStatefile', $request, $callOptions)->wait(); - } - - /** - * Exports Terraform state file from a given deployment. - * - * The async variant is {@see ConfigClient::exportDeploymentStatefileAsync()} . - * - * @example samples/V1/ConfigClient/export_deployment_statefile.php - * - * @param ExportDeploymentStatefileRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Statefile - * - * @throws ApiException Thrown if the API call fails. - */ - public function exportDeploymentStatefile(ExportDeploymentStatefileRequest $request, array $callOptions = []): Statefile - { - return $this->startApiCall('ExportDeploymentStatefile', $request, $callOptions)->wait(); - } - - /** - * Exports the lock info on a locked deployment. - * - * The async variant is {@see ConfigClient::exportLockInfoAsync()} . - * - * @example samples/V1/ConfigClient/export_lock_info.php - * - * @param ExportLockInfoRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return LockInfo - * - * @throws ApiException Thrown if the API call fails. - */ - public function exportLockInfo(ExportLockInfoRequest $request, array $callOptions = []): LockInfo - { - return $this->startApiCall('ExportLockInfo', $request, $callOptions)->wait(); - } - - /** - * Export [Preview][google.cloud.config.v1.Preview] results. - * - * The async variant is {@see ConfigClient::exportPreviewResultAsync()} . - * - * @example samples/V1/ConfigClient/export_preview_result.php - * - * @param ExportPreviewResultRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ExportPreviewResultResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function exportPreviewResult(ExportPreviewResultRequest $request, array $callOptions = []): ExportPreviewResultResponse - { - return $this->startApiCall('ExportPreviewResult', $request, $callOptions)->wait(); - } - - /** - * Exports Terraform state file from a given revision. - * - * The async variant is {@see ConfigClient::exportRevisionStatefileAsync()} . - * - * @example samples/V1/ConfigClient/export_revision_statefile.php - * - * @param ExportRevisionStatefileRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Statefile - * - * @throws ApiException Thrown if the API call fails. - */ - public function exportRevisionStatefile(ExportRevisionStatefileRequest $request, array $callOptions = []): Statefile - { - return $this->startApiCall('ExportRevisionStatefile', $request, $callOptions)->wait(); - } - - /** - * Gets details about a [Deployment][google.cloud.config.v1.Deployment]. - * - * The async variant is {@see ConfigClient::getDeploymentAsync()} . - * - * @example samples/V1/ConfigClient/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(); - } - - /** - * Gets details about a [Preview][google.cloud.config.v1.Preview]. - * - * The async variant is {@see ConfigClient::getPreviewAsync()} . - * - * @example samples/V1/ConfigClient/get_preview.php - * - * @param GetPreviewRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Preview - * - * @throws ApiException Thrown if the API call fails. - */ - public function getPreview(GetPreviewRequest $request, array $callOptions = []): Preview - { - return $this->startApiCall('GetPreview', $request, $callOptions)->wait(); - } - - /** - * Gets details about a [Resource][google.cloud.config.v1.Resource] deployed - * by Infra Manager. - * - * The async variant is {@see ConfigClient::getResourceAsync()} . - * - * @example samples/V1/ConfigClient/get_resource.php - * - * @param GetResourceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Resource - * - * @throws ApiException Thrown if the API call fails. - */ - public function getResource(GetResourceRequest $request, array $callOptions = []): Resource - { - return $this->startApiCall('GetResource', $request, $callOptions)->wait(); - } - - /** - * Gets details about a [Revision][google.cloud.config.v1.Revision]. - * - * The async variant is {@see ConfigClient::getRevisionAsync()} . - * - * @example samples/V1/ConfigClient/get_revision.php - * - * @param GetRevisionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Revision - * - * @throws ApiException Thrown if the API call fails. - */ - public function getRevision(GetRevisionRequest $request, array $callOptions = []): Revision - { - return $this->startApiCall('GetRevision', $request, $callOptions)->wait(); - } - - /** - * Gets details about a - * [TerraformVersion][google.cloud.config.v1.TerraformVersion]. - * - * The async variant is {@see ConfigClient::getTerraformVersionAsync()} . - * - * @example samples/V1/ConfigClient/get_terraform_version.php - * - * @param GetTerraformVersionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TerraformVersion - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTerraformVersion(GetTerraformVersionRequest $request, array $callOptions = []): TerraformVersion - { - return $this->startApiCall('GetTerraformVersion', $request, $callOptions)->wait(); - } - - /** - * Imports Terraform state file in a given deployment. The state file does not - * take effect until the Deployment has been unlocked. - * - * The async variant is {@see ConfigClient::importStatefileAsync()} . - * - * @example samples/V1/ConfigClient/import_statefile.php - * - * @param ImportStatefileRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Statefile - * - * @throws ApiException Thrown if the API call fails. - */ - public function importStatefile(ImportStatefileRequest $request, array $callOptions = []): Statefile - { - return $this->startApiCall('ImportStatefile', $request, $callOptions)->wait(); - } - - /** - * Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project - * and location. - * - * The async variant is {@see ConfigClient::listDeploymentsAsync()} . - * - * @example samples/V1/ConfigClient/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); - } - - /** - * Lists [Preview][google.cloud.config.v1.Preview]s in a given project and - * location. - * - * The async variant is {@see ConfigClient::listPreviewsAsync()} . - * - * @example samples/V1/ConfigClient/list_previews.php - * - * @param ListPreviewsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listPreviews(ListPreviewsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPreviews', $request, $callOptions); - } - - /** - * Lists [Resources][google.cloud.config.v1.Resource] in a given revision. - * - * The async variant is {@see ConfigClient::listResourcesAsync()} . - * - * @example samples/V1/ConfigClient/list_resources.php - * - * @param ListResourcesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listResources(ListResourcesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListResources', $request, $callOptions); - } - - /** - * Lists [Revision][google.cloud.config.v1.Revision]s of a deployment. - * - * The async variant is {@see ConfigClient::listRevisionsAsync()} . - * - * @example samples/V1/ConfigClient/list_revisions.php - * - * @param ListRevisionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listRevisions(ListRevisionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListRevisions', $request, $callOptions); - } - - /** - * Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s in a - * given project and location. - * - * The async variant is {@see ConfigClient::listTerraformVersionsAsync()} . - * - * @example samples/V1/ConfigClient/list_terraform_versions.php - * - * @param ListTerraformVersionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listTerraformVersions(ListTerraformVersionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTerraformVersions', $request, $callOptions); - } - - /** - * Locks a deployment. - * - * The async variant is {@see ConfigClient::lockDeploymentAsync()} . - * - * @example samples/V1/ConfigClient/lock_deployment.php - * - * @param LockDeploymentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 lockDeployment(LockDeploymentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('LockDeployment', $request, $callOptions)->wait(); - } - - /** - * Unlocks a locked deployment. - * - * The async variant is {@see ConfigClient::unlockDeploymentAsync()} . - * - * @example samples/V1/ConfigClient/unlock_deployment.php - * - * @param UnlockDeploymentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 unlockDeployment(UnlockDeploymentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UnlockDeployment', $request, $callOptions)->wait(); - } - - /** - * Updates a [Deployment][google.cloud.config.v1.Deployment]. - * - * The async variant is {@see ConfigClient::updateDeploymentAsync()} . - * - * @example samples/V1/ConfigClient/update_deployment.php - * - * @param UpdateDeploymentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateDeployment(UpdateDeploymentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateDeployment', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see ConfigClient::getLocationAsync()} . - * - * @example samples/V1/ConfigClient/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 ConfigClient::listLocationsAsync()} . - * - * @example samples/V1/ConfigClient/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 ConfigClient::getIamPolicyAsync()} . - * - * @example samples/V1/ConfigClient/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 ConfigClient::setIamPolicyAsync()} . - * - * @example samples/V1/ConfigClient/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 ConfigClient::testIamPermissionsAsync()} . - * - * @example samples/V1/ConfigClient/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/Config/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Config/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 17aca320234b..000000000000 --- a/owl-bot-staging/Config/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.config.v1", - "libraryPackage": "Google\\Cloud\\Config\\V1", - "services": { - "Config": { - "clients": { - "grpc": { - "libraryClient": "ConfigGapicClient", - "rpcs": { - "CreateDeployment": { - "methods": [ - "createDeployment" - ] - }, - "CreatePreview": { - "methods": [ - "createPreview" - ] - }, - "DeleteDeployment": { - "methods": [ - "deleteDeployment" - ] - }, - "DeletePreview": { - "methods": [ - "deletePreview" - ] - }, - "DeleteStatefile": { - "methods": [ - "deleteStatefile" - ] - }, - "ExportDeploymentStatefile": { - "methods": [ - "exportDeploymentStatefile" - ] - }, - "ExportLockInfo": { - "methods": [ - "exportLockInfo" - ] - }, - "ExportPreviewResult": { - "methods": [ - "exportPreviewResult" - ] - }, - "ExportRevisionStatefile": { - "methods": [ - "exportRevisionStatefile" - ] - }, - "GetDeployment": { - "methods": [ - "getDeployment" - ] - }, - "GetPreview": { - "methods": [ - "getPreview" - ] - }, - "GetResource": { - "methods": [ - "getResource" - ] - }, - "GetRevision": { - "methods": [ - "getRevision" - ] - }, - "GetTerraformVersion": { - "methods": [ - "getTerraformVersion" - ] - }, - "ImportStatefile": { - "methods": [ - "importStatefile" - ] - }, - "ListDeployments": { - "methods": [ - "listDeployments" - ] - }, - "ListPreviews": { - "methods": [ - "listPreviews" - ] - }, - "ListResources": { - "methods": [ - "listResources" - ] - }, - "ListRevisions": { - "methods": [ - "listRevisions" - ] - }, - "ListTerraformVersions": { - "methods": [ - "listTerraformVersions" - ] - }, - "LockDeployment": { - "methods": [ - "lockDeployment" - ] - }, - "UnlockDeployment": { - "methods": [ - "unlockDeployment" - ] - }, - "UpdateDeployment": { - "methods": [ - "updateDeployment" - ] - }, - "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/Config/v1/src/V1/resources/config_client_config.json b/owl-bot-staging/Config/v1/src/V1/resources/config_client_config.json deleted file mode 100644 index 6ea63ea32572..000000000000 --- a/owl-bot-staging/Config/v1/src/V1/resources/config_client_config.json +++ /dev/null @@ -1,166 +0,0 @@ -{ - "interfaces": { - "google.cloud.config.v1.Config": { - "retry_codes": { - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "non_idempotent": [] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CreateDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreatePreview": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeletePreview": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteStatefile": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ExportDeploymentStatefile": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ExportLockInfo": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ExportPreviewResult": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ExportRevisionStatefile": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetPreview": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetResource": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetRevision": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetTerraformVersion": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ImportStatefile": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListDeployments": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListPreviews": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListResources": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListRevisions": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListTerraformVersions": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "LockDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UnlockDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/Config/v1/src/V1/resources/config_descriptor_config.php b/owl-bot-staging/Config/v1/src/V1/resources/config_descriptor_config.php deleted file mode 100644 index b6363a20d766..000000000000 --- a/owl-bot-staging/Config/v1/src/V1/resources/config_descriptor_config.php +++ /dev/null @@ -1,477 +0,0 @@ - [ - 'google.cloud.config.v1.Config' => [ - 'CreateDeployment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Config\V1\Deployment', - 'metadataReturnType' => '\Google\Cloud\Config\V1\OperationMetadata', - 'initialPollDelayMillis' => '300000', - 'pollDelayMultiplier' => '1.25', - 'maxPollDelayMillis' => '3600000', - 'totalPollTimeoutMillis' => '43200000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreatePreview' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Config\V1\Preview', - 'metadataReturnType' => '\Google\Cloud\Config\V1\OperationMetadata', - 'initialPollDelayMillis' => '300000', - 'pollDelayMultiplier' => '1.25', - 'maxPollDelayMillis' => '3600000', - 'totalPollTimeoutMillis' => '43200000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDeployment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Config\V1\Deployment', - 'metadataReturnType' => '\Google\Cloud\Config\V1\OperationMetadata', - 'initialPollDelayMillis' => '300000', - 'pollDelayMultiplier' => '1.25', - 'maxPollDelayMillis' => '3600000', - 'totalPollTimeoutMillis' => '43200000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeletePreview' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Config\V1\Preview', - 'metadataReturnType' => '\Google\Cloud\Config\V1\OperationMetadata', - 'initialPollDelayMillis' => '300000', - 'pollDelayMultiplier' => '1.25', - 'maxPollDelayMillis' => '3600000', - 'totalPollTimeoutMillis' => '43200000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'LockDeployment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Config\V1\Deployment', - 'metadataReturnType' => '\Google\Cloud\Config\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UnlockDeployment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Config\V1\Deployment', - 'metadataReturnType' => '\Google\Cloud\Config\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateDeployment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Config\V1\Deployment', - 'metadataReturnType' => '\Google\Cloud\Config\V1\OperationMetadata', - 'initialPollDelayMillis' => '300000', - 'pollDelayMultiplier' => '1.25', - 'maxPollDelayMillis' => '3600000', - 'totalPollTimeoutMillis' => '43200000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'deployment.name', - 'fieldAccessors' => [ - 'getDeployment', - 'getName', - ], - ], - ], - ], - 'DeleteStatefile' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ExportDeploymentStatefile' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Config\V1\Statefile', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ExportLockInfo' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Config\V1\LockInfo', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ExportPreviewResult' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Config\V1\ExportPreviewResultResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ExportRevisionStatefile' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Config\V1\Statefile', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Config\V1\Deployment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetPreview' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Config\V1\Preview', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetResource' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Config\V1\Resource', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetRevision' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Config\V1\Revision', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetTerraformVersion' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Config\V1\TerraformVersion', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ImportStatefile' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Config\V1\Statefile', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDeployments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDeployments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Config\V1\ListDeploymentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListPreviews' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPreviews', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Config\V1\ListPreviewsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListResources' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getResources', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Config\V1\ListResourcesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListRevisions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRevisions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Config\V1\ListRevisionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListTerraformVersions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTerraformVersions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Config\V1\ListTerraformVersionsResponse', - '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' => [ - 'deployment' => 'projects/{project}/locations/{location}/deployments/{deployment}', - 'location' => 'projects/{project}/locations/{location}', - 'preview' => 'projects/{project}/locations/{location}/previews/{preview}', - 'resource' => 'projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}', - 'revision' => 'projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}', - 'serviceAccount' => 'projects/{project}/serviceAccounts/{service_account}', - 'terraformVersion' => 'projects/{project}/locations/{location}/terraformVersions/{terraform_version}', - 'workerPool' => 'projects/{project}/locations/{location}/workerPools/{worker_pool}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Config/v1/src/V1/resources/config_rest_client_config.php b/owl-bot-staging/Config/v1/src/V1/resources/config_rest_client_config.php deleted file mode 100644 index 8c4252307138..000000000000 --- a/owl-bot-staging/Config/v1/src/V1/resources/config_rest_client_config.php +++ /dev/null @@ -1,404 +0,0 @@ - [ - 'google.cloud.config.v1.Config' => [ - 'CreateDeployment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/deployments', - 'body' => 'deployment', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'deployment_id', - ], - ], - 'CreatePreview' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/previews', - 'body' => 'preview', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDeployment' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/deployments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeletePreview' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/previews/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteStatefile' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/deployments/*}:deleteState', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExportDeploymentStatefile' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/deployments/*}:exportState', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ExportLockInfo' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/deployments/*}:exportLock', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExportPreviewResult' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/previews/*}:export', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ExportRevisionStatefile' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}:exportState', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetDeployment' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/deployments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetPreview' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/previews/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetResource' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/deployments/*/revisions/*/resources/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetRevision' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/deployments/*/revisions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTerraformVersion' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/terraformVersions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportStatefile' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/deployments/*}:importState', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDeployments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/deployments', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListPreviews' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/previews', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListResources' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}/resources', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListRevisions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/deployments/*}/revisions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTerraformVersions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/terraformVersions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'LockDeployment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/deployments/*}:lock', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UnlockDeployment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/deployments/*}:unlock', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateDeployment' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{deployment.name=projects/*/locations/*/deployments/*}', - 'body' => 'deployment', - 'placeholders' => [ - 'deployment.name' => [ - 'getters' => [ - 'getDeployment', - '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/*/deployments/*}:getIamPolicy', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/deployments/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/deployments/*}: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/Config/v1/tests/Unit/V1/Client/ConfigClientTest.php b/owl-bot-staging/Config/v1/tests/Unit/V1/Client/ConfigClientTest.php deleted file mode 100644 index 79cfec1a311d..000000000000 --- a/owl-bot-staging/Config/v1/tests/Unit/V1/Client/ConfigClientTest.php +++ /dev/null @@ -1,2720 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ConfigClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ConfigClient($options); - } - - /** @test */ - public function createDeploymentTest() - { - $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/createDeploymentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $latestRevision = 'latestRevision602726803'; - $stateDetail = 'stateDetail-118146113'; - $deleteBuild = 'deleteBuild-433028390'; - $deleteLogs = 'deleteLogs-1122055229'; - $errorLogs = 'errorLogs1635955078'; - $artifactsGcsBucket = 'artifactsGcsBucket696146480'; - $serviceAccount = 'serviceAccount-1948028253'; - $importExistingResources = false; - $workerPool = 'workerPool982219837'; - $tfVersionConstraint = 'tfVersionConstraint594495121'; - $tfVersion = 'tfVersion1712341003'; - $expectedResponse = new Deployment(); - $expectedResponse->setName($name); - $expectedResponse->setLatestRevision($latestRevision); - $expectedResponse->setStateDetail($stateDetail); - $expectedResponse->setDeleteBuild($deleteBuild); - $expectedResponse->setDeleteLogs($deleteLogs); - $expectedResponse->setErrorLogs($errorLogs); - $expectedResponse->setArtifactsGcsBucket($artifactsGcsBucket); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setImportExistingResources($importExistingResources); - $expectedResponse->setWorkerPool($workerPool); - $expectedResponse->setTfVersionConstraint($tfVersionConstraint); - $expectedResponse->setTfVersion($tfVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDeploymentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $deploymentId = 'deploymentId51250389'; - $deployment = new Deployment(); - $deploymentServiceAccount = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $deployment->setServiceAccount($deploymentServiceAccount); - $request = (new CreateDeploymentRequest()) - ->setParent($formattedParent) - ->setDeploymentId($deploymentId) - ->setDeployment($deployment); - $response = $gapicClient->createDeployment($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.config.v1.Config/CreateDeployment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDeploymentId(); - $this->assertProtobufEquals($deploymentId, $actualValue); - $actualValue = $actualApiRequestObject->getDeployment(); - $this->assertProtobufEquals($deployment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDeploymentTest'); - $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 createDeploymentExceptionTest() - { - $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/createDeploymentTest'); - $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]'); - $deploymentId = 'deploymentId51250389'; - $deployment = new Deployment(); - $deploymentServiceAccount = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $deployment->setServiceAccount($deploymentServiceAccount); - $request = (new CreateDeploymentRequest()) - ->setParent($formattedParent) - ->setDeploymentId($deploymentId) - ->setDeployment($deployment); - $response = $gapicClient->createDeployment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDeploymentTest'); - 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 createPreviewTest() - { - $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/createPreviewTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $deployment = 'deployment1939520197'; - $serviceAccount = 'serviceAccount-1948028253'; - $artifactsGcsBucket = 'artifactsGcsBucket696146480'; - $workerPool = 'workerPool982219837'; - $build = 'build94094958'; - $errorLogs = 'errorLogs1635955078'; - $logs = 'logs3327407'; - $tfVersion = 'tfVersion1712341003'; - $tfVersionConstraint = 'tfVersionConstraint594495121'; - $expectedResponse = new Preview(); - $expectedResponse->setName($name); - $expectedResponse->setDeployment($deployment); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setArtifactsGcsBucket($artifactsGcsBucket); - $expectedResponse->setWorkerPool($workerPool); - $expectedResponse->setBuild($build); - $expectedResponse->setErrorLogs($errorLogs); - $expectedResponse->setLogs($logs); - $expectedResponse->setTfVersion($tfVersion); - $expectedResponse->setTfVersionConstraint($tfVersionConstraint); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createPreviewTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $preview = new Preview(); - $previewServiceAccount = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $preview->setServiceAccount($previewServiceAccount); - $request = (new CreatePreviewRequest()) - ->setParent($formattedParent) - ->setPreview($preview); - $response = $gapicClient->createPreview($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.config.v1.Config/CreatePreview', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getPreview(); - $this->assertProtobufEquals($preview, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPreviewTest'); - $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 createPreviewExceptionTest() - { - $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/createPreviewTest'); - $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]'); - $preview = new Preview(); - $previewServiceAccount = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $preview->setServiceAccount($previewServiceAccount); - $request = (new CreatePreviewRequest()) - ->setParent($formattedParent) - ->setPreview($preview); - $response = $gapicClient->createPreview($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPreviewTest'); - 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 deleteDeploymentTest() - { - $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/deleteDeploymentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $latestRevision = 'latestRevision602726803'; - $stateDetail = 'stateDetail-118146113'; - $deleteBuild = 'deleteBuild-433028390'; - $deleteLogs = 'deleteLogs-1122055229'; - $errorLogs = 'errorLogs1635955078'; - $artifactsGcsBucket = 'artifactsGcsBucket696146480'; - $serviceAccount = 'serviceAccount-1948028253'; - $importExistingResources = false; - $workerPool = 'workerPool982219837'; - $tfVersionConstraint = 'tfVersionConstraint594495121'; - $tfVersion = 'tfVersion1712341003'; - $expectedResponse = new Deployment(); - $expectedResponse->setName($name2); - $expectedResponse->setLatestRevision($latestRevision); - $expectedResponse->setStateDetail($stateDetail); - $expectedResponse->setDeleteBuild($deleteBuild); - $expectedResponse->setDeleteLogs($deleteLogs); - $expectedResponse->setErrorLogs($errorLogs); - $expectedResponse->setArtifactsGcsBucket($artifactsGcsBucket); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setImportExistingResources($importExistingResources); - $expectedResponse->setWorkerPool($workerPool); - $expectedResponse->setTfVersionConstraint($tfVersionConstraint); - $expectedResponse->setTfVersion($tfVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDeploymentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $request = (new DeleteDeploymentRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDeployment($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.config.v1.Config/DeleteDeployment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDeploymentTest'); - $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 deleteDeploymentExceptionTest() - { - $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/deleteDeploymentTest'); - $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->deploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $request = (new DeleteDeploymentRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDeployment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDeploymentTest'); - 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 deletePreviewTest() - { - $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/deletePreviewTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $deployment = 'deployment1939520197'; - $serviceAccount = 'serviceAccount-1948028253'; - $artifactsGcsBucket = 'artifactsGcsBucket696146480'; - $workerPool = 'workerPool982219837'; - $build = 'build94094958'; - $errorLogs = 'errorLogs1635955078'; - $logs = 'logs3327407'; - $tfVersion = 'tfVersion1712341003'; - $tfVersionConstraint = 'tfVersionConstraint594495121'; - $expectedResponse = new Preview(); - $expectedResponse->setName($name2); - $expectedResponse->setDeployment($deployment); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setArtifactsGcsBucket($artifactsGcsBucket); - $expectedResponse->setWorkerPool($workerPool); - $expectedResponse->setBuild($build); - $expectedResponse->setErrorLogs($errorLogs); - $expectedResponse->setLogs($logs); - $expectedResponse->setTfVersion($tfVersion); - $expectedResponse->setTfVersionConstraint($tfVersionConstraint); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deletePreviewTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->previewName('[PROJECT]', '[LOCATION]', '[PREVIEW]'); - $request = (new DeletePreviewRequest()) - ->setName($formattedName); - $response = $gapicClient->deletePreview($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.config.v1.Config/DeletePreview', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deletePreviewTest'); - $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 deletePreviewExceptionTest() - { - $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/deletePreviewTest'); - $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->previewName('[PROJECT]', '[LOCATION]', '[PREVIEW]'); - $request = (new DeletePreviewRequest()) - ->setName($formattedName); - $response = $gapicClient->deletePreview($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deletePreviewTest'); - 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 deleteStatefileTest() - { - $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]', '[LOCATION]', '[DEPLOYMENT]'); - $lockId = 338696367; - $request = (new DeleteStatefileRequest()) - ->setName($formattedName) - ->setLockId($lockId); - $gapicClient->deleteStatefile($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.config.v1.Config/DeleteStatefile', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getLockId(); - $this->assertProtobufEquals($lockId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteStatefileExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]', '[LOCATION]', '[DEPLOYMENT]'); - $lockId = 338696367; - $request = (new DeleteStatefileRequest()) - ->setName($formattedName) - ->setLockId($lockId); - try { - $gapicClient->deleteStatefile($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function exportDeploymentStatefileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $signedUri = 'signedUri-979536439'; - $expectedResponse = new Statefile(); - $expectedResponse->setSignedUri($signedUri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $request = (new ExportDeploymentStatefileRequest()) - ->setParent($formattedParent); - $response = $gapicClient->exportDeploymentStatefile($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.config.v1.Config/ExportDeploymentStatefile', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function exportDeploymentStatefileExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->deploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $request = (new ExportDeploymentStatefileRequest()) - ->setParent($formattedParent); - try { - $gapicClient->exportDeploymentStatefile($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function exportLockInfoTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $lockId = 338696367; - $operation = 'operation1662702951'; - $info = 'info3237038'; - $who = 'who117694'; - $version = 'version351608024'; - $expectedResponse = new LockInfo(); - $expectedResponse->setLockId($lockId); - $expectedResponse->setOperation($operation); - $expectedResponse->setInfo($info); - $expectedResponse->setWho($who); - $expectedResponse->setVersion($version); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $request = (new ExportLockInfoRequest()) - ->setName($formattedName); - $response = $gapicClient->exportLockInfo($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.config.v1.Config/ExportLockInfo', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function exportLockInfoExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]', '[LOCATION]', '[DEPLOYMENT]'); - $request = (new ExportLockInfoRequest()) - ->setName($formattedName); - try { - $gapicClient->exportLockInfo($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function exportPreviewResultTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ExportPreviewResultResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->previewName('[PROJECT]', '[LOCATION]', '[PREVIEW]'); - $request = (new ExportPreviewResultRequest()) - ->setParent($formattedParent); - $response = $gapicClient->exportPreviewResult($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.config.v1.Config/ExportPreviewResult', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function exportPreviewResultExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->previewName('[PROJECT]', '[LOCATION]', '[PREVIEW]'); - $request = (new ExportPreviewResultRequest()) - ->setParent($formattedParent); - try { - $gapicClient->exportPreviewResult($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function exportRevisionStatefileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $signedUri = 'signedUri-979536439'; - $expectedResponse = new Statefile(); - $expectedResponse->setSignedUri($signedUri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->revisionName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]', '[REVISION]'); - $request = (new ExportRevisionStatefileRequest()) - ->setParent($formattedParent); - $response = $gapicClient->exportRevisionStatefile($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.config.v1.Config/ExportRevisionStatefile', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function exportRevisionStatefileExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->revisionName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]', '[REVISION]'); - $request = (new ExportRevisionStatefileRequest()) - ->setParent($formattedParent); - try { - $gapicClient->exportRevisionStatefile($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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'; - $latestRevision = 'latestRevision602726803'; - $stateDetail = 'stateDetail-118146113'; - $deleteBuild = 'deleteBuild-433028390'; - $deleteLogs = 'deleteLogs-1122055229'; - $errorLogs = 'errorLogs1635955078'; - $artifactsGcsBucket = 'artifactsGcsBucket696146480'; - $serviceAccount = 'serviceAccount-1948028253'; - $importExistingResources = false; - $workerPool = 'workerPool982219837'; - $tfVersionConstraint = 'tfVersionConstraint594495121'; - $tfVersion = 'tfVersion1712341003'; - $expectedResponse = new Deployment(); - $expectedResponse->setName($name2); - $expectedResponse->setLatestRevision($latestRevision); - $expectedResponse->setStateDetail($stateDetail); - $expectedResponse->setDeleteBuild($deleteBuild); - $expectedResponse->setDeleteLogs($deleteLogs); - $expectedResponse->setErrorLogs($errorLogs); - $expectedResponse->setArtifactsGcsBucket($artifactsGcsBucket); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setImportExistingResources($importExistingResources); - $expectedResponse->setWorkerPool($workerPool); - $expectedResponse->setTfVersionConstraint($tfVersionConstraint); - $expectedResponse->setTfVersion($tfVersion); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[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.config.v1.Config/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]', '[LOCATION]', '[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 getPreviewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $deployment = 'deployment1939520197'; - $serviceAccount = 'serviceAccount-1948028253'; - $artifactsGcsBucket = 'artifactsGcsBucket696146480'; - $workerPool = 'workerPool982219837'; - $build = 'build94094958'; - $errorLogs = 'errorLogs1635955078'; - $logs = 'logs3327407'; - $tfVersion = 'tfVersion1712341003'; - $tfVersionConstraint = 'tfVersionConstraint594495121'; - $expectedResponse = new Preview(); - $expectedResponse->setName($name2); - $expectedResponse->setDeployment($deployment); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setArtifactsGcsBucket($artifactsGcsBucket); - $expectedResponse->setWorkerPool($workerPool); - $expectedResponse->setBuild($build); - $expectedResponse->setErrorLogs($errorLogs); - $expectedResponse->setLogs($logs); - $expectedResponse->setTfVersion($tfVersion); - $expectedResponse->setTfVersionConstraint($tfVersionConstraint); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->previewName('[PROJECT]', '[LOCATION]', '[PREVIEW]'); - $request = (new GetPreviewRequest()) - ->setName($formattedName); - $response = $gapicClient->getPreview($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.config.v1.Config/GetPreview', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPreviewExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->previewName('[PROJECT]', '[LOCATION]', '[PREVIEW]'); - $request = (new GetPreviewRequest()) - ->setName($formattedName); - try { - $gapicClient->getPreview($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getResourceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Resource(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->resourceName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]', '[REVISION]', '[RESOURCE]'); - $request = (new GetResourceRequest()) - ->setName($formattedName); - $response = $gapicClient->getResource($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.config.v1.Config/GetResource', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getResourceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->resourceName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]', '[REVISION]', '[RESOURCE]'); - $request = (new GetResourceRequest()) - ->setName($formattedName); - try { - $gapicClient->getResource($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRevisionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $stateDetail = 'stateDetail-118146113'; - $build = 'build94094958'; - $logs = 'logs3327407'; - $errorLogs = 'errorLogs1635955078'; - $serviceAccount = 'serviceAccount-1948028253'; - $importExistingResources = false; - $workerPool = 'workerPool982219837'; - $tfVersionConstraint = 'tfVersionConstraint594495121'; - $tfVersion = 'tfVersion1712341003'; - $quotaValidationResults = 'quotaValidationResults220555095'; - $expectedResponse = new Revision(); - $expectedResponse->setName($name2); - $expectedResponse->setStateDetail($stateDetail); - $expectedResponse->setBuild($build); - $expectedResponse->setLogs($logs); - $expectedResponse->setErrorLogs($errorLogs); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setImportExistingResources($importExistingResources); - $expectedResponse->setWorkerPool($workerPool); - $expectedResponse->setTfVersionConstraint($tfVersionConstraint); - $expectedResponse->setTfVersion($tfVersion); - $expectedResponse->setQuotaValidationResults($quotaValidationResults); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->revisionName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]', '[REVISION]'); - $request = (new GetRevisionRequest()) - ->setName($formattedName); - $response = $gapicClient->getRevision($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.config.v1.Config/GetRevision', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRevisionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->revisionName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]', '[REVISION]'); - $request = (new GetRevisionRequest()) - ->setName($formattedName); - try { - $gapicClient->getRevision($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTerraformVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new TerraformVersion(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->terraformVersionName('[PROJECT]', '[LOCATION]', '[TERRAFORM_VERSION]'); - $request = (new GetTerraformVersionRequest()) - ->setName($formattedName); - $response = $gapicClient->getTerraformVersion($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.config.v1.Config/GetTerraformVersion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTerraformVersionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->terraformVersionName('[PROJECT]', '[LOCATION]', '[TERRAFORM_VERSION]'); - $request = (new GetTerraformVersionRequest()) - ->setName($formattedName); - try { - $gapicClient->getTerraformVersion($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importStatefileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $signedUri = 'signedUri-979536439'; - $expectedResponse = new Statefile(); - $expectedResponse->setSignedUri($signedUri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $lockId = 338696367; - $request = (new ImportStatefileRequest()) - ->setParent($formattedParent) - ->setLockId($lockId); - $response = $gapicClient->importStatefile($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.config.v1.Config/ImportStatefile', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getLockId(); - $this->assertProtobufEquals($lockId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importStatefileExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->deploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $lockId = 338696367; - $request = (new ImportStatefileRequest()) - ->setParent($formattedParent) - ->setLockId($lockId); - try { - $gapicClient->importStatefile($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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->locationName('[PROJECT]', '[LOCATION]'); - $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.config.v1.Config/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->locationName('[PROJECT]', '[LOCATION]'); - $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 listPreviewsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $previewsElement = new Preview(); - $previews = [ - $previewsElement, - ]; - $expectedResponse = new ListPreviewsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPreviews($previews); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListPreviewsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPreviews($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPreviews()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.config.v1.Config/ListPreviews', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPreviewsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListPreviewsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPreviews($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listResourcesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $resourcesElement = new Resource(); - $resources = [ - $resourcesElement, - ]; - $expectedResponse = new ListResourcesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResources($resources); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->revisionName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]', '[REVISION]'); - $request = (new ListResourcesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listResources($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.config.v1.Config/ListResources', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listResourcesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->revisionName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]', '[REVISION]'); - $request = (new ListResourcesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listResources($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRevisionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $revisionsElement = new Revision(); - $revisions = [ - $revisionsElement, - ]; - $expectedResponse = new ListRevisionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRevisions($revisions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $request = (new ListRevisionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listRevisions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRevisions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.config.v1.Config/ListRevisions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRevisionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->deploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $request = (new ListRevisionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listRevisions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTerraformVersionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $terraformVersionsElement = new TerraformVersion(); - $terraformVersions = [ - $terraformVersionsElement, - ]; - $expectedResponse = new ListTerraformVersionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTerraformVersions($terraformVersions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListTerraformVersionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTerraformVersions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTerraformVersions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.config.v1.Config/ListTerraformVersions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTerraformVersionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListTerraformVersionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTerraformVersions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function lockDeploymentTest() - { - $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/lockDeploymentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $latestRevision = 'latestRevision602726803'; - $stateDetail = 'stateDetail-118146113'; - $deleteBuild = 'deleteBuild-433028390'; - $deleteLogs = 'deleteLogs-1122055229'; - $errorLogs = 'errorLogs1635955078'; - $artifactsGcsBucket = 'artifactsGcsBucket696146480'; - $serviceAccount = 'serviceAccount-1948028253'; - $importExistingResources = false; - $workerPool = 'workerPool982219837'; - $tfVersionConstraint = 'tfVersionConstraint594495121'; - $tfVersion = 'tfVersion1712341003'; - $expectedResponse = new Deployment(); - $expectedResponse->setName($name2); - $expectedResponse->setLatestRevision($latestRevision); - $expectedResponse->setStateDetail($stateDetail); - $expectedResponse->setDeleteBuild($deleteBuild); - $expectedResponse->setDeleteLogs($deleteLogs); - $expectedResponse->setErrorLogs($errorLogs); - $expectedResponse->setArtifactsGcsBucket($artifactsGcsBucket); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setImportExistingResources($importExistingResources); - $expectedResponse->setWorkerPool($workerPool); - $expectedResponse->setTfVersionConstraint($tfVersionConstraint); - $expectedResponse->setTfVersion($tfVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/lockDeploymentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $request = (new LockDeploymentRequest()) - ->setName($formattedName); - $response = $gapicClient->lockDeployment($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.config.v1.Config/LockDeployment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/lockDeploymentTest'); - $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 lockDeploymentExceptionTest() - { - $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/lockDeploymentTest'); - $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->deploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $request = (new LockDeploymentRequest()) - ->setName($formattedName); - $response = $gapicClient->lockDeployment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/lockDeploymentTest'); - 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 unlockDeploymentTest() - { - $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/unlockDeploymentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $latestRevision = 'latestRevision602726803'; - $stateDetail = 'stateDetail-118146113'; - $deleteBuild = 'deleteBuild-433028390'; - $deleteLogs = 'deleteLogs-1122055229'; - $errorLogs = 'errorLogs1635955078'; - $artifactsGcsBucket = 'artifactsGcsBucket696146480'; - $serviceAccount = 'serviceAccount-1948028253'; - $importExistingResources = false; - $workerPool = 'workerPool982219837'; - $tfVersionConstraint = 'tfVersionConstraint594495121'; - $tfVersion = 'tfVersion1712341003'; - $expectedResponse = new Deployment(); - $expectedResponse->setName($name2); - $expectedResponse->setLatestRevision($latestRevision); - $expectedResponse->setStateDetail($stateDetail); - $expectedResponse->setDeleteBuild($deleteBuild); - $expectedResponse->setDeleteLogs($deleteLogs); - $expectedResponse->setErrorLogs($errorLogs); - $expectedResponse->setArtifactsGcsBucket($artifactsGcsBucket); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setImportExistingResources($importExistingResources); - $expectedResponse->setWorkerPool($workerPool); - $expectedResponse->setTfVersionConstraint($tfVersionConstraint); - $expectedResponse->setTfVersion($tfVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/unlockDeploymentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $lockId = 338696367; - $request = (new UnlockDeploymentRequest()) - ->setName($formattedName) - ->setLockId($lockId); - $response = $gapicClient->unlockDeployment($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.config.v1.Config/UnlockDeployment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getLockId(); - $this->assertProtobufEquals($lockId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/unlockDeploymentTest'); - $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 unlockDeploymentExceptionTest() - { - $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/unlockDeploymentTest'); - $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->deploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $lockId = 338696367; - $request = (new UnlockDeploymentRequest()) - ->setName($formattedName) - ->setLockId($lockId); - $response = $gapicClient->unlockDeployment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/unlockDeploymentTest'); - 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 updateDeploymentTest() - { - $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/updateDeploymentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $latestRevision = 'latestRevision602726803'; - $stateDetail = 'stateDetail-118146113'; - $deleteBuild = 'deleteBuild-433028390'; - $deleteLogs = 'deleteLogs-1122055229'; - $errorLogs = 'errorLogs1635955078'; - $artifactsGcsBucket = 'artifactsGcsBucket696146480'; - $serviceAccount = 'serviceAccount-1948028253'; - $importExistingResources = false; - $workerPool = 'workerPool982219837'; - $tfVersionConstraint = 'tfVersionConstraint594495121'; - $tfVersion = 'tfVersion1712341003'; - $expectedResponse = new Deployment(); - $expectedResponse->setName($name); - $expectedResponse->setLatestRevision($latestRevision); - $expectedResponse->setStateDetail($stateDetail); - $expectedResponse->setDeleteBuild($deleteBuild); - $expectedResponse->setDeleteLogs($deleteLogs); - $expectedResponse->setErrorLogs($errorLogs); - $expectedResponse->setArtifactsGcsBucket($artifactsGcsBucket); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setImportExistingResources($importExistingResources); - $expectedResponse->setWorkerPool($workerPool); - $expectedResponse->setTfVersionConstraint($tfVersionConstraint); - $expectedResponse->setTfVersion($tfVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDeploymentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $deployment = new Deployment(); - $deploymentServiceAccount = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $deployment->setServiceAccount($deploymentServiceAccount); - $request = (new UpdateDeploymentRequest()) - ->setDeployment($deployment); - $response = $gapicClient->updateDeployment($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.config.v1.Config/UpdateDeployment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getDeployment(); - $this->assertProtobufEquals($deployment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDeploymentTest'); - $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 updateDeploymentExceptionTest() - { - $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/updateDeploymentTest'); - $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 - $deployment = new Deployment(); - $deploymentServiceAccount = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $deployment->setServiceAccount($deploymentServiceAccount); - $request = (new UpdateDeploymentRequest()) - ->setDeployment($deployment); - $response = $gapicClient->updateDeployment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDeploymentTest'); - 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 createDeploymentAsyncTest() - { - $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/createDeploymentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $latestRevision = 'latestRevision602726803'; - $stateDetail = 'stateDetail-118146113'; - $deleteBuild = 'deleteBuild-433028390'; - $deleteLogs = 'deleteLogs-1122055229'; - $errorLogs = 'errorLogs1635955078'; - $artifactsGcsBucket = 'artifactsGcsBucket696146480'; - $serviceAccount = 'serviceAccount-1948028253'; - $importExistingResources = false; - $workerPool = 'workerPool982219837'; - $tfVersionConstraint = 'tfVersionConstraint594495121'; - $tfVersion = 'tfVersion1712341003'; - $expectedResponse = new Deployment(); - $expectedResponse->setName($name); - $expectedResponse->setLatestRevision($latestRevision); - $expectedResponse->setStateDetail($stateDetail); - $expectedResponse->setDeleteBuild($deleteBuild); - $expectedResponse->setDeleteLogs($deleteLogs); - $expectedResponse->setErrorLogs($errorLogs); - $expectedResponse->setArtifactsGcsBucket($artifactsGcsBucket); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setImportExistingResources($importExistingResources); - $expectedResponse->setWorkerPool($workerPool); - $expectedResponse->setTfVersionConstraint($tfVersionConstraint); - $expectedResponse->setTfVersion($tfVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDeploymentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $deploymentId = 'deploymentId51250389'; - $deployment = new Deployment(); - $deploymentServiceAccount = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $deployment->setServiceAccount($deploymentServiceAccount); - $request = (new CreateDeploymentRequest()) - ->setParent($formattedParent) - ->setDeploymentId($deploymentId) - ->setDeployment($deployment); - $response = $gapicClient->createDeploymentAsync($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.config.v1.Config/CreateDeployment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDeploymentId(); - $this->assertProtobufEquals($deploymentId, $actualValue); - $actualValue = $actualApiRequestObject->getDeployment(); - $this->assertProtobufEquals($deployment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDeploymentTest'); - $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()); - } -}