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)