|
35 | 35 | use Google\ApiCore\Transport\TransportInterface; |
36 | 36 | use Google\ApiCore\ValidationException; |
37 | 37 | use Google\Auth\FetchAuthTokenInterface; |
| 38 | +use Google\Cloud\Config\V1\AutoMigrationConfig; |
38 | 39 | use Google\Cloud\Config\V1\CreateDeploymentRequest; |
39 | 40 | use Google\Cloud\Config\V1\CreatePreviewRequest; |
40 | 41 | use Google\Cloud\Config\V1\DeleteDeploymentRequest; |
|
46 | 47 | use Google\Cloud\Config\V1\ExportPreviewResultRequest; |
47 | 48 | use Google\Cloud\Config\V1\ExportPreviewResultResponse; |
48 | 49 | use Google\Cloud\Config\V1\ExportRevisionStatefileRequest; |
| 50 | +use Google\Cloud\Config\V1\GetAutoMigrationConfigRequest; |
49 | 51 | use Google\Cloud\Config\V1\GetDeploymentRequest; |
50 | 52 | use Google\Cloud\Config\V1\GetPreviewRequest; |
51 | 53 | use Google\Cloud\Config\V1\GetResourceChangeRequest; |
|
71 | 73 | use Google\Cloud\Config\V1\Statefile; |
72 | 74 | use Google\Cloud\Config\V1\TerraformVersion; |
73 | 75 | use Google\Cloud\Config\V1\UnlockDeploymentRequest; |
| 76 | +use Google\Cloud\Config\V1\UpdateAutoMigrationConfigRequest; |
74 | 77 | use Google\Cloud\Config\V1\UpdateDeploymentRequest; |
75 | 78 | use Google\Cloud\Iam\V1\GetIamPolicyRequest; |
76 | 79 | use Google\Cloud\Iam\V1\Policy; |
|
106 | 109 | * @method PromiseInterface<LockInfo> exportLockInfoAsync(ExportLockInfoRequest $request, array $optionalArgs = []) |
107 | 110 | * @method PromiseInterface<ExportPreviewResultResponse> exportPreviewResultAsync(ExportPreviewResultRequest $request, array $optionalArgs = []) |
108 | 111 | * @method PromiseInterface<Statefile> exportRevisionStatefileAsync(ExportRevisionStatefileRequest $request, array $optionalArgs = []) |
| 112 | + * @method PromiseInterface<AutoMigrationConfig> getAutoMigrationConfigAsync(GetAutoMigrationConfigRequest $request, array $optionalArgs = []) |
109 | 113 | * @method PromiseInterface<Deployment> getDeploymentAsync(GetDeploymentRequest $request, array $optionalArgs = []) |
110 | 114 | * @method PromiseInterface<Preview> getPreviewAsync(GetPreviewRequest $request, array $optionalArgs = []) |
111 | 115 | * @method PromiseInterface<Resource> getResourceAsync(GetResourceRequest $request, array $optionalArgs = []) |
|
123 | 127 | * @method PromiseInterface<PagedListResponse> listTerraformVersionsAsync(ListTerraformVersionsRequest $request, array $optionalArgs = []) |
124 | 128 | * @method PromiseInterface<OperationResponse> lockDeploymentAsync(LockDeploymentRequest $request, array $optionalArgs = []) |
125 | 129 | * @method PromiseInterface<OperationResponse> unlockDeploymentAsync(UnlockDeploymentRequest $request, array $optionalArgs = []) |
| 130 | + * @method PromiseInterface<OperationResponse> updateAutoMigrationConfigAsync(UpdateAutoMigrationConfigRequest $request, array $optionalArgs = []) |
126 | 131 | * @method PromiseInterface<OperationResponse> updateDeploymentAsync(UpdateDeploymentRequest $request, array $optionalArgs = []) |
127 | 132 | * @method PromiseInterface<Location> getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) |
128 | 133 | * @method PromiseInterface<PagedListResponse> listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) |
@@ -226,6 +231,23 @@ private function createOperationsClient(array $options) |
226 | 231 | return new OperationsClient($options); |
227 | 232 | } |
228 | 233 |
|
| 234 | + /** |
| 235 | + * Formats a string containing the fully-qualified path to represent a |
| 236 | + * auto_migration_config resource. |
| 237 | + * |
| 238 | + * @param string $project |
| 239 | + * @param string $location |
| 240 | + * |
| 241 | + * @return string The formatted auto_migration_config resource. |
| 242 | + */ |
| 243 | + public static function autoMigrationConfigName(string $project, string $location): string |
| 244 | + { |
| 245 | + return self::getPathTemplate('autoMigrationConfig')->render([ |
| 246 | + 'project' => $project, |
| 247 | + 'location' => $location, |
| 248 | + ]); |
| 249 | + } |
| 250 | + |
229 | 251 | /** |
230 | 252 | * Formats a string containing the fully-qualified path to represent a deployment |
231 | 253 | * resource. |
@@ -439,6 +461,7 @@ public static function workerPoolName(string $project, string $location, string |
439 | 461 | * Parses a formatted name string and returns an associative array of the components in the name. |
440 | 462 | * The following name formats are supported: |
441 | 463 | * Template: Pattern |
| 464 | + * - autoMigrationConfig: projects/{project}/locations/{location}/autoMigrationConfig |
442 | 465 | * - deployment: projects/{project}/locations/{location}/deployments/{deployment} |
443 | 466 | * - location: projects/{project}/locations/{location} |
444 | 467 | * - preview: projects/{project}/locations/{location}/previews/{preview} |
@@ -790,6 +813,34 @@ public function exportRevisionStatefile(ExportRevisionStatefileRequest $request, |
790 | 813 | return $this->startApiCall('ExportRevisionStatefile', $request, $callOptions)->wait(); |
791 | 814 | } |
792 | 815 |
|
| 816 | + /** |
| 817 | + * Get the AutoMigrationConfig for a given project and location. |
| 818 | + * |
| 819 | + * The async variant is {@see ConfigClient::getAutoMigrationConfigAsync()} . |
| 820 | + * |
| 821 | + * @example samples/V1/ConfigClient/get_auto_migration_config.php |
| 822 | + * |
| 823 | + * @param GetAutoMigrationConfigRequest $request A request to house fields associated with the call. |
| 824 | + * @param array $callOptions { |
| 825 | + * Optional. |
| 826 | + * |
| 827 | + * @type RetrySettings|array $retrySettings |
| 828 | + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an |
| 829 | + * associative array of retry settings parameters. See the documentation on |
| 830 | + * {@see RetrySettings} for example usage. |
| 831 | + * } |
| 832 | + * |
| 833 | + * @return AutoMigrationConfig |
| 834 | + * |
| 835 | + * @throws ApiException Thrown if the API call fails. |
| 836 | + */ |
| 837 | + public function getAutoMigrationConfig( |
| 838 | + GetAutoMigrationConfigRequest $request, |
| 839 | + array $callOptions = [] |
| 840 | + ): AutoMigrationConfig { |
| 841 | + return $this->startApiCall('GetAutoMigrationConfig', $request, $callOptions)->wait(); |
| 842 | + } |
| 843 | + |
793 | 844 | /** |
794 | 845 | * Gets details about a [Deployment][google.cloud.config.v1.Deployment]. |
795 | 846 | * |
@@ -1240,6 +1291,34 @@ public function unlockDeployment(UnlockDeploymentRequest $request, array $callOp |
1240 | 1291 | return $this->startApiCall('UnlockDeployment', $request, $callOptions)->wait(); |
1241 | 1292 | } |
1242 | 1293 |
|
| 1294 | + /** |
| 1295 | + * Updates the AutoMigrationConfig for a given project and location. |
| 1296 | + * |
| 1297 | + * The async variant is {@see ConfigClient::updateAutoMigrationConfigAsync()} . |
| 1298 | + * |
| 1299 | + * @example samples/V1/ConfigClient/update_auto_migration_config.php |
| 1300 | + * |
| 1301 | + * @param UpdateAutoMigrationConfigRequest $request A request to house fields associated with the call. |
| 1302 | + * @param array $callOptions { |
| 1303 | + * Optional. |
| 1304 | + * |
| 1305 | + * @type RetrySettings|array $retrySettings |
| 1306 | + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an |
| 1307 | + * associative array of retry settings parameters. See the documentation on |
| 1308 | + * {@see RetrySettings} for example usage. |
| 1309 | + * } |
| 1310 | + * |
| 1311 | + * @return OperationResponse<AutoMigrationConfig> |
| 1312 | + * |
| 1313 | + * @throws ApiException Thrown if the API call fails. |
| 1314 | + */ |
| 1315 | + public function updateAutoMigrationConfig( |
| 1316 | + UpdateAutoMigrationConfigRequest $request, |
| 1317 | + array $callOptions = [] |
| 1318 | + ): OperationResponse { |
| 1319 | + return $this->startApiCall('UpdateAutoMigrationConfig', $request, $callOptions)->wait(); |
| 1320 | + } |
| 1321 | + |
1243 | 1322 | /** |
1244 | 1323 | * Updates a [Deployment][google.cloud.config.v1.Deployment]. |
1245 | 1324 | * |
|
0 commit comments