diff --git a/TelcoAutomation/.OwlBot.yaml b/TelcoAutomation/.OwlBot.yaml new file mode 100644 index 000000000000..681b1bdc2732 --- /dev/null +++ b/TelcoAutomation/.OwlBot.yaml @@ -0,0 +1,4 @@ +deep-copy-regex: + - source: /google/cloud/telcoautomation/(v1)/.*-php/(.*) + dest: /owl-bot-staging/TelcoAutomation/$1/$2 +api-name: TelcoAutomation diff --git a/TelcoAutomation/.gitattributes b/TelcoAutomation/.gitattributes new file mode 100644 index 000000000000..8119e7fcc1b2 --- /dev/null +++ b/TelcoAutomation/.gitattributes @@ -0,0 +1,8 @@ +/*.xml.dist export-ignore +/.OwlBot.yaml export-ignore +/.github export-ignore +/.repo-metadata.json export-ignore +/owlbot.py export-ignore +/src/**/gapic_metadata.json export-ignore +/samples export-ignore +/tests export-ignore diff --git a/TelcoAutomation/.github/pull_request_template.md b/TelcoAutomation/.github/pull_request_template.md new file mode 100644 index 000000000000..9db16ea55f76 --- /dev/null +++ b/TelcoAutomation/.github/pull_request_template.md @@ -0,0 +1,24 @@ +**PLEASE READ THIS ENTIRE MESSAGE** + +Hello, and thank you for your contribution! Please note that this repository is +a read-only split of `googleapis/google-cloud-php`. As such, we are +unable to accept pull requests to this repository. + +We welcome your pull request and would be happy to consider it for inclusion in +our library if you follow these steps: + +* Clone the parent client library repository: + +```sh +$ git clone git@github.com:googleapis/google-cloud-php.git +``` + +* Move your changes into the correct location in that library. Library code +belongs in `TelcoAutomation/src`, and tests in `TelcoAutomation/tests`. + +* Push the changes in a new branch to a fork, and open a new pull request +[here](https://github.com/googleapis/google-cloud-php). + +Thanks again, and we look forward to seeing your proposed change! + +The Google Cloud PHP team diff --git a/TelcoAutomation/.repo-metadata.json b/TelcoAutomation/.repo-metadata.json new file mode 100644 index 000000000000..ee904f499667 --- /dev/null +++ b/TelcoAutomation/.repo-metadata.json @@ -0,0 +1,8 @@ +{ + "language": "php", + "distribution_name": "google/cloud-telcoautomation", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-telcoautomation/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "telcoautomation" +} diff --git a/TelcoAutomation/CONTRIBUTING.md b/TelcoAutomation/CONTRIBUTING.md new file mode 100644 index 000000000000..76ea811cacdb --- /dev/null +++ b/TelcoAutomation/CONTRIBUTING.md @@ -0,0 +1,10 @@ +# How to Contribute + +We'd love to accept your patches and contributions to this project. We accept +and review pull requests against the main +[Google Cloud PHP](https://github.com/googleapis/google-cloud-php) +repository, which contains all of our client libraries. You will also need to +sign a Contributor License Agreement. For more details about how to contribute, +see the +[CONTRIBUTING.md](https://github.com/googleapis/google-cloud-php/blob/main/CONTRIBUTING.md) +file in the main Google Cloud PHP repository. diff --git a/TelcoAutomation/LICENSE b/TelcoAutomation/LICENSE new file mode 100644 index 000000000000..8f71f43fee3f --- /dev/null +++ b/TelcoAutomation/LICENSE @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/TelcoAutomation/README.md b/TelcoAutomation/README.md new file mode 100644 index 000000000000..9ea686f84b2e --- /dev/null +++ b/TelcoAutomation/README.md @@ -0,0 +1,45 @@ +# Google Cloud Telco Automation for PHP + +> Idiomatic PHP client for [Google Cloud Telco Automation](https://cloud.google.com/telecom-network-automation). + +[![Latest Stable Version](https://poser.pugx.org/google/cloud-telcoautomation/v/stable)](https://packagist.org/packages/google/cloud-telcoautomation) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-telcoautomation.svg)](https://packagist.org/packages/google/cloud-telcoautomation) + +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-telcoautomation/latest) + +**NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any +support requests, bug reports, or development contributions should be directed to +that project. + +### Installation + +To begin, install the preferred dependency manager for PHP, [Composer](https://getcomposer.org/). + +Now, install this component: + +```sh +$ composer require google/cloud-telcoautomation +``` + +> Browse the complete list of [Google Cloud APIs](https://cloud.google.com/php/docs/reference) +> for PHP + +This component supports both REST over HTTP/1.1 and gRPC. In order to take advantage of the benefits +offered by gRPC (such as streaming methods) please see our +[gRPC installation guide](https://cloud.google.com/php/grpc). + +### Authentication + +Please see our [Authentication guide](https://github.com/googleapis/google-cloud-php/blob/main/AUTHENTICATION.md) for more information +on authenticating your client. Once authenticated, you'll be ready to start making requests. + +### Sample + +See the [samples directory](https://github.com/googleapis/google-cloud-php-telcoautomation/tree/main/samples) for a canonical list of samples. + +### Version + +This component is considered alpha. As such, it is still a work-in-progress and is more likely to get backwards-incompatible updates. + +### Next Steps + +1. Understand the [official documentation](https://cloud.google.com/telecom-network-automation). diff --git a/TelcoAutomation/VERSION b/TelcoAutomation/VERSION new file mode 100644 index 000000000000..77d6f4ca2371 --- /dev/null +++ b/TelcoAutomation/VERSION @@ -0,0 +1 @@ +0.0.0 diff --git a/TelcoAutomation/composer.json b/TelcoAutomation/composer.json new file mode 100644 index 000000000000..4241f54bea3d --- /dev/null +++ b/TelcoAutomation/composer.json @@ -0,0 +1,30 @@ +{ + "name": "google/cloud-telcoautomation", + "description": "Google Cloud Telco Automation Client for PHP", + "license": "Apache-2.0", + "minimum-stability": "stable", + "autoload": { + "psr-4": { + "Google\\Cloud\\TelcoAutomation\\": "src", + "GPBMetadata\\Google\\Cloud\\Telcoautomation\\": "metadata" + } + }, + "extra": { + "component": { + "id": "cloud-telcoautomation", + "path": "TelcoAutomation", + "target": "googleapis/google-cloud-php-telcoautomation" + } + }, + "require": { + "php": ">=7.4", + "google/gax": "^1.25.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "suggest": { + "ext-grpc": "Enables use of gRPC, a universal high-performance RPC framework created by Google.", + "ext-protobuf": "Provides a significant increase in throughput over the pure PHP protobuf implementation. See https://cloud.google.com/php/grpc for installation instructions." + } +} diff --git a/TelcoAutomation/metadata/V1/Telcoautomation.php b/TelcoAutomation/metadata/V1/Telcoautomation.php new file mode 100644 index 000000000000..4abe4a8c09da Binary files /dev/null and b/TelcoAutomation/metadata/V1/Telcoautomation.php differ diff --git a/TelcoAutomation/owlbot.py b/TelcoAutomation/owlbot.py new file mode 100644 index 000000000000..502ce0e99f1b --- /dev/null +++ b/TelcoAutomation/owlbot.py @@ -0,0 +1,62 @@ +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""This script is used to synthesize generated parts of this library.""" + +import logging +from pathlib import Path +import subprocess + +import synthtool as s +from synthtool.languages import php +from synthtool import _tracked_paths + +logging.basicConfig(level=logging.DEBUG) + +src = Path(f"../{php.STAGING_DIR}/TelcoAutomation").resolve() +dest = Path().resolve() + +# Added so that we can pass copy_excludes in the owlbot_main() call +_tracked_paths.add(src) + +php.owlbot_main( + src=src, + dest=dest, + copy_excludes=[ + src / "**/[A-Z]*_*.php", + ] +) + +# remove class_alias code +s.replace( + "src/V*/**/*.php", + r"^// Adding a class alias for backwards compatibility with the previous class name.$" + + "\n" + + r"^class_alias\(.*\);$" + + "\n", + '') + +# format generated clients +subprocess.run([ + 'npm', + 'exec', + '--yes', + '--package=@prettier/plugin-php@^0.16', + '--', + 'prettier', + '**/BaseClient/*', + '--write', + '--parser=php', + '--single-quote', + '--print-width=80']) diff --git a/TelcoAutomation/phpunit.xml.dist b/TelcoAutomation/phpunit.xml.dist new file mode 100644 index 000000000000..af909715a1f8 --- /dev/null +++ b/TelcoAutomation/phpunit.xml.dist @@ -0,0 +1,16 @@ + + + + + tests/Unit + + + + + src + + src/V[!a-zA-Z]* + + + + diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/apply_deployment.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/apply_deployment.php new file mode 100644 index 000000000000..787c5231515c --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/apply_deployment.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Deployment $response */ + $response = $telcoAutomationClient->applyDeployment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 = TelcoAutomationClient::deploymentName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[DEPLOYMENT]' + ); + + apply_deployment_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ApplyDeployment_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/apply_hydrated_deployment.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/apply_hydrated_deployment.php new file mode 100644 index 000000000000..d5073581b795 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/apply_hydrated_deployment.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var HydratedDeployment $response */ + $response = $telcoAutomationClient->applyHydratedDeployment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 = TelcoAutomationClient::hydratedDeploymentName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[DEPLOYMENT]', + '[HYDRATED_DEPLOYMENT]' + ); + + apply_hydrated_deployment_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ApplyHydratedDeployment_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/approve_blueprint.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/approve_blueprint.php new file mode 100644 index 000000000000..3560236cca03 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/approve_blueprint.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Blueprint $response */ + $response = $telcoAutomationClient->approveBlueprint($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 = TelcoAutomationClient::blueprintName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[BLUEPRINT]' + ); + + approve_blueprint_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ApproveBlueprint_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/compute_deployment_status.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/compute_deployment_status.php new file mode 100644 index 000000000000..87b71115fe54 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/compute_deployment_status.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ComputeDeploymentStatusResponse $response */ + $response = $telcoAutomationClient->computeDeploymentStatus($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 = TelcoAutomationClient::deploymentName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[DEPLOYMENT]' + ); + + compute_deployment_status_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ComputeDeploymentStatus_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/create_blueprint.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/create_blueprint.php new file mode 100644 index 000000000000..f2e59ac2d76d --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/create_blueprint.php @@ -0,0 +1,83 @@ +setSourceBlueprint($blueprintSourceBlueprint); + $request = (new CreateBlueprintRequest()) + ->setParent($formattedParent) + ->setBlueprint($blueprint); + + // Call the API and handle any network failures. + try { + /** @var Blueprint $response */ + $response = $telcoAutomationClient->createBlueprint($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 = TelcoAutomationClient::orchestrationClusterName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]' + ); + $blueprintSourceBlueprint = '[SOURCE_BLUEPRINT]'; + + create_blueprint_sample($formattedParent, $blueprintSourceBlueprint); +} +// [END telcoautomation_v1_generated_TelcoAutomation_CreateBlueprint_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/create_deployment.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/create_deployment.php new file mode 100644 index 000000000000..da68796ddb6d --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/create_deployment.php @@ -0,0 +1,84 @@ +setSourceBlueprintRevision($deploymentSourceBlueprintRevision); + $request = (new CreateDeploymentRequest()) + ->setParent($formattedParent) + ->setDeployment($deployment); + + // Call the API and handle any network failures. + try { + /** @var Deployment $response */ + $response = $telcoAutomationClient->createDeployment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = TelcoAutomationClient::orchestrationClusterName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]' + ); + $deploymentSourceBlueprintRevision = '[SOURCE_BLUEPRINT_REVISION]'; + + create_deployment_sample($formattedParent, $deploymentSourceBlueprintRevision); +} +// [END telcoautomation_v1_generated_TelcoAutomation_CreateDeployment_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/create_edge_slm.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/create_edge_slm.php new file mode 100644 index 000000000000..9215e96ab8a9 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/create_edge_slm.php @@ -0,0 +1,90 @@ +setParent($formattedParent) + ->setEdgeSlmId($edgeSlmId) + ->setEdgeSlm($edgeSlm); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $telcoAutomationClient->createEdgeSlm($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var EdgeSlm $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 = TelcoAutomationClient::locationName('[PROJECT]', '[LOCATION]'); + $edgeSlmId = '[EDGE_SLM_ID]'; + + create_edge_slm_sample($formattedParent, $edgeSlmId); +} +// [END telcoautomation_v1_generated_TelcoAutomation_CreateEdgeSlm_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/create_orchestration_cluster.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/create_orchestration_cluster.php new file mode 100644 index 000000000000..d74e2929a383 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/create_orchestration_cluster.php @@ -0,0 +1,92 @@ +setParent($formattedParent) + ->setOrchestrationClusterId($orchestrationClusterId) + ->setOrchestrationCluster($orchestrationCluster); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $telcoAutomationClient->createOrchestrationCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var OrchestrationCluster $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 = TelcoAutomationClient::locationName('[PROJECT]', '[LOCATION]'); + $orchestrationClusterId = '[ORCHESTRATION_CLUSTER_ID]'; + + create_orchestration_cluster_sample($formattedParent, $orchestrationClusterId); +} +// [END telcoautomation_v1_generated_TelcoAutomation_CreateOrchestrationCluster_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/delete_blueprint.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/delete_blueprint.php new file mode 100644 index 000000000000..8fb948ef3354 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/delete_blueprint.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $telcoAutomationClient->deleteBlueprint($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 = TelcoAutomationClient::blueprintName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[BLUEPRINT]' + ); + + delete_blueprint_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_DeleteBlueprint_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/delete_edge_slm.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/delete_edge_slm.php new file mode 100644 index 000000000000..d5d29934415c --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/delete_edge_slm.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $telcoAutomationClient->deleteEdgeSlm($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = TelcoAutomationClient::edgeSlmName('[PROJECT]', '[LOCATION]', '[EDGE_SLM]'); + + delete_edge_slm_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_DeleteEdgeSlm_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/delete_orchestration_cluster.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/delete_orchestration_cluster.php new file mode 100644 index 000000000000..9cfc0a3d0b51 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/delete_orchestration_cluster.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $telcoAutomationClient->deleteOrchestrationCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = TelcoAutomationClient::orchestrationClusterName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]' + ); + + delete_orchestration_cluster_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_DeleteOrchestrationCluster_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/discard_blueprint_changes.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/discard_blueprint_changes.php new file mode 100644 index 000000000000..f13634427441 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/discard_blueprint_changes.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DiscardBlueprintChangesResponse $response */ + $response = $telcoAutomationClient->discardBlueprintChanges($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 = TelcoAutomationClient::blueprintName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[BLUEPRINT]' + ); + + discard_blueprint_changes_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_DiscardBlueprintChanges_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/discard_deployment_changes.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/discard_deployment_changes.php new file mode 100644 index 000000000000..700d14e1f50c --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/discard_deployment_changes.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DiscardDeploymentChangesResponse $response */ + $response = $telcoAutomationClient->discardDeploymentChanges($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 = TelcoAutomationClient::deploymentName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[DEPLOYMENT]' + ); + + discard_deployment_changes_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_DiscardDeploymentChanges_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/get_blueprint.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/get_blueprint.php new file mode 100644 index 000000000000..6797ac743fea --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/get_blueprint.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Blueprint $response */ + $response = $telcoAutomationClient->getBlueprint($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 = TelcoAutomationClient::blueprintName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[BLUEPRINT]' + ); + + get_blueprint_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_GetBlueprint_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/get_deployment.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/get_deployment.php new file mode 100644 index 000000000000..8c071f1490f9 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/get_deployment.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Deployment $response */ + $response = $telcoAutomationClient->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 = TelcoAutomationClient::deploymentName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[DEPLOYMENT]' + ); + + get_deployment_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_GetDeployment_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/get_edge_slm.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/get_edge_slm.php new file mode 100644 index 000000000000..afb60006b4b3 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/get_edge_slm.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var EdgeSlm $response */ + $response = $telcoAutomationClient->getEdgeSlm($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 = TelcoAutomationClient::edgeSlmName('[PROJECT]', '[LOCATION]', '[EDGE_SLM]'); + + get_edge_slm_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_GetEdgeSlm_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/get_hydrated_deployment.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/get_hydrated_deployment.php new file mode 100644 index 000000000000..e4fdd4dbdfe6 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/get_hydrated_deployment.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var HydratedDeployment $response */ + $response = $telcoAutomationClient->getHydratedDeployment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 = TelcoAutomationClient::hydratedDeploymentName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[DEPLOYMENT]', + '[HYDRATED_DEPLOYMENT]' + ); + + get_hydrated_deployment_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_GetHydratedDeployment_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/get_location.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/get_location.php new file mode 100644 index 000000000000..7265cc4ba33e --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END telcoautomation_v1_generated_TelcoAutomation_GetLocation_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/get_orchestration_cluster.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/get_orchestration_cluster.php new file mode 100644 index 000000000000..e4d02ba17e36 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/get_orchestration_cluster.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OrchestrationCluster $response */ + $response = $telcoAutomationClient->getOrchestrationCluster($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 = TelcoAutomationClient::orchestrationClusterName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]' + ); + + get_orchestration_cluster_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_GetOrchestrationCluster_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/get_public_blueprint.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/get_public_blueprint.php new file mode 100644 index 000000000000..60490c4099d4 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/get_public_blueprint.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PublicBlueprint $response */ + $response = $telcoAutomationClient->getPublicBlueprint($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 = TelcoAutomationClient::publicBlueprintName( + '[PROJECT]', + '[LOCATION]', + '[PUBLIC_LUEPRINT]' + ); + + get_public_blueprint_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_GetPublicBlueprint_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/list_blueprint_revisions.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/list_blueprint_revisions.php new file mode 100644 index 000000000000..23c0b4886363 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/list_blueprint_revisions.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $telcoAutomationClient->listBlueprintRevisions($request); + + /** @var Blueprint $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = TelcoAutomationClient::blueprintName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[BLUEPRINT]' + ); + + list_blueprint_revisions_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ListBlueprintRevisions_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/list_blueprints.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/list_blueprints.php new file mode 100644 index 000000000000..e50cc18b87d9 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/list_blueprints.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $telcoAutomationClient->listBlueprints($request); + + /** @var Blueprint $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 = TelcoAutomationClient::orchestrationClusterName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]' + ); + + list_blueprints_sample($formattedParent); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ListBlueprints_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/list_deployment_revisions.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/list_deployment_revisions.php new file mode 100644 index 000000000000..8d10653dadfd --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/list_deployment_revisions.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $telcoAutomationClient->listDeploymentRevisions($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 +{ + $formattedName = TelcoAutomationClient::deploymentName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[DEPLOYMENT]' + ); + + list_deployment_revisions_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ListDeploymentRevisions_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/list_deployments.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/list_deployments.php new file mode 100644 index 000000000000..5d9a02e29183 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/list_deployments.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $telcoAutomationClient->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 = TelcoAutomationClient::orchestrationClusterName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]' + ); + + list_deployments_sample($formattedParent); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ListDeployments_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/list_edge_slms.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/list_edge_slms.php new file mode 100644 index 000000000000..ff3a85051122 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/list_edge_slms.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $telcoAutomationClient->listEdgeSlms($request); + + /** @var EdgeSlm $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 = TelcoAutomationClient::locationName('[PROJECT]', '[LOCATION]'); + + list_edge_slms_sample($formattedParent); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ListEdgeSlms_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/list_hydrated_deployments.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/list_hydrated_deployments.php new file mode 100644 index 000000000000..9a54619c896b --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/list_hydrated_deployments.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $telcoAutomationClient->listHydratedDeployments($request); + + /** @var HydratedDeployment $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 = TelcoAutomationClient::deploymentName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[DEPLOYMENT]' + ); + + list_hydrated_deployments_sample($formattedParent); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ListHydratedDeployments_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/list_locations.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/list_locations.php new file mode 100644 index 000000000000..ab0b00d6a425 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/list_locations.php @@ -0,0 +1,63 @@ +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()); + } +} +list_locations_sample(); +// [END telcoautomation_v1_generated_TelcoAutomation_ListLocations_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/list_orchestration_clusters.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/list_orchestration_clusters.php new file mode 100644 index 000000000000..55bb8d92a87f --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/list_orchestration_clusters.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $telcoAutomationClient->listOrchestrationClusters($request); + + /** @var OrchestrationCluster $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 = TelcoAutomationClient::locationName('[PROJECT]', '[LOCATION]'); + + list_orchestration_clusters_sample($formattedParent); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ListOrchestrationClusters_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/list_public_blueprints.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/list_public_blueprints.php new file mode 100644 index 000000000000..b6f25892b114 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/list_public_blueprints.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $telcoAutomationClient->listPublicBlueprints($request); + + /** @var PublicBlueprint $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 = TelcoAutomationClient::locationName('[PROJECT]', '[LOCATION]'); + + list_public_blueprints_sample($formattedParent); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ListPublicBlueprints_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/propose_blueprint.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/propose_blueprint.php new file mode 100644 index 000000000000..baccab1145ca --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/propose_blueprint.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Blueprint $response */ + $response = $telcoAutomationClient->proposeBlueprint($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 = TelcoAutomationClient::blueprintName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[BLUEPRINT]' + ); + + propose_blueprint_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ProposeBlueprint_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/reject_blueprint.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/reject_blueprint.php new file mode 100644 index 000000000000..6af809e9cd4f --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/reject_blueprint.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Blueprint $response */ + $response = $telcoAutomationClient->rejectBlueprint($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 = TelcoAutomationClient::blueprintName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[BLUEPRINT]' + ); + + reject_blueprint_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_RejectBlueprint_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/remove_deployment.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/remove_deployment.php new file mode 100644 index 000000000000..5a8aedba6798 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/remove_deployment.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $telcoAutomationClient->removeDeployment($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 = TelcoAutomationClient::deploymentName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[DEPLOYMENT]' + ); + + remove_deployment_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_RemoveDeployment_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/rollback_deployment.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/rollback_deployment.php new file mode 100644 index 000000000000..4767c246417e --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/rollback_deployment.php @@ -0,0 +1,80 @@ +setName($formattedName) + ->setRevisionId($revisionId); + + // Call the API and handle any network failures. + try { + /** @var Deployment $response */ + $response = $telcoAutomationClient->rollbackDeployment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 = TelcoAutomationClient::deploymentName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[DEPLOYMENT]' + ); + $revisionId = '[REVISION_ID]'; + + rollback_deployment_sample($formattedName, $revisionId); +} +// [END telcoautomation_v1_generated_TelcoAutomation_RollbackDeployment_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/search_blueprint_revisions.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/search_blueprint_revisions.php new file mode 100644 index 000000000000..54a299da4789 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/search_blueprint_revisions.php @@ -0,0 +1,91 @@ +" : Lists all revisions of blueprint with name + * . + * 4. "name= latest=true": Lists latest revision of blueprint with name + * + */ +function search_blueprint_revisions_sample(string $formattedParent, string $query): void +{ + // Create a client. + $telcoAutomationClient = new TelcoAutomationClient(); + + // Prepare the request message. + $request = (new SearchBlueprintRevisionsRequest()) + ->setParent($formattedParent) + ->setQuery($query); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $telcoAutomationClient->searchBlueprintRevisions($request); + + /** @var Blueprint $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 = TelcoAutomationClient::orchestrationClusterName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]' + ); + $query = '[QUERY]'; + + search_blueprint_revisions_sample($formattedParent, $query); +} +// [END telcoautomation_v1_generated_TelcoAutomation_SearchBlueprintRevisions_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/search_deployment_revisions.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/search_deployment_revisions.php new file mode 100644 index 000000000000..bef37a91fb1c --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/search_deployment_revisions.php @@ -0,0 +1,92 @@ +" : Lists all revisions of deployment with name + * . + * 4. "name= latest=true": Lists latest revision of deployment with name + * + */ +function search_deployment_revisions_sample(string $formattedParent, string $query): void +{ + // Create a client. + $telcoAutomationClient = new TelcoAutomationClient(); + + // Prepare the request message. + $request = (new SearchDeploymentRevisionsRequest()) + ->setParent($formattedParent) + ->setQuery($query); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $telcoAutomationClient->searchDeploymentRevisions($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 = TelcoAutomationClient::orchestrationClusterName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]' + ); + $query = '[QUERY]'; + + search_deployment_revisions_sample($formattedParent, $query); +} +// [END telcoautomation_v1_generated_TelcoAutomation_SearchDeploymentRevisions_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/update_blueprint.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/update_blueprint.php new file mode 100644 index 000000000000..7b13001a2991 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/update_blueprint.php @@ -0,0 +1,76 @@ +setSourceBlueprint($blueprintSourceBlueprint); + $updateMask = new FieldMask(); + $request = (new UpdateBlueprintRequest()) + ->setBlueprint($blueprint) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var Blueprint $response */ + $response = $telcoAutomationClient->updateBlueprint($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $blueprintSourceBlueprint = '[SOURCE_BLUEPRINT]'; + + update_blueprint_sample($blueprintSourceBlueprint); +} +// [END telcoautomation_v1_generated_TelcoAutomation_UpdateBlueprint_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/update_deployment.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/update_deployment.php new file mode 100644 index 000000000000..679dc2d93bfa --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/update_deployment.php @@ -0,0 +1,75 @@ +setSourceBlueprintRevision($deploymentSourceBlueprintRevision); + $updateMask = new FieldMask(); + $request = (new UpdateDeploymentRequest()) + ->setDeployment($deployment) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var Deployment $response */ + $response = $telcoAutomationClient->updateDeployment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $deploymentSourceBlueprintRevision = '[SOURCE_BLUEPRINT_REVISION]'; + + update_deployment_sample($deploymentSourceBlueprintRevision); +} +// [END telcoautomation_v1_generated_TelcoAutomation_UpdateDeployment_sync] diff --git a/TelcoAutomation/samples/V1/TelcoAutomationClient/update_hydrated_deployment.php b/TelcoAutomation/samples/V1/TelcoAutomationClient/update_hydrated_deployment.php new file mode 100644 index 000000000000..4bf979d49414 --- /dev/null +++ b/TelcoAutomation/samples/V1/TelcoAutomationClient/update_hydrated_deployment.php @@ -0,0 +1,62 @@ +setHydratedDeployment($hydratedDeployment) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var HydratedDeployment $response */ + $response = $telcoAutomationClient->updateHydratedDeployment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END telcoautomation_v1_generated_TelcoAutomation_UpdateHydratedDeployment_sync] diff --git a/TelcoAutomation/src/V1/ApplyDeploymentRequest.php b/TelcoAutomation/src/V1/ApplyDeploymentRequest.php new file mode 100644 index 000000000000..7a6a464b778d --- /dev/null +++ b/TelcoAutomation/src/V1/ApplyDeploymentRequest.php @@ -0,0 +1,83 @@ +google.cloud.telcoautomation.v1.ApplyDeploymentRequest + */ +class ApplyDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the deployment to apply to orchestration cluster. + * + * 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 to apply to orchestration cluster. Please see + * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ApplyDeploymentRequest + * + * @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 to apply to orchestration cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the deployment to apply to orchestration cluster. + * + * 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 to apply to orchestration cluster. + * + * 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/TelcoAutomation/src/V1/ApplyHydratedDeploymentRequest.php b/TelcoAutomation/src/V1/ApplyHydratedDeploymentRequest.php new file mode 100644 index 000000000000..bd968a50653a --- /dev/null +++ b/TelcoAutomation/src/V1/ApplyHydratedDeploymentRequest.php @@ -0,0 +1,81 @@ +google.cloud.telcoautomation.v1.ApplyHydratedDeploymentRequest + */ +class ApplyHydratedDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the hydrated deployment to apply. + * + * 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 hydrated deployment to apply. Please see + * {@see TelcoAutomationClient::hydratedDeploymentName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ApplyHydratedDeploymentRequest + * + * @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 hydrated deployment to apply. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the hydrated deployment to apply. + * + * 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 hydrated deployment to apply. + * + * 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/TelcoAutomation/src/V1/ApproveBlueprintRequest.php b/TelcoAutomation/src/V1/ApproveBlueprintRequest.php new file mode 100644 index 000000000000..c75363cccf22 --- /dev/null +++ b/TelcoAutomation/src/V1/ApproveBlueprintRequest.php @@ -0,0 +1,86 @@ +google.cloud.telcoautomation.v1.ApproveBlueprintRequest + */ +class ApproveBlueprintRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the blueprint to approve. The blueprint must be in + * Proposed state. A new revision is committed on approval. + * + * 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 blueprint to approve. The blueprint must be in + * Proposed state. A new revision is committed on approval. Please see + * {@see TelcoAutomationClient::blueprintName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ApproveBlueprintRequest + * + * @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 blueprint to approve. The blueprint must be in + * Proposed state. A new revision is committed on approval. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the blueprint to approve. The blueprint must be in + * Proposed state. A new revision is committed on approval. + * + * 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 blueprint to approve. The blueprint must be in + * Proposed state. A new revision is committed on approval. + * + * 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/TelcoAutomation/src/V1/Blueprint.php b/TelcoAutomation/src/V1/Blueprint.php new file mode 100644 index 000000000000..17a778e9c60f --- /dev/null +++ b/TelcoAutomation/src/V1/Blueprint.php @@ -0,0 +1,586 @@ +google.cloud.telcoautomation.v1.Blueprint + */ +class Blueprint extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the blueprint. If unspecified, the name will be autogenerated + * from server side. Name of the blueprint must not contain `@` character. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. Immutable. The revision ID of the blueprint. + * A new revision is committed whenever a blueprint is approved. + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $revision_id = ''; + /** + * Required. Immutable. The public blueprint ID from which this blueprint was + * created. + * + * Generated from protobuf field string source_blueprint = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $source_blueprint = ''; + /** + * Output only. The timestamp that the revision was created. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $revision_create_time = null; + /** + * Output only. Approval state of the blueprint (DRAFT, PROPOSED, APPROVED) + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint.ApprovalState approval_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $approval_state = 0; + /** + * Optional. Human readable name of a Blueprint. + * + * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Output only. Name of the repository where the blueprint files are stored. + * + * Generated from protobuf field string repository = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $repository = ''; + /** + * Optional. Files present in a blueprint. + * When invoking UpdateBlueprint API, only the modified files should be + * included in this. Files that are not included in the update of a blueprint + * will not be changed. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $files; + /** + * Optional. Labels are key-value attributes that can be set on a blueprint + * resource by the user. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Output only. Blueprint creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the blueprint was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Source provider is the author of a public blueprint, from + * which this blueprint is created. + * + * Generated from protobuf field string source_provider = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $source_provider = ''; + /** + * Output only. DeploymentLevel of a blueprint signifies where the blueprint + * will be applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $deployment_level = 0; + /** + * Output only. Indicates if the deployment created from this blueprint can be + * rolled back. + * + * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $rollback_support = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the blueprint. If unspecified, the name will be autogenerated + * from server side. Name of the blueprint must not contain `@` character. + * @type string $revision_id + * Output only. Immutable. The revision ID of the blueprint. + * A new revision is committed whenever a blueprint is approved. + * @type string $source_blueprint + * Required. Immutable. The public blueprint ID from which this blueprint was + * created. + * @type \Google\Protobuf\Timestamp $revision_create_time + * Output only. The timestamp that the revision was created. + * @type int $approval_state + * Output only. Approval state of the blueprint (DRAFT, PROPOSED, APPROVED) + * @type string $display_name + * Optional. Human readable name of a Blueprint. + * @type string $repository + * Output only. Name of the repository where the blueprint files are stored. + * @type array<\Google\Cloud\TelcoAutomation\V1\File>|\Google\Protobuf\Internal\RepeatedField $files + * Optional. Files present in a blueprint. + * When invoking UpdateBlueprint API, only the modified files should be + * included in this. Files that are not included in the update of a blueprint + * will not be changed. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels are key-value attributes that can be set on a blueprint + * resource by the user. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Blueprint creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the blueprint was updated. + * @type string $source_provider + * Output only. Source provider is the author of a public blueprint, from + * which this blueprint is created. + * @type int $deployment_level + * Output only. DeploymentLevel of a blueprint signifies where the blueprint + * will be applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] + * @type bool $rollback_support + * Output only. Indicates if the deployment created from this blueprint can be + * rolled back. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The name of the blueprint. If unspecified, the name will be autogenerated + * from server side. Name of the blueprint must not contain `@` character. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the blueprint. If unspecified, the name will be autogenerated + * from server side. Name of the blueprint must not contain `@` character. + * + * 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. Immutable. The revision ID of the blueprint. + * A new revision is committed whenever a blueprint is approved. + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRevisionId() + { + return $this->revision_id; + } + + /** + * Output only. Immutable. The revision ID of the blueprint. + * A new revision is committed whenever a blueprint is approved. + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRevisionId($var) + { + GPBUtil::checkString($var, True); + $this->revision_id = $var; + + return $this; + } + + /** + * Required. Immutable. The public blueprint ID from which this blueprint was + * created. + * + * Generated from protobuf field string source_blueprint = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getSourceBlueprint() + { + return $this->source_blueprint; + } + + /** + * Required. Immutable. The public blueprint ID from which this blueprint was + * created. + * + * Generated from protobuf field string source_blueprint = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setSourceBlueprint($var) + { + GPBUtil::checkString($var, True); + $this->source_blueprint = $var; + + return $this; + } + + /** + * Output only. The timestamp that the revision was created. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRevisionCreateTime() + { + return $this->revision_create_time; + } + + public function hasRevisionCreateTime() + { + return isset($this->revision_create_time); + } + + public function clearRevisionCreateTime() + { + unset($this->revision_create_time); + } + + /** + * Output only. The timestamp that the revision was created. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRevisionCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->revision_create_time = $var; + + return $this; + } + + /** + * Output only. Approval state of the blueprint (DRAFT, PROPOSED, APPROVED) + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint.ApprovalState approval_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getApprovalState() + { + return $this->approval_state; + } + + /** + * Output only. Approval state of the blueprint (DRAFT, PROPOSED, APPROVED) + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint.ApprovalState approval_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setApprovalState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\Blueprint\ApprovalState::class); + $this->approval_state = $var; + + return $this; + } + + /** + * Optional. Human readable name of a Blueprint. + * + * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. Human readable name of a Blueprint. + * + * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. Name of the repository where the blueprint files are stored. + * + * Generated from protobuf field string repository = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRepository() + { + return $this->repository; + } + + /** + * Output only. Name of the repository where the blueprint files are stored. + * + * Generated from protobuf field string repository = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRepository($var) + { + GPBUtil::checkString($var, True); + $this->repository = $var; + + return $this; + } + + /** + * Optional. Files present in a blueprint. + * When invoking UpdateBlueprint API, only the modified files should be + * included in this. Files that are not included in the update of a blueprint + * will not be changed. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFiles() + { + return $this->files; + } + + /** + * Optional. Files present in a blueprint. + * When invoking UpdateBlueprint API, only the modified files should be + * included in this. Files that are not included in the update of a blueprint + * will not be changed. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\TelcoAutomation\V1\File>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFiles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\File::class); + $this->files = $arr; + + return $this; + } + + /** + * Optional. Labels are key-value attributes that can be set on a blueprint + * resource by the user. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels are key-value attributes that can be set on a blueprint + * resource by the user. + * + * Generated from protobuf field map labels = 10 [(.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. Blueprint creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Blueprint creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the blueprint was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp when the blueprint was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. Source provider is the author of a public blueprint, from + * which this blueprint is created. + * + * Generated from protobuf field string source_provider = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSourceProvider() + { + return $this->source_provider; + } + + /** + * Output only. Source provider is the author of a public blueprint, from + * which this blueprint is created. + * + * Generated from protobuf field string source_provider = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSourceProvider($var) + { + GPBUtil::checkString($var, True); + $this->source_provider = $var; + + return $this; + } + + /** + * Output only. DeploymentLevel of a blueprint signifies where the blueprint + * will be applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getDeploymentLevel() + { + return $this->deployment_level; + } + + /** + * Output only. DeploymentLevel of a blueprint signifies where the blueprint + * will be applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDeploymentLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\DeploymentLevel::class); + $this->deployment_level = $var; + + return $this; + } + + /** + * Output only. Indicates if the deployment created from this blueprint can be + * rolled back. + * + * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRollbackSupport() + { + return $this->rollback_support; + } + + /** + * Output only. Indicates if the deployment created from this blueprint can be + * rolled back. + * + * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRollbackSupport($var) + { + GPBUtil::checkBool($var); + $this->rollback_support = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/Blueprint/ApprovalState.php b/TelcoAutomation/src/V1/Blueprint/ApprovalState.php new file mode 100644 index 000000000000..c53b63ac63f5 --- /dev/null +++ b/TelcoAutomation/src/V1/Blueprint/ApprovalState.php @@ -0,0 +1,76 @@ +google.cloud.telcoautomation.v1.Blueprint.ApprovalState + */ +class ApprovalState +{ + /** + * Unspecified state. + * + * Generated from protobuf enum APPROVAL_STATE_UNSPECIFIED = 0; + */ + const APPROVAL_STATE_UNSPECIFIED = 0; + /** + * A blueprint starts in DRAFT state once it is created. All edits are made + * to the blueprint in DRAFT state. + * + * Generated from protobuf enum DRAFT = 1; + */ + const DRAFT = 1; + /** + * When the edits are ready for review, blueprint can be proposed and moves + * to PROPOSED state. Edits cannot be made to a blueprint in PROPOSED state. + * + * Generated from protobuf enum PROPOSED = 2; + */ + const PROPOSED = 2; + /** + * When a proposed blueprint is approved, it moves to APPROVED state. A new + * revision is committed. The latest committed revision can be used to + * create a deployment on Orchestration or Workload Cluster. Edits to an + * APPROVED blueprint changes its state back to DRAFT. The last committed + * revision of a blueprint represents its latest APPROVED state. + * + * Generated from protobuf enum APPROVED = 3; + */ + const APPROVED = 3; + + private static $valueToName = [ + self::APPROVAL_STATE_UNSPECIFIED => 'APPROVAL_STATE_UNSPECIFIED', + self::DRAFT => 'DRAFT', + self::PROPOSED => 'PROPOSED', + self::APPROVED => 'APPROVED', + ]; + + 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/TelcoAutomation/src/V1/BlueprintView.php b/TelcoAutomation/src/V1/BlueprintView.php new file mode 100644 index 000000000000..d7586bd49f05 --- /dev/null +++ b/TelcoAutomation/src/V1/BlueprintView.php @@ -0,0 +1,61 @@ +google.cloud.telcoautomation.v1.BlueprintView + */ +class BlueprintView +{ + /** + * Unspecified enum value. + * + * Generated from protobuf enum BLUEPRINT_VIEW_UNSPECIFIED = 0; + */ + const BLUEPRINT_VIEW_UNSPECIFIED = 0; + /** + * View which only contains metadata. + * + * Generated from protobuf enum BLUEPRINT_VIEW_BASIC = 1; + */ + const BLUEPRINT_VIEW_BASIC = 1; + /** + * View which contains metadata and files it encapsulates. + * + * Generated from protobuf enum BLUEPRINT_VIEW_FULL = 2; + */ + const BLUEPRINT_VIEW_FULL = 2; + + private static $valueToName = [ + self::BLUEPRINT_VIEW_UNSPECIFIED => 'BLUEPRINT_VIEW_UNSPECIFIED', + self::BLUEPRINT_VIEW_BASIC => 'BLUEPRINT_VIEW_BASIC', + self::BLUEPRINT_VIEW_FULL => 'BLUEPRINT_VIEW_FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/TelcoAutomation/src/V1/Client/TelcoAutomationClient.php b/TelcoAutomation/src/V1/Client/TelcoAutomationClient.php new file mode 100644 index 000000000000..7ab51978c5d9 --- /dev/null +++ b/TelcoAutomation/src/V1/Client/TelcoAutomationClient.php @@ -0,0 +1,1465 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/telco_automation_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/telco_automation_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/telco_automation_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/telco_automation_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a blueprint + * resource. + * + * @param string $project + * @param string $location + * @param string $orchestrationCluster + * @param string $blueprint + * + * @return string The formatted blueprint resource. + */ + public static function blueprintName(string $project, string $location, string $orchestrationCluster, string $blueprint): string + { + return self::getPathTemplate('blueprint')->render([ + 'project' => $project, + 'location' => $location, + 'orchestration_cluster' => $orchestrationCluster, + 'blueprint' => $blueprint, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a deployment + * resource. + * + * @param string $project + * @param string $location + * @param string $orchestrationCluster + * @param string $deployment + * + * @return string The formatted deployment resource. + */ + public static function deploymentName(string $project, string $location, string $orchestrationCluster, string $deployment): string + { + return self::getPathTemplate('deployment')->render([ + 'project' => $project, + 'location' => $location, + 'orchestration_cluster' => $orchestrationCluster, + 'deployment' => $deployment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a edge_slm + * resource. + * + * @param string $project + * @param string $location + * @param string $edgeSlm + * + * @return string The formatted edge_slm resource. + */ + public static function edgeSlmName(string $project, string $location, string $edgeSlm): string + { + return self::getPathTemplate('edgeSlm')->render([ + 'project' => $project, + 'location' => $location, + 'edge_slm' => $edgeSlm, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * hydrated_deployment resource. + * + * @param string $project + * @param string $location + * @param string $orchestrationCluster + * @param string $deployment + * @param string $hydratedDeployment + * + * @return string The formatted hydrated_deployment resource. + */ + public static function hydratedDeploymentName(string $project, string $location, string $orchestrationCluster, string $deployment, string $hydratedDeployment): string + { + return self::getPathTemplate('hydratedDeployment')->render([ + 'project' => $project, + 'location' => $location, + 'orchestration_cluster' => $orchestrationCluster, + 'deployment' => $deployment, + 'hydrated_deployment' => $hydratedDeployment, + ]); + } + + /** + * 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 + * orchestration_cluster resource. + * + * @param string $project + * @param string $location + * @param string $orchestrationCluster + * + * @return string The formatted orchestration_cluster resource. + */ + public static function orchestrationClusterName(string $project, string $location, string $orchestrationCluster): string + { + return self::getPathTemplate('orchestrationCluster')->render([ + 'project' => $project, + 'location' => $location, + 'orchestration_cluster' => $orchestrationCluster, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * public_blueprint resource. + * + * @param string $project + * @param string $location + * @param string $publicLueprint + * + * @return string The formatted public_blueprint resource. + */ + public static function publicBlueprintName(string $project, string $location, string $publicLueprint): string + { + return self::getPathTemplate('publicBlueprint')->render([ + 'project' => $project, + 'location' => $location, + 'public_lueprint' => $publicLueprint, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - blueprint: projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/blueprints/{blueprint} + * - deployment: projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/deployments/{deployment} + * - edgeSlm: projects/{project}/locations/{location}/edgeSlms/{edge_slm} + * - hydratedDeployment: projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/deployments/{deployment}/hydratedDeployments/{hydrated_deployment} + * - location: projects/{project}/locations/{location} + * - orchestrationCluster: projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster} + * - publicBlueprint: projects/{project}/locations/{location}/publicBlueprints/{public_lueprint} + * + * 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 'telcoautomation.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** 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); + } + + /** + * Applies the deployment's YAML files to the parent orchestration cluster. + * + * The async variant is {@see TelcoAutomationClient::applyDeploymentAsync()} . + * + * @example samples/V1/TelcoAutomationClient/apply_deployment.php + * + * @param ApplyDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 applyDeployment(ApplyDeploymentRequest $request, array $callOptions = []): Deployment + { + return $this->startApiCall('ApplyDeployment', $request, $callOptions)->wait(); + } + + /** + * Applies a hydrated deployment to a workload cluster. + * + * The async variant is + * {@see TelcoAutomationClient::applyHydratedDeploymentAsync()} . + * + * @example samples/V1/TelcoAutomationClient/apply_hydrated_deployment.php + * + * @param ApplyHydratedDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return HydratedDeployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function applyHydratedDeployment(ApplyHydratedDeploymentRequest $request, array $callOptions = []): HydratedDeployment + { + return $this->startApiCall('ApplyHydratedDeployment', $request, $callOptions)->wait(); + } + + /** + * Approves a blueprint and commits a new revision. + * + * The async variant is {@see TelcoAutomationClient::approveBlueprintAsync()} . + * + * @example samples/V1/TelcoAutomationClient/approve_blueprint.php + * + * @param ApproveBlueprintRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Blueprint + * + * @throws ApiException Thrown if the API call fails. + */ + public function approveBlueprint(ApproveBlueprintRequest $request, array $callOptions = []): Blueprint + { + return $this->startApiCall('ApproveBlueprint', $request, $callOptions)->wait(); + } + + /** + * Returns the requested deployment status. + * + * The async variant is + * {@see TelcoAutomationClient::computeDeploymentStatusAsync()} . + * + * @example samples/V1/TelcoAutomationClient/compute_deployment_status.php + * + * @param ComputeDeploymentStatusRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ComputeDeploymentStatusResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function computeDeploymentStatus(ComputeDeploymentStatusRequest $request, array $callOptions = []): ComputeDeploymentStatusResponse + { + return $this->startApiCall('ComputeDeploymentStatus', $request, $callOptions)->wait(); + } + + /** + * Creates a blueprint. + * + * The async variant is {@see TelcoAutomationClient::createBlueprintAsync()} . + * + * @example samples/V1/TelcoAutomationClient/create_blueprint.php + * + * @param CreateBlueprintRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Blueprint + * + * @throws ApiException Thrown if the API call fails. + */ + public function createBlueprint(CreateBlueprintRequest $request, array $callOptions = []): Blueprint + { + return $this->startApiCall('CreateBlueprint', $request, $callOptions)->wait(); + } + + /** + * Creates a deployment. + * + * The async variant is {@see TelcoAutomationClient::createDeploymentAsync()} . + * + * @example samples/V1/TelcoAutomationClient/create_deployment.php + * + * @param CreateDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Deployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function createDeployment(CreateDeploymentRequest $request, array $callOptions = []): Deployment + { + return $this->startApiCall('CreateDeployment', $request, $callOptions)->wait(); + } + + /** + * Creates a new EdgeSlm in a given project and location. + * + * The async variant is {@see TelcoAutomationClient::createEdgeSlmAsync()} . + * + * @example samples/V1/TelcoAutomationClient/create_edge_slm.php + * + * @param CreateEdgeSlmRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createEdgeSlm(CreateEdgeSlmRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateEdgeSlm', $request, $callOptions)->wait(); + } + + /** + * Creates a new OrchestrationCluster in a given project and location. + * + * The async variant is + * {@see TelcoAutomationClient::createOrchestrationClusterAsync()} . + * + * @example samples/V1/TelcoAutomationClient/create_orchestration_cluster.php + * + * @param CreateOrchestrationClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createOrchestrationCluster(CreateOrchestrationClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateOrchestrationCluster', $request, $callOptions)->wait(); + } + + /** + * Deletes a blueprint and all its revisions. + * + * The async variant is {@see TelcoAutomationClient::deleteBlueprintAsync()} . + * + * @example samples/V1/TelcoAutomationClient/delete_blueprint.php + * + * @param DeleteBlueprintRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteBlueprint(DeleteBlueprintRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteBlueprint', $request, $callOptions)->wait(); + } + + /** + * Deletes a single EdgeSlm. + * + * The async variant is {@see TelcoAutomationClient::deleteEdgeSlmAsync()} . + * + * @example samples/V1/TelcoAutomationClient/delete_edge_slm.php + * + * @param DeleteEdgeSlmRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteEdgeSlm(DeleteEdgeSlmRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteEdgeSlm', $request, $callOptions)->wait(); + } + + /** + * Deletes a single OrchestrationCluster. + * + * The async variant is + * {@see TelcoAutomationClient::deleteOrchestrationClusterAsync()} . + * + * @example samples/V1/TelcoAutomationClient/delete_orchestration_cluster.php + * + * @param DeleteOrchestrationClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteOrchestrationCluster(DeleteOrchestrationClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteOrchestrationCluster', $request, $callOptions)->wait(); + } + + /** + * Discards the changes in a blueprint and reverts the blueprint to the last + * approved blueprint revision. No changes take place if a blueprint does not + * have revisions. + * + * The async variant is + * {@see TelcoAutomationClient::discardBlueprintChangesAsync()} . + * + * @example samples/V1/TelcoAutomationClient/discard_blueprint_changes.php + * + * @param DiscardBlueprintChangesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DiscardBlueprintChangesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function discardBlueprintChanges(DiscardBlueprintChangesRequest $request, array $callOptions = []): DiscardBlueprintChangesResponse + { + return $this->startApiCall('DiscardBlueprintChanges', $request, $callOptions)->wait(); + } + + /** + * Discards the changes in a deployment and reverts the deployment to the last + * approved deployment revision. No changes take place if a deployment does + * not have revisions. + * + * The async variant is + * {@see TelcoAutomationClient::discardDeploymentChangesAsync()} . + * + * @example samples/V1/TelcoAutomationClient/discard_deployment_changes.php + * + * @param DiscardDeploymentChangesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DiscardDeploymentChangesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function discardDeploymentChanges(DiscardDeploymentChangesRequest $request, array $callOptions = []): DiscardDeploymentChangesResponse + { + return $this->startApiCall('DiscardDeploymentChanges', $request, $callOptions)->wait(); + } + + /** + * Returns the requested blueprint. + * + * The async variant is {@see TelcoAutomationClient::getBlueprintAsync()} . + * + * @example samples/V1/TelcoAutomationClient/get_blueprint.php + * + * @param GetBlueprintRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Blueprint + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBlueprint(GetBlueprintRequest $request, array $callOptions = []): Blueprint + { + return $this->startApiCall('GetBlueprint', $request, $callOptions)->wait(); + } + + /** + * Returns the requested deployment. + * + * The async variant is {@see TelcoAutomationClient::getDeploymentAsync()} . + * + * @example samples/V1/TelcoAutomationClient/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 of a single EdgeSlm. + * + * The async variant is {@see TelcoAutomationClient::getEdgeSlmAsync()} . + * + * @example samples/V1/TelcoAutomationClient/get_edge_slm.php + * + * @param GetEdgeSlmRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EdgeSlm + * + * @throws ApiException Thrown if the API call fails. + */ + public function getEdgeSlm(GetEdgeSlmRequest $request, array $callOptions = []): EdgeSlm + { + return $this->startApiCall('GetEdgeSlm', $request, $callOptions)->wait(); + } + + /** + * Returns the requested hydrated deployment. + * + * The async variant is {@see TelcoAutomationClient::getHydratedDeploymentAsync()} + * . + * + * @example samples/V1/TelcoAutomationClient/get_hydrated_deployment.php + * + * @param GetHydratedDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return HydratedDeployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getHydratedDeployment(GetHydratedDeploymentRequest $request, array $callOptions = []): HydratedDeployment + { + return $this->startApiCall('GetHydratedDeployment', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single OrchestrationCluster. + * + * The async variant is + * {@see TelcoAutomationClient::getOrchestrationClusterAsync()} . + * + * @example samples/V1/TelcoAutomationClient/get_orchestration_cluster.php + * + * @param GetOrchestrationClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OrchestrationCluster + * + * @throws ApiException Thrown if the API call fails. + */ + public function getOrchestrationCluster(GetOrchestrationClusterRequest $request, array $callOptions = []): OrchestrationCluster + { + return $this->startApiCall('GetOrchestrationCluster', $request, $callOptions)->wait(); + } + + /** + * Returns the requested public blueprint. + * + * The async variant is {@see TelcoAutomationClient::getPublicBlueprintAsync()} . + * + * @example samples/V1/TelcoAutomationClient/get_public_blueprint.php + * + * @param GetPublicBlueprintRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PublicBlueprint + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPublicBlueprint(GetPublicBlueprintRequest $request, array $callOptions = []): PublicBlueprint + { + return $this->startApiCall('GetPublicBlueprint', $request, $callOptions)->wait(); + } + + /** + * List blueprint revisions of a given blueprint. + * + * The async variant is {@see TelcoAutomationClient::listBlueprintRevisionsAsync()} + * . + * + * @example samples/V1/TelcoAutomationClient/list_blueprint_revisions.php + * + * @param ListBlueprintRevisionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listBlueprintRevisions(ListBlueprintRevisionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListBlueprintRevisions', $request, $callOptions); + } + + /** + * List all blueprints. + * + * The async variant is {@see TelcoAutomationClient::listBlueprintsAsync()} . + * + * @example samples/V1/TelcoAutomationClient/list_blueprints.php + * + * @param ListBlueprintsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listBlueprints(ListBlueprintsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListBlueprints', $request, $callOptions); + } + + /** + * List deployment revisions of a given deployment. + * + * The async variant is + * {@see TelcoAutomationClient::listDeploymentRevisionsAsync()} . + * + * @example samples/V1/TelcoAutomationClient/list_deployment_revisions.php + * + * @param ListDeploymentRevisionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listDeploymentRevisions(ListDeploymentRevisionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDeploymentRevisions', $request, $callOptions); + } + + /** + * List all deployments. + * + * The async variant is {@see TelcoAutomationClient::listDeploymentsAsync()} . + * + * @example samples/V1/TelcoAutomationClient/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 EdgeSlms in a given project and location. + * + * The async variant is {@see TelcoAutomationClient::listEdgeSlmsAsync()} . + * + * @example samples/V1/TelcoAutomationClient/list_edge_slms.php + * + * @param ListEdgeSlmsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listEdgeSlms(ListEdgeSlmsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListEdgeSlms', $request, $callOptions); + } + + /** + * List all hydrated deployments present under a deployment. + * + * The async variant is + * {@see TelcoAutomationClient::listHydratedDeploymentsAsync()} . + * + * @example samples/V1/TelcoAutomationClient/list_hydrated_deployments.php + * + * @param ListHydratedDeploymentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listHydratedDeployments(ListHydratedDeploymentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListHydratedDeployments', $request, $callOptions); + } + + /** + * Lists OrchestrationClusters in a given project and location. + * + * The async variant is + * {@see TelcoAutomationClient::listOrchestrationClustersAsync()} . + * + * @example samples/V1/TelcoAutomationClient/list_orchestration_clusters.php + * + * @param ListOrchestrationClustersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listOrchestrationClusters(ListOrchestrationClustersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListOrchestrationClusters', $request, $callOptions); + } + + /** + * Lists the blueprints in TNA's public catalog. Default page size = 20, + * Max Page Size = 100. + * + * The async variant is {@see TelcoAutomationClient::listPublicBlueprintsAsync()} . + * + * @example samples/V1/TelcoAutomationClient/list_public_blueprints.php + * + * @param ListPublicBlueprintsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listPublicBlueprints(ListPublicBlueprintsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPublicBlueprints', $request, $callOptions); + } + + /** + * Proposes a blueprint for approval of changes. + * + * The async variant is {@see TelcoAutomationClient::proposeBlueprintAsync()} . + * + * @example samples/V1/TelcoAutomationClient/propose_blueprint.php + * + * @param ProposeBlueprintRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Blueprint + * + * @throws ApiException Thrown if the API call fails. + */ + public function proposeBlueprint(ProposeBlueprintRequest $request, array $callOptions = []): Blueprint + { + return $this->startApiCall('ProposeBlueprint', $request, $callOptions)->wait(); + } + + /** + * Rejects a blueprint revision proposal and flips it back to Draft state. + * + * The async variant is {@see TelcoAutomationClient::rejectBlueprintAsync()} . + * + * @example samples/V1/TelcoAutomationClient/reject_blueprint.php + * + * @param RejectBlueprintRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Blueprint + * + * @throws ApiException Thrown if the API call fails. + */ + public function rejectBlueprint(RejectBlueprintRequest $request, array $callOptions = []): Blueprint + { + return $this->startApiCall('RejectBlueprint', $request, $callOptions)->wait(); + } + + /** + * Removes the deployment by marking it as DELETING. Post which deployment and + * it's revisions gets deleted. + * + * The async variant is {@see TelcoAutomationClient::removeDeploymentAsync()} . + * + * @example samples/V1/TelcoAutomationClient/remove_deployment.php + * + * @param RemoveDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 removeDeployment(RemoveDeploymentRequest $request, array $callOptions = []): void + { + $this->startApiCall('RemoveDeployment', $request, $callOptions)->wait(); + } + + /** + * Rollback the active deployment to the given past approved deployment + * revision. + * + * The async variant is {@see TelcoAutomationClient::rollbackDeploymentAsync()} . + * + * @example samples/V1/TelcoAutomationClient/rollback_deployment.php + * + * @param RollbackDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 rollbackDeployment(RollbackDeploymentRequest $request, array $callOptions = []): Deployment + { + return $this->startApiCall('RollbackDeployment', $request, $callOptions)->wait(); + } + + /** + * Searches across blueprint revisions. + * + * The async variant is + * {@see TelcoAutomationClient::searchBlueprintRevisionsAsync()} . + * + * @example samples/V1/TelcoAutomationClient/search_blueprint_revisions.php + * + * @param SearchBlueprintRevisionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 searchBlueprintRevisions(SearchBlueprintRevisionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('SearchBlueprintRevisions', $request, $callOptions); + } + + /** + * Searches across deployment revisions. + * + * The async variant is + * {@see TelcoAutomationClient::searchDeploymentRevisionsAsync()} . + * + * @example samples/V1/TelcoAutomationClient/search_deployment_revisions.php + * + * @param SearchDeploymentRevisionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 searchDeploymentRevisions(SearchDeploymentRevisionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('SearchDeploymentRevisions', $request, $callOptions); + } + + /** + * Updates a blueprint. + * + * The async variant is {@see TelcoAutomationClient::updateBlueprintAsync()} . + * + * @example samples/V1/TelcoAutomationClient/update_blueprint.php + * + * @param UpdateBlueprintRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Blueprint + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateBlueprint(UpdateBlueprintRequest $request, array $callOptions = []): Blueprint + { + return $this->startApiCall('UpdateBlueprint', $request, $callOptions)->wait(); + } + + /** + * Updates a deployment. + * + * The async variant is {@see TelcoAutomationClient::updateDeploymentAsync()} . + * + * @example samples/V1/TelcoAutomationClient/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 Deployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateDeployment(UpdateDeploymentRequest $request, array $callOptions = []): Deployment + { + return $this->startApiCall('UpdateDeployment', $request, $callOptions)->wait(); + } + + /** + * Updates a hydrated deployment. + * + * The async variant is + * {@see TelcoAutomationClient::updateHydratedDeploymentAsync()} . + * + * @example samples/V1/TelcoAutomationClient/update_hydrated_deployment.php + * + * @param UpdateHydratedDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return HydratedDeployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateHydratedDeployment(UpdateHydratedDeploymentRequest $request, array $callOptions = []): HydratedDeployment + { + return $this->startApiCall('UpdateHydratedDeployment', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see TelcoAutomationClient::getLocationAsync()} . + * + * @example samples/V1/TelcoAutomationClient/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 TelcoAutomationClient::listLocationsAsync()} . + * + * @example samples/V1/TelcoAutomationClient/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); + } +} diff --git a/TelcoAutomation/src/V1/ComputeDeploymentStatusRequest.php b/TelcoAutomation/src/V1/ComputeDeploymentStatusRequest.php new file mode 100644 index 000000000000..c517f57b7d9c --- /dev/null +++ b/TelcoAutomation/src/V1/ComputeDeploymentStatusRequest.php @@ -0,0 +1,81 @@ +google.cloud.telcoautomation.v1.ComputeDeploymentStatusRequest + */ +class ComputeDeploymentStatusRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the deployment without revisionID. + * + * 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 without revisionID. Please see + * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ComputeDeploymentStatusRequest + * + * @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 without revisionID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the deployment without revisionID. + * + * 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 without revisionID. + * + * 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/TelcoAutomation/src/V1/ComputeDeploymentStatusResponse.php b/TelcoAutomation/src/V1/ComputeDeploymentStatusResponse.php new file mode 100644 index 000000000000..0822acdbd981 --- /dev/null +++ b/TelcoAutomation/src/V1/ComputeDeploymentStatusResponse.php @@ -0,0 +1,135 @@ +google.cloud.telcoautomation.v1.ComputeDeploymentStatusResponse + */ +class ComputeDeploymentStatusResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the deployment. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. Aggregated status of a deployment. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Status aggregated_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $aggregated_status = 0; + /** + * Output only. Resource level status details in deployments. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.ResourceStatus resource_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $resource_statuses; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the deployment. + * @type int $aggregated_status + * Output only. Aggregated status of a deployment. + * @type array<\Google\Cloud\TelcoAutomation\V1\ResourceStatus>|\Google\Protobuf\Internal\RepeatedField $resource_statuses + * Output only. Resource level status details in deployments. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The name of the deployment. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the 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. Aggregated status of a deployment. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Status aggregated_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getAggregatedStatus() + { + return $this->aggregated_status; + } + + /** + * Output only. Aggregated status of a deployment. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Status aggregated_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setAggregatedStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\Status::class); + $this->aggregated_status = $var; + + return $this; + } + + /** + * Output only. Resource level status details in deployments. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.ResourceStatus resource_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResourceStatuses() + { + return $this->resource_statuses; + } + + /** + * Output only. Resource level status details in deployments. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.ResourceStatus resource_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\TelcoAutomation\V1\ResourceStatus>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResourceStatuses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\ResourceStatus::class); + $this->resource_statuses = $arr; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/CreateBlueprintRequest.php b/TelcoAutomation/src/V1/CreateBlueprintRequest.php new file mode 100644 index 000000000000..358159e75a04 --- /dev/null +++ b/TelcoAutomation/src/V1/CreateBlueprintRequest.php @@ -0,0 +1,173 @@ +google.cloud.telcoautomation.v1.CreateBlueprintRequest + */ +class CreateBlueprintRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of parent resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The name of the blueprint. + * + * Generated from protobuf field string blueprint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $blueprint_id = ''; + /** + * Required. The `Blueprint` to create. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint blueprint = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $blueprint = null; + + /** + * @param string $parent Required. The name of parent resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". Please see + * {@see TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. + * @param \Google\Cloud\TelcoAutomation\V1\Blueprint $blueprint Required. The `Blueprint` to create. + * @param string $blueprintId Optional. The name of the blueprint. + * + * @return \Google\Cloud\TelcoAutomation\V1\CreateBlueprintRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\TelcoAutomation\V1\Blueprint $blueprint, string $blueprintId): self + { + return (new self()) + ->setParent($parent) + ->setBlueprint($blueprint) + ->setBlueprintId($blueprintId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of parent resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * @type string $blueprint_id + * Optional. The name of the blueprint. + * @type \Google\Cloud\TelcoAutomation\V1\Blueprint $blueprint + * Required. The `Blueprint` to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of parent resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of parent resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * 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 name of the blueprint. + * + * Generated from protobuf field string blueprint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBlueprintId() + { + return $this->blueprint_id; + } + + /** + * Optional. The name of the blueprint. + * + * Generated from protobuf field string blueprint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setBlueprintId($var) + { + GPBUtil::checkString($var, True); + $this->blueprint_id = $var; + + return $this; + } + + /** + * Required. The `Blueprint` to create. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint blueprint = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TelcoAutomation\V1\Blueprint|null + */ + public function getBlueprint() + { + return $this->blueprint; + } + + public function hasBlueprint() + { + return isset($this->blueprint); + } + + public function clearBlueprint() + { + unset($this->blueprint); + } + + /** + * Required. The `Blueprint` to create. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint blueprint = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TelcoAutomation\V1\Blueprint $var + * @return $this + */ + public function setBlueprint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\Blueprint::class); + $this->blueprint = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/CreateDeploymentRequest.php b/TelcoAutomation/src/V1/CreateDeploymentRequest.php new file mode 100644 index 000000000000..c479894e6802 --- /dev/null +++ b/TelcoAutomation/src/V1/CreateDeploymentRequest.php @@ -0,0 +1,173 @@ +google.cloud.telcoautomation.v1.CreateDeploymentRequest + */ +class CreateDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of parent resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The name of the deployment. + * + * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $deployment_id = ''; + /** + * Required. The `Deployment` to create. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $deployment = null; + + /** + * @param string $parent Required. The name of parent resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". Please see + * {@see TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. + * @param \Google\Cloud\TelcoAutomation\V1\Deployment $deployment Required. The `Deployment` to create. + * @param string $deploymentId Optional. The name of the deployment. + * + * @return \Google\Cloud\TelcoAutomation\V1\CreateDeploymentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\TelcoAutomation\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 name of parent resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * @type string $deployment_id + * Optional. The name of the deployment. + * @type \Google\Cloud\TelcoAutomation\V1\Deployment $deployment + * Required. The `Deployment` to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of parent resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of parent resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * 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 name of the deployment. + * + * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDeploymentId() + { + return $this->deployment_id; + } + + /** + * Optional. The name of the deployment. + * + * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDeploymentId($var) + { + GPBUtil::checkString($var, True); + $this->deployment_id = $var; + + return $this; + } + + /** + * Required. The `Deployment` to create. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TelcoAutomation\V1\Deployment|null + */ + public function getDeployment() + { + return $this->deployment; + } + + public function hasDeployment() + { + return isset($this->deployment); + } + + public function clearDeployment() + { + unset($this->deployment); + } + + /** + * Required. The `Deployment` to create. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TelcoAutomation\V1\Deployment $var + * @return $this + */ + public function setDeployment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\Deployment::class); + $this->deployment = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/CreateEdgeSlmRequest.php b/TelcoAutomation/src/V1/CreateEdgeSlmRequest.php new file mode 100644 index 000000000000..12291acdb971 --- /dev/null +++ b/TelcoAutomation/src/V1/CreateEdgeSlmRequest.php @@ -0,0 +1,247 @@ +google.cloud.telcoautomation.v1.CreateEdgeSlmRequest + */ +class CreateEdgeSlmRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Id of the requesting object + * If auto-generating Id server-side, remove this field and + * edge_slm_id from the method_signature of Create RPC + * + * Generated from protobuf field string edge_slm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $edge_slm_id = ''; + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm edge_slm = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $edge_slm = 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. Value for parent. Please see + * {@see TelcoAutomationClient::locationName()} for help formatting this field. + * @param \Google\Cloud\TelcoAutomation\V1\EdgeSlm $edgeSlm Required. The resource being created + * @param string $edgeSlmId Required. Id of the requesting object + * If auto-generating Id server-side, remove this field and + * edge_slm_id from the method_signature of Create RPC + * + * @return \Google\Cloud\TelcoAutomation\V1\CreateEdgeSlmRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\TelcoAutomation\V1\EdgeSlm $edgeSlm, string $edgeSlmId): self + { + return (new self()) + ->setParent($parent) + ->setEdgeSlm($edgeSlm) + ->setEdgeSlmId($edgeSlmId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $edge_slm_id + * Required. Id of the requesting object + * If auto-generating Id server-side, remove this field and + * edge_slm_id from the method_signature of Create RPC + * @type \Google\Cloud\TelcoAutomation\V1\EdgeSlm $edge_slm + * Required. The resource being 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\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Id of the requesting object + * If auto-generating Id server-side, remove this field and + * edge_slm_id from the method_signature of Create RPC + * + * Generated from protobuf field string edge_slm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEdgeSlmId() + { + return $this->edge_slm_id; + } + + /** + * Required. Id of the requesting object + * If auto-generating Id server-side, remove this field and + * edge_slm_id from the method_signature of Create RPC + * + * Generated from protobuf field string edge_slm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEdgeSlmId($var) + { + GPBUtil::checkString($var, True); + $this->edge_slm_id = $var; + + return $this; + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm edge_slm = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TelcoAutomation\V1\EdgeSlm|null + */ + public function getEdgeSlm() + { + return $this->edge_slm; + } + + public function hasEdgeSlm() + { + return isset($this->edge_slm); + } + + public function clearEdgeSlm() + { + unset($this->edge_slm); + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm edge_slm = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TelcoAutomation\V1\EdgeSlm $var + * @return $this + */ + public function setEdgeSlm($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\EdgeSlm::class); + $this->edge_slm = $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/TelcoAutomation/src/V1/CreateOrchestrationClusterRequest.php b/TelcoAutomation/src/V1/CreateOrchestrationClusterRequest.php new file mode 100644 index 000000000000..8c98f3f758d4 --- /dev/null +++ b/TelcoAutomation/src/V1/CreateOrchestrationClusterRequest.php @@ -0,0 +1,247 @@ +google.cloud.telcoautomation.v1.CreateOrchestrationClusterRequest + */ +class CreateOrchestrationClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Id of the requesting object + * If auto-generating Id server-side, remove this field and + * orchestration_cluster_id from the method_signature of Create RPC + * + * Generated from protobuf field string orchestration_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $orchestration_cluster_id = ''; + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.OrchestrationCluster orchestration_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $orchestration_cluster = 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. Value for parent. Please see + * {@see TelcoAutomationClient::locationName()} for help formatting this field. + * @param \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster $orchestrationCluster Required. The resource being created + * @param string $orchestrationClusterId Required. Id of the requesting object + * If auto-generating Id server-side, remove this field and + * orchestration_cluster_id from the method_signature of Create RPC + * + * @return \Google\Cloud\TelcoAutomation\V1\CreateOrchestrationClusterRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster $orchestrationCluster, string $orchestrationClusterId): self + { + return (new self()) + ->setParent($parent) + ->setOrchestrationCluster($orchestrationCluster) + ->setOrchestrationClusterId($orchestrationClusterId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $orchestration_cluster_id + * Required. Id of the requesting object + * If auto-generating Id server-side, remove this field and + * orchestration_cluster_id from the method_signature of Create RPC + * @type \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster $orchestration_cluster + * Required. The resource being 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\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Id of the requesting object + * If auto-generating Id server-side, remove this field and + * orchestration_cluster_id from the method_signature of Create RPC + * + * Generated from protobuf field string orchestration_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getOrchestrationClusterId() + { + return $this->orchestration_cluster_id; + } + + /** + * Required. Id of the requesting object + * If auto-generating Id server-side, remove this field and + * orchestration_cluster_id from the method_signature of Create RPC + * + * Generated from protobuf field string orchestration_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setOrchestrationClusterId($var) + { + GPBUtil::checkString($var, True); + $this->orchestration_cluster_id = $var; + + return $this; + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.OrchestrationCluster orchestration_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster|null + */ + public function getOrchestrationCluster() + { + return $this->orchestration_cluster; + } + + public function hasOrchestrationCluster() + { + return isset($this->orchestration_cluster); + } + + public function clearOrchestrationCluster() + { + unset($this->orchestration_cluster); + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.OrchestrationCluster orchestration_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster $var + * @return $this + */ + public function setOrchestrationCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster::class); + $this->orchestration_cluster = $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/TelcoAutomation/src/V1/DeleteBlueprintRequest.php b/TelcoAutomation/src/V1/DeleteBlueprintRequest.php new file mode 100644 index 000000000000..8bd4fde06229 --- /dev/null +++ b/TelcoAutomation/src/V1/DeleteBlueprintRequest.php @@ -0,0 +1,96 @@ +google.cloud.telcoautomation.v1.DeleteBlueprintRequest + */ +class DeleteBlueprintRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of blueprint to delete. + * Blueprint name should be in the format {blueprint_id}, if + * {blueprint_id}@{revision_id} is passed then the API throws invalid + * argument. + * + * 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 blueprint to delete. + * Blueprint name should be in the format {blueprint_id}, if + * {blueprint_id}@{revision_id} is passed then the API throws invalid + * argument. Please see + * {@see TelcoAutomationClient::blueprintName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\DeleteBlueprintRequest + * + * @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 blueprint to delete. + * Blueprint name should be in the format {blueprint_id}, if + * {blueprint_id}@{revision_id} is passed then the API throws invalid + * argument. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of blueprint to delete. + * Blueprint name should be in the format {blueprint_id}, if + * {blueprint_id}@{revision_id} is passed then the API throws invalid + * argument. + * + * 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 blueprint to delete. + * Blueprint name should be in the format {blueprint_id}, if + * {blueprint_id}@{revision_id} is passed then the API throws invalid + * argument. + * + * 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/TelcoAutomation/src/V1/DeleteEdgeSlmRequest.php b/TelcoAutomation/src/V1/DeleteEdgeSlmRequest.php new file mode 100644 index 000000000000..fb80f6e26235 --- /dev/null +++ b/TelcoAutomation/src/V1/DeleteEdgeSlmRequest.php @@ -0,0 +1,155 @@ +google.cloud.telcoautomation.v1.DeleteEdgeSlmRequest + */ +class DeleteEdgeSlmRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource + * + * 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 = ''; + + /** + * @param string $name Required. Name of the resource + * Please see {@see TelcoAutomationClient::edgeSlmName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\DeleteEdgeSlmRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource + * @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\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the 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. Name of the 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; + } + + /** + * 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; + } + +} + diff --git a/TelcoAutomation/src/V1/DeleteOrchestrationClusterRequest.php b/TelcoAutomation/src/V1/DeleteOrchestrationClusterRequest.php new file mode 100644 index 000000000000..a7b6698f204a --- /dev/null +++ b/TelcoAutomation/src/V1/DeleteOrchestrationClusterRequest.php @@ -0,0 +1,155 @@ +google.cloud.telcoautomation.v1.DeleteOrchestrationClusterRequest + */ +class DeleteOrchestrationClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource + * + * 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 = ''; + + /** + * @param string $name Required. Name of the resource + * Please see {@see TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\DeleteOrchestrationClusterRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource + * @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\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the 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. Name of the 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; + } + + /** + * 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; + } + +} + diff --git a/TelcoAutomation/src/V1/Deployment.php b/TelcoAutomation/src/V1/Deployment.php new file mode 100644 index 000000000000..219a9e26d768 --- /dev/null +++ b/TelcoAutomation/src/V1/Deployment.php @@ -0,0 +1,611 @@ +google.cloud.telcoautomation.v1.Deployment + */ +class Deployment extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the deployment. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. Immutable. The revision ID of the deployment. + * A new revision is committed whenever a change in deployment is applied. + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $revision_id = ''; + /** + * Required. The blueprint revision from which this deployment was created. + * + * Generated from protobuf field string source_blueprint_revision = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source_blueprint_revision = ''; + /** + * Output only. The timestamp that the revision was created. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $revision_create_time = null; + /** + * Output only. State of the deployment (DRAFT, APPLIED, DELETING). + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Optional. Human readable name of a Deployment. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Output only. Name of the repository where the deployment package files are + * stored. + * + * Generated from protobuf field string repository = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $repository = ''; + /** + * Optional. Files present in a deployment. + * When invoking UpdateDeployment API, only the modified files should be + * included in this. Files that are not included in the update of a deployment + * will not be changed. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $files; + /** + * Optional. Labels are key-value attributes that can be set on a deployment + * resource by the user. + * + * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Output only. Deployment creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the deployment was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Source provider is the author of a public blueprint, from + * which this deployment is created. + * + * Generated from protobuf field string source_provider = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $source_provider = ''; + /** + * Optional. Immutable. The WorkloadCluster on which to create the Deployment. + * + * Generated from protobuf field string workload_cluster = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $workload_cluster = ''; + /** + * Output only. Attributes to where the deployment can inflict changes. The + * value can only be [SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT]. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $deployment_level = 0; + /** + * Output only. Indicates if the deployment can be rolled back, exported from + * public blueprint. + * + * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $rollback_support = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the deployment. + * @type string $revision_id + * Output only. Immutable. The revision ID of the deployment. + * A new revision is committed whenever a change in deployment is applied. + * @type string $source_blueprint_revision + * Required. The blueprint revision from which this deployment was created. + * @type \Google\Protobuf\Timestamp $revision_create_time + * Output only. The timestamp that the revision was created. + * @type int $state + * Output only. State of the deployment (DRAFT, APPLIED, DELETING). + * @type string $display_name + * Optional. Human readable name of a Deployment. + * @type string $repository + * Output only. Name of the repository where the deployment package files are + * stored. + * @type array<\Google\Cloud\TelcoAutomation\V1\File>|\Google\Protobuf\Internal\RepeatedField $files + * Optional. Files present in a deployment. + * When invoking UpdateDeployment API, only the modified files should be + * included in this. Files that are not included in the update of a deployment + * will not be changed. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels are key-value attributes that can be set on a deployment + * resource by the user. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Deployment creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the deployment was updated. + * @type string $source_provider + * Output only. Source provider is the author of a public blueprint, from + * which this deployment is created. + * @type string $workload_cluster + * Optional. Immutable. The WorkloadCluster on which to create the Deployment. + * @type int $deployment_level + * Output only. Attributes to where the deployment can inflict changes. The + * value can only be [SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT]. + * @type bool $rollback_support + * Output only. Indicates if the deployment can be rolled back, exported from + * public blueprint. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The name of the deployment. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the 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. Immutable. The revision ID of the deployment. + * A new revision is committed whenever a change in deployment is applied. + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRevisionId() + { + return $this->revision_id; + } + + /** + * Output only. Immutable. The revision ID of the deployment. + * A new revision is committed whenever a change in deployment is applied. + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRevisionId($var) + { + GPBUtil::checkString($var, True); + $this->revision_id = $var; + + return $this; + } + + /** + * Required. The blueprint revision from which this deployment was created. + * + * Generated from protobuf field string source_blueprint_revision = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSourceBlueprintRevision() + { + return $this->source_blueprint_revision; + } + + /** + * Required. The blueprint revision from which this deployment was created. + * + * Generated from protobuf field string source_blueprint_revision = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSourceBlueprintRevision($var) + { + GPBUtil::checkString($var, True); + $this->source_blueprint_revision = $var; + + return $this; + } + + /** + * Output only. The timestamp that the revision was created. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRevisionCreateTime() + { + return $this->revision_create_time; + } + + public function hasRevisionCreateTime() + { + return isset($this->revision_create_time); + } + + public function clearRevisionCreateTime() + { + unset($this->revision_create_time); + } + + /** + * Output only. The timestamp that the revision was created. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRevisionCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->revision_create_time = $var; + + return $this; + } + + /** + * Output only. State of the deployment (DRAFT, APPLIED, DELETING). + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the deployment (DRAFT, APPLIED, DELETING). + * + * Generated from protobuf field .google.cloud.telcoautomation.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\TelcoAutomation\V1\Deployment\State::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. Human readable name of a Deployment. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. Human readable name of a Deployment. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. Name of the repository where the deployment package files are + * stored. + * + * Generated from protobuf field string repository = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRepository() + { + return $this->repository; + } + + /** + * Output only. Name of the repository where the deployment package files are + * stored. + * + * Generated from protobuf field string repository = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRepository($var) + { + GPBUtil::checkString($var, True); + $this->repository = $var; + + return $this; + } + + /** + * Optional. Files present in a deployment. + * When invoking UpdateDeployment API, only the modified files should be + * included in this. Files that are not included in the update of a deployment + * will not be changed. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFiles() + { + return $this->files; + } + + /** + * Optional. Files present in a deployment. + * When invoking UpdateDeployment API, only the modified files should be + * included in this. Files that are not included in the update of a deployment + * will not be changed. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\TelcoAutomation\V1\File>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFiles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\File::class); + $this->files = $arr; + + return $this; + } + + /** + * Optional. Labels are key-value attributes that can be set on a deployment + * resource by the user. + * + * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels are key-value attributes that can be set on a deployment + * resource by the user. + * + * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. Deployment creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Deployment creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the deployment was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp when the deployment was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. Source provider is the author of a public blueprint, from + * which this deployment is created. + * + * Generated from protobuf field string source_provider = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSourceProvider() + { + return $this->source_provider; + } + + /** + * Output only. Source provider is the author of a public blueprint, from + * which this deployment is created. + * + * Generated from protobuf field string source_provider = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSourceProvider($var) + { + GPBUtil::checkString($var, True); + $this->source_provider = $var; + + return $this; + } + + /** + * Optional. Immutable. The WorkloadCluster on which to create the Deployment. + * + * Generated from protobuf field string workload_cluster = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getWorkloadCluster() + { + return $this->workload_cluster; + } + + /** + * Optional. Immutable. The WorkloadCluster on which to create the Deployment. + * + * Generated from protobuf field string workload_cluster = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setWorkloadCluster($var) + { + GPBUtil::checkString($var, True); + $this->workload_cluster = $var; + + return $this; + } + + /** + * Output only. Attributes to where the deployment can inflict changes. The + * value can only be [SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT]. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getDeploymentLevel() + { + return $this->deployment_level; + } + + /** + * Output only. Attributes to where the deployment can inflict changes. The + * value can only be [SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT]. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDeploymentLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\DeploymentLevel::class); + $this->deployment_level = $var; + + return $this; + } + + /** + * Output only. Indicates if the deployment can be rolled back, exported from + * public blueprint. + * + * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRollbackSupport() + { + return $this->rollback_support; + } + + /** + * Output only. Indicates if the deployment can be rolled back, exported from + * public blueprint. + * + * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRollbackSupport($var) + { + GPBUtil::checkBool($var); + $this->rollback_support = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/Deployment/State.php b/TelcoAutomation/src/V1/Deployment/State.php new file mode 100644 index 000000000000..1b8c94f09d89 --- /dev/null +++ b/TelcoAutomation/src/V1/Deployment/State.php @@ -0,0 +1,78 @@ +google.cloud.telcoautomation.v1.Deployment.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * A deployment starts in DRAFT state. All edits are made in DRAFT state. A + * deployment opened for editing after applying will be in draft state, + * while its prevision revision will be its current applied version. + * + * Generated from protobuf enum DRAFT = 1; + */ + const DRAFT = 1; + /** + * This state means that the contents (YAML files containing kubernetes + * resources) of the deployment have been applied to an Orchestration or + * Workload Cluster. A revision is created when a deployment is applied. + * This revision will represent the latest view of what is applied on the + * cluster until the deployment is modified and applied again, which will + * create a new revision. + * + * Generated from protobuf enum APPLIED = 2; + */ + const APPLIED = 2; + /** + * A deployment in DELETING state has been marked for deletion. Its + * deletion status can be queried using `ComputeDeploymentStatus` API. No + * updates are allowed to a deployment in DELETING state. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::DRAFT => 'DRAFT', + self::APPLIED => 'APPLIED', + self::DELETING => 'DELETING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/TelcoAutomation/src/V1/DeploymentLevel.php b/TelcoAutomation/src/V1/DeploymentLevel.php new file mode 100644 index 000000000000..84e9420bd402 --- /dev/null +++ b/TelcoAutomation/src/V1/DeploymentLevel.php @@ -0,0 +1,79 @@ +google.cloud.telcoautomation.v1.DeploymentLevel + */ +class DeploymentLevel +{ + /** + * Default unspecified deployment level. + * + * Generated from protobuf enum DEPLOYMENT_LEVEL_UNSPECIFIED = 0; + */ + const DEPLOYMENT_LEVEL_UNSPECIFIED = 0; + /** + * Blueprints at HYDRATION level cannot be used to create a Deployment + * (A user cannot manually initate deployment of these blueprints on + * orchestration or workload cluster). + * These blueprints stay in a user's private catalog and are configured and + * deployed by TNA automation. + * + * Generated from protobuf enum HYDRATION = 1; + */ + const HYDRATION = 1; + /** + * Blueprints at SINGLE_DEPLOYMENT level can be + * a) Modified in private catalog. + * b) Used to create a deployment on orchestration cluster by the user, once + * approved. + * + * Generated from protobuf enum SINGLE_DEPLOYMENT = 2; + */ + const SINGLE_DEPLOYMENT = 2; + /** + * Blueprints at MULTI_DEPLOYMENT level can be + * a) Modified in private catalog. + * b) Used to create a deployment on orchestration cluster which will create + * further hydrated deployments. + * + * Generated from protobuf enum MULTI_DEPLOYMENT = 3; + */ + const MULTI_DEPLOYMENT = 3; + + private static $valueToName = [ + self::DEPLOYMENT_LEVEL_UNSPECIFIED => 'DEPLOYMENT_LEVEL_UNSPECIFIED', + self::HYDRATION => 'HYDRATION', + self::SINGLE_DEPLOYMENT => 'SINGLE_DEPLOYMENT', + self::MULTI_DEPLOYMENT => 'MULTI_DEPLOYMENT', + ]; + + 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/TelcoAutomation/src/V1/DeploymentView.php b/TelcoAutomation/src/V1/DeploymentView.php new file mode 100644 index 000000000000..22be9d27a288 --- /dev/null +++ b/TelcoAutomation/src/V1/DeploymentView.php @@ -0,0 +1,61 @@ +google.cloud.telcoautomation.v1.DeploymentView + */ +class DeploymentView +{ + /** + * Unspecified enum value. + * + * Generated from protobuf enum DEPLOYMENT_VIEW_UNSPECIFIED = 0; + */ + const DEPLOYMENT_VIEW_UNSPECIFIED = 0; + /** + * View which only contains metadata. + * + * Generated from protobuf enum DEPLOYMENT_VIEW_BASIC = 1; + */ + const DEPLOYMENT_VIEW_BASIC = 1; + /** + * View which contains metadata and files it encapsulates. + * + * Generated from protobuf enum DEPLOYMENT_VIEW_FULL = 2; + */ + const DEPLOYMENT_VIEW_FULL = 2; + + private static $valueToName = [ + self::DEPLOYMENT_VIEW_UNSPECIFIED => 'DEPLOYMENT_VIEW_UNSPECIFIED', + self::DEPLOYMENT_VIEW_BASIC => 'DEPLOYMENT_VIEW_BASIC', + self::DEPLOYMENT_VIEW_FULL => 'DEPLOYMENT_VIEW_FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/TelcoAutomation/src/V1/DiscardBlueprintChangesRequest.php b/TelcoAutomation/src/V1/DiscardBlueprintChangesRequest.php new file mode 100644 index 000000000000..7b4d9258c0eb --- /dev/null +++ b/TelcoAutomation/src/V1/DiscardBlueprintChangesRequest.php @@ -0,0 +1,81 @@ +google.cloud.telcoautomation.v1.DiscardBlueprintChangesRequest + */ +class DiscardBlueprintChangesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the blueprint of which changes are being discarded. + * + * 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 blueprint of which changes are being discarded. Please see + * {@see TelcoAutomationClient::blueprintName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\DiscardBlueprintChangesRequest + * + * @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 blueprint of which changes are being discarded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the blueprint of which changes are being discarded. + * + * 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 blueprint of which changes are being discarded. + * + * 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/TelcoAutomation/src/V1/DiscardBlueprintChangesResponse.php b/TelcoAutomation/src/V1/DiscardBlueprintChangesResponse.php new file mode 100644 index 000000000000..3fa79c1c86ed --- /dev/null +++ b/TelcoAutomation/src/V1/DiscardBlueprintChangesResponse.php @@ -0,0 +1,33 @@ +google.cloud.telcoautomation.v1.DiscardBlueprintChangesResponse + */ +class DiscardBlueprintChangesResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + +} + diff --git a/TelcoAutomation/src/V1/DiscardDeploymentChangesRequest.php b/TelcoAutomation/src/V1/DiscardDeploymentChangesRequest.php new file mode 100644 index 000000000000..43f2d7329008 --- /dev/null +++ b/TelcoAutomation/src/V1/DiscardDeploymentChangesRequest.php @@ -0,0 +1,81 @@ +google.cloud.telcoautomation.v1.DiscardDeploymentChangesRequest + */ +class DiscardDeploymentChangesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the deployment of which changes are being discarded. + * + * 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 of which changes are being discarded. Please see + * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\DiscardDeploymentChangesRequest + * + * @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 of which changes are being discarded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the deployment of which changes are being discarded. + * + * 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 of which changes are being discarded. + * + * 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/TelcoAutomation/src/V1/DiscardDeploymentChangesResponse.php b/TelcoAutomation/src/V1/DiscardDeploymentChangesResponse.php new file mode 100644 index 000000000000..7699c38576c8 --- /dev/null +++ b/TelcoAutomation/src/V1/DiscardDeploymentChangesResponse.php @@ -0,0 +1,33 @@ +google.cloud.telcoautomation.v1.DiscardDeploymentChangesResponse + */ +class DiscardDeploymentChangesResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + +} + diff --git a/TelcoAutomation/src/V1/EdgeSlm.php b/TelcoAutomation/src/V1/EdgeSlm.php new file mode 100644 index 000000000000..39267d98f3dc --- /dev/null +++ b/TelcoAutomation/src/V1/EdgeSlm.php @@ -0,0 +1,343 @@ +google.cloud.telcoautomation.v1.EdgeSlm + */ +class EdgeSlm extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the EdgeSlm resource. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Immutable. Reference to the orchestration cluster on which templates for + * this resources will be applied. This should be of format + * projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}. + * + * Generated from protobuf field string orchestration_cluster = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $orchestration_cluster = ''; + /** + * Output only. [Output only] Create time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. [Output only] Update time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Labels as key value pairs. The key and value should contain + * characters which are UTF-8 compliant and less than 50 characters. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Output only. Provides the active TNA version for this resource. + * + * Generated from protobuf field string tna_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $tna_version = ''; + /** + * Output only. State of the EdgeSlm resource. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Optional. Type of workload cluster for which an EdgeSLM resource is + * created. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm.WorkloadClusterType workload_cluster_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $workload_cluster_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the EdgeSlm resource. + * @type string $orchestration_cluster + * Immutable. Reference to the orchestration cluster on which templates for + * this resources will be applied. This should be of format + * projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. [Output only] Create time stamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. [Output only] Update time stamp. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels as key value pairs. The key and value should contain + * characters which are UTF-8 compliant and less than 50 characters. + * @type string $tna_version + * Output only. Provides the active TNA version for this resource. + * @type int $state + * Output only. State of the EdgeSlm resource. + * @type int $workload_cluster_type + * Optional. Type of workload cluster for which an EdgeSLM resource is + * created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Name of the EdgeSlm resource. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the EdgeSlm resource. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Immutable. Reference to the orchestration cluster on which templates for + * this resources will be applied. This should be of format + * projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}. + * + * Generated from protobuf field string orchestration_cluster = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getOrchestrationCluster() + { + return $this->orchestration_cluster; + } + + /** + * Immutable. Reference to the orchestration cluster on which templates for + * this resources will be applied. This should be of format + * projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}. + * + * Generated from protobuf field string orchestration_cluster = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setOrchestrationCluster($var) + { + GPBUtil::checkString($var, True); + $this->orchestration_cluster = $var; + + return $this; + } + + /** + * Output only. [Output only] Create time stamp. + * + * 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. [Output only] Create time stamp. + * + * 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. [Output only] Update time stamp. + * + * 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. [Output only] Update time stamp. + * + * 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; + } + + /** + * Optional. Labels as key value pairs. The key and value should contain + * characters which are UTF-8 compliant and less than 50 characters. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels as key value pairs. The key and value should contain + * characters which are UTF-8 compliant and less than 50 characters. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. Provides the active TNA version for this resource. + * + * Generated from protobuf field string tna_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTnaVersion() + { + return $this->tna_version; + } + + /** + * Output only. Provides the active TNA version for this resource. + * + * Generated from protobuf field string tna_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTnaVersion($var) + { + GPBUtil::checkString($var, True); + $this->tna_version = $var; + + return $this; + } + + /** + * Output only. State of the EdgeSlm resource. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the EdgeSlm resource. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\EdgeSlm\State::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. Type of workload cluster for which an EdgeSLM resource is + * created. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm.WorkloadClusterType workload_cluster_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getWorkloadClusterType() + { + return $this->workload_cluster_type; + } + + /** + * Optional. Type of workload cluster for which an EdgeSLM resource is + * created. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm.WorkloadClusterType workload_cluster_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setWorkloadClusterType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\EdgeSlm\WorkloadClusterType::class); + $this->workload_cluster_type = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/EdgeSlm/State.php b/TelcoAutomation/src/V1/EdgeSlm/State.php new file mode 100644 index 000000000000..954da7b15cd0 --- /dev/null +++ b/TelcoAutomation/src/V1/EdgeSlm/State.php @@ -0,0 +1,77 @@ +google.cloud.telcoautomation.v1.EdgeSlm.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * EdgeSlm is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * EdgeSlm has been created and is ready for use. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * EdgeSlm is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * EdgeSlm encountered an error and is in an indeterministic + * state. User can still initiate a delete operation on this state. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + self::DELETING => 'DELETING', + self::FAILED => 'FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/TelcoAutomation/src/V1/EdgeSlm/WorkloadClusterType.php b/TelcoAutomation/src/V1/EdgeSlm/WorkloadClusterType.php new file mode 100644 index 000000000000..7149a6fddb06 --- /dev/null +++ b/TelcoAutomation/src/V1/EdgeSlm/WorkloadClusterType.php @@ -0,0 +1,63 @@ +google.cloud.telcoautomation.v1.EdgeSlm.WorkloadClusterType + */ +class WorkloadClusterType +{ + /** + * Unspecified workload cluster. + * + * Generated from protobuf enum WORKLOAD_CLUSTER_TYPE_UNSPECIFIED = 0; + */ + const WORKLOAD_CLUSTER_TYPE_UNSPECIFIED = 0; + /** + * Workload cluster is a GDCE cluster. + * + * Generated from protobuf enum GDCE = 1; + */ + const GDCE = 1; + /** + * Workload cluster is a GKE cluster. + * + * Generated from protobuf enum GKE = 2; + */ + const GKE = 2; + + private static $valueToName = [ + self::WORKLOAD_CLUSTER_TYPE_UNSPECIFIED => 'WORKLOAD_CLUSTER_TYPE_UNSPECIFIED', + self::GDCE => 'GDCE', + self::GKE => 'GKE', + ]; + + 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/TelcoAutomation/src/V1/File.php b/TelcoAutomation/src/V1/File.php new file mode 100644 index 000000000000..d5b01324ed6c --- /dev/null +++ b/TelcoAutomation/src/V1/File.php @@ -0,0 +1,177 @@ +google.cloud.telcoautomation.v1.File + */ +class File extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Path of the file in package. + * e.g. `gdce/v1/cluster.yaml` + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $path = ''; + /** + * Optional. The contents of a file in string format. + * + * Generated from protobuf field string content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $content = ''; + /** + * Optional. Signifies whether a file is marked for deletion. + * + * Generated from protobuf field bool deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $deleted = false; + /** + * Optional. Indicates whether changes are allowed to a file. If the field is + * not set, the file cannot be edited. + * + * Generated from protobuf field bool editable = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $editable = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $path + * Required. Path of the file in package. + * e.g. `gdce/v1/cluster.yaml` + * @type string $content + * Optional. The contents of a file in string format. + * @type bool $deleted + * Optional. Signifies whether a file is marked for deletion. + * @type bool $editable + * Optional. Indicates whether changes are allowed to a file. If the field is + * not set, the file cannot be edited. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Path of the file in package. + * e.g. `gdce/v1/cluster.yaml` + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Required. Path of the file in package. + * e.g. `gdce/v1/cluster.yaml` + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * Optional. The contents of a file in string format. + * + * Generated from protobuf field string content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Optional. The contents of a file in string format. + * + * Generated from protobuf field string content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->content = $var; + + return $this; + } + + /** + * Optional. Signifies whether a file is marked for deletion. + * + * Generated from protobuf field bool deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDeleted() + { + return $this->deleted; + } + + /** + * Optional. Signifies whether a file is marked for deletion. + * + * Generated from protobuf field bool deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDeleted($var) + { + GPBUtil::checkBool($var); + $this->deleted = $var; + + return $this; + } + + /** + * Optional. Indicates whether changes are allowed to a file. If the field is + * not set, the file cannot be edited. + * + * Generated from protobuf field bool editable = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEditable() + { + return $this->editable; + } + + /** + * Optional. Indicates whether changes are allowed to a file. If the field is + * not set, the file cannot be edited. + * + * Generated from protobuf field bool editable = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEditable($var) + { + GPBUtil::checkBool($var); + $this->editable = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/FullManagementConfig.php b/TelcoAutomation/src/V1/FullManagementConfig.php new file mode 100644 index 000000000000..9a1138aa7425 --- /dev/null +++ b/TelcoAutomation/src/V1/FullManagementConfig.php @@ -0,0 +1,383 @@ +google.cloud.telcoautomation.v1.FullManagementConfig + */ +class FullManagementConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The + * VPC will be created if it doesn't exist. + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $network = ''; + /** + * Optional. Specifies the subnet that the interface will be part of. Network + * key must be specified and the subnet must be a subnetwork of the specified + * network. + * + * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $subnet = ''; + /** + * Optional. The /28 network that the masters will use. + * + * Generated from protobuf field string master_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $master_ipv4_cidr_block = ''; + /** + * Optional. The IP address range for the cluster pod IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation + * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string cluster_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cluster_cidr_block = ''; + /** + * Optional. The IP address range for the cluster service IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. + * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string services_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $services_cidr_block = ''; + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block + * can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string cluster_named_range = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cluster_named_range = ''; + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for service ClusterIPs. Alternatively, + * services_cidr_block can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string services_named_range = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $services_named_range = ''; + /** + * Optional. Master Authorized Network that supports multiple CIDR blocks. + * Allows access to the k8s master from multiple blocks. It cannot be set at + * the same time with the field man_block. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $master_authorized_networks_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network + * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The + * VPC will be created if it doesn't exist. + * @type string $subnet + * Optional. Specifies the subnet that the interface will be part of. Network + * key must be specified and the subnet must be a subnetwork of the specified + * network. + * @type string $master_ipv4_cidr_block + * Optional. The /28 network that the masters will use. + * @type string $cluster_cidr_block + * Optional. The IP address range for the cluster pod IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation + * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * @type string $services_cidr_block + * Optional. The IP address range for the cluster service IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. + * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * @type string $cluster_named_range + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block + * can be used to automatically create a GKE-managed one. + * @type string $services_named_range + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for service ClusterIPs. Alternatively, + * services_cidr_block can be used to automatically create a GKE-managed one. + * @type \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig $master_authorized_networks_config + * Optional. Master Authorized Network that supports multiple CIDR blocks. + * Allows access to the k8s master from multiple blocks. It cannot be set at + * the same time with the field man_block. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The + * VPC will be created if it doesn't exist. + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The + * VPC will be created if it doesn't exist. + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Optional. Specifies the subnet that the interface will be part of. Network + * key must be specified and the subnet must be a subnetwork of the specified + * network. + * + * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSubnet() + { + return $this->subnet; + } + + /** + * Optional. Specifies the subnet that the interface will be part of. Network + * key must be specified and the subnet must be a subnetwork of the specified + * network. + * + * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSubnet($var) + { + GPBUtil::checkString($var, True); + $this->subnet = $var; + + return $this; + } + + /** + * Optional. The /28 network that the masters will use. + * + * Generated from protobuf field string master_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMasterIpv4CidrBlock() + { + return $this->master_ipv4_cidr_block; + } + + /** + * Optional. The /28 network that the masters will use. + * + * Generated from protobuf field string master_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMasterIpv4CidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->master_ipv4_cidr_block = $var; + + return $this; + } + + /** + * Optional. The IP address range for the cluster pod IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation + * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string cluster_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getClusterCidrBlock() + { + return $this->cluster_cidr_block; + } + + /** + * Optional. The IP address range for the cluster pod IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation + * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string cluster_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setClusterCidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->cluster_cidr_block = $var; + + return $this; + } + + /** + * Optional. The IP address range for the cluster service IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. + * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string services_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServicesCidrBlock() + { + return $this->services_cidr_block; + } + + /** + * Optional. The IP address range for the cluster service IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. + * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string services_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServicesCidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->services_cidr_block = $var; + + return $this; + } + + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block + * can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string cluster_named_range = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getClusterNamedRange() + { + return $this->cluster_named_range; + } + + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block + * can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string cluster_named_range = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setClusterNamedRange($var) + { + GPBUtil::checkString($var, True); + $this->cluster_named_range = $var; + + return $this; + } + + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for service ClusterIPs. Alternatively, + * services_cidr_block can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string services_named_range = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServicesNamedRange() + { + return $this->services_named_range; + } + + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for service ClusterIPs. Alternatively, + * services_cidr_block can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string services_named_range = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServicesNamedRange($var) + { + GPBUtil::checkString($var, True); + $this->services_named_range = $var; + + return $this; + } + + /** + * Optional. Master Authorized Network that supports multiple CIDR blocks. + * Allows access to the k8s master from multiple blocks. It cannot be set at + * the same time with the field man_block. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig|null + */ + public function getMasterAuthorizedNetworksConfig() + { + return $this->master_authorized_networks_config; + } + + public function hasMasterAuthorizedNetworksConfig() + { + return isset($this->master_authorized_networks_config); + } + + public function clearMasterAuthorizedNetworksConfig() + { + unset($this->master_authorized_networks_config); + } + + /** + * Optional. Master Authorized Network that supports multiple CIDR blocks. + * Allows access to the k8s master from multiple blocks. It cannot be set at + * the same time with the field man_block. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig $var + * @return $this + */ + public function setMasterAuthorizedNetworksConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig::class); + $this->master_authorized_networks_config = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/GetBlueprintRequest.php b/TelcoAutomation/src/V1/GetBlueprintRequest.php new file mode 100644 index 000000000000..5ff49a3cb1b2 --- /dev/null +++ b/TelcoAutomation/src/V1/GetBlueprintRequest.php @@ -0,0 +1,139 @@ +google.cloud.telcoautomation.v1.GetBlueprintRequest + */ +class GetBlueprintRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the blueprint. + * Case 1: If the name provided in the request is + * {blueprint_id}@{revision_id}, then the revision with revision_id will be + * returned. Case 2: If the name provided in the request is {blueprint}, then + * the current state of the blueprint is returned. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Defines the type of view of the blueprint. + * When field is not present BLUEPRINT_VIEW_BASIC is considered as default. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.BlueprintView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $name Required. The name of the blueprint. + * Case 1: If the name provided in the request is + * {blueprint_id}@{revision_id}, then the revision with revision_id will be + * returned. Case 2: If the name provided in the request is {blueprint}, then + * the current state of the blueprint is returned. Please see + * {@see TelcoAutomationClient::blueprintName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\GetBlueprintRequest + * + * @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 blueprint. + * Case 1: If the name provided in the request is + * {blueprint_id}@{revision_id}, then the revision with revision_id will be + * returned. Case 2: If the name provided in the request is {blueprint}, then + * the current state of the blueprint is returned. + * @type int $view + * Optional. Defines the type of view of the blueprint. + * When field is not present BLUEPRINT_VIEW_BASIC is considered as default. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the blueprint. + * Case 1: If the name provided in the request is + * {blueprint_id}@{revision_id}, then the revision with revision_id will be + * returned. Case 2: If the name provided in the request is {blueprint}, then + * the current state of the blueprint is returned. + * + * 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 blueprint. + * Case 1: If the name provided in the request is + * {blueprint_id}@{revision_id}, then the revision with revision_id will be + * returned. Case 2: If the name provided in the request is {blueprint}, then + * the current state of the blueprint is returned. + * + * 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. Defines the type of view of the blueprint. + * When field is not present BLUEPRINT_VIEW_BASIC is considered as default. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.BlueprintView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. Defines the type of view of the blueprint. + * When field is not present BLUEPRINT_VIEW_BASIC is considered as default. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.BlueprintView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\BlueprintView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/GetDeploymentRequest.php b/TelcoAutomation/src/V1/GetDeploymentRequest.php new file mode 100644 index 000000000000..246d68fc20e7 --- /dev/null +++ b/TelcoAutomation/src/V1/GetDeploymentRequest.php @@ -0,0 +1,144 @@ +google.cloud.telcoautomation.v1.GetDeploymentRequest + */ +class GetDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the deployment. + * Case 1: If the name provided in the request is + * {deployment_id}@{revision_id}, then the revision with revision_id will be + * returned. + * Case 2: If the name provided in the request is {deployment}, then + * the current state of the deployment is returned. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Defines the type of view of the deployment. + * When field is not present VIEW_BASIC is considered as default. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $name Required. The name of the deployment. + * Case 1: If the name provided in the request is + * {deployment_id}@{revision_id}, then the revision with revision_id will be + * returned. + * Case 2: If the name provided in the request is {deployment}, then + * the current state of the deployment is returned. Please see + * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\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. + * Case 1: If the name provided in the request is + * {deployment_id}@{revision_id}, then the revision with revision_id will be + * returned. + * Case 2: If the name provided in the request is {deployment}, then + * the current state of the deployment is returned. + * @type int $view + * Optional. Defines the type of view of the deployment. + * When field is not present VIEW_BASIC is considered as default. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the deployment. + * Case 1: If the name provided in the request is + * {deployment_id}@{revision_id}, then the revision with revision_id will be + * returned. + * Case 2: If the name provided in the request is {deployment}, then + * the current state of the deployment is returned. + * + * 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. + * Case 1: If the name provided in the request is + * {deployment_id}@{revision_id}, then the revision with revision_id will be + * returned. + * Case 2: If the name provided in the request is {deployment}, then + * the current state of the deployment is returned. + * + * 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. Defines the type of view of the deployment. + * When field is not present VIEW_BASIC is considered as default. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. Defines the type of view of the deployment. + * When field is not present VIEW_BASIC is considered as default. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\DeploymentView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/GetEdgeSlmRequest.php b/TelcoAutomation/src/V1/GetEdgeSlmRequest.php new file mode 100644 index 000000000000..64848428d743 --- /dev/null +++ b/TelcoAutomation/src/V1/GetEdgeSlmRequest.php @@ -0,0 +1,81 @@ +google.cloud.telcoautomation.v1.GetEdgeSlmRequest + */ +class GetEdgeSlmRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource + * Please see {@see TelcoAutomationClient::edgeSlmName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\GetEdgeSlmRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the 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. Name of the 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/TelcoAutomation/src/V1/GetHydratedDeploymentRequest.php b/TelcoAutomation/src/V1/GetHydratedDeploymentRequest.php new file mode 100644 index 000000000000..895c91bcdec2 --- /dev/null +++ b/TelcoAutomation/src/V1/GetHydratedDeploymentRequest.php @@ -0,0 +1,81 @@ +google.cloud.telcoautomation.v1.GetHydratedDeploymentRequest + */ +class GetHydratedDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the hydrated deployment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the hydrated deployment. Please see + * {@see TelcoAutomationClient::hydratedDeploymentName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\GetHydratedDeploymentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the hydrated deployment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the hydrated 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. Name of the hydrated 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/TelcoAutomation/src/V1/GetOrchestrationClusterRequest.php b/TelcoAutomation/src/V1/GetOrchestrationClusterRequest.php new file mode 100644 index 000000000000..4fc7dcd45bee --- /dev/null +++ b/TelcoAutomation/src/V1/GetOrchestrationClusterRequest.php @@ -0,0 +1,81 @@ +google.cloud.telcoautomation.v1.GetOrchestrationClusterRequest + */ +class GetOrchestrationClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource + * Please see {@see TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\GetOrchestrationClusterRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the 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. Name of the 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/TelcoAutomation/src/V1/GetPublicBlueprintRequest.php b/TelcoAutomation/src/V1/GetPublicBlueprintRequest.php new file mode 100644 index 000000000000..825d020fa884 --- /dev/null +++ b/TelcoAutomation/src/V1/GetPublicBlueprintRequest.php @@ -0,0 +1,81 @@ +google.cloud.telcoautomation.v1.GetPublicBlueprintRequest + */ +class GetPublicBlueprintRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the public blueprint. + * + * 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 public blueprint. Please see + * {@see TelcoAutomationClient::publicBlueprintName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\GetPublicBlueprintRequest + * + * @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 public blueprint. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the public blueprint. + * + * 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 public blueprint. + * + * 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/TelcoAutomation/src/V1/HydratedDeployment.php b/TelcoAutomation/src/V1/HydratedDeployment.php new file mode 100644 index 000000000000..efc74725b2e4 --- /dev/null +++ b/TelcoAutomation/src/V1/HydratedDeployment.php @@ -0,0 +1,186 @@ +google.cloud.telcoautomation.v1.HydratedDeployment + */ +class HydratedDeployment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the hydrated deployment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. State of the hydrated deployment (DRAFT, APPLIED). + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.HydratedDeployment.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Optional. File contents of a hydrated deployment. + * When invoking UpdateHydratedBlueprint API, only the modified files should + * be included in this. Files that are not included in the update of a + * hydrated deployment will not be changed. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $files; + /** + * Output only. WorkloadCluster identifies which workload cluster will the + * hydrated deployment will be deployed on. + * + * Generated from protobuf field string workload_cluster = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $workload_cluster = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the hydrated deployment. + * @type int $state + * Output only. State of the hydrated deployment (DRAFT, APPLIED). + * @type array<\Google\Cloud\TelcoAutomation\V1\File>|\Google\Protobuf\Internal\RepeatedField $files + * Optional. File contents of a hydrated deployment. + * When invoking UpdateHydratedBlueprint API, only the modified files should + * be included in this. Files that are not included in the update of a + * hydrated deployment will not be changed. + * @type string $workload_cluster + * Output only. WorkloadCluster identifies which workload cluster will the + * hydrated deployment will be deployed on. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the hydrated deployment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the hydrated deployment. + * + * 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. State of the hydrated deployment (DRAFT, APPLIED). + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.HydratedDeployment.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the hydrated deployment (DRAFT, APPLIED). + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.HydratedDeployment.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\HydratedDeployment\State::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. File contents of a hydrated deployment. + * When invoking UpdateHydratedBlueprint API, only the modified files should + * be included in this. Files that are not included in the update of a + * hydrated deployment will not be changed. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFiles() + { + return $this->files; + } + + /** + * Optional. File contents of a hydrated deployment. + * When invoking UpdateHydratedBlueprint API, only the modified files should + * be included in this. Files that are not included in the update of a + * hydrated deployment will not be changed. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\TelcoAutomation\V1\File>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFiles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\File::class); + $this->files = $arr; + + return $this; + } + + /** + * Output only. WorkloadCluster identifies which workload cluster will the + * hydrated deployment will be deployed on. + * + * Generated from protobuf field string workload_cluster = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getWorkloadCluster() + { + return $this->workload_cluster; + } + + /** + * Output only. WorkloadCluster identifies which workload cluster will the + * hydrated deployment will be deployed on. + * + * Generated from protobuf field string workload_cluster = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setWorkloadCluster($var) + { + GPBUtil::checkString($var, True); + $this->workload_cluster = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/HydratedDeployment/State.php b/TelcoAutomation/src/V1/HydratedDeployment/State.php new file mode 100644 index 000000000000..c4e6fd0bdaa8 --- /dev/null +++ b/TelcoAutomation/src/V1/HydratedDeployment/State.php @@ -0,0 +1,64 @@ +google.cloud.telcoautomation.v1.HydratedDeployment.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * A hydrated deployment starts in DRAFT state. All edits are made in DRAFT + * state. + * + * Generated from protobuf enum DRAFT = 1; + */ + const DRAFT = 1; + /** + * When the edit is applied, the hydrated deployment moves to APPLIED + * state. No changes can be made once a hydrated deployment is applied. + * + * Generated from protobuf enum APPLIED = 2; + */ + const APPLIED = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::DRAFT => 'DRAFT', + self::APPLIED => 'APPLIED', + ]; + + 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/TelcoAutomation/src/V1/HydrationStatus.php b/TelcoAutomation/src/V1/HydrationStatus.php new file mode 100644 index 000000000000..46c4cdb1c2c8 --- /dev/null +++ b/TelcoAutomation/src/V1/HydrationStatus.php @@ -0,0 +1,111 @@ +google.cloud.telcoautomation.v1.HydrationStatus + */ +class HydrationStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. SiteVersion Hydration is targeting. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.SiteVersion site_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $site_version = null; + /** + * Output only. Status. + * + * Generated from protobuf field string status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\TelcoAutomation\V1\SiteVersion $site_version + * Output only. SiteVersion Hydration is targeting. + * @type string $status + * Output only. Status. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. SiteVersion Hydration is targeting. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.SiteVersion site_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\TelcoAutomation\V1\SiteVersion|null + */ + public function getSiteVersion() + { + return $this->site_version; + } + + public function hasSiteVersion() + { + return isset($this->site_version); + } + + public function clearSiteVersion() + { + unset($this->site_version); + } + + /** + * Output only. SiteVersion Hydration is targeting. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.SiteVersion site_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\TelcoAutomation\V1\SiteVersion $var + * @return $this + */ + public function setSiteVersion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\SiteVersion::class); + $this->site_version = $var; + + return $this; + } + + /** + * Output only. Status. + * + * Generated from protobuf field string status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatus() + { + return $this->status; + } + + /** + * Output only. Status. + * + * Generated from protobuf field string status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkString($var, True); + $this->status = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/ListBlueprintRevisionsRequest.php b/TelcoAutomation/src/V1/ListBlueprintRevisionsRequest.php new file mode 100644 index 000000000000..baedb5d45cad --- /dev/null +++ b/TelcoAutomation/src/V1/ListBlueprintRevisionsRequest.php @@ -0,0 +1,153 @@ +google.cloud.telcoautomation.v1.ListBlueprintRevisionsRequest + */ +class ListBlueprintRevisionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the blueprint to list revisions for. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The maximum number of revisions to return per page. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The page token, received from a previous ListBlueprintRevisions call + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $name Required. The name of the blueprint to list revisions for. Please see + * {@see TelcoAutomationClient::blueprintName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ListBlueprintRevisionsRequest + * + * @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 blueprint to list revisions for. + * @type int $page_size + * The maximum number of revisions to return per page. + * @type string $page_token + * The page token, received from a previous ListBlueprintRevisions call + * It can be provided to retrieve the subsequent page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the blueprint to list revisions for. + * + * 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 blueprint to list revisions for. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The maximum number of revisions to return per page. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of revisions to return per page. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The page token, received from a previous ListBlueprintRevisions call + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The page token, received from a previous ListBlueprintRevisions call + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/ListBlueprintRevisionsResponse.php b/TelcoAutomation/src/V1/ListBlueprintRevisionsResponse.php new file mode 100644 index 000000000000..c935afeb4fe9 --- /dev/null +++ b/TelcoAutomation/src/V1/ListBlueprintRevisionsResponse.php @@ -0,0 +1,105 @@ +google.cloud.telcoautomation.v1.ListBlueprintRevisionsResponse + */ +class ListBlueprintRevisionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The revisions of the blueprint. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; + */ + private $blueprints; + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\TelcoAutomation\V1\Blueprint>|\Google\Protobuf\Internal\RepeatedField $blueprints + * The revisions of the blueprint. + * @type string $next_page_token + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The revisions of the blueprint. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBlueprints() + { + return $this->blueprints; + } + + /** + * The revisions of the blueprint. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; + * @param array<\Google\Cloud\TelcoAutomation\V1\Blueprint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBlueprints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\Blueprint::class); + $this->blueprints = $arr; + + return $this; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/ListBlueprintsRequest.php b/TelcoAutomation/src/V1/ListBlueprintsRequest.php new file mode 100644 index 000000000000..2b9f18e3d3cd --- /dev/null +++ b/TelcoAutomation/src/V1/ListBlueprintsRequest.php @@ -0,0 +1,205 @@ +google.cloud.telcoautomation.v1.ListBlueprintsRequest + */ +class ListBlueprintsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Filtering only supports equality on blueprint state. + * It should be in the form: "state = DRAFT". `OR` operator can be used to + * get response for multiple states. e.g. "state = DRAFT OR state = PROPOSED". + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. The maximum number of blueprints to return per page. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The page token, received from a previous ListBlueprints call. + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". Please see + * {@see TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ListBlueprintsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * @type string $filter + * Optional. Filtering only supports equality on blueprint state. + * It should be in the form: "state = DRAFT". `OR` operator can be used to + * get response for multiple states. e.g. "state = DRAFT OR state = PROPOSED". + * @type int $page_size + * Optional. The maximum number of blueprints to return per page. + * @type string $page_token + * Optional. The page token, received from a previous ListBlueprints call. + * It can be provided to retrieve the subsequent page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * 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. Filtering only supports equality on blueprint state. + * It should be in the form: "state = DRAFT". `OR` operator can be used to + * get response for multiple states. e.g. "state = DRAFT OR state = PROPOSED". + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filtering only supports equality on blueprint state. + * It should be in the form: "state = DRAFT". `OR` operator can be used to + * get response for multiple states. e.g. "state = DRAFT OR state = PROPOSED". + * + * 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. The maximum number of blueprints to return per page. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of blueprints to return per page. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The page token, received from a previous ListBlueprints call. + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The page token, received from a previous ListBlueprints call. + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/ListBlueprintsResponse.php b/TelcoAutomation/src/V1/ListBlueprintsResponse.php new file mode 100644 index 000000000000..98af4e8efc40 --- /dev/null +++ b/TelcoAutomation/src/V1/ListBlueprintsResponse.php @@ -0,0 +1,105 @@ +google.cloud.telcoautomation.v1.ListBlueprintsResponse + */ +class ListBlueprintsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of requested blueprints. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; + */ + private $blueprints; + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\TelcoAutomation\V1\Blueprint>|\Google\Protobuf\Internal\RepeatedField $blueprints + * The list of requested blueprints. + * @type string $next_page_token + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The list of requested blueprints. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBlueprints() + { + return $this->blueprints; + } + + /** + * The list of requested blueprints. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; + * @param array<\Google\Cloud\TelcoAutomation\V1\Blueprint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBlueprints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\Blueprint::class); + $this->blueprints = $arr; + + return $this; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/ListDeploymentRevisionsRequest.php b/TelcoAutomation/src/V1/ListDeploymentRevisionsRequest.php new file mode 100644 index 000000000000..a5b6236e0de4 --- /dev/null +++ b/TelcoAutomation/src/V1/ListDeploymentRevisionsRequest.php @@ -0,0 +1,153 @@ +google.cloud.telcoautomation.v1.ListDeploymentRevisionsRequest + */ +class ListDeploymentRevisionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the deployment to list revisions for. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The maximum number of revisions to return per page. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The page token, received from a previous ListDeploymentRevisions + * call Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $name Required. The name of the deployment to list revisions for. Please see + * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ListDeploymentRevisionsRequest + * + * @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 to list revisions for. + * @type int $page_size + * Optional. The maximum number of revisions to return per page. + * @type string $page_token + * Optional. The page token, received from a previous ListDeploymentRevisions + * call Provide this to retrieve the subsequent page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the deployment to list revisions for. + * + * 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 to list revisions for. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The maximum number of revisions to return per page. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of revisions to return per page. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The page token, received from a previous ListDeploymentRevisions + * call Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The page token, received from a previous ListDeploymentRevisions + * call Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/ListDeploymentRevisionsResponse.php b/TelcoAutomation/src/V1/ListDeploymentRevisionsResponse.php new file mode 100644 index 000000000000..977b44de59c2 --- /dev/null +++ b/TelcoAutomation/src/V1/ListDeploymentRevisionsResponse.php @@ -0,0 +1,105 @@ +google.cloud.telcoautomation.v1.ListDeploymentRevisionsResponse + */ +class ListDeploymentRevisionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The revisions of the deployment. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; + */ + private $deployments; + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\TelcoAutomation\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $deployments + * The revisions of the deployment. + * @type string $next_page_token + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The revisions of the deployment. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeployments() + { + return $this->deployments; + } + + /** + * The revisions of the deployment. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; + * @param array<\Google\Cloud\TelcoAutomation\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeployments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\Deployment::class); + $this->deployments = $arr; + + return $this; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/ListDeploymentsRequest.php b/TelcoAutomation/src/V1/ListDeploymentsRequest.php new file mode 100644 index 000000000000..6b3f2db56d61 --- /dev/null +++ b/TelcoAutomation/src/V1/ListDeploymentsRequest.php @@ -0,0 +1,205 @@ +google.cloud.telcoautomation.v1.ListDeploymentsRequest + */ +class ListDeploymentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Filtering only supports equality on deployment state. + * It should be in the form: "state = DRAFT". `OR` operator can be used to + * get response for multiple states. e.g. "state = DRAFT OR state = APPLIED". + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. The maximum number of deployments to return per page. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The page token, received from a previous ListDeployments call. + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". Please see + * {@see TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\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 name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * @type string $filter + * Optional. Filtering only supports equality on deployment state. + * It should be in the form: "state = DRAFT". `OR` operator can be used to + * get response for multiple states. e.g. "state = DRAFT OR state = APPLIED". + * @type int $page_size + * Optional. The maximum number of deployments to return per page. + * @type string $page_token + * Optional. The page token, received from a previous ListDeployments call. + * It can be provided to retrieve the subsequent page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * 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. Filtering only supports equality on deployment state. + * It should be in the form: "state = DRAFT". `OR` operator can be used to + * get response for multiple states. e.g. "state = DRAFT OR state = APPLIED". + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filtering only supports equality on deployment state. + * It should be in the form: "state = DRAFT". `OR` operator can be used to + * get response for multiple states. e.g. "state = DRAFT OR state = APPLIED". + * + * 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. The maximum number of deployments to return per page. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of deployments to return per page. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The page token, received from a previous ListDeployments call. + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The page token, received from a previous ListDeployments call. + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/ListDeploymentsResponse.php b/TelcoAutomation/src/V1/ListDeploymentsResponse.php new file mode 100644 index 000000000000..451c88afd295 --- /dev/null +++ b/TelcoAutomation/src/V1/ListDeploymentsResponse.php @@ -0,0 +1,105 @@ +google.cloud.telcoautomation.v1.ListDeploymentsResponse + */ +class ListDeploymentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of requested deployments. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; + */ + private $deployments; + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\TelcoAutomation\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $deployments + * The list of requested deployments. + * @type string $next_page_token + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The list of requested deployments. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeployments() + { + return $this->deployments; + } + + /** + * The list of requested deployments. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; + * @param array<\Google\Cloud\TelcoAutomation\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeployments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\Deployment::class); + $this->deployments = $arr; + + return $this; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/ListEdgeSlmsRequest.php b/TelcoAutomation/src/V1/ListEdgeSlmsRequest.php new file mode 100644 index 000000000000..3fd5a27fa80a --- /dev/null +++ b/TelcoAutomation/src/V1/ListEdgeSlmsRequest.php @@ -0,0 +1,221 @@ +google.cloud.telcoautomation.v1.ListEdgeSlmsRequest + */ +class ListEdgeSlmsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListEdgeSlmsRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListEdgeSlmsRequest + * Please see {@see TelcoAutomationClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ListEdgeSlmsRequest + * + * @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. Parent value for ListEdgeSlmsRequest + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results + * @type string $order_by + * Hint for how to order the results + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListEdgeSlmsRequest + * + * 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. Parent value for ListEdgeSlmsRequest + * + * 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; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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; + } + + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results + * + * 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; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results + * + * 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/TelcoAutomation/src/V1/ListEdgeSlmsResponse.php b/TelcoAutomation/src/V1/ListEdgeSlmsResponse.php new file mode 100644 index 000000000000..381a04774e22 --- /dev/null +++ b/TelcoAutomation/src/V1/ListEdgeSlmsResponse.php @@ -0,0 +1,135 @@ +google.cloud.telcoautomation.v1.ListEdgeSlmsResponse + */ +class ListEdgeSlmsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of EdgeSlm + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.EdgeSlm edge_slms = 1; + */ + private $edge_slms; + /** + * A token identifying a page of results the server should 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\TelcoAutomation\V1\EdgeSlm>|\Google\Protobuf\Internal\RepeatedField $edge_slms + * The list of EdgeSlm + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The list of EdgeSlm + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.EdgeSlm edge_slms = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEdgeSlms() + { + return $this->edge_slms; + } + + /** + * The list of EdgeSlm + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.EdgeSlm edge_slms = 1; + * @param array<\Google\Cloud\TelcoAutomation\V1\EdgeSlm>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEdgeSlms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\EdgeSlm::class); + $this->edge_slms = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should 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/TelcoAutomation/src/V1/ListHydratedDeploymentsRequest.php b/TelcoAutomation/src/V1/ListHydratedDeploymentsRequest.php new file mode 100644 index 000000000000..c25e8a018545 --- /dev/null +++ b/TelcoAutomation/src/V1/ListHydratedDeploymentsRequest.php @@ -0,0 +1,165 @@ +google.cloud.telcoautomation.v1.ListHydratedDeploymentsRequest + */ +class ListHydratedDeploymentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The deployment managing the hydrated deployments. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of hydrated deployments to return. The service + * may return fewer than this value. If unspecified, at most 50 hydrated + * deployments will be returned. The maximum value is 1000. Values above 1000 + * will be set to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The page token, received from a previous ListHydratedDeployments + * call. Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The deployment managing the hydrated deployments. Please see + * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ListHydratedDeploymentsRequest + * + * @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 deployment managing the hydrated deployments. + * @type int $page_size + * Optional. The maximum number of hydrated deployments to return. The service + * may return fewer than this value. If unspecified, at most 50 hydrated + * deployments will be returned. The maximum value is 1000. Values above 1000 + * will be set to 1000. + * @type string $page_token + * Optional. The page token, received from a previous ListHydratedDeployments + * call. Provide this to retrieve the subsequent page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The deployment managing the hydrated deployments. + * + * 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 deployment managing the hydrated deployments. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of hydrated deployments to return. The service + * may return fewer than this value. If unspecified, at most 50 hydrated + * deployments will be returned. The maximum value is 1000. Values above 1000 + * will be set to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of hydrated deployments to return. The service + * may return fewer than this value. If unspecified, at most 50 hydrated + * deployments will be returned. The maximum value is 1000. Values above 1000 + * will be set to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The page token, received from a previous ListHydratedDeployments + * call. Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The page token, received from a previous ListHydratedDeployments + * call. Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/ListHydratedDeploymentsResponse.php b/TelcoAutomation/src/V1/ListHydratedDeploymentsResponse.php new file mode 100644 index 000000000000..bebff355c6f6 --- /dev/null +++ b/TelcoAutomation/src/V1/ListHydratedDeploymentsResponse.php @@ -0,0 +1,105 @@ +google.cloud.telcoautomation.v1.ListHydratedDeploymentsResponse + */ +class ListHydratedDeploymentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of hydrated deployments. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.HydratedDeployment hydrated_deployments = 1; + */ + private $hydrated_deployments; + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\TelcoAutomation\V1\HydratedDeployment>|\Google\Protobuf\Internal\RepeatedField $hydrated_deployments + * The list of hydrated deployments. + * @type string $next_page_token + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The list of hydrated deployments. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.HydratedDeployment hydrated_deployments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHydratedDeployments() + { + return $this->hydrated_deployments; + } + + /** + * The list of hydrated deployments. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.HydratedDeployment hydrated_deployments = 1; + * @param array<\Google\Cloud\TelcoAutomation\V1\HydratedDeployment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHydratedDeployments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\HydratedDeployment::class); + $this->hydrated_deployments = $arr; + + return $this; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/ListOrchestrationClustersRequest.php b/TelcoAutomation/src/V1/ListOrchestrationClustersRequest.php new file mode 100644 index 000000000000..9577ff201170 --- /dev/null +++ b/TelcoAutomation/src/V1/ListOrchestrationClustersRequest.php @@ -0,0 +1,221 @@ +google.cloud.telcoautomation.v1.ListOrchestrationClustersRequest + */ +class ListOrchestrationClustersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListOrchestrationClustersRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListOrchestrationClustersRequest + * Please see {@see TelcoAutomationClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ListOrchestrationClustersRequest + * + * @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. Parent value for ListOrchestrationClustersRequest + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results. + * @type string $order_by + * Hint for how to order the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListOrchestrationClustersRequest + * + * 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. Parent value for ListOrchestrationClustersRequest + * + * 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; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results. + * + * 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; + } + + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results. + * + * 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/TelcoAutomation/src/V1/ListOrchestrationClustersResponse.php b/TelcoAutomation/src/V1/ListOrchestrationClustersResponse.php new file mode 100644 index 000000000000..762548d5a74b --- /dev/null +++ b/TelcoAutomation/src/V1/ListOrchestrationClustersResponse.php @@ -0,0 +1,135 @@ +google.cloud.telcoautomation.v1.ListOrchestrationClustersResponse + */ +class ListOrchestrationClustersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of OrchestrationCluster + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.OrchestrationCluster orchestration_clusters = 1; + */ + private $orchestration_clusters; + /** + * A token identifying a page of results the server should 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\TelcoAutomation\V1\OrchestrationCluster>|\Google\Protobuf\Internal\RepeatedField $orchestration_clusters + * The list of OrchestrationCluster + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The list of OrchestrationCluster + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.OrchestrationCluster orchestration_clusters = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOrchestrationClusters() + { + return $this->orchestration_clusters; + } + + /** + * The list of OrchestrationCluster + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.OrchestrationCluster orchestration_clusters = 1; + * @param array<\Google\Cloud\TelcoAutomation\V1\OrchestrationCluster>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOrchestrationClusters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster::class); + $this->orchestration_clusters = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should 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/TelcoAutomation/src/V1/ListPublicBlueprintsRequest.php b/TelcoAutomation/src/V1/ListPublicBlueprintsRequest.php new file mode 100644 index 000000000000..29491797f726 --- /dev/null +++ b/TelcoAutomation/src/V1/ListPublicBlueprintsRequest.php @@ -0,0 +1,163 @@ +google.cloud.telcoautomation.v1.ListPublicBlueprintsRequest + */ +class ListPublicBlueprintsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value of public blueprint. + * Format should be - + * "projects/{project_id}/locations/{location_name}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Parent value of public blueprint. + * Format should be - + * "projects/{project_id}/locations/{location_name}". Please see + * {@see TelcoAutomationClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ListPublicBlueprintsRequest + * + * @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. Parent value of public blueprint. + * Format should be - + * "projects/{project_id}/locations/{location_name}". + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value of public blueprint. + * Format should be - + * "projects/{project_id}/locations/{location_name}". + * + * 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. Parent value of public blueprint. + * Format should be - + * "projects/{project_id}/locations/{location_name}". + * + * 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. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/ListPublicBlueprintsResponse.php b/TelcoAutomation/src/V1/ListPublicBlueprintsResponse.php new file mode 100644 index 000000000000..8c788b83b9f3 --- /dev/null +++ b/TelcoAutomation/src/V1/ListPublicBlueprintsResponse.php @@ -0,0 +1,105 @@ +google.cloud.telcoautomation.v1.ListPublicBlueprintsResponse + */ +class ListPublicBlueprintsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of public blueprints to return. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.PublicBlueprint public_blueprints = 1; + */ + private $public_blueprints; + /** + * Output only. A token identifying a page of results the server should + * return. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\TelcoAutomation\V1\PublicBlueprint>|\Google\Protobuf\Internal\RepeatedField $public_blueprints + * The list of public blueprints to return. + * @type string $next_page_token + * Output only. A token identifying a page of results the server should + * return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The list of public blueprints to return. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.PublicBlueprint public_blueprints = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPublicBlueprints() + { + return $this->public_blueprints; + } + + /** + * The list of public blueprints to return. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.PublicBlueprint public_blueprints = 1; + * @param array<\Google\Cloud\TelcoAutomation\V1\PublicBlueprint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPublicBlueprints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\PublicBlueprint::class); + $this->public_blueprints = $arr; + + return $this; + } + + /** + * Output only. A token identifying a page of results the server should + * return. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. A token identifying a page of results the server should + * return. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/ManagementConfig.php b/TelcoAutomation/src/V1/ManagementConfig.php new file mode 100644 index 000000000000..b4f1b49bdefe --- /dev/null +++ b/TelcoAutomation/src/V1/ManagementConfig.php @@ -0,0 +1,111 @@ +google.cloud.telcoautomation.v1.ManagementConfig + */ +class ManagementConfig extends \Google\Protobuf\Internal\Message +{ + protected $oneof_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\TelcoAutomation\V1\StandardManagementConfig $standard_management_config + * Configuration of the standard (GKE) cluster management + * @type \Google\Cloud\TelcoAutomation\V1\FullManagementConfig $full_management_config + * Configuration of the full (Autopilot) cluster management. Full cluster + * management is a preview feature. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Configuration of the standard (GKE) cluster management + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.StandardManagementConfig standard_management_config = 1; + * @return \Google\Cloud\TelcoAutomation\V1\StandardManagementConfig|null + */ + public function getStandardManagementConfig() + { + return $this->readOneof(1); + } + + public function hasStandardManagementConfig() + { + return $this->hasOneof(1); + } + + /** + * Configuration of the standard (GKE) cluster management + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.StandardManagementConfig standard_management_config = 1; + * @param \Google\Cloud\TelcoAutomation\V1\StandardManagementConfig $var + * @return $this + */ + public function setStandardManagementConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\StandardManagementConfig::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Configuration of the full (Autopilot) cluster management. Full cluster + * management is a preview feature. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.FullManagementConfig full_management_config = 2; + * @return \Google\Cloud\TelcoAutomation\V1\FullManagementConfig|null + */ + public function getFullManagementConfig() + { + return $this->readOneof(2); + } + + public function hasFullManagementConfig() + { + return $this->hasOneof(2); + } + + /** + * Configuration of the full (Autopilot) cluster management. Full cluster + * management is a preview feature. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.FullManagementConfig full_management_config = 2; + * @param \Google\Cloud\TelcoAutomation\V1\FullManagementConfig $var + * @return $this + */ + public function setFullManagementConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\FullManagementConfig::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getOneofConfig() + { + return $this->whichOneof("oneof_config"); + } + +} + diff --git a/TelcoAutomation/src/V1/MasterAuthorizedNetworksConfig.php b/TelcoAutomation/src/V1/MasterAuthorizedNetworksConfig.php new file mode 100644 index 000000000000..fb7c70431adc --- /dev/null +++ b/TelcoAutomation/src/V1/MasterAuthorizedNetworksConfig.php @@ -0,0 +1,71 @@ +google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig + */ +class MasterAuthorizedNetworksConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. cidr_blocks define up to 50 external networks that could access + * Kubernetes master through HTTPS. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig.CidrBlock cidr_blocks = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $cidr_blocks; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig\CidrBlock>|\Google\Protobuf\Internal\RepeatedField $cidr_blocks + * Optional. cidr_blocks define up to 50 external networks that could access + * Kubernetes master through HTTPS. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Optional. cidr_blocks define up to 50 external networks that could access + * Kubernetes master through HTTPS. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig.CidrBlock cidr_blocks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCidrBlocks() + { + return $this->cidr_blocks; + } + + /** + * Optional. cidr_blocks define up to 50 external networks that could access + * Kubernetes master through HTTPS. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig.CidrBlock cidr_blocks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig\CidrBlock>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCidrBlocks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig\CidrBlock::class); + $this->cidr_blocks = $arr; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/MasterAuthorizedNetworksConfig/CidrBlock.php b/TelcoAutomation/src/V1/MasterAuthorizedNetworksConfig/CidrBlock.php new file mode 100644 index 000000000000..539cfe1407df --- /dev/null +++ b/TelcoAutomation/src/V1/MasterAuthorizedNetworksConfig/CidrBlock.php @@ -0,0 +1,118 @@ +google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig.CidrBlock + */ +class CidrBlock extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. display_name is an optional field for users to identify CIDR + * blocks. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Optional. cidr_block must be specified in CIDR notation when using + * master_authorized_networks_config. Currently, the user could still use + * the deprecated man_block field, so this field is currently optional, but + * will be required in the future. + * + * Generated from protobuf field string cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cidr_block = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Optional. display_name is an optional field for users to identify CIDR + * blocks. + * @type string $cidr_block + * Optional. cidr_block must be specified in CIDR notation when using + * master_authorized_networks_config. Currently, the user could still use + * the deprecated man_block field, so this field is currently optional, but + * will be required in the future. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Optional. display_name is an optional field for users to identify CIDR + * blocks. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. display_name is an optional field for users to identify CIDR + * blocks. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. cidr_block must be specified in CIDR notation when using + * master_authorized_networks_config. Currently, the user could still use + * the deprecated man_block field, so this field is currently optional, but + * will be required in the future. + * + * Generated from protobuf field string cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCidrBlock() + { + return $this->cidr_block; + } + + /** + * Optional. cidr_block must be specified in CIDR notation when using + * master_authorized_networks_config. Currently, the user could still use + * the deprecated man_block field, so this field is currently optional, but + * will be required in the future. + * + * Generated from protobuf field string cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->cidr_block = $var; + + return $this; + } + +} + + diff --git a/TelcoAutomation/src/V1/NFDeploySiteStatus.php b/TelcoAutomation/src/V1/NFDeploySiteStatus.php new file mode 100644 index 000000000000..34b67fa12bcd --- /dev/null +++ b/TelcoAutomation/src/V1/NFDeploySiteStatus.php @@ -0,0 +1,189 @@ +google.cloud.telcoautomation.v1.NFDeploySiteStatus + */ +class NFDeploySiteStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Site id. + * + * Generated from protobuf field string site = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $site = ''; + /** + * Output only. If true, the Site Deletion is in progress. + * + * Generated from protobuf field bool pending_deletion = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $pending_deletion = false; + /** + * Output only. Hydration status. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.HydrationStatus hydration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $hydration = null; + /** + * Output only. Workload status. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.WorkloadStatus workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $workload = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $site + * Output only. Site id. + * @type bool $pending_deletion + * Output only. If true, the Site Deletion is in progress. + * @type \Google\Cloud\TelcoAutomation\V1\HydrationStatus $hydration + * Output only. Hydration status. + * @type \Google\Cloud\TelcoAutomation\V1\WorkloadStatus $workload + * Output only. Workload status. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Site id. + * + * Generated from protobuf field string site = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSite() + { + return $this->site; + } + + /** + * Output only. Site id. + * + * Generated from protobuf field string site = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSite($var) + { + GPBUtil::checkString($var, True); + $this->site = $var; + + return $this; + } + + /** + * Output only. If true, the Site Deletion is in progress. + * + * Generated from protobuf field bool pending_deletion = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getPendingDeletion() + { + return $this->pending_deletion; + } + + /** + * Output only. If true, the Site Deletion is in progress. + * + * Generated from protobuf field bool pending_deletion = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setPendingDeletion($var) + { + GPBUtil::checkBool($var); + $this->pending_deletion = $var; + + return $this; + } + + /** + * Output only. Hydration status. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.HydrationStatus hydration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\TelcoAutomation\V1\HydrationStatus|null + */ + public function getHydration() + { + return $this->hydration; + } + + public function hasHydration() + { + return isset($this->hydration); + } + + public function clearHydration() + { + unset($this->hydration); + } + + /** + * Output only. Hydration status. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.HydrationStatus hydration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\TelcoAutomation\V1\HydrationStatus $var + * @return $this + */ + public function setHydration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\HydrationStatus::class); + $this->hydration = $var; + + return $this; + } + + /** + * Output only. Workload status. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.WorkloadStatus workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\TelcoAutomation\V1\WorkloadStatus|null + */ + public function getWorkload() + { + return $this->workload; + } + + public function hasWorkload() + { + return isset($this->workload); + } + + public function clearWorkload() + { + unset($this->workload); + } + + /** + * Output only. Workload status. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.WorkloadStatus workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\TelcoAutomation\V1\WorkloadStatus $var + * @return $this + */ + public function setWorkload($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\WorkloadStatus::class); + $this->workload = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/NFDeployStatus.php b/TelcoAutomation/src/V1/NFDeployStatus.php new file mode 100644 index 000000000000..8bfc09183fbf --- /dev/null +++ b/TelcoAutomation/src/V1/NFDeployStatus.php @@ -0,0 +1,139 @@ +google.cloud.telcoautomation.v1.NFDeployStatus + */ +class NFDeployStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Total number of NFs targeted by this deployment + * + * Generated from protobuf field int32 targeted_nfs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $targeted_nfs = 0; + /** + * Output only. Total number of NFs targeted by this deployment with a Ready + * Condition set. + * + * Generated from protobuf field int32 ready_nfs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $ready_nfs = 0; + /** + * Output only. Per-Site Status. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.NFDeploySiteStatus sites = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $sites; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $targeted_nfs + * Output only. Total number of NFs targeted by this deployment + * @type int $ready_nfs + * Output only. Total number of NFs targeted by this deployment with a Ready + * Condition set. + * @type array<\Google\Cloud\TelcoAutomation\V1\NFDeploySiteStatus>|\Google\Protobuf\Internal\RepeatedField $sites + * Output only. Per-Site Status. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Total number of NFs targeted by this deployment + * + * Generated from protobuf field int32 targeted_nfs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTargetedNfs() + { + return $this->targeted_nfs; + } + + /** + * Output only. Total number of NFs targeted by this deployment + * + * Generated from protobuf field int32 targeted_nfs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTargetedNfs($var) + { + GPBUtil::checkInt32($var); + $this->targeted_nfs = $var; + + return $this; + } + + /** + * Output only. Total number of NFs targeted by this deployment with a Ready + * Condition set. + * + * Generated from protobuf field int32 ready_nfs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getReadyNfs() + { + return $this->ready_nfs; + } + + /** + * Output only. Total number of NFs targeted by this deployment with a Ready + * Condition set. + * + * Generated from protobuf field int32 ready_nfs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setReadyNfs($var) + { + GPBUtil::checkInt32($var); + $this->ready_nfs = $var; + + return $this; + } + + /** + * Output only. Per-Site Status. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.NFDeploySiteStatus sites = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSites() + { + return $this->sites; + } + + /** + * Output only. Per-Site Status. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.NFDeploySiteStatus sites = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\TelcoAutomation\V1\NFDeploySiteStatus>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSites($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\NFDeploySiteStatus::class); + $this->sites = $arr; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/OperationMetadata.php b/TelcoAutomation/src/V1/OperationMetadata.php new file mode 100644 index 000000000000..c01fc50eab26 --- /dev/null +++ b/TelcoAutomation/src/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.telcoautomation.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_message + * Output only. Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/OrchestrationCluster.php b/TelcoAutomation/src/V1/OrchestrationCluster.php new file mode 100644 index 000000000000..997a97f6304f --- /dev/null +++ b/TelcoAutomation/src/V1/OrchestrationCluster.php @@ -0,0 +1,306 @@ +google.cloud.telcoautomation.v1.OrchestrationCluster + */ +class OrchestrationCluster extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the orchestration cluster. The name of orchestration cluster cannot + * be more than 24 characters. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Management configuration of the underlying GKE cluster. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.ManagementConfig management_config = 5; + */ + protected $management_config = null; + /** + * Output only. [Output only] Create time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. [Output only] Update time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Output only. Provides the TNA version installed on the cluster. + * + * Generated from protobuf field string tna_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $tna_version = ''; + /** + * Output only. State of the Orchestration Cluster. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.OrchestrationCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the orchestration cluster. The name of orchestration cluster cannot + * be more than 24 characters. + * @type \Google\Cloud\TelcoAutomation\V1\ManagementConfig $management_config + * Management configuration of the underlying GKE cluster. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. [Output only] Create time stamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. [Output only] Update time stamp. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs. + * @type string $tna_version + * Output only. Provides the TNA version installed on the cluster. + * @type int $state + * Output only. State of the Orchestration Cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Name of the orchestration cluster. The name of orchestration cluster cannot + * be more than 24 characters. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the orchestration cluster. The name of orchestration cluster cannot + * be more than 24 characters. + * + * 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; + } + + /** + * Management configuration of the underlying GKE cluster. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.ManagementConfig management_config = 5; + * @return \Google\Cloud\TelcoAutomation\V1\ManagementConfig|null + */ + public function getManagementConfig() + { + return $this->management_config; + } + + public function hasManagementConfig() + { + return isset($this->management_config); + } + + public function clearManagementConfig() + { + unset($this->management_config); + } + + /** + * Management configuration of the underlying GKE cluster. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.ManagementConfig management_config = 5; + * @param \Google\Cloud\TelcoAutomation\V1\ManagementConfig $var + * @return $this + */ + public function setManagementConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\ManagementConfig::class); + $this->management_config = $var; + + return $this; + } + + /** + * Output only. [Output only] Create time stamp. + * + * 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. [Output only] Create time stamp. + * + * 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. [Output only] Update time stamp. + * + * 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. [Output only] Update time stamp. + * + * 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; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs. + * + * 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. Provides the TNA version installed on the cluster. + * + * Generated from protobuf field string tna_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTnaVersion() + { + return $this->tna_version; + } + + /** + * Output only. Provides the TNA version installed on the cluster. + * + * Generated from protobuf field string tna_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTnaVersion($var) + { + GPBUtil::checkString($var, True); + $this->tna_version = $var; + + return $this; + } + + /** + * Output only. State of the Orchestration Cluster. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.OrchestrationCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the Orchestration Cluster. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.OrchestrationCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/OrchestrationCluster/State.php b/TelcoAutomation/src/V1/OrchestrationCluster/State.php new file mode 100644 index 000000000000..02fab267da4e --- /dev/null +++ b/TelcoAutomation/src/V1/OrchestrationCluster/State.php @@ -0,0 +1,77 @@ +google.cloud.telcoautomation.v1.OrchestrationCluster.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * OrchestrationCluster is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * OrchestrationCluster has been created and is ready for use. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * OrchestrationCluster is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * OrchestrationCluster encountered an error and is in an indeterministic + * state. User can still initiate a delete operation on this state. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + self::DELETING => 'DELETING', + self::FAILED => 'FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/TelcoAutomation/src/V1/ProposeBlueprintRequest.php b/TelcoAutomation/src/V1/ProposeBlueprintRequest.php new file mode 100644 index 000000000000..55d600ee30af --- /dev/null +++ b/TelcoAutomation/src/V1/ProposeBlueprintRequest.php @@ -0,0 +1,81 @@ +google.cloud.telcoautomation.v1.ProposeBlueprintRequest + */ +class ProposeBlueprintRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the blueprint being proposed. + * + * 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 blueprint being proposed. Please see + * {@see TelcoAutomationClient::blueprintName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ProposeBlueprintRequest + * + * @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 blueprint being proposed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the blueprint being proposed. + * + * 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 blueprint being proposed. + * + * 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/TelcoAutomation/src/V1/PublicBlueprint.php b/TelcoAutomation/src/V1/PublicBlueprint.php new file mode 100644 index 000000000000..0f344f29b8ca --- /dev/null +++ b/TelcoAutomation/src/V1/PublicBlueprint.php @@ -0,0 +1,250 @@ +google.cloud.telcoautomation.v1.PublicBlueprint + */ +class PublicBlueprint extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the public blueprint. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The display name of the public blueprint. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * The description of the public blueprint. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * DeploymentLevel of a blueprint signifies where the blueprint will be + * applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 4; + */ + protected $deployment_level = 0; + /** + * Source provider is the author of a public blueprint. e.g. Google, vendors + * + * Generated from protobuf field string source_provider = 5; + */ + protected $source_provider = ''; + /** + * Output only. Indicates if the deployment created from this blueprint can be + * rolled back. + * + * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $rollback_support = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the public blueprint. + * @type string $display_name + * The display name of the public blueprint. + * @type string $description + * The description of the public blueprint. + * @type int $deployment_level + * DeploymentLevel of a blueprint signifies where the blueprint will be + * applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] + * @type string $source_provider + * Source provider is the author of a public blueprint. e.g. Google, vendors + * @type bool $rollback_support + * Output only. Indicates if the deployment created from this blueprint can be + * rolled back. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Name of the public blueprint. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the public blueprint. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The display name of the public blueprint. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the public blueprint. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The description of the public blueprint. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the public blueprint. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * DeploymentLevel of a blueprint signifies where the blueprint will be + * applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 4; + * @return int + */ + public function getDeploymentLevel() + { + return $this->deployment_level; + } + + /** + * DeploymentLevel of a blueprint signifies where the blueprint will be + * applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 4; + * @param int $var + * @return $this + */ + public function setDeploymentLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\DeploymentLevel::class); + $this->deployment_level = $var; + + return $this; + } + + /** + * Source provider is the author of a public blueprint. e.g. Google, vendors + * + * Generated from protobuf field string source_provider = 5; + * @return string + */ + public function getSourceProvider() + { + return $this->source_provider; + } + + /** + * Source provider is the author of a public blueprint. e.g. Google, vendors + * + * Generated from protobuf field string source_provider = 5; + * @param string $var + * @return $this + */ + public function setSourceProvider($var) + { + GPBUtil::checkString($var, True); + $this->source_provider = $var; + + return $this; + } + + /** + * Output only. Indicates if the deployment created from this blueprint can be + * rolled back. + * + * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRollbackSupport() + { + return $this->rollback_support; + } + + /** + * Output only. Indicates if the deployment created from this blueprint can be + * rolled back. + * + * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRollbackSupport($var) + { + GPBUtil::checkBool($var); + $this->rollback_support = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/RejectBlueprintRequest.php b/TelcoAutomation/src/V1/RejectBlueprintRequest.php new file mode 100644 index 000000000000..7222716ce547 --- /dev/null +++ b/TelcoAutomation/src/V1/RejectBlueprintRequest.php @@ -0,0 +1,81 @@ +google.cloud.telcoautomation.v1.RejectBlueprintRequest + */ +class RejectBlueprintRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the blueprint being rejected. + * + * 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 blueprint being rejected. Please see + * {@see TelcoAutomationClient::blueprintName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\RejectBlueprintRequest + * + * @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 blueprint being rejected. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the blueprint being rejected. + * + * 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 blueprint being rejected. + * + * 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/TelcoAutomation/src/V1/RemoveDeploymentRequest.php b/TelcoAutomation/src/V1/RemoveDeploymentRequest.php new file mode 100644 index 000000000000..adae44ce3934 --- /dev/null +++ b/TelcoAutomation/src/V1/RemoveDeploymentRequest.php @@ -0,0 +1,81 @@ +google.cloud.telcoautomation.v1.RemoveDeploymentRequest + */ +class RemoveDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of deployment to initiate delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of deployment to initiate delete. Please see + * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\RemoveDeploymentRequest + * + * @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 deployment to initiate delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of deployment to initiate delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of deployment to initiate delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/ResourceStatus.php b/TelcoAutomation/src/V1/ResourceStatus.php new file mode 100644 index 000000000000..d9beabf366fe --- /dev/null +++ b/TelcoAutomation/src/V1/ResourceStatus.php @@ -0,0 +1,315 @@ +google.cloud.telcoautomation.v1.ResourceStatus + */ +class ResourceStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the resource. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Namespace of the resource. + * + * Generated from protobuf field string resource_namespace = 2; + */ + protected $resource_namespace = ''; + /** + * Group to which the resource belongs to. + * + * Generated from protobuf field string group = 3; + */ + protected $group = ''; + /** + * Version of the resource. + * + * Generated from protobuf field string version = 4; + */ + protected $version = ''; + /** + * Kind of the resource. + * + * Generated from protobuf field string kind = 5; + */ + protected $kind = ''; + /** + * Output only. Resource type. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.ResourceType resource_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $resource_type = 0; + /** + * Output only. Status of the resource. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Status status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = 0; + /** + * Output only. Detailed status of NFDeploy. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.NFDeployStatus nf_deploy_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $nf_deploy_status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the resource. + * @type string $resource_namespace + * Namespace of the resource. + * @type string $group + * Group to which the resource belongs to. + * @type string $version + * Version of the resource. + * @type string $kind + * Kind of the resource. + * @type int $resource_type + * Output only. Resource type. + * @type int $status + * Output only. Status of the resource. + * @type \Google\Cloud\TelcoAutomation\V1\NFDeployStatus $nf_deploy_status + * Output only. Detailed status of NFDeploy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Name of the resource. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the resource. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Namespace of the resource. + * + * Generated from protobuf field string resource_namespace = 2; + * @return string + */ + public function getResourceNamespace() + { + return $this->resource_namespace; + } + + /** + * Namespace of the resource. + * + * Generated from protobuf field string resource_namespace = 2; + * @param string $var + * @return $this + */ + public function setResourceNamespace($var) + { + GPBUtil::checkString($var, True); + $this->resource_namespace = $var; + + return $this; + } + + /** + * Group to which the resource belongs to. + * + * Generated from protobuf field string group = 3; + * @return string + */ + public function getGroup() + { + return $this->group; + } + + /** + * Group to which the resource belongs to. + * + * Generated from protobuf field string group = 3; + * @param string $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkString($var, True); + $this->group = $var; + + return $this; + } + + /** + * Version of the resource. + * + * Generated from protobuf field string version = 4; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Version of the resource. + * + * Generated from protobuf field string version = 4; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Kind of the resource. + * + * Generated from protobuf field string kind = 5; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * Kind of the resource. + * + * Generated from protobuf field string kind = 5; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Output only. Resource type. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.ResourceType resource_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getResourceType() + { + return $this->resource_type; + } + + /** + * Output only. Resource type. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.ResourceType resource_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setResourceType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\ResourceType::class); + $this->resource_type = $var; + + return $this; + } + + /** + * Output only. Status of the resource. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Status status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Output only. Status of the resource. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Status status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\Status::class); + $this->status = $var; + + return $this; + } + + /** + * Output only. Detailed status of NFDeploy. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.NFDeployStatus nf_deploy_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\TelcoAutomation\V1\NFDeployStatus|null + */ + public function getNfDeployStatus() + { + return $this->nf_deploy_status; + } + + public function hasNfDeployStatus() + { + return isset($this->nf_deploy_status); + } + + public function clearNfDeployStatus() + { + unset($this->nf_deploy_status); + } + + /** + * Output only. Detailed status of NFDeploy. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.NFDeployStatus nf_deploy_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\TelcoAutomation\V1\NFDeployStatus $var + * @return $this + */ + public function setNfDeployStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\NFDeployStatus::class); + $this->nf_deploy_status = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/ResourceType.php b/TelcoAutomation/src/V1/ResourceType.php new file mode 100644 index 000000000000..e6f0ba0d7f44 --- /dev/null +++ b/TelcoAutomation/src/V1/ResourceType.php @@ -0,0 +1,61 @@ +google.cloud.telcoautomation.v1.ResourceType + */ +class ResourceType +{ + /** + * Unspecified resource type. + * + * Generated from protobuf enum RESOURCE_TYPE_UNSPECIFIED = 0; + */ + const RESOURCE_TYPE_UNSPECIFIED = 0; + /** + * User specified NF Deploy CR. + * + * Generated from protobuf enum NF_DEPLOY_RESOURCE = 1; + */ + const NF_DEPLOY_RESOURCE = 1; + /** + * CRs that are part of a blueprint. + * + * Generated from protobuf enum DEPLOYMENT_RESOURCE = 2; + */ + const DEPLOYMENT_RESOURCE = 2; + + private static $valueToName = [ + self::RESOURCE_TYPE_UNSPECIFIED => 'RESOURCE_TYPE_UNSPECIFIED', + self::NF_DEPLOY_RESOURCE => 'NF_DEPLOY_RESOURCE', + self::DEPLOYMENT_RESOURCE => 'DEPLOYMENT_RESOURCE', + ]; + + 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/TelcoAutomation/src/V1/RollbackDeploymentRequest.php b/TelcoAutomation/src/V1/RollbackDeploymentRequest.php new file mode 100644 index 000000000000..378f43cd394f --- /dev/null +++ b/TelcoAutomation/src/V1/RollbackDeploymentRequest.php @@ -0,0 +1,117 @@ +google.cloud.telcoautomation.v1.RollbackDeploymentRequest + */ +class RollbackDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the deployment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The revision id of deployment to roll back to. + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $revision_id = ''; + + /** + * @param string $name Required. Name of the deployment. Please see + * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. + * @param string $revisionId Required. The revision id of deployment to roll back to. + * + * @return \Google\Cloud\TelcoAutomation\V1\RollbackDeploymentRequest + * + * @experimental + */ + public static function build(string $name, string $revisionId): self + { + return (new self()) + ->setName($name) + ->setRevisionId($revisionId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the deployment. + * @type string $revision_id + * Required. The revision id of deployment to roll back to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the 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. Name of the 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. The revision id of deployment to roll back to. + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRevisionId() + { + return $this->revision_id; + } + + /** + * Required. The revision id of deployment to roll back to. + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRevisionId($var) + { + GPBUtil::checkString($var, True); + $this->revision_id = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/SearchBlueprintRevisionsRequest.php b/TelcoAutomation/src/V1/SearchBlueprintRevisionsRequest.php new file mode 100644 index 000000000000..86c7eab4f675 --- /dev/null +++ b/TelcoAutomation/src/V1/SearchBlueprintRevisionsRequest.php @@ -0,0 +1,233 @@ +google.cloud.telcoautomation.v1.SearchBlueprintRevisionsRequest + */ +class SearchBlueprintRevisionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Supported queries: + * 1. "" : Lists all revisions across all blueprints. + * 2. "latest=true" : Lists latest revisions across all blueprints. + * 3. "name=" : Lists all revisions of blueprint with name + * . + * 4. "name= latest=true": Lists latest revision of blueprint with name + * + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query = ''; + /** + * Optional. The maximum number of blueprints revisions to return per page. + * max page size = 100, default page size = 20. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The page token, received from a previous search call. + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". Please see + * {@see TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. + * @param string $query Required. Supported queries: + * 1. "" : Lists all revisions across all blueprints. + * 2. "latest=true" : Lists latest revisions across all blueprints. + * 3. "name=" : Lists all revisions of blueprint with name + * . + * 4. "name= latest=true": Lists latest revision of blueprint with name + * + * + * @return \Google\Cloud\TelcoAutomation\V1\SearchBlueprintRevisionsRequest + * + * @experimental + */ + public static function build(string $parent, string $query): self + { + return (new self()) + ->setParent($parent) + ->setQuery($query); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * @type string $query + * Required. Supported queries: + * 1. "" : Lists all revisions across all blueprints. + * 2. "latest=true" : Lists latest revisions across all blueprints. + * 3. "name=" : Lists all revisions of blueprint with name + * . + * 4. "name= latest=true": Lists latest revision of blueprint with name + * + * @type int $page_size + * Optional. The maximum number of blueprints revisions to return per page. + * max page size = 100, default page size = 20. + * @type string $page_token + * Optional. The page token, received from a previous search call. + * It can be provided to retrieve the subsequent page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * 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. Supported queries: + * 1. "" : Lists all revisions across all blueprints. + * 2. "latest=true" : Lists latest revisions across all blueprints. + * 3. "name=" : Lists all revisions of blueprint with name + * . + * 4. "name= latest=true": Lists latest revision of blueprint with name + * + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Required. Supported queries: + * 1. "" : Lists all revisions across all blueprints. + * 2. "latest=true" : Lists latest revisions across all blueprints. + * 3. "name=" : Lists all revisions of blueprint with name + * . + * 4. "name= latest=true": Lists latest revision of blueprint with name + * + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * Optional. The maximum number of blueprints revisions to return per page. + * max page size = 100, default page size = 20. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of blueprints revisions to return per page. + * max page size = 100, default page size = 20. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The page token, received from a previous search call. + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The page token, received from a previous search call. + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/SearchBlueprintRevisionsResponse.php b/TelcoAutomation/src/V1/SearchBlueprintRevisionsResponse.php new file mode 100644 index 000000000000..34ea86345a84 --- /dev/null +++ b/TelcoAutomation/src/V1/SearchBlueprintRevisionsResponse.php @@ -0,0 +1,105 @@ +google.cloud.telcoautomation.v1.SearchBlueprintRevisionsResponse + */ +class SearchBlueprintRevisionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of requested blueprint revisions. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; + */ + private $blueprints; + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\TelcoAutomation\V1\Blueprint>|\Google\Protobuf\Internal\RepeatedField $blueprints + * The list of requested blueprint revisions. + * @type string $next_page_token + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The list of requested blueprint revisions. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBlueprints() + { + return $this->blueprints; + } + + /** + * The list of requested blueprint revisions. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; + * @param array<\Google\Cloud\TelcoAutomation\V1\Blueprint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBlueprints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\Blueprint::class); + $this->blueprints = $arr; + + return $this; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/SearchDeploymentRevisionsRequest.php b/TelcoAutomation/src/V1/SearchDeploymentRevisionsRequest.php new file mode 100644 index 000000000000..1aa2f1a508cc --- /dev/null +++ b/TelcoAutomation/src/V1/SearchDeploymentRevisionsRequest.php @@ -0,0 +1,238 @@ +google.cloud.telcoautomation.v1.SearchDeploymentRevisionsRequest + */ +class SearchDeploymentRevisionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Supported queries: + * 1. "" : Lists all revisions across all deployments. + * 2. "latest=true" : Lists latest revisions across all + * deployments. + * 3. "name=" : Lists all revisions of deployment with name + * . + * 4. "name= latest=true": Lists latest revision of deployment with name + * + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query = ''; + /** + * Optional. The maximum number of deployment revisions to return per page. + * max page size = 100, default page size = 20. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The page token, received from a previous search call. + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". Please see + * {@see TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. + * @param string $query Required. Supported queries: + * 1. "" : Lists all revisions across all deployments. + * 2. "latest=true" : Lists latest revisions across all + * deployments. + * 3. "name=" : Lists all revisions of deployment with name + * . + * 4. "name= latest=true": Lists latest revision of deployment with name + * + * + * @return \Google\Cloud\TelcoAutomation\V1\SearchDeploymentRevisionsRequest + * + * @experimental + */ + public static function build(string $parent, string $query): self + { + return (new self()) + ->setParent($parent) + ->setQuery($query); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * @type string $query + * Required. Supported queries: + * 1. "" : Lists all revisions across all deployments. + * 2. "latest=true" : Lists latest revisions across all + * deployments. + * 3. "name=" : Lists all revisions of deployment with name + * . + * 4. "name= latest=true": Lists latest revision of deployment with name + * + * @type int $page_size + * Optional. The maximum number of deployment revisions to return per page. + * max page size = 100, default page size = 20. + * @type string $page_token + * Optional. The page token, received from a previous search call. + * It can be provided to retrieve the subsequent page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * 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. Supported queries: + * 1. "" : Lists all revisions across all deployments. + * 2. "latest=true" : Lists latest revisions across all + * deployments. + * 3. "name=" : Lists all revisions of deployment with name + * . + * 4. "name= latest=true": Lists latest revision of deployment with name + * + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Required. Supported queries: + * 1. "" : Lists all revisions across all deployments. + * 2. "latest=true" : Lists latest revisions across all + * deployments. + * 3. "name=" : Lists all revisions of deployment with name + * . + * 4. "name= latest=true": Lists latest revision of deployment with name + * + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * Optional. The maximum number of deployment revisions to return per page. + * max page size = 100, default page size = 20. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of deployment revisions to return per page. + * max page size = 100, default page size = 20. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The page token, received from a previous search call. + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The page token, received from a previous search call. + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/SearchDeploymentRevisionsResponse.php b/TelcoAutomation/src/V1/SearchDeploymentRevisionsResponse.php new file mode 100644 index 000000000000..430cb0ea2a8d --- /dev/null +++ b/TelcoAutomation/src/V1/SearchDeploymentRevisionsResponse.php @@ -0,0 +1,105 @@ +google.cloud.telcoautomation.v1.SearchDeploymentRevisionsResponse + */ +class SearchDeploymentRevisionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of requested deployment revisions. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; + */ + private $deployments; + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\TelcoAutomation\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $deployments + * The list of requested deployment revisions. + * @type string $next_page_token + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The list of requested deployment revisions. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeployments() + { + return $this->deployments; + } + + /** + * The list of requested deployment revisions. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; + * @param array<\Google\Cloud\TelcoAutomation\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeployments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\Deployment::class); + $this->deployments = $arr; + + return $this; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/SiteVersion.php b/TelcoAutomation/src/V1/SiteVersion.php new file mode 100644 index 000000000000..cd8bed6849c2 --- /dev/null +++ b/TelcoAutomation/src/V1/SiteVersion.php @@ -0,0 +1,135 @@ +google.cloud.telcoautomation.v1.SiteVersion + */ +class SiteVersion extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. NF vendor. + * + * Generated from protobuf field string nf_vendor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $nf_vendor = ''; + /** + * Output only. NF vendor type. + * + * Generated from protobuf field string nf_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $nf_type = ''; + /** + * Output only. NF version. + * + * Generated from protobuf field string nf_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $nf_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $nf_vendor + * Output only. NF vendor. + * @type string $nf_type + * Output only. NF vendor type. + * @type string $nf_version + * Output only. NF version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. NF vendor. + * + * Generated from protobuf field string nf_vendor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNfVendor() + { + return $this->nf_vendor; + } + + /** + * Output only. NF vendor. + * + * Generated from protobuf field string nf_vendor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNfVendor($var) + { + GPBUtil::checkString($var, True); + $this->nf_vendor = $var; + + return $this; + } + + /** + * Output only. NF vendor type. + * + * Generated from protobuf field string nf_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNfType() + { + return $this->nf_type; + } + + /** + * Output only. NF vendor type. + * + * Generated from protobuf field string nf_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNfType($var) + { + GPBUtil::checkString($var, True); + $this->nf_type = $var; + + return $this; + } + + /** + * Output only. NF version. + * + * Generated from protobuf field string nf_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNfVersion() + { + return $this->nf_version; + } + + /** + * Output only. NF version. + * + * Generated from protobuf field string nf_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNfVersion($var) + { + GPBUtil::checkString($var, True); + $this->nf_version = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/StandardManagementConfig.php b/TelcoAutomation/src/V1/StandardManagementConfig.php new file mode 100644 index 000000000000..915ac6f9e4dc --- /dev/null +++ b/TelcoAutomation/src/V1/StandardManagementConfig.php @@ -0,0 +1,387 @@ +google.cloud.telcoautomation.v1.StandardManagementConfig + */ +class StandardManagementConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The + * VPC will be created if it doesn't exist. + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $network = ''; + /** + * Optional. Specifies the subnet that the interface will be part of. Network + * key must be specified and the subnet must be a subnetwork of the specified + * network. + * + * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $subnet = ''; + /** + * Optional. The /28 network that the masters will use. It should be free + * within the network. + * + * Generated from protobuf field string master_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $master_ipv4_cidr_block = ''; + /** + * Optional. The IP address range for the cluster pod IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation + * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string cluster_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cluster_cidr_block = ''; + /** + * Optional. The IP address range for the cluster service IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. + * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string services_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $services_cidr_block = ''; + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block + * can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string cluster_named_range = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cluster_named_range = ''; + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for service ClusterIPs. Alternatively, + * services_cidr_block can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string services_named_range = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $services_named_range = ''; + /** + * Optional. Master Authorized Network that supports multiple CIDR blocks. + * Allows access to the k8s master from multiple blocks. It cannot be set at + * the same time with the field man_block. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $master_authorized_networks_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network + * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The + * VPC will be created if it doesn't exist. + * @type string $subnet + * Optional. Specifies the subnet that the interface will be part of. Network + * key must be specified and the subnet must be a subnetwork of the specified + * network. + * @type string $master_ipv4_cidr_block + * Optional. The /28 network that the masters will use. It should be free + * within the network. + * @type string $cluster_cidr_block + * Optional. The IP address range for the cluster pod IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation + * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * @type string $services_cidr_block + * Optional. The IP address range for the cluster service IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. + * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * @type string $cluster_named_range + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block + * can be used to automatically create a GKE-managed one. + * @type string $services_named_range + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for service ClusterIPs. Alternatively, + * services_cidr_block can be used to automatically create a GKE-managed one. + * @type \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig $master_authorized_networks_config + * Optional. Master Authorized Network that supports multiple CIDR blocks. + * Allows access to the k8s master from multiple blocks. It cannot be set at + * the same time with the field man_block. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The + * VPC will be created if it doesn't exist. + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The + * VPC will be created if it doesn't exist. + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Optional. Specifies the subnet that the interface will be part of. Network + * key must be specified and the subnet must be a subnetwork of the specified + * network. + * + * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSubnet() + { + return $this->subnet; + } + + /** + * Optional. Specifies the subnet that the interface will be part of. Network + * key must be specified and the subnet must be a subnetwork of the specified + * network. + * + * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSubnet($var) + { + GPBUtil::checkString($var, True); + $this->subnet = $var; + + return $this; + } + + /** + * Optional. The /28 network that the masters will use. It should be free + * within the network. + * + * Generated from protobuf field string master_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMasterIpv4CidrBlock() + { + return $this->master_ipv4_cidr_block; + } + + /** + * Optional. The /28 network that the masters will use. It should be free + * within the network. + * + * Generated from protobuf field string master_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMasterIpv4CidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->master_ipv4_cidr_block = $var; + + return $this; + } + + /** + * Optional. The IP address range for the cluster pod IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation + * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string cluster_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getClusterCidrBlock() + { + return $this->cluster_cidr_block; + } + + /** + * Optional. The IP address range for the cluster pod IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation + * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string cluster_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setClusterCidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->cluster_cidr_block = $var; + + return $this; + } + + /** + * Optional. The IP address range for the cluster service IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. + * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string services_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServicesCidrBlock() + { + return $this->services_cidr_block; + } + + /** + * Optional. The IP address range for the cluster service IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. + * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string services_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServicesCidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->services_cidr_block = $var; + + return $this; + } + + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block + * can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string cluster_named_range = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getClusterNamedRange() + { + return $this->cluster_named_range; + } + + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block + * can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string cluster_named_range = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setClusterNamedRange($var) + { + GPBUtil::checkString($var, True); + $this->cluster_named_range = $var; + + return $this; + } + + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for service ClusterIPs. Alternatively, + * services_cidr_block can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string services_named_range = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServicesNamedRange() + { + return $this->services_named_range; + } + + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for service ClusterIPs. Alternatively, + * services_cidr_block can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string services_named_range = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServicesNamedRange($var) + { + GPBUtil::checkString($var, True); + $this->services_named_range = $var; + + return $this; + } + + /** + * Optional. Master Authorized Network that supports multiple CIDR blocks. + * Allows access to the k8s master from multiple blocks. It cannot be set at + * the same time with the field man_block. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig|null + */ + public function getMasterAuthorizedNetworksConfig() + { + return $this->master_authorized_networks_config; + } + + public function hasMasterAuthorizedNetworksConfig() + { + return isset($this->master_authorized_networks_config); + } + + public function clearMasterAuthorizedNetworksConfig() + { + unset($this->master_authorized_networks_config); + } + + /** + * Optional. Master Authorized Network that supports multiple CIDR blocks. + * Allows access to the k8s master from multiple blocks. It cannot be set at + * the same time with the field man_block. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig $var + * @return $this + */ + public function setMasterAuthorizedNetworksConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig::class); + $this->master_authorized_networks_config = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/Status.php b/TelcoAutomation/src/V1/Status.php new file mode 100644 index 000000000000..9b42bf732e7b --- /dev/null +++ b/TelcoAutomation/src/V1/Status.php @@ -0,0 +1,89 @@ +google.cloud.telcoautomation.v1.Status + */ +class Status +{ + /** + * Unknown state. + * + * Generated from protobuf enum STATUS_UNSPECIFIED = 0; + */ + const STATUS_UNSPECIFIED = 0; + /** + * Under progress. + * + * Generated from protobuf enum STATUS_IN_PROGRESS = 1; + */ + const STATUS_IN_PROGRESS = 1; + /** + * Running and ready to serve traffic. + * + * Generated from protobuf enum STATUS_ACTIVE = 2; + */ + const STATUS_ACTIVE = 2; + /** + * Failed or stalled. + * + * Generated from protobuf enum STATUS_FAILED = 3; + */ + const STATUS_FAILED = 3; + /** + * Delete in progress. + * + * Generated from protobuf enum STATUS_DELETING = 4; + */ + const STATUS_DELETING = 4; + /** + * Deleted deployment. + * + * Generated from protobuf enum STATUS_DELETED = 5; + */ + const STATUS_DELETED = 5; + /** + * NFDeploy specific status. Peering in progress. + * + * Generated from protobuf enum STATUS_PEERING = 10; + */ + const STATUS_PEERING = 10; + + private static $valueToName = [ + self::STATUS_UNSPECIFIED => 'STATUS_UNSPECIFIED', + self::STATUS_IN_PROGRESS => 'STATUS_IN_PROGRESS', + self::STATUS_ACTIVE => 'STATUS_ACTIVE', + self::STATUS_FAILED => 'STATUS_FAILED', + self::STATUS_DELETING => 'STATUS_DELETING', + self::STATUS_DELETED => 'STATUS_DELETED', + self::STATUS_PEERING => 'STATUS_PEERING', + ]; + + 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/TelcoAutomation/src/V1/UpdateBlueprintRequest.php b/TelcoAutomation/src/V1/UpdateBlueprintRequest.php new file mode 100644 index 000000000000..c57a0a7dc882 --- /dev/null +++ b/TelcoAutomation/src/V1/UpdateBlueprintRequest.php @@ -0,0 +1,141 @@ +google.cloud.telcoautomation.v1.UpdateBlueprintRequest + */ +class UpdateBlueprintRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `blueprint` to update. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint blueprint = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $blueprint = null; + /** + * Required. Update mask is used to specify the fields to be overwritten in + * the `blueprint` resource by the update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\TelcoAutomation\V1\Blueprint $blueprint Required. The `blueprint` to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. Update mask is used to specify the fields to be overwritten in + * the `blueprint` resource by the update. + * + * @return \Google\Cloud\TelcoAutomation\V1\UpdateBlueprintRequest + * + * @experimental + */ + public static function build(\Google\Cloud\TelcoAutomation\V1\Blueprint $blueprint, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setBlueprint($blueprint) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\TelcoAutomation\V1\Blueprint $blueprint + * Required. The `blueprint` to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Update mask is used to specify the fields to be overwritten in + * the `blueprint` resource by the update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `blueprint` to update. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint blueprint = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TelcoAutomation\V1\Blueprint|null + */ + public function getBlueprint() + { + return $this->blueprint; + } + + public function hasBlueprint() + { + return isset($this->blueprint); + } + + public function clearBlueprint() + { + unset($this->blueprint); + } + + /** + * Required. The `blueprint` to update. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint blueprint = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TelcoAutomation\V1\Blueprint $var + * @return $this + */ + public function setBlueprint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\Blueprint::class); + $this->blueprint = $var; + + return $this; + } + + /** + * Required. Update mask is used to specify the fields to be overwritten in + * the `blueprint` resource by the update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Update mask is used to specify the fields to be overwritten in + * the `blueprint` resource by the update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/UpdateDeploymentRequest.php b/TelcoAutomation/src/V1/UpdateDeploymentRequest.php new file mode 100644 index 000000000000..f36906a99d3d --- /dev/null +++ b/TelcoAutomation/src/V1/UpdateDeploymentRequest.php @@ -0,0 +1,141 @@ +google.cloud.telcoautomation.v1.UpdateDeploymentRequest + */ +class UpdateDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `deployment` to update. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $deployment = null; + /** + * Required. Update mask is used to specify the fields to be overwritten in + * the `deployment` resource by the update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\TelcoAutomation\V1\Deployment $deployment Required. The `deployment` to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. Update mask is used to specify the fields to be overwritten in + * the `deployment` resource by the update. + * + * @return \Google\Cloud\TelcoAutomation\V1\UpdateDeploymentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\TelcoAutomation\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\Cloud\TelcoAutomation\V1\Deployment $deployment + * Required. The `deployment` to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Update mask is used to specify the fields to be overwritten in + * the `deployment` resource by the update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `deployment` to update. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TelcoAutomation\V1\Deployment|null + */ + public function getDeployment() + { + return $this->deployment; + } + + public function hasDeployment() + { + return isset($this->deployment); + } + + public function clearDeployment() + { + unset($this->deployment); + } + + /** + * Required. The `deployment` to update. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TelcoAutomation\V1\Deployment $var + * @return $this + */ + public function setDeployment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\Deployment::class); + $this->deployment = $var; + + return $this; + } + + /** + * Required. Update mask is used to specify the fields to be overwritten in + * the `deployment` resource by the update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Update mask is used to specify the fields to be overwritten in + * the `deployment` resource by the update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/UpdateHydratedDeploymentRequest.php b/TelcoAutomation/src/V1/UpdateHydratedDeploymentRequest.php new file mode 100644 index 000000000000..69f410fff00c --- /dev/null +++ b/TelcoAutomation/src/V1/UpdateHydratedDeploymentRequest.php @@ -0,0 +1,141 @@ +google.cloud.telcoautomation.v1.UpdateHydratedDeploymentRequest + */ +class UpdateHydratedDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The hydrated deployment to update. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.HydratedDeployment hydrated_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $hydrated_deployment = null; + /** + * Required. The list of fields to update. Update mask supports a special + * value `*` which fully replaces (equivalent to PUT) the resource provided. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\TelcoAutomation\V1\HydratedDeployment $hydratedDeployment Required. The hydrated deployment to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to update. Update mask supports a special + * value `*` which fully replaces (equivalent to PUT) the resource provided. + * + * @return \Google\Cloud\TelcoAutomation\V1\UpdateHydratedDeploymentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\TelcoAutomation\V1\HydratedDeployment $hydratedDeployment, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setHydratedDeployment($hydratedDeployment) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\TelcoAutomation\V1\HydratedDeployment $hydrated_deployment + * Required. The hydrated deployment to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The list of fields to update. Update mask supports a special + * value `*` which fully replaces (equivalent to PUT) the resource provided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The hydrated deployment to update. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.HydratedDeployment hydrated_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TelcoAutomation\V1\HydratedDeployment|null + */ + public function getHydratedDeployment() + { + return $this->hydrated_deployment; + } + + public function hasHydratedDeployment() + { + return isset($this->hydrated_deployment); + } + + public function clearHydratedDeployment() + { + unset($this->hydrated_deployment); + } + + /** + * Required. The hydrated deployment to update. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.HydratedDeployment hydrated_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TelcoAutomation\V1\HydratedDeployment $var + * @return $this + */ + public function setHydratedDeployment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\HydratedDeployment::class); + $this->hydrated_deployment = $var; + + return $this; + } + + /** + * Required. The list of fields to update. Update mask supports a special + * value `*` which fully replaces (equivalent to PUT) the resource provided. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The list of fields to update. Update mask supports a special + * value `*` which fully replaces (equivalent to PUT) the resource provided. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/WorkloadStatus.php b/TelcoAutomation/src/V1/WorkloadStatus.php new file mode 100644 index 000000000000..50a5b9606b9e --- /dev/null +++ b/TelcoAutomation/src/V1/WorkloadStatus.php @@ -0,0 +1,111 @@ +google.cloud.telcoautomation.v1.WorkloadStatus + */ +class WorkloadStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. SiteVersion running in the workload cluster. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.SiteVersion site_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $site_version = null; + /** + * Output only. Status. + * + * Generated from protobuf field string status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\TelcoAutomation\V1\SiteVersion $site_version + * Output only. SiteVersion running in the workload cluster. + * @type string $status + * Output only. Status. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. SiteVersion running in the workload cluster. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.SiteVersion site_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\TelcoAutomation\V1\SiteVersion|null + */ + public function getSiteVersion() + { + return $this->site_version; + } + + public function hasSiteVersion() + { + return isset($this->site_version); + } + + public function clearSiteVersion() + { + unset($this->site_version); + } + + /** + * Output only. SiteVersion running in the workload cluster. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.SiteVersion site_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\TelcoAutomation\V1\SiteVersion $var + * @return $this + */ + public function setSiteVersion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\SiteVersion::class); + $this->site_version = $var; + + return $this; + } + + /** + * Output only. Status. + * + * Generated from protobuf field string status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatus() + { + return $this->status; + } + + /** + * Output only. Status. + * + * Generated from protobuf field string status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkString($var, True); + $this->status = $var; + + return $this; + } + +} + diff --git a/TelcoAutomation/src/V1/gapic_metadata.json b/TelcoAutomation/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..920267ed1b4b --- /dev/null +++ b/TelcoAutomation/src/V1/gapic_metadata.json @@ -0,0 +1,208 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.telcoautomation.v1", + "libraryPackage": "Google\\Cloud\\TelcoAutomation\\V1", + "services": { + "TelcoAutomation": { + "clients": { + "grpc": { + "libraryClient": "TelcoAutomationGapicClient", + "rpcs": { + "ApplyDeployment": { + "methods": [ + "applyDeployment" + ] + }, + "ApplyHydratedDeployment": { + "methods": [ + "applyHydratedDeployment" + ] + }, + "ApproveBlueprint": { + "methods": [ + "approveBlueprint" + ] + }, + "ComputeDeploymentStatus": { + "methods": [ + "computeDeploymentStatus" + ] + }, + "CreateBlueprint": { + "methods": [ + "createBlueprint" + ] + }, + "CreateDeployment": { + "methods": [ + "createDeployment" + ] + }, + "CreateEdgeSlm": { + "methods": [ + "createEdgeSlm" + ] + }, + "CreateOrchestrationCluster": { + "methods": [ + "createOrchestrationCluster" + ] + }, + "DeleteBlueprint": { + "methods": [ + "deleteBlueprint" + ] + }, + "DeleteEdgeSlm": { + "methods": [ + "deleteEdgeSlm" + ] + }, + "DeleteOrchestrationCluster": { + "methods": [ + "deleteOrchestrationCluster" + ] + }, + "DiscardBlueprintChanges": { + "methods": [ + "discardBlueprintChanges" + ] + }, + "DiscardDeploymentChanges": { + "methods": [ + "discardDeploymentChanges" + ] + }, + "GetBlueprint": { + "methods": [ + "getBlueprint" + ] + }, + "GetDeployment": { + "methods": [ + "getDeployment" + ] + }, + "GetEdgeSlm": { + "methods": [ + "getEdgeSlm" + ] + }, + "GetHydratedDeployment": { + "methods": [ + "getHydratedDeployment" + ] + }, + "GetOrchestrationCluster": { + "methods": [ + "getOrchestrationCluster" + ] + }, + "GetPublicBlueprint": { + "methods": [ + "getPublicBlueprint" + ] + }, + "ListBlueprintRevisions": { + "methods": [ + "listBlueprintRevisions" + ] + }, + "ListBlueprints": { + "methods": [ + "listBlueprints" + ] + }, + "ListDeploymentRevisions": { + "methods": [ + "listDeploymentRevisions" + ] + }, + "ListDeployments": { + "methods": [ + "listDeployments" + ] + }, + "ListEdgeSlms": { + "methods": [ + "listEdgeSlms" + ] + }, + "ListHydratedDeployments": { + "methods": [ + "listHydratedDeployments" + ] + }, + "ListOrchestrationClusters": { + "methods": [ + "listOrchestrationClusters" + ] + }, + "ListPublicBlueprints": { + "methods": [ + "listPublicBlueprints" + ] + }, + "ProposeBlueprint": { + "methods": [ + "proposeBlueprint" + ] + }, + "RejectBlueprint": { + "methods": [ + "rejectBlueprint" + ] + }, + "RemoveDeployment": { + "methods": [ + "removeDeployment" + ] + }, + "RollbackDeployment": { + "methods": [ + "rollbackDeployment" + ] + }, + "SearchBlueprintRevisions": { + "methods": [ + "searchBlueprintRevisions" + ] + }, + "SearchDeploymentRevisions": { + "methods": [ + "searchDeploymentRevisions" + ] + }, + "UpdateBlueprint": { + "methods": [ + "updateBlueprint" + ] + }, + "UpdateDeployment": { + "methods": [ + "updateDeployment" + ] + }, + "UpdateHydratedDeployment": { + "methods": [ + "updateHydratedDeployment" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/TelcoAutomation/src/V1/resources/telco_automation_client_config.json b/TelcoAutomation/src/V1/resources/telco_automation_client_config.json new file mode 100644 index 000000000000..596ed5133dc8 --- /dev/null +++ b/TelcoAutomation/src/V1/resources/telco_automation_client_config.json @@ -0,0 +1,212 @@ +{ + "interfaces": { + "google.cloud.telcoautomation.v1.TelcoAutomation": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "ApplyDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ApplyHydratedDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ApproveBlueprint": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ComputeDeploymentStatus": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateBlueprint": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateEdgeSlm": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateOrchestrationCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteBlueprint": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteEdgeSlm": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteOrchestrationCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DiscardBlueprintChanges": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DiscardDeploymentChanges": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetBlueprint": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetEdgeSlm": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetHydratedDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetOrchestrationCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetPublicBlueprint": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListBlueprintRevisions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListBlueprints": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListDeploymentRevisions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListDeployments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListEdgeSlms": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListHydratedDeployments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListOrchestrationClusters": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListPublicBlueprints": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ProposeBlueprint": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RejectBlueprint": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RemoveDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RollbackDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SearchBlueprintRevisions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SearchDeploymentRevisions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateBlueprint": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateHydratedDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/TelcoAutomation/src/V1/resources/telco_automation_descriptor_config.php b/TelcoAutomation/src/V1/resources/telco_automation_descriptor_config.php new file mode 100644 index 000000000000..4998bf59ce44 --- /dev/null +++ b/TelcoAutomation/src/V1/resources/telco_automation_descriptor_config.php @@ -0,0 +1,594 @@ + [ + 'google.cloud.telcoautomation.v1.TelcoAutomation' => [ + 'CreateEdgeSlm' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\TelcoAutomation\V1\EdgeSlm', + 'metadataReturnType' => '\Google\Cloud\TelcoAutomation\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateOrchestrationCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\TelcoAutomation\V1\OrchestrationCluster', + 'metadataReturnType' => '\Google\Cloud\TelcoAutomation\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteEdgeSlm' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\TelcoAutomation\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOrchestrationCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\TelcoAutomation\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ApplyDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Deployment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ApplyHydratedDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\HydratedDeployment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ApproveBlueprint' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Blueprint', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ComputeDeploymentStatus' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ComputeDeploymentStatusResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateBlueprint' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Blueprint', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Deployment', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteBlueprint' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DiscardBlueprintChanges' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\DiscardBlueprintChangesResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DiscardDeploymentChanges' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\DiscardDeploymentChangesResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetBlueprint' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Blueprint', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Deployment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetEdgeSlm' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\EdgeSlm', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetHydratedDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\HydratedDeployment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetOrchestrationCluster' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\OrchestrationCluster', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetPublicBlueprint' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\PublicBlueprint', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListBlueprintRevisions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBlueprints', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListBlueprintRevisionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListBlueprints' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBlueprints', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListBlueprintsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListDeploymentRevisions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDeployments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListDeploymentRevisionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListDeployments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDeployments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListDeploymentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListEdgeSlms' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEdgeSlms', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListEdgeSlmsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListHydratedDeployments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getHydratedDeployments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListHydratedDeploymentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListOrchestrationClusters' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getOrchestrationClusters', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListOrchestrationClustersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListPublicBlueprints' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPublicBlueprints', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListPublicBlueprintsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ProposeBlueprint' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Blueprint', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RejectBlueprint' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Blueprint', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RemoveDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RollbackDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Deployment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'SearchBlueprintRevisions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBlueprints', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\SearchBlueprintRevisionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'SearchDeploymentRevisions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDeployments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\SearchDeploymentRevisionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateBlueprint' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Blueprint', + 'headerParams' => [ + [ + 'keyName' => 'blueprint.name', + 'fieldAccessors' => [ + 'getBlueprint', + 'getName', + ], + ], + ], + ], + 'UpdateDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Deployment', + 'headerParams' => [ + [ + 'keyName' => 'deployment.name', + 'fieldAccessors' => [ + 'getDeployment', + 'getName', + ], + ], + ], + ], + 'UpdateHydratedDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\HydratedDeployment', + 'headerParams' => [ + [ + 'keyName' => 'hydrated_deployment.name', + 'fieldAccessors' => [ + 'getHydratedDeployment', + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'blueprint' => 'projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/blueprints/{blueprint}', + 'deployment' => 'projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/deployments/{deployment}', + 'edgeSlm' => 'projects/{project}/locations/{location}/edgeSlms/{edge_slm}', + 'hydratedDeployment' => 'projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/deployments/{deployment}/hydratedDeployments/{hydrated_deployment}', + 'location' => 'projects/{project}/locations/{location}', + 'orchestrationCluster' => 'projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}', + 'publicBlueprint' => 'projects/{project}/locations/{location}/publicBlueprints/{public_lueprint}', + ], + ], + ], +]; diff --git a/TelcoAutomation/src/V1/resources/telco_automation_rest_client_config.php b/TelcoAutomation/src/V1/resources/telco_automation_rest_client_config.php new file mode 100644 index 000000000000..b4c0f25990ae --- /dev/null +++ b/TelcoAutomation/src/V1/resources/telco_automation_rest_client_config.php @@ -0,0 +1,510 @@ + [ + '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.cloud.telcoautomation.v1.TelcoAutomation' => [ + 'ApplyDeployment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:apply', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ApplyHydratedDeployment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*/hydratedDeployments/*}:apply', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ApproveBlueprint' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:approve', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ComputeDeploymentStatus' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:computeDeploymentStatus', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateBlueprint' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/blueprints', + 'body' => 'blueprint', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDeployment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/deployments', + 'body' => 'deployment', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateEdgeSlm' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/edgeSlms', + 'body' => 'edge_slm', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'edge_slm_id', + ], + ], + 'CreateOrchestrationCluster' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/orchestrationClusters', + 'body' => 'orchestration_cluster', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'orchestration_cluster_id', + ], + ], + 'DeleteBlueprint' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteEdgeSlm' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/edgeSlms/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOrchestrationCluster' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DiscardBlueprintChanges' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:discard', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DiscardDeploymentChanges' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:discard', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBlueprint' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDeployment' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetEdgeSlm' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/edgeSlms/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetHydratedDeployment' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*/hydratedDeployments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOrchestrationCluster' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPublicBlueprint' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/publicBlueprints/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListBlueprintRevisions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:listRevisions', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListBlueprints' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/blueprints', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDeploymentRevisions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:listRevisions', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListDeployments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/deployments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListEdgeSlms' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/edgeSlms', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListHydratedDeployments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/orchestrationClusters/*/deployments/*}/hydratedDeployments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListOrchestrationClusters' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/orchestrationClusters', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListPublicBlueprints' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/publicBlueprints', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ProposeBlueprint' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:propose', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RejectBlueprint' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:reject', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RemoveDeployment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:remove', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RollbackDeployment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:rollback', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SearchBlueprintRevisions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/blueprints:searchRevisions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SearchDeploymentRevisions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/deployments:searchRevisions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateBlueprint' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{blueprint.name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}', + 'body' => 'blueprint', + 'placeholders' => [ + 'blueprint.name' => [ + 'getters' => [ + 'getBlueprint', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateDeployment' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{deployment.name=projects/*/locations/*/orchestrationClusters/*/deployments/*}', + 'body' => 'deployment', + 'placeholders' => [ + 'deployment.name' => [ + 'getters' => [ + 'getDeployment', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateHydratedDeployment' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{hydrated_deployment.name=projects/*/locations/*/orchestrationClusters/*/deployments/*/hydratedDeployments/*}', + 'body' => 'hydrated_deployment', + 'placeholders' => [ + 'hydrated_deployment.name' => [ + 'getters' => [ + 'getHydratedDeployment', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/TelcoAutomation/tests/Unit/V1/Client/TelcoAutomationClientTest.php b/TelcoAutomation/tests/Unit/V1/Client/TelcoAutomationClientTest.php new file mode 100644 index 000000000000..d7d1cb5f91b5 --- /dev/null +++ b/TelcoAutomation/tests/Unit/V1/Client/TelcoAutomationClientTest.php @@ -0,0 +1,3154 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return TelcoAutomationClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new TelcoAutomationClient($options); + } + + /** @test */ + public function applyDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $revisionId = 'revisionId513861631'; + $sourceBlueprintRevision = 'sourceBlueprintRevision-1372328277'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $workloadCluster = 'workloadCluster531492146'; + $rollbackSupport = true; + $expectedResponse = new Deployment(); + $expectedResponse->setName($name2); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setSourceBlueprintRevision($sourceBlueprintRevision); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setWorkloadCluster($workloadCluster); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new ApplyDeploymentRequest()) + ->setName($formattedName); + $response = $gapicClient->applyDeployment($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.telcoautomation.v1.TelcoAutomation/ApplyDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function applyDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new ApplyDeploymentRequest()) + ->setName($formattedName); + try { + $gapicClient->applyDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function applyHydratedDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $workloadCluster = 'workloadCluster531492146'; + $expectedResponse = new HydratedDeployment(); + $expectedResponse->setName($name2); + $expectedResponse->setWorkloadCluster($workloadCluster); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->hydratedDeploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]', '[HYDRATED_DEPLOYMENT]'); + $request = (new ApplyHydratedDeploymentRequest()) + ->setName($formattedName); + $response = $gapicClient->applyHydratedDeployment($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.telcoautomation.v1.TelcoAutomation/ApplyHydratedDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function applyHydratedDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->hydratedDeploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]', '[HYDRATED_DEPLOYMENT]'); + $request = (new ApplyHydratedDeploymentRequest()) + ->setName($formattedName); + try { + $gapicClient->applyHydratedDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function approveBlueprintTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $revisionId = 'revisionId513861631'; + $sourceBlueprint = 'sourceBlueprint-1884166289'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $rollbackSupport = true; + $expectedResponse = new Blueprint(); + $expectedResponse->setName($name2); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setSourceBlueprint($sourceBlueprint); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new ApproveBlueprintRequest()) + ->setName($formattedName); + $response = $gapicClient->approveBlueprint($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.telcoautomation.v1.TelcoAutomation/ApproveBlueprint', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function approveBlueprintExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new ApproveBlueprintRequest()) + ->setName($formattedName); + try { + $gapicClient->approveBlueprint($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function computeDeploymentStatusTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new ComputeDeploymentStatusResponse(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new ComputeDeploymentStatusRequest()) + ->setName($formattedName); + $response = $gapicClient->computeDeploymentStatus($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.telcoautomation.v1.TelcoAutomation/ComputeDeploymentStatus', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function computeDeploymentStatusExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new ComputeDeploymentStatusRequest()) + ->setName($formattedName); + try { + $gapicClient->computeDeploymentStatus($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createBlueprintTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $revisionId = 'revisionId513861631'; + $sourceBlueprint = 'sourceBlueprint-1884166289'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $rollbackSupport = true; + $expectedResponse = new Blueprint(); + $expectedResponse->setName($name); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setSourceBlueprint($sourceBlueprint); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $blueprint = new Blueprint(); + $blueprintSourceBlueprint = 'blueprintSourceBlueprint115443109'; + $blueprint->setSourceBlueprint($blueprintSourceBlueprint); + $request = (new CreateBlueprintRequest()) + ->setParent($formattedParent) + ->setBlueprint($blueprint); + $response = $gapicClient->createBlueprint($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.telcoautomation.v1.TelcoAutomation/CreateBlueprint', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getBlueprint(); + $this->assertProtobufEquals($blueprint, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createBlueprintExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $blueprint = new Blueprint(); + $blueprintSourceBlueprint = 'blueprintSourceBlueprint115443109'; + $blueprint->setSourceBlueprint($blueprintSourceBlueprint); + $request = (new CreateBlueprintRequest()) + ->setParent($formattedParent) + ->setBlueprint($blueprint); + try { + $gapicClient->createBlueprint($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $revisionId = 'revisionId513861631'; + $sourceBlueprintRevision = 'sourceBlueprintRevision-1372328277'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $workloadCluster = 'workloadCluster531492146'; + $rollbackSupport = true; + $expectedResponse = new Deployment(); + $expectedResponse->setName($name); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setSourceBlueprintRevision($sourceBlueprintRevision); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setWorkloadCluster($workloadCluster); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $deployment = new Deployment(); + $deploymentSourceBlueprintRevision = 'deploymentSourceBlueprintRevision-1529084882'; + $deployment->setSourceBlueprintRevision($deploymentSourceBlueprintRevision); + $request = (new CreateDeploymentRequest()) + ->setParent($formattedParent) + ->setDeployment($deployment); + $response = $gapicClient->createDeployment($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/CreateDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDeployment(); + $this->assertProtobufEquals($deployment, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $deployment = new Deployment(); + $deploymentSourceBlueprintRevision = 'deploymentSourceBlueprintRevision-1529084882'; + $deployment->setSourceBlueprintRevision($deploymentSourceBlueprintRevision); + $request = (new CreateDeploymentRequest()) + ->setParent($formattedParent) + ->setDeployment($deployment); + try { + $gapicClient->createDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEdgeSlmTest() + { + $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/createEdgeSlmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $orchestrationCluster = 'orchestrationCluster-1006439940'; + $tnaVersion = 'tnaVersion1050832320'; + $expectedResponse = new EdgeSlm(); + $expectedResponse->setName($name); + $expectedResponse->setOrchestrationCluster($orchestrationCluster); + $expectedResponse->setTnaVersion($tnaVersion); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createEdgeSlmTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $edgeSlmId = 'edgeSlmId974932168'; + $edgeSlm = new EdgeSlm(); + $request = (new CreateEdgeSlmRequest()) + ->setParent($formattedParent) + ->setEdgeSlmId($edgeSlmId) + ->setEdgeSlm($edgeSlm); + $response = $gapicClient->createEdgeSlm($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.telcoautomation.v1.TelcoAutomation/CreateEdgeSlm', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getEdgeSlmId(); + $this->assertProtobufEquals($edgeSlmId, $actualValue); + $actualValue = $actualApiRequestObject->getEdgeSlm(); + $this->assertProtobufEquals($edgeSlm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEdgeSlmTest'); + $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 createEdgeSlmExceptionTest() + { + $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/createEdgeSlmTest'); + $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]'); + $edgeSlmId = 'edgeSlmId974932168'; + $edgeSlm = new EdgeSlm(); + $request = (new CreateEdgeSlmRequest()) + ->setParent($formattedParent) + ->setEdgeSlmId($edgeSlmId) + ->setEdgeSlm($edgeSlm); + $response = $gapicClient->createEdgeSlm($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEdgeSlmTest'); + 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 createOrchestrationClusterTest() + { + $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/createOrchestrationClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $tnaVersion = 'tnaVersion1050832320'; + $expectedResponse = new OrchestrationCluster(); + $expectedResponse->setName($name); + $expectedResponse->setTnaVersion($tnaVersion); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createOrchestrationClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $orchestrationClusterId = 'orchestrationClusterId314535486'; + $orchestrationCluster = new OrchestrationCluster(); + $request = (new CreateOrchestrationClusterRequest()) + ->setParent($formattedParent) + ->setOrchestrationClusterId($orchestrationClusterId) + ->setOrchestrationCluster($orchestrationCluster); + $response = $gapicClient->createOrchestrationCluster($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.telcoautomation.v1.TelcoAutomation/CreateOrchestrationCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getOrchestrationClusterId(); + $this->assertProtobufEquals($orchestrationClusterId, $actualValue); + $actualValue = $actualApiRequestObject->getOrchestrationCluster(); + $this->assertProtobufEquals($orchestrationCluster, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createOrchestrationClusterTest'); + $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 createOrchestrationClusterExceptionTest() + { + $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/createOrchestrationClusterTest'); + $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]'); + $orchestrationClusterId = 'orchestrationClusterId314535486'; + $orchestrationCluster = new OrchestrationCluster(); + $request = (new CreateOrchestrationClusterRequest()) + ->setParent($formattedParent) + ->setOrchestrationClusterId($orchestrationClusterId) + ->setOrchestrationCluster($orchestrationCluster); + $response = $gapicClient->createOrchestrationCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createOrchestrationClusterTest'); + 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 deleteBlueprintTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new DeleteBlueprintRequest()) + ->setName($formattedName); + $gapicClient->deleteBlueprint($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/DeleteBlueprint', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteBlueprintExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new DeleteBlueprintRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteBlueprint($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteEdgeSlmTest() + { + $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/deleteEdgeSlmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteEdgeSlmTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->edgeSlmName('[PROJECT]', '[LOCATION]', '[EDGE_SLM]'); + $request = (new DeleteEdgeSlmRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteEdgeSlm($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.telcoautomation.v1.TelcoAutomation/DeleteEdgeSlm', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteEdgeSlmTest'); + $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 deleteEdgeSlmExceptionTest() + { + $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/deleteEdgeSlmTest'); + $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->edgeSlmName('[PROJECT]', '[LOCATION]', '[EDGE_SLM]'); + $request = (new DeleteEdgeSlmRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteEdgeSlm($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteEdgeSlmTest'); + 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 deleteOrchestrationClusterTest() + { + $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/deleteOrchestrationClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteOrchestrationClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $request = (new DeleteOrchestrationClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteOrchestrationCluster($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.telcoautomation.v1.TelcoAutomation/DeleteOrchestrationCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteOrchestrationClusterTest'); + $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 deleteOrchestrationClusterExceptionTest() + { + $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/deleteOrchestrationClusterTest'); + $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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $request = (new DeleteOrchestrationClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteOrchestrationCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteOrchestrationClusterTest'); + 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 discardBlueprintChangesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new DiscardBlueprintChangesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new DiscardBlueprintChangesRequest()) + ->setName($formattedName); + $response = $gapicClient->discardBlueprintChanges($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.telcoautomation.v1.TelcoAutomation/DiscardBlueprintChanges', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function discardBlueprintChangesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new DiscardBlueprintChangesRequest()) + ->setName($formattedName); + try { + $gapicClient->discardBlueprintChanges($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function discardDeploymentChangesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new DiscardDeploymentChangesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new DiscardDeploymentChangesRequest()) + ->setName($formattedName); + $response = $gapicClient->discardDeploymentChanges($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.telcoautomation.v1.TelcoAutomation/DiscardDeploymentChanges', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function discardDeploymentChangesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new DiscardDeploymentChangesRequest()) + ->setName($formattedName); + try { + $gapicClient->discardDeploymentChanges($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBlueprintTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $revisionId = 'revisionId513861631'; + $sourceBlueprint = 'sourceBlueprint-1884166289'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $rollbackSupport = true; + $expectedResponse = new Blueprint(); + $expectedResponse->setName($name2); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setSourceBlueprint($sourceBlueprint); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new GetBlueprintRequest()) + ->setName($formattedName); + $response = $gapicClient->getBlueprint($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.telcoautomation.v1.TelcoAutomation/GetBlueprint', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBlueprintExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new GetBlueprintRequest()) + ->setName($formattedName); + try { + $gapicClient->getBlueprint($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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'; + $revisionId = 'revisionId513861631'; + $sourceBlueprintRevision = 'sourceBlueprintRevision-1372328277'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $workloadCluster = 'workloadCluster531492146'; + $rollbackSupport = true; + $expectedResponse = new Deployment(); + $expectedResponse->setName($name2); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setSourceBlueprintRevision($sourceBlueprintRevision); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setWorkloadCluster($workloadCluster); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[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.telcoautomation.v1.TelcoAutomation/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]', '[ORCHESTRATION_CLUSTER]', '[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 getEdgeSlmTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $orchestrationCluster = 'orchestrationCluster-1006439940'; + $tnaVersion = 'tnaVersion1050832320'; + $expectedResponse = new EdgeSlm(); + $expectedResponse->setName($name2); + $expectedResponse->setOrchestrationCluster($orchestrationCluster); + $expectedResponse->setTnaVersion($tnaVersion); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->edgeSlmName('[PROJECT]', '[LOCATION]', '[EDGE_SLM]'); + $request = (new GetEdgeSlmRequest()) + ->setName($formattedName); + $response = $gapicClient->getEdgeSlm($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.telcoautomation.v1.TelcoAutomation/GetEdgeSlm', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEdgeSlmExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->edgeSlmName('[PROJECT]', '[LOCATION]', '[EDGE_SLM]'); + $request = (new GetEdgeSlmRequest()) + ->setName($formattedName); + try { + $gapicClient->getEdgeSlm($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getHydratedDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $workloadCluster = 'workloadCluster531492146'; + $expectedResponse = new HydratedDeployment(); + $expectedResponse->setName($name2); + $expectedResponse->setWorkloadCluster($workloadCluster); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->hydratedDeploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]', '[HYDRATED_DEPLOYMENT]'); + $request = (new GetHydratedDeploymentRequest()) + ->setName($formattedName); + $response = $gapicClient->getHydratedDeployment($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.telcoautomation.v1.TelcoAutomation/GetHydratedDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getHydratedDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->hydratedDeploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]', '[HYDRATED_DEPLOYMENT]'); + $request = (new GetHydratedDeploymentRequest()) + ->setName($formattedName); + try { + $gapicClient->getHydratedDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getOrchestrationClusterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $tnaVersion = 'tnaVersion1050832320'; + $expectedResponse = new OrchestrationCluster(); + $expectedResponse->setName($name2); + $expectedResponse->setTnaVersion($tnaVersion); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $request = (new GetOrchestrationClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->getOrchestrationCluster($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.telcoautomation.v1.TelcoAutomation/GetOrchestrationCluster', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getOrchestrationClusterExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $request = (new GetOrchestrationClusterRequest()) + ->setName($formattedName); + try { + $gapicClient->getOrchestrationCluster($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPublicBlueprintTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $sourceProvider = 'sourceProvider2074918293'; + $rollbackSupport = true; + $expectedResponse = new PublicBlueprint(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->publicBlueprintName('[PROJECT]', '[LOCATION]', '[PUBLIC_LUEPRINT]'); + $request = (new GetPublicBlueprintRequest()) + ->setName($formattedName); + $response = $gapicClient->getPublicBlueprint($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.telcoautomation.v1.TelcoAutomation/GetPublicBlueprint', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPublicBlueprintExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->publicBlueprintName('[PROJECT]', '[LOCATION]', '[PUBLIC_LUEPRINT]'); + $request = (new GetPublicBlueprintRequest()) + ->setName($formattedName); + try { + $gapicClient->getPublicBlueprint($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBlueprintRevisionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $blueprintsElement = new Blueprint(); + $blueprints = [ + $blueprintsElement, + ]; + $expectedResponse = new ListBlueprintRevisionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBlueprints($blueprints); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new ListBlueprintRevisionsRequest()) + ->setName($formattedName); + $response = $gapicClient->listBlueprintRevisions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBlueprints()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ListBlueprintRevisions', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBlueprintRevisionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new ListBlueprintRevisionsRequest()) + ->setName($formattedName); + try { + $gapicClient->listBlueprintRevisions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBlueprintsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $blueprintsElement = new Blueprint(); + $blueprints = [ + $blueprintsElement, + ]; + $expectedResponse = new ListBlueprintsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBlueprints($blueprints); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $request = (new ListBlueprintsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listBlueprints($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBlueprints()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ListBlueprints', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBlueprintsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $request = (new ListBlueprintsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listBlueprints($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDeploymentRevisionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $deploymentsElement = new Deployment(); + $deployments = [ + $deploymentsElement, + ]; + $expectedResponse = new ListDeploymentRevisionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDeployments($deployments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new ListDeploymentRevisionsRequest()) + ->setName($formattedName); + $response = $gapicClient->listDeploymentRevisions($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.telcoautomation.v1.TelcoAutomation/ListDeploymentRevisions', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDeploymentRevisionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new ListDeploymentRevisionsRequest()) + ->setName($formattedName); + try { + $gapicClient->listDeploymentRevisions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $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.telcoautomation.v1.TelcoAutomation/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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $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 listEdgeSlmsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $edgeSlmsElement = new EdgeSlm(); + $edgeSlms = [ + $edgeSlmsElement, + ]; + $expectedResponse = new ListEdgeSlmsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEdgeSlms($edgeSlms); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListEdgeSlmsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listEdgeSlms($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEdgeSlms()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ListEdgeSlms', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEdgeSlmsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListEdgeSlmsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listEdgeSlms($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listHydratedDeploymentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $hydratedDeploymentsElement = new HydratedDeployment(); + $hydratedDeployments = [ + $hydratedDeploymentsElement, + ]; + $expectedResponse = new ListHydratedDeploymentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setHydratedDeployments($hydratedDeployments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new ListHydratedDeploymentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listHydratedDeployments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getHydratedDeployments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ListHydratedDeployments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listHydratedDeploymentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new ListHydratedDeploymentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listHydratedDeployments($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOrchestrationClustersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $orchestrationClustersElement = new OrchestrationCluster(); + $orchestrationClusters = [ + $orchestrationClustersElement, + ]; + $expectedResponse = new ListOrchestrationClustersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setOrchestrationClusters($orchestrationClusters); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListOrchestrationClustersRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listOrchestrationClusters($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getOrchestrationClusters()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ListOrchestrationClusters', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOrchestrationClustersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListOrchestrationClustersRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listOrchestrationClusters($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPublicBlueprintsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $publicBlueprintsElement = new PublicBlueprint(); + $publicBlueprints = [ + $publicBlueprintsElement, + ]; + $expectedResponse = new ListPublicBlueprintsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPublicBlueprints($publicBlueprints); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListPublicBlueprintsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPublicBlueprints($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPublicBlueprints()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ListPublicBlueprints', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPublicBlueprintsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListPublicBlueprintsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPublicBlueprints($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function proposeBlueprintTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $revisionId = 'revisionId513861631'; + $sourceBlueprint = 'sourceBlueprint-1884166289'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $rollbackSupport = true; + $expectedResponse = new Blueprint(); + $expectedResponse->setName($name2); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setSourceBlueprint($sourceBlueprint); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new ProposeBlueprintRequest()) + ->setName($formattedName); + $response = $gapicClient->proposeBlueprint($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.telcoautomation.v1.TelcoAutomation/ProposeBlueprint', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function proposeBlueprintExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new ProposeBlueprintRequest()) + ->setName($formattedName); + try { + $gapicClient->proposeBlueprint($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rejectBlueprintTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $revisionId = 'revisionId513861631'; + $sourceBlueprint = 'sourceBlueprint-1884166289'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $rollbackSupport = true; + $expectedResponse = new Blueprint(); + $expectedResponse->setName($name2); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setSourceBlueprint($sourceBlueprint); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new RejectBlueprintRequest()) + ->setName($formattedName); + $response = $gapicClient->rejectBlueprint($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.telcoautomation.v1.TelcoAutomation/RejectBlueprint', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rejectBlueprintExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new RejectBlueprintRequest()) + ->setName($formattedName); + try { + $gapicClient->rejectBlueprint($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function removeDeploymentTest() + { + $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]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new RemoveDeploymentRequest()) + ->setName($formattedName); + $gapicClient->removeDeployment($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/RemoveDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function removeDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new RemoveDeploymentRequest()) + ->setName($formattedName); + try { + $gapicClient->removeDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rollbackDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $revisionId2 = 'revisionId2-100208654'; + $sourceBlueprintRevision = 'sourceBlueprintRevision-1372328277'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $workloadCluster = 'workloadCluster531492146'; + $rollbackSupport = true; + $expectedResponse = new Deployment(); + $expectedResponse->setName($name2); + $expectedResponse->setRevisionId($revisionId2); + $expectedResponse->setSourceBlueprintRevision($sourceBlueprintRevision); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setWorkloadCluster($workloadCluster); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $revisionId = 'revisionId513861631'; + $request = (new RollbackDeploymentRequest()) + ->setName($formattedName) + ->setRevisionId($revisionId); + $response = $gapicClient->rollbackDeployment($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.telcoautomation.v1.TelcoAutomation/RollbackDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getRevisionId(); + $this->assertProtobufEquals($revisionId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rollbackDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $revisionId = 'revisionId513861631'; + $request = (new RollbackDeploymentRequest()) + ->setName($formattedName) + ->setRevisionId($revisionId); + try { + $gapicClient->rollbackDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchBlueprintRevisionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $blueprintsElement = new Blueprint(); + $blueprints = [ + $blueprintsElement, + ]; + $expectedResponse = new SearchBlueprintRevisionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBlueprints($blueprints); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $query = 'query107944136'; + $request = (new SearchBlueprintRevisionsRequest()) + ->setParent($formattedParent) + ->setQuery($query); + $response = $gapicClient->searchBlueprintRevisions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBlueprints()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/SearchBlueprintRevisions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchBlueprintRevisionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $query = 'query107944136'; + $request = (new SearchBlueprintRevisionsRequest()) + ->setParent($formattedParent) + ->setQuery($query); + try { + $gapicClient->searchBlueprintRevisions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchDeploymentRevisionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $deploymentsElement = new Deployment(); + $deployments = [ + $deploymentsElement, + ]; + $expectedResponse = new SearchDeploymentRevisionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDeployments($deployments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $query = 'query107944136'; + $request = (new SearchDeploymentRevisionsRequest()) + ->setParent($formattedParent) + ->setQuery($query); + $response = $gapicClient->searchDeploymentRevisions($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.telcoautomation.v1.TelcoAutomation/SearchDeploymentRevisions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchDeploymentRevisionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $query = 'query107944136'; + $request = (new SearchDeploymentRevisionsRequest()) + ->setParent($formattedParent) + ->setQuery($query); + try { + $gapicClient->searchDeploymentRevisions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateBlueprintTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $revisionId = 'revisionId513861631'; + $sourceBlueprint = 'sourceBlueprint-1884166289'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $rollbackSupport = true; + $expectedResponse = new Blueprint(); + $expectedResponse->setName($name); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setSourceBlueprint($sourceBlueprint); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $blueprint = new Blueprint(); + $blueprintSourceBlueprint = 'blueprintSourceBlueprint115443109'; + $blueprint->setSourceBlueprint($blueprintSourceBlueprint); + $updateMask = new FieldMask(); + $request = (new UpdateBlueprintRequest()) + ->setBlueprint($blueprint) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateBlueprint($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.telcoautomation.v1.TelcoAutomation/UpdateBlueprint', $actualFuncCall); + $actualValue = $actualRequestObject->getBlueprint(); + $this->assertProtobufEquals($blueprint, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateBlueprintExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $blueprint = new Blueprint(); + $blueprintSourceBlueprint = 'blueprintSourceBlueprint115443109'; + $blueprint->setSourceBlueprint($blueprintSourceBlueprint); + $updateMask = new FieldMask(); + $request = (new UpdateBlueprintRequest()) + ->setBlueprint($blueprint) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateBlueprint($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $revisionId = 'revisionId513861631'; + $sourceBlueprintRevision = 'sourceBlueprintRevision-1372328277'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $workloadCluster = 'workloadCluster531492146'; + $rollbackSupport = true; + $expectedResponse = new Deployment(); + $expectedResponse->setName($name); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setSourceBlueprintRevision($sourceBlueprintRevision); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setWorkloadCluster($workloadCluster); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $deployment = new Deployment(); + $deploymentSourceBlueprintRevision = 'deploymentSourceBlueprintRevision-1529084882'; + $deployment->setSourceBlueprintRevision($deploymentSourceBlueprintRevision); + $updateMask = new FieldMask(); + $request = (new UpdateDeploymentRequest()) + ->setDeployment($deployment) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateDeployment($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.telcoautomation.v1.TelcoAutomation/UpdateDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getDeployment(); + $this->assertProtobufEquals($deployment, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $deployment = new Deployment(); + $deploymentSourceBlueprintRevision = 'deploymentSourceBlueprintRevision-1529084882'; + $deployment->setSourceBlueprintRevision($deploymentSourceBlueprintRevision); + $updateMask = new FieldMask(); + $request = (new UpdateDeploymentRequest()) + ->setDeployment($deployment) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateHydratedDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $workloadCluster = 'workloadCluster531492146'; + $expectedResponse = new HydratedDeployment(); + $expectedResponse->setName($name); + $expectedResponse->setWorkloadCluster($workloadCluster); + $transport->addResponse($expectedResponse); + // Mock request + $hydratedDeployment = new HydratedDeployment(); + $updateMask = new FieldMask(); + $request = (new UpdateHydratedDeploymentRequest()) + ->setHydratedDeployment($hydratedDeployment) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateHydratedDeployment($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.telcoautomation.v1.TelcoAutomation/UpdateHydratedDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getHydratedDeployment(); + $this->assertProtobufEquals($hydratedDeployment, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateHydratedDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $hydratedDeployment = new HydratedDeployment(); + $updateMask = new FieldMask(); + $request = (new UpdateHydratedDeploymentRequest()) + ->setHydratedDeployment($hydratedDeployment) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateHydratedDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function applyDeploymentAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $revisionId = 'revisionId513861631'; + $sourceBlueprintRevision = 'sourceBlueprintRevision-1372328277'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $workloadCluster = 'workloadCluster531492146'; + $rollbackSupport = true; + $expectedResponse = new Deployment(); + $expectedResponse->setName($name2); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setSourceBlueprintRevision($sourceBlueprintRevision); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setWorkloadCluster($workloadCluster); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new ApplyDeploymentRequest()) + ->setName($formattedName); + $response = $gapicClient->applyDeploymentAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ApplyDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/composer.json b/composer.json index c4fa93630341..e79c2cd2f6c4 100644 --- a/composer.json +++ b/composer.json @@ -209,6 +209,7 @@ "google/cloud-support": "0.1.2", "google/cloud-talent": "1.2.2", "google/cloud-tasks": "1.13.2", + "google/cloud-telcoautomation": "0.0.0", "google/cloud-text-to-speech": "1.7.2", "google/cloud-tpu": "1.3.2", "google/cloud-trace": "1.6.5", @@ -226,9 +227,9 @@ "google/cloud-workflows": "0.4.2", "google/grafeas": "0.8.3", "google/longrunning": "0.2.6", + "google/shopping-common-protos": "0.2.0", "google/shopping-merchant-inventories": "0.1.1", - "google/shopping-merchant-reports": "0.3.0", - "google/shopping-common-protos": "0.2.0" + "google/shopping-merchant-reports": "0.3.0" }, "suggest": { "opis/closure": "May be used to serialize closures to process jobs in the batch daemon. Please require version ^3.", @@ -359,6 +360,7 @@ "GPBMetadata\\Google\\Cloud\\Support\\": "Support/metadata", "GPBMetadata\\Google\\Cloud\\Talent\\": "Talent/metadata", "GPBMetadata\\Google\\Cloud\\Tasks\\": "Tasks/metadata", + "GPBMetadata\\Google\\Cloud\\Telcoautomation\\": "TelcoAutomation/metadata", "GPBMetadata\\Google\\Cloud\\Texttospeech\\": "TextToSpeech/metadata", "GPBMetadata\\Google\\Cloud\\Tpu\\": "Tpu/metadata", "GPBMetadata\\Google\\Cloud\\Translate\\": "Translate/metadata", @@ -548,6 +550,7 @@ "Google\\Cloud\\Support\\": "Support/src", "Google\\Cloud\\Talent\\": "Talent/src", "Google\\Cloud\\Tasks\\": "Tasks/src", + "Google\\Cloud\\TelcoAutomation\\": "TelcoAutomation/src", "Google\\Cloud\\TextToSpeech\\": "TextToSpeech/src", "Google\\Cloud\\Tpu\\": "Tpu/src", "Google\\Cloud\\Trace\\": "Trace/src",